/* VoidLearning Journal: clinical research stylesheet. Void navy, electric blue, all-sans. Self-contained. */

:root {
  --paper: #f2f8ff;
  --paper-2: #eaf4ff;
  --paper-3: #dcecfb;
  --card: #ffffff;
  --ink: #0a1836;
  --ink-2: #2f3544;
  --muted: #5a6b85;
  --rule: #cfdef0;
  --rule-strong: #9cb9dd;
  --brand: #007ae5;
  --brand-dark: #0054cb;
  --brand-light: #32adff;
  --brand-bright: #0097fc;
  --on-blue: #9cc9f2;
  --void: #020618;
  --navy: #0a1836;
  --deep: #01345e;
  --tint: #f2f8ff;
  --tint-2: #eaf4ff;
  --success: #3f7d3a;
  --danger: #c0452f;
  --focus: #007ae5;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --maxw: 1200px;
  --readw: 43rem;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow: 0 12px 30px rgba(2, 6, 24, 0.09);
  --shadow-lg: 0 26px 60px rgba(2, 6, 24, 0.13);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #060a18;
  --paper-2: #0a1226;
  --paper-3: #0f1a36;
  --card: #0c1224;
  --ink: #eaf2fd;
  --ink-2: #b8c8e2;
  --muted: #8fa3be;
  --rule: #16233f;
  --rule-strong: #24365c;
  --brand: #32adff;
  --brand-dark: #007ae5;
  --tint: #0a1226;
  --tint-2: #0f1a36;
  --focus: #32adff;
  --shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.85);
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 82% -8%, var(--paper-2), transparent 65%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-dark); }
button, input { font: inherit; color: inherit; }

::selection { background: var(--tint-2); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 0.6rem; left: 0.6rem; z-index: 1000;
  padding: 0.6rem 0.95rem; background: var(--void); color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none; transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-xs); }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top strip ---------- */

.topbar {
  background: var(--void);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-blue);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 33px;
}
.topbar p { margin: 0; }
.topbar a { color: var(--on-blue); text-decoration: none; }
.topbar a:hover { color: var(--brand-light); }
.topbar__date { letter-spacing: 0.1em; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-strong);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 86px;
  padding-block: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), var(--deep));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding-top: 1px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s var(--ease);
}
.brand:hover { color: var(--ink); }
.brand:hover .brand__mark { box-shadow: 0 0 0 3px var(--tint-2), var(--shadow); }
.brand__word {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.brand__word em { font-style: italic; font-weight: 400; color: var(--muted); }

.nav--desk { display: flex; gap: clamp(0.8rem, 1.7vw, 1.4rem); margin-inline: auto; }
.nav a, .mobile-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: 0.45rem;
  position: relative;
}
.nav a::after, .mobile-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
  transition: right 0.3s var(--ease);
}
.nav a:hover::after, .mobile-nav a:hover::after { right: 0; }

.tools { display: flex; align-items: center; gap: 0.15rem; flex: none; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--tint-2); color: var(--brand); }
.theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: block; }
.menu-toggle { display: none; }

.search-drawer { border-top: 1px solid var(--rule); background: var(--paper-2); }
.search-form { display: flex; gap: 0.6rem; padding-block: 1rem; max-width: 52rem; }
.search-form input,
.archive-search input {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem;
}
.search-form input:focus, .archive-search input:focus { outline: 2px solid var(--focus); outline-offset: 0; }

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.8rem 1.25rem 1.6rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
}
.mobile-nav:not([hidden]) { display: grid; }
.mobile-nav a {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a::after { display: none; }
body.nav-open { overflow: hidden; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--brand);
  padding: 0.7rem 1.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--brand); color: #fff; }
