/* ==========================================================================
   Nexus Anima Guide
   Visual system: bonded field journal. Warm paper, deep navy ink, Anima cyan,
   coral warnings. All art is CSS or inline SVG. No third-party images.
   ========================================================================== */

:root {
  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
  --read: 72ch;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2,.7,.3,1);
}

:root[data-theme="light"] {
  --bg: #f7f3e9;
  --bg-2: #fffdf6;
  --panel: #fffdf6;
  --panel-2: #f1ead9;
  --panel-3: #e7ddc7;
  --border: #ddd3bd;
  --border-strong: #c3b79c;
  --text: #161a2b;
  --text-dim: #454b61;
  --text-faint: #737a90;
  --accent: #0b7fa6;
  --accent-deep: #05617f;
  --accent-bright: #29d4ff;
  --accent-wash: rgba(11, 127, 166, 0.08);
  --coral: #c8442b;
  --coral-wash: rgba(200, 68, 43, 0.10);
  --gold: #a8791f;
  --gold-wash: rgba(168, 121, 31, 0.12);
  --ok: #157a4a;
  --hero-1: #0a1a2a;
  --hero-2: #10344c;
  --hero-ink: #eef6f8;
  --grid: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 0 rgba(22, 26, 43, 0.04), 0 18px 44px -32px rgba(22, 26, 43, 0.55);
  --shadow-lift: 0 2px 0 rgba(22, 26, 43, 0.04), 0 26px 60px -36px rgba(22, 26, 43, 0.6);
}

:root[data-theme="dark"] {
  --bg: #08121a;
  --bg-2: #0b1721;
  --panel: #0f1e29;
  --panel-2: #142836;
  --panel-3: #1a3343;
  --border: #21394a;
  --border-strong: #335063;
  --text: #eaf3f6;
  --text-dim: #b3c6cf;
  --text-faint: #8298a3;
  --accent: #4fd6f5;
  --accent-deep: #86e6fb;
  --accent-bright: #29d4ff;
  --accent-wash: rgba(79, 214, 245, 0.12);
  --coral: #ff7a5c;
  --coral-wash: rgba(255, 122, 92, 0.14);
  --gold: #e2b65c;
  --gold-wash: rgba(226, 182, 92, 0.13);
  --ok: #4bd694;
  --hero-1: #06101a;
  --hero-2: #0c2b40;
  --hero-ink: #eaf3f6;
  --grid: rgba(255, 255, 255, 0.05);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 22px 52px -32px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 2px 0 rgba(0, 0, 0, 0.4), 0 30px 70px -38px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: #fff;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 68px; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  background: var(--hero-1); color: var(--accent-bright);
  border: 1px solid rgba(41, 212, 255, .45);
  border-radius: 50% 50% 50% 12px;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 16.5px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; color: var(--text-faint); letter-spacing: 0.15em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  display: inline-block; padding: 8px 10px;
  color: var(--text-dim); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
}
.main-nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--accent-deep); background: var(--accent-wash); }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); cursor: pointer; border-radius: 50%;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

@media (max-width: 1040px) {
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    padding: 10px 18px 16px; background: var(--bg-2);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .main-nav[hidden] { display: none; }
  .main-nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; }
  .menu-btn { display: grid; }
}

