/* ==========================================================================
   SYNAPSE — Trusted AI News
   Bold Magazine theme. High contrast, color-coded categories, dark/light.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
	--accent: #3b82f6;     /* primary (AI blue) */
	--accent-2: #10b981;   /* secondary (data center green) */
	--accent-glow: rgba(59, 130, 246, 0.32);

	--font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

	--wrap: 1220px;
	--border-w: 2px;
	--rule-w: 3px;
	--gap: 20px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light theme (default) */
[data-theme="light"] {
	--bg: #ffffff;
	--bg-elev: #f7f7fa;
	--bg-soft: #edeef2;
	--text: #0a0a0f;
	--text-soft: #4f4f5e;
	--text-faint: #86869a;
	--line: #0a0a0f;            /* hard rules use the text color */
	--border: rgba(10, 10, 15, 0.14);
	--card-img-bg: linear-gradient(135deg, #1e3a8a, #0a0a0f);
}

/* Dark theme */
[data-theme="dark"] {
	--bg: #0a0a0f;
	--bg-elev: #15151d;
	--bg-soft: #1c1c26;
	--text: #ffffff;
	--text-soft: #b3b3c0;
	--text-faint: #76768a;
	--line: #ffffff;
	--border: rgba(255, 255, 255, 0.16);
	--card-img-bg: linear-gradient(135deg, #1e3a8a, #0a0a0f);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color .35s var(--ease), color .35s var(--ease);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 .4em; font-weight: 800; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; }
.skip-link:focus { left: 12px; top: 12px; background: var(--accent); color: #fff; padding: 10px 16px; }

/* Magazine doesn't use the neon background grid. */
.bg-grid { display: none; }

/* ---- Buttons & chips ----------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-display); font-weight: 700; font-size: 14px;
	text-transform: uppercase; letter-spacing: .03em;
	padding: 13px 26px; border: var(--border-w) solid var(--line);
	cursor: pointer; transition: all .2s var(--ease); background: transparent; color: var(--text);
	border-radius: 0;
}
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { filter: brightness(1.08); }

/* Category chip — color comes from inline --chip var set per category. */
.cat-chip {
	display: inline-flex; align-items: center;
	font-family: var(--font-display); font-size: 11px; font-weight: 700;
	letter-spacing: .07em; text-transform: uppercase;
	padding: 5px 12px; border-radius: 0;
	background: var(--chip, var(--accent)); color: #fff;
	transition: filter .2s var(--ease);
}
.cat-chip:hover { filter: brightness(1.12); }

.dot-sep { opacity: .5; margin: 0 2px; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--bg);
	border-bottom: var(--rule-w) solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 78px; }
.brand { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.brand__name {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.04em;
	color: var(--text);
}
.brand__logo img { max-height: 48px; width: auto; transition: filter .3s var(--ease); }
[data-theme="dark"] .brand__logo img { filter: brightness(0) invert(1); }
[data-theme="dark"] .footer-brand .brand__logo img { filter: brightness(0) invert(1); }
.brand__dot { width: 12px; height: 12px; border-radius: 0; background: var(--accent); }

/* Built-in logo (no upload needed). currentColor flips it for dark mode. */
.brand__mark { display: inline-flex; align-items: center; color: var(--text); }
.synapse-logo { height: 44px; width: auto; display: block; }
.footer-mark .synapse-logo { height: 48px; }
.brand__kicker { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }

.site-nav .nav-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
	display: inline-block; padding: 9px 14px;
	font-family: var(--font-display); font-weight: 700; font-size: 14px;
	text-transform: uppercase; letter-spacing: .02em; color: var(--text);
	transition: color .18s var(--ease);
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu .current-menu-item > a,
.nav-menu .current-cat > a { color: var(--accent); }
.nav-menu .menu-item-has-children > a::after { content: " \25BE"; font-size: .8em; opacity: .6; }
.nav-menu .sub-menu {
	position: absolute; list-style: none; margin: 10px 0 0; padding: 6px;
	background: var(--bg); border: var(--border-w) solid var(--line);
	min-width: 210px; opacity: 0; visibility: hidden;
	transform: translateY(6px); transition: all .18s var(--ease); z-index: 50;
}
.nav-menu li { position: relative; }
.nav-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .sub-menu a { display: block; text-transform: none; letter-spacing: 0; font-weight: 600; }
.nav-menu .sub-menu a:hover { background: var(--accent); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 0;
	border: var(--border-w) solid var(--line); background: transparent; color: var(--text);
	cursor: pointer; transition: all .18s var(--ease);
}
.icon-btn:hover { background: var(--text); color: var(--bg); }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: currentColor; transition: .25s var(--ease); }

.header-search { border-top: var(--border-w) solid var(--line); padding: 16px 0; }
.header-search .wrap { padding-top: 0; padding-bottom: 0; }

/* ---- Search form --------------------------------------------------------- */
.search-form { display: flex; align-items: center; gap: 0; position: relative; max-width: 560px; }
.search-field {
	flex: 1; width: 100%; font-family: var(--font-body); font-size: 16px;
	padding: 13px 16px; border-radius: 0; border: var(--border-w) solid var(--line);
	background: var(--bg); color: var(--text);
}
.search-field:focus { outline: none; border-color: var(--accent); }
.search-submit {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 50px; height: 50px; border-radius: 0; border: var(--border-w) solid var(--line); border-left: none;
	cursor: pointer; background: var(--accent); color: #fff;
}

/* ---- Main spacing -------------------------------------------------------- */
.site-main { padding: 36px 24px 80px; }

/* ---- Magazine lead block ------------------------------------------------- */
.mag-grid {
	display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap);
	margin-bottom: 52px;
}
.big {
	display: flex; flex-direction: column; color: var(--text);
	border: var(--border-w) solid var(--line); overflow: hidden; background: var(--bg);
	transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.big:hover { transform: translateY(-4px); box-shadow: 10px 10px 0 var(--accent); }
.big__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--card-img-bg); overflow: hidden; }
.big__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.big:hover .big__media img { transform: scale(1.03); }
.big .ph { position: absolute; inset: 0; background: var(--card-img-bg); }
.big .ph::after {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.35), transparent 60%),
				radial-gradient(circle at 75% 70%, rgba(16,185,129,.3), transparent 60%);
}
.big__caption { display: block; padding: 24px 28px 28px; }
.big__title { display: block; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; margin: 14px 0 12px; max-width: 22ch; }
.big:hover .big__title { color: var(--accent); }
.big__caption .cat-chip { margin-bottom: 4px; }
.big__caption .card__meta { color: var(--text-faint); }