.btn--solid { background: linear-gradient(135deg, var(--brand), var(--deep)); border-color: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--solid:hover { filter: brightness(1.1); }

.text-link {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.15rem;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero__copy { position: relative; }
.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 300px;
  height: 300px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  left: -14%;
  top: -22%;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 1.25rem;
}
.kicker::before { content: ""; width: 26px; height: 2px; border-radius: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(3rem, 6.6vw, 5.7rem);
  line-height: 0.99;
  letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
}
.hero h1 em { color: var(--brand); font-weight: 400; }
.hero__standfirst {
  font-size: clamp(1.12rem, 1.9vw, 1.34rem);
  line-height: 1.46;
  color: var(--ink-2);
  max-width: 31rem;
  margin-bottom: 1.2rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.hero__meta span + span::before { content: "·"; margin-right: 1rem; color: var(--rule-strong); }
.hero__note { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.8rem; }

.feature { display: block; color: var(--ink); text-decoration: none; }
.feature__media { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.feature__media .media img { transition: transform 0.6s var(--ease); }
.feature:hover .feature__media .media img { transform: scale(1.025); }
.feature__flag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  background: var(--brand);
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full, 999px);
  font-size: 0.6rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.feature__body { padding-top: 1rem; }
.feature h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
  margin-block: 0.7rem 0.6rem;
  transition: color 0.2s var(--ease);
}
.feature:hover h2 { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.feature__excerpt { color: var(--ink-2); font-size: 0.94rem; }
.photo-credit { margin-top: 0.45rem; text-align: right; font-size: 0.66rem; letter-spacing: 0.05em; color: var(--muted); }
.photo-credit:empty { display: none; }

/* ---------- poster fallback ---------- */

.poster {
  --p0: #0a1836; --p1: #01345e; --p2: #32adff;
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(115% 90% at 12% 8%, var(--p1), transparent 62%),
    radial-gradient(110% 100% at 88% 96%, var(--p2), transparent 58%),
    var(--p0);
  transition: transform 0.45s var(--ease);
}
.poster--card { aspect-ratio: 16 / 10; }
.poster--hero { aspect-ratio: 4 / 3; }
.poster--cover { aspect-ratio: 21 / 9; }
.poster::before {
  content: "";
  position: absolute; inset: -30%;
  background:
    repeating-radial-gradient(circle at 70% 20%, transparent 0 46px, rgba(255,255,255,0.08) 46px 47px),
    repeating-linear-gradient(115deg, transparent 0 58px, rgba(255,255,255,0.04) 58px 59px);
  mix-blend-mode: screen;
}
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 6, 24, 0.55), transparent 55%); }
.poster__no {
  position: absolute; right: 1rem; bottom: 0.6rem; z-index: 1;
  font-family: var(--mono); font-size: clamp(3rem, 8vw, 6.5rem); line-height: 1;
  color: rgba(255, 255, 255, 0.22); letter-spacing: -0.04em;
}
[data-cat="memory"] { --p0: #0a1836; --p1: #01345e; --p2: #32adff; }
[data-cat="practice"] { --p0: #04122e; --p1: #0054cb; --p2: #39b6fb; }
[data-cat="focus"] { --p0: #020618; --p1: #01345e; --p2: #0097fc; }
[data-cat="reading"] { --p0: #0e1a2e; --p1: #013a5e; --p2: #9cc9f2; }
[data-cat="notes"] { --p0: #0a1424; --p1: #00429e; --p2: #32adff; }
[data-cat="habits"] { --p0: #061020; --p1: #01345e; --p2: #8fa3be; }
[data-cat="journal"] { --p0: #0a1836; --p1: #01345e; --p2: #32adff; }

/* ---------- media ---------- */

.media { position: relative; overflow: hidden; background: var(--paper-2); border-radius: var(--radius-md); }
.media--card { aspect-ratio: 16 / 10; }
.media--hero { aspect-ratio: 4 / 3; }
.media--cover { aspect-ratio: 21 / 9; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- sections ---------- */

.section { padding-block: clamp(2.6rem, 5vw, 4.2rem); border-bottom: 1px solid var(--rule); }
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.9rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.85rem;
  margin-bottom: 2.1rem;
}
.section-index {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--brand);
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  font-weight: 700;
}
.section-count { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2rem);
}
.grid:empty::before {
  content: "Nothing here yet. More is on the way.";
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 2rem 0;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--rule-strong); box-shadow: var(--shadow-lg); }
.card-art { display: block; text-decoration: none; overflow: hidden; }
.card:hover .media img { transform: scale(1.03); }
.card-body { padding: 1.05rem 1.1rem 1.2rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--tint-2);
  border-radius: var(--radius-full, 999px);
  padding: 0.28rem 0.65rem;
  margin-bottom: 0.7rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.card-title { font-size: clamp(1.12rem, 1.7vw, 1.32rem); line-height: 1.16; margin-bottom: 0.5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-excerpt { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 0.85rem; }
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-strong); }

/* ---------- topic chips ---------- */

.rail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.rail li { border: 0; }
.rail a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.62rem 0.95rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-full, 999px);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.rail a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.rail-count { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }
.rail a:hover .rail-count { color: inherit; opacity: 0.7; }

/* ---------- newsletter band ---------- */

.band { padding-block: clamp(2.6rem, 5vw, 4.2rem); }
.band__inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--void), var(--deep));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.8rem);
  display: grid;
  gap: 0.35rem;
}
.band__inner::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -130px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.18;
  box-shadow: 0 0 0 42px transparent, 0 0 0 43px currentColor, 0 0 0 90px transparent, 0 0 0 91px currentColor;
}
.band__inner .kicker { color: var(--on-blue); opacity: 0.9; }
.band__inner h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); max-width: 21ch; margin-bottom: 0.45rem; }
.band__inner p { opacity: 0.82; max-width: 44ch; }
.subscribe--band { margin-top: 1.25rem; max-width: 33rem; display: flex; gap: 0.5rem; }
.subscribe--band input { flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius-sm); color: inherit; padding: 0.72rem 0.85rem; }
.subscribe--band input::placeholder { color: inherit; opacity: 0.6; }