/* ---------- Buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: rgba(238, 246, 248, .4); color: var(--hero-ink); }
.btn-ghost:hover { border-color: var(--hero-ink); }
.btn-soft { background: var(--panel-2); color: var(--text); border-color: var(--border); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent-deep);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.chip-coral { background: var(--coral-wash); color: var(--coral); }
.chip-gold { background: var(--gold-wash); color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: 24px 0 12px; padding: 56px 46px 48px;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: var(--hero-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 68% 26%, #000 0, transparent 76%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 360px at 90% -14%, rgba(41, 212, 255, .28), transparent 64%),
    radial-gradient(540px 320px at 2% 120%, rgba(255, 94, 65, .17), transparent 62%);
}
.hero-inner { position: relative; z-index: 2; max-width: 790px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; padding: 5px 13px; border-radius: 999px;
  border: 1px solid rgba(238, 246, 248, .28); background: rgba(255, 255, 255, .06);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--hero-ink);
}
.hero-tag i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(41, 212, 255, .22);
}
.hero h1 {
  margin: 0 0 16px; font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; color: #fff;
}
.hero h1 em { font-style: normal; color: var(--accent-bright); }
.hero p.lede {
  margin: 0 0 26px; max-width: 66ch;
  color: rgba(238, 246, 248, .78); font-size: 18px; line-height: 1.65;
}
.hero p.lede a { color: #9ce8ff; text-decoration: underline; text-underline-offset: 3px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 440px; opacity: .9; pointer-events: none; z-index: 1;
}
.hero-art svg { width: 100%; height: auto; }
.hero-stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  margin-top: 38px; border-top: 1px solid rgba(238, 246, 248, .16);
  padding-top: 22px;
}
.hero-stat { padding-right: 12px; }
.hero-stat b {
  display: block; font-family: var(--font-display); font-size: 24px;
  letter-spacing: -0.02em; color: #fff; font-weight: 800;
}
.hero-stat span {
  display: block; font-size: 11px; letter-spacing: 0.09em;
  text-transform: uppercase; color: rgba(238, 246, 248, .58);
}
@media (max-width: 900px) {
  .hero { padding: 38px 26px 34px; }
  .hero-art { opacity: .34; right: -120px; width: 380px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
  .hero-stat:nth-child(5) { display: none; }
}

/* ---------- Sections and cards ---------- */
.section { margin: 46px 0; }
.section-head { margin-bottom: 20px; }
.section-head h2 {
  margin: 0 0 6px; font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.025em;
}
.section-head p { margin: 0; color: var(--text-dim); max-width: 68ch; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  padding: 22px 20px 20px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--panel);
  color: var(--text); box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.card:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.card-tag {
  align-self: flex-start; margin-bottom: 12px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent-deep);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.card h3 {
  margin: 0 0 8px; font-family: var(--font-display);
  font-size: 20px; line-height: 1.25; letter-spacing: -0.02em;
}
.card p { margin: 0 0 16px; color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }
.card-more {
  margin-top: auto; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.card-more::after { content: " \2192"; }

.network-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .network-grid { grid-template-columns: repeat(2, 1fr); } }
.network-card {
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--panel);
  color: var(--text); transition: border-color .15s var(--ease);
}
.network-card:hover { text-decoration: none; border-color: var(--accent); }
.network-card strong { display: block; font-size: 14px; }
.network-card span { display: block; color: var(--text-faint); font-size: 12px; line-height: 1.5; }

.guide-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 26px; }
@media (max-width: 720px) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .guide-list { grid-template-columns: 1fr; } }
.guide-item { display: block; padding: 9px 0; color: var(--text); }
.guide-item strong { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.guide-item span { display: block; margin-top: 2px; color: var(--text-faint); font-size: 12.5px; line-height: 1.5; }
.guide-item:hover { text-decoration: none; }
.guide-item:hover strong { color: var(--accent); }

/* ---------- Article layout ---------- */
.breadcrumb { margin: 22px 0 0; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0;
  list-style: none; font-size: 12.5px; color: var(--text-faint);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-dim); }

.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px;
  gap: 46px; align-items: start; margin: 26px 0 10px;
}
@media (max-width: 980px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc-aside { display: none; }
}
.doc-main { min-width: 0; }

.article-head { margin-bottom: 24px; }
.eyebrow {
  margin: 0 0 10px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.article-head h1 {
  margin: 0 0 14px; font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px); line-height: 1.1;
  letter-spacing: -0.035em;
}
.lede { margin: 0 0 16px; max-width: var(--read); color: var(--text-dim); font-size: 18.5px; line-height: 1.6; }
.meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  margin: 0; font-size: 12px; color: var(--text-faint);
}
.meta-row .badge {
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent-deep);
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.meta-row [aria-hidden] { color: var(--border-strong); }

/* ---------- Keybox ---------- */
.keybox {
  position: relative; margin: 0 0 30px; padding: 20px 24px 22px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.keybox::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 1px dashed var(--border); border-radius: calc(var(--radius) - 6px);
}
.keybox h2 {
  position: relative; z-index: 1;
  margin: 0 0 12px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}
.keybox dl {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(120px, 0.8fr) 1.6fr;
  gap: 9px 20px; margin: 0;
}
.keybox dt { font-size: 13.5px; font-weight: 700; color: var(--text-dim); }
.keybox dd { margin: 0; font-size: 14px; }
@media (max-width: 620px) {
  .keybox { padding: 18px; }
  .keybox dl { grid-template-columns: 1fr; gap: 2px 0; }
  .keybox dd { margin-bottom: 10px; }
}

/* ---------- Prose ---------- */
.prose { max-width: var(--read); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  margin: 46px 0 14px; font-family: var(--font-display);
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.2;
  letter-spacing: -0.025em; scroll-margin-top: 90px;
}
.prose h3 {
  margin: 30px 0 10px; font-size: 19px; line-height: 1.3;
  letter-spacing: -0.01em; scroll-margin-top: 90px;
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose hr { margin: 34px 0; border: 0; border-top: 1px dashed var(--border-strong); }

.answer {
  margin: 0 0 26px; padding: 18px 20px 18px 22px;
  border-left: 3px solid var(--accent-bright);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-wash);
  font-size: 17.5px;
}
.answer p:last-child { margin-bottom: 0; }

.note {
  margin: 0 0 24px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); font-size: 15px;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }
.note-coral { border-color: color-mix(in srgb, var(--coral) 35%, var(--border)); background: var(--coral-wash); }
.verify { color: var(--coral); font-weight: 700; font-size: 0.86em; letter-spacing: 0.02em; }

