/*
Theme Name: TheDarkWebsites
Theme URI: https://thedarkwebsites.com/
Author: TheDarkWebsites.com
Description: A fast, privacy-first dark theme for a directory of verified official onion mirrors. Fully responsive and built mobile-first, with copy-to-clipboard onion address cards, no external fonts, no trackers and no jQuery.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thedarkwebsites
Tags: dark, one-column, custom-menu, custom-logo, editor-style, featured-images, accessibility-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--bg: #07070b;
	--bg-2: #0c0c13;
	--surface: #11111a;
	--surface-2: #171724;
	--border: #23233a;
	--border-strong: #34345a;
	--text: #e8e8f2;
	--text-soft: #c4c4d6;
	--muted: #8f8faa;
	--accent: #a970ff;
	--accent-strong: #c49bff;
	--accent-glow: rgba(169, 112, 255, 0.35);
	--term: #3dffa2;
	--term-dim: rgba(61, 255, 162, 0.12);
	--warn: #ffb547;
	--danger: #ff5c7a;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	--radius: 14px;
	--radius-sm: 9px;
	--wrap: 1120px;
	--prose: 720px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 64px;

	--step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
	--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
	--step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
	--step-2: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
	--step-3: clamp(1.65rem, 1.35rem + 1.4vw, 2.4rem);
	--step-4: clamp(2.1rem, 1.5rem + 3vw, 3.9rem);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
	color-scheme: dark;
}

body {
	margin: 0;
	background-color: var(--bg);
	background-image:
		radial-gradient(900px 500px at 85% -10%, rgba(169, 112, 255, 0.16), transparent 60%),
		radial-gradient(700px 420px at -10% 30%, rgba(61, 255, 162, 0.06), transparent 60%);
	background-repeat: no-repeat;
	color: var(--text);
	font-family: var(--font);
	font-size: var(--step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
	color: var(--accent-strong);
	text-decoration: underline;
	text-decoration-color: rgba(196, 155, 255, 0.4);
	text-underline-offset: 3px;
	transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: #fff; text-decoration-color: var(--accent); }

:focus-visible {
	outline: 2px solid var(--term);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4, h5, h6 {
	color: #fff;
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 0 0 .6em;
	font-weight: 750;
	text-wrap: balance;
}

p { margin: 0 0 1.15em; }

code, kbd, samp, pre { font-family: var(--mono); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--surface-2); clip: auto !important; clip-path: none;
	color: #fff; display: block; font-size: 1rem; height: auto;
	left: 12px; top: 12px; padding: 12px 18px; width: auto; z-index: 100000;
	border-radius: var(--radius-sm);
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(52, 52, 90, 0.55);
}
/* Blur lives on a pseudo-element so the fixed mobile menu is positioned
   against the viewport, not trapped inside the header. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(7, 7, 11, 0.8);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	text-decoration: none;
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	min-width: 0;
	min-height: 44px;
}
.brand:hover { color: #fff; }
.brand__mark {
	flex: 0 0 auto;
	width: 34px; height: 34px;
	display: grid; place-items: center;
	border-radius: 10px;
	background: linear-gradient(145deg, #2a1650, #120a24);
	border: 1px solid #3c2670;
	box-shadow: 0 0 18px var(--accent-glow);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__name span { color: var(--accent-strong); }
.custom-logo-link img { max-height: 40px; width: auto; }
@media (max-width: 360px) {
	.brand { font-size: .94rem; gap: 8px; }
	.brand__mark { width: 30px; height: 30px; }
}

/* Navigation */
.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: #fff;
	cursor: pointer;
	padding: 0;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	content: "";
	display: block;
	width: 18px; height: 2px;
	background: currentColor;
	border-radius: 2px;
	position: relative;
	transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}