/* ---------- breadcrumb / article ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span[aria-current] { color: var(--ink-2); }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-light)); z-index: 100; }

.article { padding-bottom: 5rem; }
.article-head { max-width: 55rem; padding-block: clamp(1.6rem, 4vw, 3rem) 1.6rem; }
.article-head h1 { font-size: clamp(2.2rem, 5.3vw, 4.35rem); line-height: 1.04; margin-bottom: 1rem; }
.standfirst { font-size: clamp(1.12rem, 2vw, 1.35rem); line-height: 1.45; color: var(--ink-2); max-width: 44rem; font-weight: 400; }
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-block: 0.85rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--muted);
}
.byline__author { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; }
.byline__author:hover { color: var(--brand); }

.avatar {
  --avatar: var(--brand);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--avatar);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.avatar--lg { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar--xl { width: 72px; height: 72px; font-size: 1.4rem; }

.article-cover { margin: 0 0 2.4rem; }
.article-cover .media, .article-cover .poster { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.article-cover figcaption, .page-cover figcaption { margin-top: 0.5rem; text-align: right; font-size: 0.66rem; letter-spacing: 0.05em; color: var(--muted); }
.article-cover figcaption:empty, .page-cover figcaption:empty { display: none; }

.takeaways {
  max-width: var(--readw);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--tint-2);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.4rem;
}
.takeaways h2 { font-size: 1.02rem; margin-bottom: 0.55rem; }
.takeaways ul { margin: 0; padding-left: 1.05rem; }
.takeaways li { margin-bottom: 0.35rem; font-size: 0.92rem; }
.takeaways:not(:has(li)) { display: none; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; gap: clamp(2rem, 5vw, 4.2rem); align-items: start; }
.article-layout:not(:has(.toc nav)) { grid-template-columns: minmax(0, 1fr); }

.prose {
  max-width: var(--readw);
  font-size: clamp(1.09rem, 1.35vw, 1.2rem);
  line-height: 1.72;
  color: var(--ink);
}
.prose > p:first-child::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.84;
  padding-right: 0.09em;
  padding-top: 0.06em;
  font-weight: 700;
  color: var(--brand);
}
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 2.1rem 0 0.65rem; scroll-margin-top: 7rem; }
.prose h3 { font-size: 1.32rem; margin: 1.7rem 0 0.45rem; scroll-margin-top: 7rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.15rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote { margin: 1.7rem 0; padding: 0.15rem 0 0.15rem 1.2rem; border-left: 3px solid var(--brand); border-radius: 1px; color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.88rem; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--rule); }
.prose th { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.prose a { color: var(--brand); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--tint-2); border-radius: var(--radius-xs); padding: 0.1em 0.3em; }
.prose pre { overflow-x: auto; padding: 1rem; background: var(--tint-2); border-radius: var(--radius-md); }

.toc { position: sticky; top: 7rem; border-top: 1px solid var(--ink); padding-top: 0.8rem; font-size: 0.8rem; }
.toc-title { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.65rem; }
.toc nav ol { list-style: none; margin: 0; padding: 0; }
.toc nav ol ol { padding-left: 0.9rem; }
.toc a { color: var(--ink-2); text-decoration: none; display: block; padding-block: 0.28rem; line-height: 1.35; }
.toc a:hover, .toc a.is-active { color: var(--brand); }

.tags { max-width: var(--readw); margin-top: 2rem; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.45rem; }
.tags a { color: var(--brand-dark); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.tags a:hover { color: var(--brand); }
.tag-sep { color: var(--rule-strong); }
.tags:empty { display: none; }

.disclaimer { max-width: var(--readw); margin-top: 2.4rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.8rem; color: var(--muted); }
.disclaimer strong { color: var(--ink-2); }

.share-row { max-width: var(--readw); margin-top: 1.5rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1rem; font-size: 0.73rem; }
.share-label { text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.share a, .share-copy { color: var(--brand); text-decoration: none; background: none; border: 0; padding: 0.45rem 0; cursor: pointer; font-size: inherit; }
.share a:hover, .share-copy:hover { color: var(--brand-dark); text-decoration: underline; }

.author-card { display: flex; gap: 1.1rem; align-items: flex-start; max-width: var(--readw); margin-top: 2.8rem; padding: 1.3rem; background: var(--tint-2); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.author-card h2 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.author-card h2 a { color: var(--ink); text-decoration: none; }
.author-card__role { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.author-card p { font-size: 0.86rem; color: var(--ink-2); }

.adjacent-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: var(--readw); margin-top: 2.8rem; }
.adjacent { display: grid; gap: 0.3rem; padding: 1rem; border: 1px solid var(--rule); border-radius: var(--radius-md); text-decoration: none; color: var(--ink); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.adjacent:hover { border-color: var(--brand); background: var(--tint-2); }
.adjacent span { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.adjacent strong { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.adjacent:last-child:nth-child(odd) { grid-column: 1 / -1; }

.related { margin-top: 4rem; }
.related:has(.grid:empty) { display: none; }

/* ---------- archives ---------- */