.stack { display: flex; flex-direction: column; gap: var(--gap); }
.mini {
	color: var(--text);
	border: var(--border-w) solid var(--line); padding: 22px 22px; flex: 1;
	display: flex; flex-direction: column; justify-content: center;
	transition: background .2s var(--ease);
}
.mini:hover { background: var(--bg-elev); }
.mini .cat-chip { align-self: flex-start; }
.mini__title { display: block; font-family: var(--font-display); font-size: 20px; margin: 10px 0 10px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.mini:hover .mini__title { color: var(--accent); }

/* ---- Section heads ------------------------------------------------------- */
.section-head { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.section-title {
	font-family: var(--font-display); font-size: 13px; font-weight: 800;
	text-transform: uppercase; letter-spacing: .1em;
	background: var(--text); color: var(--bg); padding: 9px 16px; margin: 0; flex: none;
}
.section-rule { flex: 1; height: var(--rule-w); background: var(--line); }
.section-more {
	flex: none; font-family: var(--font-display); font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; color: var(--text);
	padding-left: 16px; transition: color .2s var(--ease);
}
.section-more:hover { color: var(--accent); }

/* ---- Stretched link: makes a whole card clickable via one title link ----- */
.stretch::after {
	content: ""; position: absolute; inset: 0; z-index: 1;
}
/* Elements that must stay clickable above the stretched link. */
.card__media .cat-chip,
.big__caption .cat-chip,
.mini .cat-chip { position: relative; z-index: 2; }

/* ---- Card grid ----------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: var(--gap); }
.card {
	position: relative;
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--bg); border: var(--border-w) solid var(--line);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--accent); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--card-img-bg); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__media .cat-chip { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card__placeholder { position: absolute; inset: 0; background: var(--card-img-bg); }
.card__placeholder::after {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.3), transparent 60%),
				radial-gradient(circle at 75% 70%, rgba(16,185,129,.26), transparent 60%);
}
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 19px; font-weight: 800; line-height: 1.22; margin: 0; }
.card:hover .card__title a { color: var(--accent); }
.card__excerpt { color: var(--text-soft); font-size: 15px; margin: 0; flex: 1; }
.card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }

.feed-section { margin-bottom: 40px; }
.feed-cta { display: flex; justify-content: center; margin-top: 44px; }

/* ---- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	* { animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Archive heads ------------------------------------------------------- */
.archive-head { margin-bottom: 36px; max-width: 820px; border-left: 8px solid var(--accent); padding-left: 20px; }
.archive-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.archive-title { font-size: clamp(32px, 4.5vw, 52px); margin: 8px 0 10px; }
.archive-desc { color: var(--text-soft); }

/* ---- Single article ------------------------------------------------------ */
.single-article { max-width: 820px; margin: 0 auto; }
.single-header { margin-bottom: 26px; }
.single-cats { margin-bottom: 16px; }
.single-title { font-size: clamp(32px, 4.6vw, 54px); margin: 0 0 20px; line-height: 1.05; }
.single-meta { display: flex; align-items: center; gap: 12px; }
.single-avatar { border-radius: 0; border: var(--border-w) solid var(--line); }
.single-byline { display: flex; flex-direction: column; }
.by-author { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.by-detail { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }

/* Featured image: capped height so it frames the story without dominating it. */
.single-featured { margin: 0 0 36px; border: var(--border-w) solid var(--line); overflow: hidden; max-height: 460px; }
.single-featured img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; }

.single-content { font-size: 18px; line-height: 1.8; color: var(--text); }
.single-content > * { margin-bottom: 1.35em; }
/* First paragraph gets a slightly larger lead-in for an editorial feel. */
.single-content > p:first-of-type { font-size: 20px; line-height: 1.7; color: var(--text); }
.single-content h2 { font-size: 30px; margin-top: 1.7em; }
.single-content h3 { font-size: 23px; margin-top: 1.4em; }
.single-content p { max-width: 70ch; }
.single-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.single-content a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.single-content img { border: var(--border-w) solid var(--line); }
.single-content blockquote {
	margin: 1.6em 0; padding: 18px 24px; border: none; border-left: 8px solid var(--accent);
	background: var(--bg-elev);
	font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text);
}
.single-content code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-elev); padding: 2px 7px; }
.single-content pre { background: var(--bg-elev); padding: 18px 20px; overflow-x: auto; border: var(--border-w) solid var(--line); }
.single-content ul, .single-content ol { padding-left: 1.4em; }
.single-content li { margin-bottom: .5em; }

