/* ==========================================================================
   Yuga Yathra — main stylesheet
   ========================================================================== */

:root {
	--bg: #F4F4F1;
	--card: #FFFFFF;
	--ink: #0E1116;
	--muted: #4D5360;
	--line: #E2E2DC;
	--line-soft: #ECECE7;
	--chip-bg: #E6E6E0;
	--dark: #2A2D33;
	--dark-2: #1F232B;
	--soft: #D9DCE2;
	--accent: #F2541B;
	--accent-ink: #B7380B;
	--accent-ring: #FCD9CB;

	--font-si: "Noto Sans Sinhala", "Iskoola Pota", sans-serif;
	--font-display: "Space Grotesk", "Noto Sans Sinhala", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;

	--r-sm: 12px;
	--r-md: 20px;
	--r-lg: 28px;
	--r-xl: 32px;
	--pad: 32px;
	--max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-si);
	font-size: 17px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 6px;
}

h1, h2, h3, h4 { line-height: 1.35; margin: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 12px; top: -60px;
	z-index: 100;
	background: var(--ink);
	color: #fff;
	padding: 10px 16px;
	border-radius: 999px;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: 64px; padding-bottom: 64px; }
.section-tight { padding-top: 20px; padding-bottom: 20px; }

.mono { font-family: var(--font-mono); }
.mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.accent { color: var(--accent-ink); }
.empty { color: var(--muted); }

/* ---------- Buttons & chips ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	border: 0;
	font-family: var(--font-si);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
}
.btn-sm { min-height: 42px; padding: 0 16px; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #DF4610; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262A31; color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bg); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.icon-btn {
	width: 48px; height: 48px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--card);
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: none;
}
.icon-btn:hover { border-color: var(--ink); }

.chip {
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	line-height: 1.4;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--line);
	color: var(--ink);
}
.chip-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.link-underline { font-weight: 700; font-size: 15px; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 20; }
.has-solid-header .site-header { background: var(--card); border-bottom: 1px solid var(--line); }

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
	width: 44px; height: 44px;
	border-radius: 14px;
	background: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.brand-logo { max-height: 44px; width: auto; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }

.pill-nav {
	list-style: none;
	margin: 0;
	padding: 4px;
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 999px;
}
.primary-nav { min-width: 0; }
.pill-nav a {
	white-space: nowrap;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	font-size: 15px;
	font-weight: 500;
}
.pill-nav a:hover { background: var(--bg); color: var(--ink); }
.pill-nav .current-menu-item > a,
.pill-nav .current_page_item > a { background: var(--ink); color: #fff; }

.header-actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; }

.site-search { border-top: 1px solid var(--line); background: var(--card); padding: 16px 0; }

.search-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px; }
.search-field {
	flex: 1 1 240px;
	min-height: 48px;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0 20px;
	font-family: var(--font-si);
	font-size: 16px;
	background: var(--card);
	color: var(--ink);
}

/* ---------- Hero slider ---------- */

.hero { padding-top: 12px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 14px; }
.hero-stage {
	position: relative;
	height: 580px;
	border-radius: var(--r-xl);
	overflow: hidden;
	background: var(--dark);
	color: #fff;
}
.hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility .6s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(14,17,22,.88) 0%, rgba(14,17,22,.55) 45%, rgba(14,17,22,.05) 100%);
}
.hero-body {
	position: absolute;
	left: 0; right: 220px; bottom: 0;
	padding: 40px 44px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}