.archive { padding-block: clamp(2rem, 4vw, 3.2rem) 4rem; }
.archive-head { max-width: 46rem; margin-bottom: 2.2rem; }
.archive-head h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); margin-bottom: 0.9rem; }
.archive-head .eyebrow { margin-bottom: 0.9rem; }
.archive-search { display: none; gap: 0.5rem; margin-top: 1.5rem; }
.body--search .archive-search { display: flex; }
.archive-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 2px solid var(--ink); padding-top: 0.8rem; margin-bottom: 2rem; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.8rem; border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.page-link { text-decoration: none; color: var(--ink); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; padding-block: 0.4rem; }
.page-link.is-off { color: var(--rule-strong); }
.page-count { font-family: var(--mono); color: var(--muted); }

.author-head { display: flex; align-items: center; gap: 1.2rem; }
.author-head h1 { margin-bottom: 0.3rem; }
.author-head .role { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.category-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.category-index li { border-bottom: 1px solid var(--rule); }
.category-index a { display: grid; grid-template-columns: 14rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.35rem 0; color: var(--ink); text-decoration: none; }
.category-index a:hover .cat-name { color: var(--brand); }
.cat-name { font-size: 1.55rem; font-weight: 700; }
.cat-blurb { color: var(--ink-2); font-size: 0.88rem; }
.cat-blurb + .rail-count { font-size: 0.72rem; color: var(--muted); }

/* ---------- pages / 404 ---------- */

.page { padding-block: clamp(2.5rem, 5vw, 4rem); }
.page-head { max-width: 50rem; margin-bottom: 2.2rem; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 0.9rem; }
.page-cover { margin: 0 0 2.2rem; }
.page-cover .media { box-shadow: var(--shadow-lg); }
.page-body { max-width: 41rem; }
.page-body h2 { font-size: 1.65rem; margin: 2rem 0 0.6rem; }

.not-found { padding-block: clamp(3rem, 7vw, 5.5rem) 5rem; }
.not-found__code { font-family: var(--mono); font-size: clamp(5rem, 15vw, 10rem); line-height: 0.8; color: var(--rule-strong); margin-bottom: 1.2rem; }
.not-found__body h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 18ch; margin-bottom: 1rem; }
.not-found__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.3rem; margin: 2rem 0 2.8rem; }
.not-found__topics { max-width: 42rem; }

.notice { margin-top: 1.1rem; padding: 0.7rem 1rem; border-left: 3px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--tint-2); font-size: 0.86rem; }
.notice--bad { border-left-color: var(--danger); }

/* ---------- footer ---------- */