.single-tags { max-width: 820px; margin: 32px auto 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.single-tags a { font-family: var(--font-mono); font-size: 12px; padding: 5px 12px; border: var(--border-w) solid var(--line); color: var(--text-soft); }
.single-tags a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tags-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-right: 4px; }

.single-footer { max-width: 820px; margin: 30px auto 0; padding-top: 26px; border-top: var(--rule-w) solid var(--line); }
.share { display: flex; align-items: center; gap: 10px; }
.share__label { font-family: var(--font-display); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }

.related { margin-top: 70px; }

/* ---- Reading progress ---------------------------------------------------- */
.reading-progress-wrap { position: sticky; top: 78px; height: 3px; z-index: 90; background: transparent; }
.reading-progress { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---- Pagination ---------------------------------------------------------- */
.synapse-pagination, .pagination { margin-top: 56px; }
.synapse-pagination .nav-links, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.synapse-pagination .page-numbers, .pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 14px;
	font-family: var(--font-mono); font-size: 14px; border-radius: 0;
	border: var(--border-w) solid var(--line); background: var(--bg); color: var(--text); transition: all .18s var(--ease);
}
.synapse-pagination .page-numbers:hover, .pagination .page-numbers:hover { background: var(--text); color: var(--bg); }
.synapse-pagination .page-numbers.current, .pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Comments ------------------------------------------------------------ */
.comments-area { max-width: 820px; margin: 60px auto 0; padding-top: 40px; border-top: var(--rule-w) solid var(--line); }
.comments-title, .comment-reply-title { font-size: 26px; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .comment-body { padding: 18px 20px; margin-bottom: 16px; border: var(--border-w) solid var(--line); }
.comment-list .children { list-style: none; margin-left: 28px; }
.comment-author .fn { font-family: var(--font-display); font-weight: 700; }
.comment-form { display: grid; gap: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; font-family: var(--font-body); font-size: 16px; padding: 12px 14px;
	border-radius: 0; border: var(--border-w) solid var(--line); background: var(--bg); color: var(--text);
}
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--accent); }

/* ---- 404 ----------------------------------------------------------------- */
.error-404 { text-align: center; max-width: 560px; margin: 60px auto; }
.error-code { font-family: var(--font-display); font-size: clamp(80px, 15vw, 150px); font-weight: 800; line-height: 1; color: var(--accent); }
.error-title { font-size: 32px; margin-top: 10px; }
.error-text { color: var(--text-soft); }
.error-actions { display: flex; flex-direction: column; gap: 16px; align-items: center; margin-top: 24px; }
.error-actions .search-form { width: 100%; }

.no-results { color: var(--text-soft); font-size: 18px; }
.no-results-form { max-width: 480px; margin-top: 16px; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top: var(--rule-w) solid var(--line); background: var(--bg-elev); margin-top: 60px; }
.footer-top {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 56px; align-items: start;
	padding-top: 56px; padding-bottom: 48px;
}
.footer-col { min-width: 0; }
.footer-brand .brand__logo img { max-height: 54px; width: auto; margin-bottom: 18px; }
.footer-brand .brand__name { margin-bottom: 16px; }
.footer-about { color: var(--text-soft); font-size: 15px; line-height: 1.7; max-width: 42ch; margin: 0; }