.hero-title { font-weight: 800; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.3; letter-spacing: -0.02em; color: #fff; }
.hero-ex { margin: 0; font-size: 18px; line-height: 1.7; color: #E4E6EA; max-width: 680px; }
.hero-body .btn { margin-top: 6px; }

.hero-controls {
	position: absolute;
	right: 44px; bottom: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	z-index: 2;
}
.hero-counter { font-size: 14px; color: #E4E6EA; }
.round-btn {
	width: 52px; height: 52px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.round-btn--ghost { border: 1px solid #fff; background: transparent; color: #fff; }
.round-btn--ghost:hover { background: rgba(255,255,255,.12); }
.round-btn--accent { border: 0; background: var(--accent); color: var(--ink); }

.hero-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hero-thumb {
	text-align: left;
	min-height: 76px;
	border: 0;
	border-top: 3px solid #D4D4CC;
	border-radius: 4px 4px 16px 16px;
	background: #ECECE7;
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
	color: var(--ink);
	font-family: var(--font-si);
}
.hero-thumb .mono { font-size: 12px; color: var(--accent-ink); }
.hero-thumb-title { font-weight: 700; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-thumb.is-active { background: var(--card); border-top-color: var(--accent); }

/* ---------- Timeline ---------- */

.timeline {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 22px 26px 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.timeline--flat { background: transparent; border: 0; border-radius: 0; padding: 14px 0 10px; }
.timeline-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.timeline-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.timeline-here { font-size: 14px; font-weight: 700; }
.timeline-here strong { color: var(--accent-ink); }
.timeline-head .link-underline { font-size: 14px; }

.timeline-scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.timeline-track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	min-width: max(100%, calc(var(--tl-count, 8) * 150px));
}
.tl-item { flex: 1 1 0; min-width: 0; }
.tl-item a { display: flex; flex-direction: column; gap: 8px; padding-right: 10px; color: var(--ink); }
.tl-item a:hover .tl-name { color: var(--accent-ink); }
.tl-rail { display: flex; align-items: center; height: 22px; }
.tl-dot {
	width: 12px; height: 12px;
	margin-left: 2px;
	border-radius: 999px;
	background: #fff;
	border: 2.5px solid var(--ink);
	flex: none;
}
.tl-line { height: 2px; background: #D4D4CC; flex: 1; margin-left: 6px; }
.tl-item:last-child .tl-line { background: linear-gradient(to right, #D4D4CC, transparent); }
.tl-when { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; color: var(--accent-ink); }
.tl-name { font-size: 16px; font-weight: 800; line-height: 1.4; }
.tl-note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.tl-you { font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.tl-item.is-current .tl-dot {
	width: 22px; height: 22px;
	margin-left: 0;
	background: var(--accent);
	border: 0;
	box-shadow: 0 0 0 5px var(--accent-ring);
}
.tl-item.is-current .tl-name {
	align-self: flex-start;
	background: var(--ink);
	color: #fff;
	padding: 4px 10px;
	border-radius: 10px;
}
.tl-item.is-current a:hover .tl-name { color: #fff; }

/* ---------- Sections & cards ---------- */

.section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 24px;
}
.section-title { font-weight: 800; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.02em; }

.band-white { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s; }
.card:hover { transform: translateY(-2px); border-color: #CFCFC7; }
.card-link { display: flex; flex-direction: column; gap: 12px; padding: 16px; height: 100%; color: var(--ink); }
.card-link:hover { color: var(--ink); }
.card-media { display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--chip-bg); }
.card-img, .card-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-tag { font-size: 12px; color: var(--accent-ink); padding: 0 6px; }
.card-title { font-weight: 800; font-size: 20px; line-height: 1.5; padding: 0 6px 6px; }
.card-link:hover .card-title { color: var(--accent-ink); }

/* Popular tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--bg); border-radius: 999px; padding: 5px; }
.tab {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font-family: var(--font-si);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab-panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.tab-panel[hidden] { display: none; }

.feature-card {
	position: relative;
	min-height: 380px;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--dark);
	color: #fff;
	display: flex;
	align-items: flex-end;
}
.feature-card:hover { color: #fff; }
.feature-img, .feature-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,17,22,.85), rgba(14,17,22,.1) 70%); }
.feature-body { position: relative; padding: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.feature-title { font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; }

.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.rank-n { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--accent-ink); width: 40px; flex: none; line-height: 1.2; }
.rank-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rank-title { font-weight: 800; font-size: 17px; line-height: 1.5; }
.rank-list .btn { margin-top: 16px; align-self: flex-start; min-height: 44px; font-size: 14px; }

/* Civilizations */
.civ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.civ-card {
	border-radius: var(--r-md);
	background: var(--card);
	border: 1px solid var(--line);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 110px;
	color: var(--ink);
}
.civ-card:hover { border-color: var(--ink); color: var(--ink); }
.civ-name { font-weight: 800; font-size: 18px; line-height: 1.4; }

/* Promo cards */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; padding-top: 0; }
.promo { border-radius: var(--r-xl); padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 240px; }
.promo-accent { background: var(--accent); color: var(--ink); }
.promo-accent:hover { color: var(--ink); background: #EA4C13; }
.promo-dark { background: var(--ink); color: #fff; }
.promo-play { width: 56px; height: 56px; border-radius: 999px; background: var(--ink); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.promo-title { font-weight: 800; font-size: 26px; line-height: 1.4; }
.newsletter-form input[type="email"], .newsletter-form input[type="text"] {
	min-height: 50px;
	border-radius: 999px;
	border: 0;
	padding: 0 18px;
	font-family: var(--font-si);
	font-size: 15px;
	width: 100%;
}
.newsletter-form input[type="submit"], .newsletter-form button {
	min-height: 50px;
	border-radius: 999px;
	border: 0;
	padding: 0 24px;
	background: var(--accent);
	color: var(--ink);
	font-weight: 700;
	cursor: pointer;
}

/* ---------- Archive ---------- */

.archive-head { padding-top: 48px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 12px; }
.archive-title { font-weight: 800; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.28; letter-spacing: -0.03em; }
.archive-desc { max-width: 780px; font-size: 18px; color: var(--muted); }
.archive-desc p { margin: 0 0 .6em; }
.archive-search { margin-top: 8px; }
.notfound { display: flex; flex-direction: column; gap: 16px; }

.pagination, .nav-links { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links .page-numbers {
	min-width: 44px; min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 14px;
}
.nav-links .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Timeline page */
.vt { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid #D4D4CC; display: flex; flex-direction: column; gap: 36px; }
.vt-era { position: relative; }
.vt-dot { position: absolute; left: -37px; top: 6px; width: 16px; height: 16px; border-radius: 999px; background: #fff; border: 3px solid var(--ink); }
.vt-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.vt-name { font-size: 26px; font-weight: 800; }
.vt-posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.vt-posts a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); }
.vt-post-title { font-weight: 700; line-height: 1.5; }

/* ---------- Single article ---------- */

.article-head { padding-top: 48px; display: flex; flex-direction: column; gap: 22px; }
.article-title { max-width: 1060px; font-weight: 800; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.28; letter-spacing: -0.03em; }
.article-dek { margin: 0; max-width: 820px; font-size: 21px; line-height: 1.8; color: var(--muted); }

.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.byline-avatar { width: 40px; height: 40px; border-radius: 999px; }
.byline-name { color: var(--ink); font-weight: 700; }
.byline-actions { margin-left: auto; display: flex; gap: 10px; }
.article-audio { width: 100%; max-width: 560px; }
.article-head .timeline { margin-top: 10px; }

.article-figure { margin: 36px auto 0; display: flex; flex-direction: column; gap: 10px; }
.article-img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--r-xl); }
.article-figure figcaption { font-size: 13px; color: var(--muted); padding: 0 8px; }

.article-layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 720px) minmax(260px, 1fr);
	gap: 48px;
	align-items: start;
	padding-top: 56px;
	padding-bottom: 64px;
}

.toc { display: flex; flex-direction: column; gap: 4px; font-size: 14px; position: sticky; top: 24px; }
.toc .mono-label { padding: 0 12px 8px; }
.toc a { min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); line-height: 1.5; }
.toc a:hover, .toc a.is-active { background: var(--ink); color: #fff; }

.entry-content { font-size: 19px; line-height: 2; }
.entry-content > * { margin-top: 0; margin-bottom: 22px; }
.entry-content > p:first-child { font-size: 22px; line-height: 1.9; font-weight: 500; }
.entry-content h2 { font-weight: 800; font-size: 32px; line-height: 1.45; letter-spacing: -0.02em; margin-top: 40px; margin-bottom: 14px; scroll-margin-top: 24px; }
.entry-content h3 { font-weight: 800; font-size: 24px; margin-top: 32px; margin-bottom: 10px; }
.entry-content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--r-md); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .wp-element-caption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.entry-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--accent);
	font-size: 22px;
	line-height: 1.8;
}
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }

.yuga-fact { border-radius: 24px; background: var(--ink); color: #fff; padding: 28px; font-size: 17px; line-height: 1.85; }
.yuga-fact p { margin: 0 0 .6em; }
.yuga-fact p:last-child { margin-bottom: 0; }
.yuga-fact-title { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 8px; }
.entry-content .yuga-fact a { color: var(--accent); }

.box { border-radius: 24px; background: var(--card); border: 1px solid var(--line); padding: 22px; }
.box h2, .box h3 { font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.sources { margin-top: 12px; }
.sources h2 { font-size: 22px; }
.sources ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.85; color: var(--muted); overflow-wrap: anywhere; }
.sources a { color: var(--accent-ink); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.article-aside { display: flex; flex-direction: column; gap: 16px; }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact-value { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.fact-label { font-size: 13px; color: var(--muted); line-height: 1.5; }
.glossary dl { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.7; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0; color: var(--muted); }
.yt-card { display: flex; flex-direction: column; gap: 6px; background: var(--accent); border-color: var(--accent); color: var(--ink); }
.yt-card:hover { color: var(--ink); background: #EA4C13; }
.yt-title { font-weight: 800; font-size: 18px; line-height: 1.5; }

.neighbors { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; padding-bottom: 64px; }
.neighbor { border-radius: 24px; background: var(--card); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.neighbor--next { background: var(--ink); border-color: var(--ink); color: #fff; text-align: right; grid-column: -2; }
.neighbor--next .accent { color: var(--accent); }
.neighbor--next:hover { color: #fff; }
.neighbor-title { font-weight: 800; font-size: 20px; line-height: 1.5; }

.page-body { max-width: 820px; padding-top: 40px; padding-bottom: 64px; }
.page-links { margin-top: 24px; font-family: var(--font-mono); }

/* Comments */
.comments-wrap { max-width: 820px; padding-bottom: 64px; }
.comments-title { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 14px; }
.comment-list .children { list-style: none; padding-left: 24px; margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.comment-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; font-size: 16px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 999px; }
.comment-meta a, .comment-metadata a { font-size: 13px; color: var(--muted); }
.comment-respond { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.comment-reply-title { font-size: 22px; font-weight: 800; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 12px 14px;
	font-family: var(--font-si);
	font-size: 16px;
	background: var(--bg);
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); }
.footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
	padding-top: 28px;
	padding-bottom: 48px;
	font-size: 14px;
	color: var(--muted);
}
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); }

/* Gutenberg alignment helpers */
.alignwide { margin-left: -80px; margin-right: -80px; max-width: none; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
	.article-layout { grid-template-columns: minmax(0, 1fr) 280px; }
	.toc { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; }
	.toc .mono-label { width: 100%; }
	.toc a { background: var(--card); border: 1px solid var(--line); }
	.toc--empty { display: none; }
	.alignwide { margin-left: 0; margin-right: 0; }
}

@media (max-width: 1100px) {
	.menu-toggle { display: inline-flex; }
	.primary-nav { display: none; width: 100%; order: 3; }
	.primary-nav.is-open { display: block; }
	.header-row { flex-wrap: wrap; }
	.pill-nav { border-radius: var(--r-md); flex-direction: column; }
	.pill-nav a { border-radius: var(--r-sm); min-height: 46px; }
}

@media (max-width: 960px) {
	.header-subscribe { display: none; }

	.tab-panel { grid-template-columns: 1fr; }
	.article-layout { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
	:root { --pad: 16px; }
	body { font-size: 16px; }
	.section { padding-top: 44px; padding-bottom: 44px; }
	.brand-mark { width: 38px; height: 38px; border-radius: 12px; }
	.brand-name { font-size: 20px; }
	.icon-btn { width: 44px; height: 44px; }

	.hero-stage { height: 520px; border-radius: 22px; }
	.hero-body { right: 0; padding: 24px 20px 92px; }
	.hero-ex { font-size: 16px; }
	.hero-controls { right: 20px; bottom: 22px; }
	.hero-thumbs { display: none; }

	.timeline { padding: 18px 16px 14px; border-radius: 22px; }
	.feature-card { min-height: 300px; }
	.feature-body { padding: 22px; }

	.article-head { padding-top: 28px; gap: 16px; }
	.article-dek { font-size: 18px; }
	.byline-actions { margin-left: 0; width: 100%; }
	.article-img { border-radius: 22px; }
	.article-layout { padding-top: 32px; }
	.entry-content { font-size: 17px; line-height: 1.95; }
	.entry-content > p:first-child { font-size: 18px; }
	.entry-content h2 { font-size: 24px; }
	.neighbor--next { grid-column: auto; }
	.promo { padding: 26px; }
	.promo-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero-slide, .card { transition: none; }
}
.icon-btn.is-copied { background: var(--accent); border-color: var(--accent); }