.primary-nav a {
	display: block;
	padding: 9px 13px;
	border-radius: 9px;
	color: var(--text-soft);
	text-decoration: none;
	font-size: .95rem;
	font-weight: 550;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: #fff; background: var(--surface-2); }
.primary-nav .menu-cta > a {
	background: var(--accent);
	color: #fff;
	margin-left: 6px;
}
.primary-nav .menu-cta > a:hover { background: var(--accent-strong); color: #120a24; }
.primary-nav .sub-menu { display: none; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.primary-nav {
		position: fixed;
		inset: var(--header-h) 0 auto 0;
		background: #09090f;
		box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
		border-bottom: 1px solid var(--border);
		padding: 10px var(--gutter) 22px;
		max-height: calc(100dvh - var(--header-h));
		overflow-y: auto;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .primary-nav { inset-block-start: calc(var(--header-h) + 46px); }
	.primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.primary-nav a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid rgba(35,35,58,.6); border-radius: 0; }
	.primary-nav .menu-cta > a { margin: 12px 0 0; border-radius: 12px; text-align: center; border: 0; }
	.primary-nav .sub-menu { display: block; padding-left: 14px; }
	body.nav-open { overflow: hidden; }
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn,
.wp-block-button__link,
button.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 22px;
	border-radius: 12px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--primary,
.wp-block-button__link {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 8px 28px -10px var(--accent-glow);
}
.btn--primary:hover,
.wp-block-button__link:hover { background: var(--accent-strong); color: #120a24; }
.btn--ghost,
.is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border-color: var(--border-strong);
	box-shadow: none;
}
.btn--ghost:hover,
.is-style-outline .wp-block-button__link:hover { border-color: var(--accent); color: #fff; background: rgba(169,112,255,.08); }

/* ==========================================================================
   5. Hero
   ========================================================================== */
.hero {
	position: relative;
	padding: clamp(48px, 9vw, 110px) 0 clamp(16px, 3vw, 32px);
	overflow: hidden;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(169,112,255,.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(169,112,255,.07) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 30%, transparent 75%);
	pointer-events: none;
}
.hero__inner { position: relative; max-width: 820px; }
.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--term-dim);
	border: 1px solid rgba(61,255,162,.28);
	color: var(--term);
	font-family: var(--mono);
	font-size: .78rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: 22px;
}
.hero__eyebrow .dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--term);
	box-shadow: 0 0 10px var(--term);
	animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.hero__title {
	font-size: var(--step-4);
	line-height: 1.05;
	letter-spacing: -0.035em;
	margin-bottom: 20px;
}
.hero__title em {
	font-style: normal;
	background: linear-gradient(92deg, var(--accent-strong), #7d5cff 55%, var(--term));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.hero__lead {
	font-size: var(--step-1);
	color: var(--text-soft);
	max-width: 640px;
	margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust {
	margin-top: 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: var(--step--1);
}
.hero__trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--term); flex: 0 0 auto; }

@media (max-width: 520px) {
	.hero__actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   6. Sections
   ========================================================================== */
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section--alt {
	background: linear-gradient(180deg, transparent, rgba(17,17,26,.65) 12%, rgba(17,17,26,.65) 88%, transparent);
}
.section__head { max-width: 720px; margin-bottom: 30px; }
.section__kicker {
	font-family: var(--mono);
	font-size: .78rem;
	color: var(--term);
	text-transform: uppercase;
	letter-spacing: .08em;
	margin-bottom: 10px;
	display: block;
}
.section__title { font-size: var(--step-3); }
.section__intro { color: var(--text-soft); }

/* Notice */
.notice {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 16px;
	border-radius: var(--radius-sm);
	background: rgba(255, 181, 71, 0.08);
	border: 1px solid rgba(255, 181, 71, 0.3);
	color: #ffe2b5;
	font-size: var(--step--1);
	margin-bottom: 28px;
}
.notice svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--warn); margin-top: 2px; }
.notice p { margin: 0; }

/* ==========================================================================
   7. Mirror cards
   ========================================================================== */