.footer-heading {
	font-family: var(--font-display); font-size: 12px; font-weight: 800;
	text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint);
	margin: 0 0 18px; padding-bottom: 12px; border-bottom: var(--border-w) solid var(--line);
}
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-list a { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.footer-list a:hover { color: var(--accent); }
.footer-dot { width: 9px; height: 9px; flex: none; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 22px; padding-bottom: 30px; border-top: var(--border-w) solid var(--line); font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.footer-bottom p { margin: 0; }
.footer-totop { background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); padding: 0; }
.footer-totop:hover { color: var(--accent); }

/* ---- Trending ticker ----------------------------------------------------- */
.ticker { border-bottom: var(--border-w) solid var(--line); background: var(--bg); overflow: hidden; }
.ticker__wrap { display: flex; align-items: stretch; gap: 0; min-height: 46px; }
.ticker__label {
	flex: none; display: inline-flex; align-items: center;
	font-family: var(--font-display); font-weight: 800; font-size: 12px;
	letter-spacing: .12em; text-transform: uppercase;
	background: var(--accent); color: #fff; padding: 0 16px; margin-left: -24px;
}
.ticker__viewport { position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; margin-left: 16px; }
.ticker__viewport::after {
	content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 60px;
	background: linear-gradient(to right, transparent, var(--bg));
	pointer-events: none;
}
.ticker__track {
	display: inline-flex; align-items: center; white-space: nowrap;
	animation: synapse-ticker 60s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display); font-weight: 600; font-size: 14px;
	color: var(--text); padding: 0 26px;
}
.ticker__item:hover { color: var(--accent); }
.ticker__dot { width: 7px; height: 7px; background: var(--accent); flex: none; }
@keyframes synapse-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Category section blocks --------------------------------------------- */
.cat-section { margin-bottom: 48px; }
.section-title--cat {
	font-family: var(--font-display); font-size: 13px; font-weight: 800;
	text-transform: uppercase; letter-spacing: .1em;
	background: var(--accent); color: #fff; padding: 9px 16px; flex: none;
}
.cat-section .section-rule { background: var(--accent); }

/* ---- Table of contents --------------------------------------------------- */
.toc {
	max-width: 820px; margin: 0 auto 36px; padding: 22px 24px;
	border: var(--border-w) solid var(--line); border-left: 8px solid var(--accent);
	background: var(--bg-elev);
}
.toc__label {
	display: block; font-family: var(--font-display); font-weight: 800;
	font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
	color: var(--text-faint); margin-bottom: 12px;
}
.toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.toc__list a { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); }
.toc__list a:hover { color: var(--accent); }
.toc__sub { padding-left: 18px; }
.toc__sub a { font-weight: 500; font-size: 14px; color: var(--text-soft); }
/* Smooth-scroll offset so headings clear the sticky header. */
.single-content h2, .single-content h3 { scroll-margin-top: 100px; }

/* ---- Back to top --------------------------------------------------------- */
.back-to-top {
	position: fixed; right: 22px; bottom: 22px; z-index: 95;
	width: 48px; height: 48px; border-radius: 0;
	border: var(--border-w) solid var(--line); background: var(--bg); color: var(--text);
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	opacity: 0; transform: translateY(10px); transition: opacity .25s var(--ease), transform .25s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.back-to-top.is-visible { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.ticker__track { animation: none !important; }
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
	.mag-grid { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.brand__kicker { display: none; }
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: fixed; inset: 78px 0 auto 0; z-index: 99;
		background: var(--bg); border-bottom: var(--rule-w) solid var(--line);
		max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
	}
	.nav-open .site-nav { max-height: 75vh; overflow-y: auto; }
	.site-nav .nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px; }
	.nav-menu a { padding: 15px 16px; border-bottom: 1px solid var(--border); }
	.nav-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: none; padding-left: 14px; margin: 0; }
	.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
	.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
	.site-main { padding-top: 26px; }
	.big__caption { padding: 20px 20px 22px; }
	.footer-top { grid-template-columns: 1fr; gap: 36px; }
	.reading-progress-wrap { top: 70px; }
	.card:hover { box-shadow: 5px 5px 0 var(--accent); }
	.ticker__label { margin-left: -24px; padding: 0 12px; font-size: 11px; }
	.toc { margin-left: 0; margin-right: 0; }
	.back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

@media (max-width: 480px) {
	.card-grid { grid-template-columns: 1fr; }
	.section-more { display: none; }
}