/* ---------- Tables ---------- */
.table-wrap {
  margin: 0 0 26px; overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose thead th {
  padding: 12px 15px; text-align: left; white-space: nowrap;
  background: var(--panel-2); color: var(--text-dim);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.prose tbody td { padding: 12px 15px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--panel-2) 42%, transparent); }

/* ---------- Figures / SVG ---------- */
.fig { margin: 0 0 28px; }
.fig-frame {
  padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background:
    radial-gradient(520px 240px at 80% 0%, var(--accent-wash), transparent 70%),
    var(--panel);
}
.fig svg { width: 100%; height: auto; }
.fig-cap {
  margin: 10px 2px 0; font-size: 12.5px; line-height: 1.5;
  color: var(--text-faint);
}
.fig-cap b { color: var(--text-dim); }

/* ---------- FAQ ---------- */
.faq { margin: 0 0 26px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative; padding: 16px 40px 16px 0; cursor: pointer;
  font-weight: 700; font-size: 16.5px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 13px;
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: var(--panel-2); color: var(--text-dim);
  font-weight: 700; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq-body { padding: 0 0 18px; color: var(--text-dim); }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Related ---------- */
.related { margin: 44px 0 6px; padding-top: 26px; border-top: 1px solid var(--border); }
.related h2 { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 680px) { .related-list { grid-template-columns: 1fr; } }
.related-list a {
  display: block; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--panel); color: var(--text);
}
.related-list a:hover { border-color: var(--accent); text-decoration: none; }
.related-list .rk { display: block; font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-faint); }
.related-list .rt { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.35; }

/* ---------- Aside / TOC ---------- */
.doc-aside { position: sticky; top: 90px; }
.toc { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.toc h2 { margin: 0 0 10px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: block; padding: 7px 0 7px 26px; position: relative;
  color: var(--text-dim); font-size: 13px; line-height: 1.4;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.toc li:last-child a { border-bottom: 0; }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 7px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-faint);
}
.toc a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Ads (hidden until approval) ---------- */
.ad-slot { display: none; }
.ad-slot span { display: none; }

/* ---------- Subscribe ---------- */
.subscribe {
  margin: 54px 0 20px; padding: 34px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, var(--hero-1), var(--hero-2));
  color: var(--hero-ink);
  box-shadow: var(--shadow-lift);
}
.subscribe-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 820px) { .subscribe { padding: 26px 24px; } .subscribe-inner { grid-template-columns: 1fr; gap: 20px; } }
.subscribe h2 {
  margin: 0 0 8px; font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -0.025em; color: #fff;
}
.subscribe p { margin: 0; color: rgba(238, 246, 248, .72); font-size: 15px; }
.subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-form label {
  width: 100%; margin-bottom: 2px;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(238, 246, 248, .6);
}
.subscribe-form input[type="email"] {
  flex: 1 1 210px; min-width: 0; padding: 12px 15px;
  border: 1px solid rgba(238, 246, 248, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; font-size: 15px;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(238, 246, 248, .45); }
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.subscribe-form button { flex: 0 0 auto; }
.subscribe-note { margin-top: 10px !important; font-size: 11.5px !important; color: rgba(238, 246, 248, .5) !important; }
.subscribe-note a { color: rgba(238, 246, 248, .8); text-decoration: underline; }
.subscribe-status { margin-top: 10px; font-size: 13px; color: #9ce8ff; }
.subscribe-status[data-state="error"] { color: #ffb4a2; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 50px; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px; padding: 44px 0 30px;
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .brand { margin-bottom: 12px; }
.footer-note { margin: 0 0 10px; color: var(--text-dim); font-size: 13.5px; }
.footer-legal-note { margin: 0; color: var(--text-faint); font-size: 12px; line-height: 1.6; }
.footer-col h3 {
  margin: 0 0 12px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: var(--text-dim); font-size: 13.5px; }
.footer-col a:hover { color: var(--accent); }
.footer-network { padding: 26px 22px; border-top: 1px solid var(--border); }
.footer-network h3 { margin: 0 0 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.footer-network-note { margin: 0 0 12px; color: var(--text-faint); font-size: 12.5px; }
.footer-network-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 18px; }
@media (max-width: 640px) { .footer-network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .footer-network-grid { grid-template-columns: 1fr; } }
.footer-network-grid a { color: var(--text-dim); font-size: 12.5px; }
.footer-network-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 18px 22px 26px; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 12px;
}
.footer-bottom p { margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  max-width: 760px; margin: 0 auto; padding: 16px 18px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow-lift);
}
.cookie-banner p { flex: 1 1 340px; margin: 0; font-size: 13px; color: var(--text-dim); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn { padding: 8px 16px; font-size: 12px; }

/* ---------- 404 ---------- */
.error-mark {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.prose .table-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

@media print {
  .site-header, .site-footer, .subscribe, .cookie-banner, .ad-slot, .doc-aside { display: none; }
  body { background: #fff; color: #000; }
}