.mirror-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mirror-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
	border: 1px solid var(--border);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
	min-width: 0;
}
.mirror-card:hover {
	border-color: var(--border-strong);
	box-shadow: 0 18px 40px -24px var(--accent-glow);
}
.mirror-card__top { display: flex; align-items: center; gap: 12px; }
.mirror-card__icon {
	width: 42px; height: 42px;
	flex: 0 0 auto;
	border-radius: 11px;
	display: grid; place-items: center;
	background: #1d1730;
	border: 1px solid #33285a;
	color: var(--accent-strong);
	font-weight: 800;
	font-size: 1.05rem;
	overflow: hidden;
}
.mirror-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.mirror-card__name { font-size: var(--step-1); margin: 0; line-height: 1.25; }
.badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 3px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--term);
}
.badge svg { width: 13px; height: 13px; }
.badge--warn { color: var(--warn); }

.onion {
	position: relative;
	border-radius: var(--radius-sm);
	background: #05050a;
	border: 1px solid #1f2a25;
	overflow: hidden;
}
.onion__label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 7px 12px;
	font-family: var(--mono);
	font-size: .7rem;
	color: var(--muted);
	border-bottom: 1px solid #16201b;
	background: #080c0a;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.onion__label .lock { color: var(--term); display: inline-flex; gap: 5px; align-items: center; }
.onion__label .lock svg { width: 12px; height: 12px; }
.onion__addr {
	display: block;
	padding: 12px;
	font-family: var(--mono);
	font-size: .86rem;
	line-height: 1.55;
	color: var(--term);
	word-break: break-all;
	overflow-wrap: anywhere;
	-webkit-user-select: all;
	user-select: all;
	text-shadow: 0 0 12px rgba(61,255,162,.25);
}
.onion__actions {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 0 12px 12px;
}
.copy-btn {
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid rgba(61,255,162,.35);
	background: var(--term-dim);
	color: var(--term);
	font: inherit;
	font-weight: 700;
	font-size: .92rem;
	cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	transition: background .15s ease, color .15s ease;
}
.copy-btn:hover { background: var(--term); color: #04140c; }
.copy-btn.is-copied { background: var(--term); color: #04140c; }
.copy-btn svg { width: 16px; height: 16px; }
.open-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 0 16px;
	border-radius: 10px;
	border: 1px solid rgba(169,112,255,.45);
	background: rgba(169,112,255,.12);
	color: var(--accent-strong);
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	text-decoration: none;
	font-size: .92rem;
	font-weight: 700;
	transition: background .15s ease, color .15s ease;
}
.open-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.open-btn svg { width: 16px; height: 16px; }

.mirror-card__desc { color: var(--text-soft); font-size: .97rem; }
.mirror-card__desc p:last-child { margin-bottom: 0; }
.mirror-card__meta {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed var(--border);
	font-size: var(--step--1);
	color: var(--muted);
}
.mirror-card__meta strong { color: var(--text-soft); font-weight: 650; }

/* ==========================================================================
   8. Steps / feature strip
   ========================================================================== */
.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 14px;
	counter-reset: step;
	list-style: none;
	padding: 0;
	margin: 0;
}
.steps li {
	counter-increment: step;
	padding: 20px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text-soft);
	font-size: .97rem;
}
.steps li::before {
	content: "0" counter(step);
	display: block;
	font-family: var(--mono);
	color: var(--accent-strong);
	font-size: .85rem;
	margin-bottom: 8px;
}
.steps li strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 4px; }

/* ==========================================================================
   9. Prose (page content from the editor)
   ========================================================================== */