.footer { background: var(--void); color: #e8eefc; margin-top: 3rem; padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.footer__brand .brand { color: inherit; }
.footer__brand .brand__mark { border-color: currentColor; }
.footer__brand .brand:hover .brand__mark { background: currentColor; color: var(--void); }
.footer__brand .brand__word em { color: rgba(232, 238, 252, 0.55); }
.footer__lead p { color: rgba(232, 238, 252, 0.72); font-size: 0.88rem; max-width: 30rem; margin-top: 1rem; }
.footer .kicker { color: var(--on-blue); }
.footer h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 18ch; margin-top: 1.6rem; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 0.4rem; }
.footer__col h3 { font-size: 0.64rem; letter-spacing: 0.17em; text-transform: uppercase; color: rgba(232, 238, 252, 0.5); margin-bottom: 0.8rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.footer__col a { display: inline-block; font-size: 0.88rem; color: rgba(232, 238, 252, 0.82); text-decoration: none; padding-block: 0.2rem; }
.footer__col a:hover { color: #fff; }
.footer__fine { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; border-top: 1px solid rgba(232, 238, 252, 0.16); margin-top: 2.6rem; padding-top: 1.1rem; font-size: 0.7rem; color: rgba(232, 238, 252, 0.5); }
.footer__giant {
  font-size: clamp(3.4rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: rgba(232, 238, 252, 0.07);
  margin-top: 2rem;
  white-space: nowrap;
  user-select: none;
}

.subscribe { margin-top: 1.2rem; max-width: 25rem; }
.subscribe label { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(232, 238, 252, 0.6); margin-bottom: 0.45rem; }
.subscribe__row { display: flex; gap: 0.4rem; }
.subscribe__row input { flex: 1; min-width: 0; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius-sm); color: #fff; padding: 0.62rem 0.7rem; }
.subscribe__row input::placeholder { color: rgba(255,255,255,0.5); }
.footer .btn { border-color: rgba(255,255,255,0.5); color: #fff; }
.footer .btn:hover { background: #fff; color: var(--void); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav--desk { gap: 0.85rem; }
  .nav a { font-size: 0.68rem; }
  .hero__copy::before { display: none; }
}

@media (max-width: 960px) {
  .nav--desk { display: none; }
  .menu-toggle { display: inline-flex; }
  .topbar__tagline { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar a { display: none; }
  .hero { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 2.6rem; }
  .hero h1 { font-size: clamp(2.8rem, 11vw, 4.2rem); }
  .hero__standfirst { max-width: 34rem; }
  .feature { border-top: 1px solid var(--rule); padding-top: 1.6rem; }
  .grid, .related .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .footer__cols { padding-top: 0; }
  .category-index a { grid-template-columns: 1fr auto; }
  .cat-blurb { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 1.6rem, var(--maxw)); }
  .masthead__inner { min-height: 64px; gap: 0.5rem; padding-block: 0.55rem; }
  .brand__word { font-size: 1.2rem; }
  .brand__mark { width: 36px; height: 36px; }
  .tools { margin-left: auto; }
  .grid, .related .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.55rem, 12.5vw, 3.4rem); }
  .hero__standfirst { font-size: 1.1rem; }
  .hero__meta { font-size: 0.6rem; gap: 0.35rem 0.7rem; }
  .hero__meta span + span::before { margin-right: 0.7rem; }
  .section { padding-block: 2.4rem; }
  .section-head { gap: 0.6rem; }
  .rail { gap: 0.45rem; }
  .rail a { padding: 0.55rem 0.8rem; font-size: 0.8rem; }
  .band__inner { padding: 1.6rem 1.25rem; }
  .subscribe--band { flex-direction: column; }
  .article-head h1 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .standfirst { font-size: 1.08rem; }
  .byline { font-size: 0.74rem; }
  .article-cover { margin-inline: calc(50% - 50vw); width: 100vw; }
  .article-cover .media, .article-cover .poster { aspect-ratio: 16 / 10; border-radius: 0; }
  .article-cover figcaption { padding-inline: 0.8rem; }
  .takeaways { padding: 1rem 1.1rem; }
  .prose { font-size: 1.06rem; line-height: 1.68; }
  .prose > p:first-child::first-letter { font-size: 3em; }
  .prose table { display: block; overflow-x: auto; }
  .adjacent-nav { grid-template-columns: 1fr; }
  .share { gap: 0.2rem 0.85rem; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer__fine { flex-direction: column; }
  .not-found__actions { gap: 1rem; }
  .archive-search { flex-direction: column; }
  .archive-search .btn { align-self: flex-start; }
  .search-form { flex-direction: column; }
  .search-form .btn { align-self: flex-start; }
}

@media (max-width: 420px) {
  .kicker__extra, .hero__meta-extra { display: none; }
  .brand__word { font-size: 1.08rem; }
  .icon-btn { min-width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .topbar, .masthead, .footer, .toc, .share-row, .related, .adjacent-nav, .progress, .band, .breadcrumb { display: none; }
  .wrap, .article, .page { width: 100%; max-width: none; padding: 0; margin: 0; }
  .article-head h1, .page-head h1 { font-size: 26pt; }
  .article-cover { margin-inline: 0; width: 100%; }
  .article-cover .media, .article-cover .poster { aspect-ratio: auto; }
  .article-layout { display: block; }
  .prose { max-width: none; font-size: 11.5pt; }
  .disclaimer, .author-card { border-color: #999; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
