/*
Theme Name: The Hidden Layer
Text Domain: the-hidden-layer
Description: Editorial theme for The Hidden Layer, a science and engineering publication.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

/* ---------- Tokens ---------- */
:root {
	--paper: #f6f5f1;
	--paper-2: #edebe4;
	--white: #ffffff;
	--ink: #0e1a2b;
	--navy: #15284a;
	--charcoal: #33363b;
	--muted: #5b6069;
	--rule: #d9d6cc;
	--rule-strong: #b9b5a8;
	--accent: #b4471f;
	--accent-ink: #8f3615;
	--cat: var(--navy);

	--serif: "Newsreader", Georgia, "Times New Roman", serif;
	--sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--wrap: 1240px;
	--prose: 690px;
	--gutter: clamp(20px, 4vw, 40px);
	--radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--charcoal);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 12px; left: 12px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
	font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
	color: var(--cat); margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
}
.eyebrow__num { color: var(--muted); }
.eyebrow__num::after { content: ""; display: inline-block; width: 18px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 8px; opacity: .6; }

.btn {
	display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 500; font-size: 15px;
	padding: 12px 20px; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--ink);
	transition: background .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.section__title { font-size: clamp(28px, 3.2vw, 38px); margin: 0; }
.section__kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.section__link { font-size: 15px; font-weight: 500; white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav summary {
	font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: var(--radius);
	cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover, .nav details[open] > summary { background: var(--paper-2); color: var(--ink); }
.nav__drop { position: relative; }
.nav__panel {
	position: absolute; right: 0; top: calc(100% + 10px); width: 560px; background: var(--white); border: 1px solid var(--rule);
	border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(14,26,43,.25); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.nav__panel a { display: block; padding: 12px 14px; }
.nav__panel small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; font-weight: 400; }
.nav__search { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 12px; box-shadow: 0 18px 40px -18px rgba(14,26,43,.25); }
.nav__icon { display: inline-flex; align-items: center; }
.nav__icon svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.search-form button { font: inherit; font-size: 15px; font-weight: 500; padding: 11px 16px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; cursor: pointer; }
.search-form button:hover { background: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
	background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 80% at 85% 40%, #000 0%, transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 40%, #000 0%, transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { font-size: clamp(42px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 24px; }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--charcoal); max-width: 34em; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art { width: 100%; max-width: 460px; justify-self: end; }
.hero__art .layer { transform-origin: center; animation: lift .9s cubic-bezier(.2,.7,.2,1) both; }
.hero__art .layer:nth-child(2) { animation-delay: .12s; }
.hero__art .layer:nth-child(3) { animation-delay: .24s; }
@keyframes lift { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__art .layer { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(20px, 2.5vw, 32px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { --cat: var(--navy); background: var(--white); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(14,26,43,.35); }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card__link:hover { color: inherit; }
.card__media { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; border-bottom: 3px solid var(--cat); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper) 12px 24px); }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 23px; line-height: 1.2; margin-bottom: 10px; }
.card:hover .card__title { color: var(--accent-ink); }
.card__excerpt { font-size: 15.5px; color: var(--muted); margin-bottom: 16px; }
.card__meta { margin: auto 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.feature { display: grid; grid-template-columns: 1.25fr 1fr; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; }
.feature:hover { color: inherit; border-color: var(--rule-strong); }
.feature__media { min-height: 360px; background: var(--paper-2); border-right: 3px solid var(--cat); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.feature__title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; margin-bottom: 16px; }
.feature:hover .feature__title { color: var(--accent-ink); }
.feature__excerpt { font-size: 18px; color: var(--charcoal); }

/* ---------- Topics ---------- */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.topic { --cat: var(--navy); display: block; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; position: relative; }
.topic:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--rule); }
.topic:hover { color: inherit; }
.topic__num { font-family: var(--mono); font-size: 13px; color: var(--cat); letter-spacing: .06em; }
.topic__name { font-size: 27px; margin: 14px 0 10px; transition: color .2s; }
.topic:hover .topic__name { color: var(--cat); }
.topic__desc { font-size: 15.5px; color: var(--muted); margin: 0 0 16px; }
.topic__count { font-family: var(--mono); font-size: 12px; color: var(--ink); letter-spacing: .04em; }
.topic__bar { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--cat); transition: width .3s; }
.topic:not(:nth-child(3n+1)) .topic__bar { left: 28px; }
.topic:hover .topic__bar { width: 64px; }

/* ---------- Principles strip ---------- */
.principles { background: var(--ink); color: #c9d0db; }
.principles .section__title { color: #fff; }
.principles .section__kicker { color: #f0a27f; }
.principles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 36px; }
.principles h3 { color: #fff; font-size: 22px; }
.principles p { font-size: 15.5px; }
.principles a { color: #fff; }
.principles a:hover { color: #f0a27f; }
.principles__num { font-family: var(--mono); font-size: 12px; color: #f0a27f; letter-spacing: .08em; display: block; margin-bottom: 14px; }

/* ---------- Page headers ---------- */
.page-head { padding: clamp(44px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.page-head__title { font-size: clamp(38px, 5vw, 62px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 16px; }
.page-head__desc { font-size: 19px; max-width: 40em; color: var(--charcoal); margin: 0; }
.page-head__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; margin-top: 18px; }
.page-head--cat { border-bottom: 3px solid var(--cat); }

.breadcrumbs { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0 0 22px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep, .breadcrumbs .breadcrumb_last { color: var(--ink); }

/* ---------- Explorer (all articles) ---------- */
.explorer__bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 24px 0; border-bottom: 1px solid var(--rule); position: sticky; top: 72px; background: var(--paper); z-index: 5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.explorer__search { flex: 0 1 320px; }
.explorer__search input { width: 100%; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--white); }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-row { --cat: var(--navy); border-bottom: 1px solid var(--rule); }
.index-row a { display: grid; grid-template-columns: 56px 1fr 220px 90px; gap: 20px; align-items: baseline; padding: 22px 0; text-decoration: none; color: inherit; }
.index-row a:hover .index-row__title { color: var(--accent-ink); }
.index-row__num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.index-row__title { font-family: var(--serif); font-size: 23px; color: var(--ink); line-height: 1.25; transition: color .2s; }
.index-row__excerpt { display: block; font-family: var(--sans); font-size: 15px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.index-row__cat { font-family: var(--mono); font-size: 12px; color: var(--cat); letter-spacing: .05em; text-transform: uppercase; }
.index-row__time { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.explorer__empty { padding: 48px 0; color: var(--muted); }
[x-cloak] { display: none !important; }

/* ---------- Single article ---------- */
.article-head { padding: clamp(40px, 5vw, 72px) 0 32px; }
.article-head__inner { max-width: 880px; }
.article-title { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.022em; margin-bottom: 20px; }
.article-dek { font-family: var(--serif); font-size: clamp(20px, 2vw, 24px); line-height: 1.4; color: var(--charcoal); margin-bottom: 28px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--rule); }
.byline strong { color: var(--ink); font-weight: 600; }
.byline a { color: var(--ink); text-decoration: none; }
.byline a:hover { color: var(--accent); }
.article-figure { margin: 0 0 clamp(36px, 5vw, 56px); }
.article-figure img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 6px; }
.article-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.article-figure figcaption a { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, var(--prose)) 1fr; gap: clamp(32px, 4vw, 64px); align-items: start; }
.toc { position: sticky; top: 104px; font-size: 14px; }
.toc__title { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--mono); font-size: 11px; color: var(--rule-strong); }
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--accent); }
.toc details summary { display: none; }

/* Prose */
.prose { font-size: 18.5px; line-height: 1.72; color: var(--charcoal); }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(27px, 2.6vw, 33px); margin: 2.2em 0 .6em; scroll-margin-top: 100px; padding-top: .6em; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 23px; margin: 1.8em 0 .5em; scroll-margin-top: 100px; }
.prose h4 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin: 1.6em 0 .4em; }
.prose a { color: var(--navy); text-decoration-color: rgba(21,40,74,.35); }
.prose a:hover { color: var(--accent); text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink); }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { border-radius: 6px; }
.prose figcaption, .prose .wp-caption-text { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.prose img { height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--paper-2); padding: 2px 6px; border-radius: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom-color: var(--ink); }
.prose sub, .prose sup { line-height: 0; }

/* Article components (used inside post content) */
.prose .key-points { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 0 0 6px 6px; padding: 22px 26px; }
.prose .key-points h2, .prose .key-points p.key-points__title { border: 0; padding: 0; margin: 0 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.prose .key-points ul { font-size: 17px; }
.prose .note { background: var(--paper-2); border-radius: 6px; padding: 18px 22px; font-size: 16.5px; }
.prose .note strong:first-child { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 4px; }
.prose .faq h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 1.4em 0 .35em; color: var(--ink); }
.prose .references ol { font-size: 15px; line-height: 1.55; color: var(--muted); }
.prose .references li { word-break: break-word; }
.prose .references a { color: var(--charcoal); }

.article-foot { max-width: var(--prose); margin-top: 56px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tags a { font-family: var(--mono); font-size: 12px; padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; text-decoration: none; color: var(--ink); }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 24px; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; }
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; }
.author-box__name { font-family: var(--serif); font-size: 21px; color: var(--ink); margin: 0 0 4px; }
.author-box__role { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.author-box p { font-size: 15.5px; margin-bottom: 8px; }
.author-box__links { font-size: 14.5px; }
.correction { font-size: 14.5px; color: var(--muted); margin-top: 20px; }

.related { background: var(--paper-2); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.pagination .page-numbers { font-family: var(--mono); font-size: 14px; min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Generic pages ---------- */
.page-body { padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.page-body .prose { max-width: 760px; }
.elementor-page-body { padding: 0; }
.wpcf7 { max-width: 640px; }
.wpcf7 label { display: block; font-weight: 500; font-size: 15px; color: var(--ink); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="url"], .wpcf7 textarea {
	width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; margin-top: 6px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--white);
}
.wpcf7 textarea { min-height: 180px; }
.wpcf7 input[type="submit"] { font: inherit; font-weight: 500; padding: 12px 24px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--accent); }

.empty-state { padding: 64px 0; text-align: center; }
.empty-state h1 { font-size: clamp(36px, 5vw, 56px); }
.empty-state .search-form { max-width: 520px; margin: 28px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aab3c2; padding: 72px 0 32px; margin-top: 0; font-size: 15px; }
.site-footer a { color: #e3e7ee; text-decoration: none; }
.site-footer a:hover { color: #f0a27f; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__brand .brand { color: #fff; }
.footer__brand .brand:hover { color: #fff; }
.footer__brand p { max-width: 30em; margin-top: 18px; }
.footer__title { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #7f8a9c; margin: 0 0 16px; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li + li { margin-top: 10px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 13.5px; color: #7f8a9c; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.article-layout { grid-template-columns: minmax(0, 1fr); max-width: var(--prose); margin: 0 auto; }
	.toc { position: static; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 18px; }
	.toc details summary { display: flex; justify-content: space-between; cursor: pointer; padding: 14px 0; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); list-style: none; }
	.toc details summary::-webkit-details-marker { display: none; }
	.toc .toc__title { display: none; }
	.toc ol { margin-bottom: 14px; }
	.article-aside-spacer { display: none; }
}
@media (max-width: 960px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__art { max-width: 340px; justify-self: start; }
	.grid--3 { grid-template-columns: repeat(2, 1fr); }
	.feature { grid-template-columns: 1fr; }
	.feature__media { min-height: 0; aspect-ratio: 16/9; border-right: 0; border-bottom: 3px solid var(--cat); }
	.topics { grid-template-columns: repeat(2, 1fr); }
	.topic, .topic:not(:nth-child(3n+1)) { padding: 26px 22px 28px 0; border-left: 0; }
	.topic:nth-child(2n) { padding-left: 22px; border-left: 1px solid var(--rule); }
	.topic:not(:nth-child(3n+1)) .topic__bar { left: 0; }
	.topic:nth-child(2n) .topic__bar { left: 22px; }
	.principles__grid { grid-template-columns: 1fr; gap: 28px; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__brand { grid-column: 1 / -1; }
	.index-row a { grid-template-columns: 40px 1fr; }
	.index-row__cat { grid-column: 2; }
	.index-row__time { display: none; }
}
@media (max-width: 760px) {
	.menu-toggle { display: inline-flex; }
	.nav { display: none; }
	.nav.is-open { display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; top: 72px; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px var(--gutter) 20px; }
	.nav.is-open .nav__panel, .nav.is-open .nav__search { position: static; width: auto; box-shadow: none; grid-template-columns: 1fr; margin-top: 6px; }
	.menu-toggle { background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
	body { font-size: 16.5px; }
	.prose { font-size: 17.5px; }
	.grid--3, .grid--2 { grid-template-columns: 1fr; }
	.topics { grid-template-columns: 1fr; }
	.topic, .topic:nth-child(2n), .topic:not(:nth-child(3n+1)) { padding: 24px 0; border-left: 0; }
	.topic .topic__bar, .topic:nth-child(2n) .topic__bar, .topic:not(:nth-child(3n+1)) .topic__bar { left: 0; }
	.section__head { flex-direction: column; align-items: start; }
	.explorer__bar { position: static; }
	.explorer__search { flex: 1 1 100%; }
	.footer__grid { grid-template-columns: 1fr; }
	.author-box { grid-template-columns: 1fr; }
}