.prose {
	max-width: var(--prose);
	margin-inline: auto;
	color: var(--text-soft);
}
.prose > * + * { margin-top: 0; }
.prose h2 {
	font-size: var(--step-3);
	margin-top: 2.2em;
	padding-top: 1.2em;
	border-top: 1px solid var(--border);
	position: relative;
}
.prose h2::before {
	content: "";
	position: absolute;
	top: -1px; left: 0;
	width: 64px; height: 2px;
	background: linear-gradient(90deg, var(--accent), var(--term));
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose > h2:first-child::before { display: none; }
.prose h3 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h4 { font-size: var(--step-1); margin-top: 1.6em; }
.prose strong { color: #fff; }

.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .55em; padding-left: .2em; }
.prose ul li::marker { color: var(--accent); }
.prose ol { counter-reset: none; }
.prose ol li::marker { color: var(--term); font-family: var(--mono); font-weight: 700; }

.prose :not(pre) > code {
	background: #05050a;
	color: var(--term);
	border: 1px solid #1f2a25;
	padding: .15em .45em;
	border-radius: 6px;
	font-size: .86em;
	word-break: break-all;
	overflow-wrap: anywhere;
}
.prose pre, .wp-block-code {
	background: #05050a;
	border: 1px solid #1f2a25;
	color: var(--term);
	padding: 16px;
	border-radius: var(--radius-sm);
	overflow-x: auto;
	font-size: .88rem;
	white-space: pre-wrap;
	word-break: break-all;
}
.prose blockquote, .wp-block-quote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--accent);
	color: var(--text);
	font-size: var(--step-1);
}
.prose hr, .wp-block-separator {
	border: 0;
	height: 1px;
	background: var(--border);
	margin: 2.4em 0;
}
.prose table, .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
}
.wp-block-table { overflow-x: auto; margin: 0 0 1.4em; }
.prose th, .prose td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
}
.prose th { color: #fff; background: var(--surface); }

/* FAQ: works with the core Details block or plain <details> */
.prose details, .wp-block-details {
	border: 1px solid var(--border);
	background: var(--surface);
	border-radius: var(--radius-sm);
	margin: 0 0 10px;
	padding: 0;
	overflow: hidden;
}
.prose summary, .wp-block-details summary {
	cursor: pointer;
	list-style: none;
	padding: 16px 48px 16px 18px;
	color: #fff;
	font-weight: 650;
	position: relative;
	min-height: 52px;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after, .wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 18px; top: 50%;
	transform: translateY(-50%);
	font-family: var(--mono);
	font-size: 1.3rem;
	color: var(--accent-strong);
	transition: transform .2s ease;
}
.prose details[open] summary::after, .wp-block-details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.prose details > :not(summary), .wp-block-details > :not(summary) { padding: 0 18px; }
.prose details > :last-child:not(summary) { padding-bottom: 16px; }

/* Alignments */
.alignwide { max-width: min(var(--wrap), 100vw - 2 * var(--gutter)); margin-inline: auto; }
.prose .alignwide { width: min(var(--wrap) - 2 * var(--gutter), 100vw - 2 * var(--gutter)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; margin: 0 0 1em; } }
.wp-block-image img { border-radius: var(--radius-sm); }
.wp-block-image figcaption, .wp-caption-text { color: var(--muted); font-size: var(--step--1); text-align: center; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0; }
.wp-block-columns { gap: 20px; }

/* ==========================================================================
   10. Disclaimer, archive, posts
   ========================================================================== */
.disclaimer {
	max-width: var(--prose);
	margin: 0 auto;
	padding: 22px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--muted);
	font-size: var(--step--1);
}
.disclaimer h2 { font-size: 1rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.disclaimer p:last-child { margin-bottom: 0; }

.page-header { padding: clamp(36px, 7vw, 72px) 0 10px; }
.page-title { font-size: var(--step-4); line-height: 1.08; letter-spacing: -0.03em; margin: 0; }
.entry-meta { color: var(--muted); font-size: var(--step--1); margin-top: 12px; font-family: var(--mono); }

.post-list { display: grid; gap: 16px; padding: 0; list-style: none; max-width: var(--prose); margin: 0 auto; }
.post-card {
	padding: 22px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
}
.post-card h2 { font-size: var(--step-2); margin-bottom: .3em; }
.post-card h2 a { color: #fff; text-decoration: none; }
.post-card h2 a:hover { color: var(--accent-strong); }
.post-card p { color: var(--text-soft); margin: .6em 0 0; }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; }
.page-numbers {
	min-width: 44px; min-height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	color: var(--text-soft);
	text-decoration: none;
}
.page-numbers.current, .page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.error-404 { text-align: center; padding: clamp(60px, 12vw, 140px) 0; }
.error-404 .code {
	font-family: var(--mono);
	font-size: clamp(4rem, 20vw, 9rem);
	line-height: 1;
	color: var(--term);
	text-shadow: 0 0 30px rgba(61,255,162,.35);
	margin-bottom: 10px;
}

/* Search form */
.search-form { display: flex; gap: 8px; max-width: 480px; margin: 20px auto 0; }
.search-field {
	flex: 1;
	min-height: 48px;
	padding: 0 14px;
	border-radius: 12px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: #fff;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
}
.search-form label { flex: 1; display: flex; }
.search-submit, input[type="submit"] {
	min-height: 48px;
	padding: 0 18px;
	border-radius: 12px;
	border: 0;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.search-submit:hover, input[type="submit"]:hover { background: var(--accent-strong); color: #120a24; }
.error-404 .page-title { margin-bottom: 14px; }

/* Comments (kept simple) */
.comments-area { max-width: var(--prose); margin: 40px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; }
input[type="text"], input[type="email"], input[type="url"], textarea {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: #fff;
	font: inherit;
	font-size: 16px;
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
	margin-top: clamp(40px, 8vw, 90px);
	border-top: 1px solid var(--border);
	background: var(--bg-2);
	padding: 40px 0 calc(28px + env(safe-area-inset-bottom));
	color: var(--muted);
	font-size: var(--step--1);
}
.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 28px;
	align-items: start;
}
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer .brand { margin-bottom: 12px; }
.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 18px;
}
.footer-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 6px 0;
	color: var(--text-soft);
	text-decoration: none;
}
.footer-nav a:hover { color: #fff; }
.site-footer__bottom {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
}
.site-footer__tagline { font-family: var(--mono); color: var(--term); }

/* ==========================================================================
   12. Floating UI
   ========================================================================== */
.toast {
	position: fixed;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom));
	transform: translate(-50%, 20px);
	background: #0f1a14;
	color: var(--term);
	border: 1px solid rgba(61,255,162,.4);
	padding: 12px 18px;
	border-radius: 12px;
	font-weight: 650;
	font-size: .95rem;
	box-shadow: 0 14px 40px rgba(0,0,0,.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 200;
	width: max-content;
	max-width: calc(100vw - 32px);
	text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.to-top {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: calc(16px + env(safe-area-inset-bottom));
	width: 46px; height: 46px;
	border-radius: 50%;
	border: 1px solid var(--border-strong);
	background: rgba(17,17,26,.9);
	color: #fff;
	display: grid; place-items: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s;
	z-index: 40;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   13. Motion & print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	body { background: #fff; color: #000; }
	.site-header, .site-footer, .to-top, .toast, .copy-btn, .open-btn, .hero__actions { display: none !important; }
	.onion__addr { color: #000; text-shadow: none; }
	.mirror-card, .disclaimer { border-color: #999; background: #fff; }
	h1, h2, h3, h4, .mirror-card__name { color: #000; }
}

/* ==========================================================================
   14. Homepage: page content and disclaimer span the full container width,
       matching the hero, mirrors and quick-start sections.
   ========================================================================== */
.tdw-home .prose,
.tdw-home .disclaimer {
	max-width: none;
}
.tdw-home .prose .alignwide {
	width: auto;
	margin-left: 0;
	transform: none;
}
.tdw-home .prose .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none;
}
