:root {
  --ink:        #0c1014;
  --ink-soft:   #141a21;
  --ink-card:   #181f28;
  --ink-deep:   #080b0e;
  --rule:       #2a3340;
  --rule-soft:  #1f2731;
  --paper:      #ebe6d8;
  --paper-mute: #c8c2b1;
  --paper-dim:  #8d8775;
  --amber:      #d4a14a;
  --amber-dim:  #8a6a31;
  --vermillion: #c8533c;
  --moss:       #6f8a55;
  --slate:      #5a7390;
  --plum:       #7d5a8a;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Newsreader', 'Iowan Old Style', Georgia, serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212,161,74,0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(90,115,144,0.06), transparent 60%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--paper); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* HEADER */
header.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(12,16,20,0.78);
  border-bottom: 1px solid var(--rule-soft);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; max-width: var(--maxw); margin: 0 auto;
}
.brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--paper);
  display: flex; align-items: baseline; gap: 10px;
}
.brand:hover { color: var(--paper); }
.brand .mark {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 2px 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav.top-nav {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
nav.top-nav a {
  color: var(--paper-mute);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all 0.2s;
}
nav.top-nav a:hover { color: var(--paper); border-bottom-color: var(--amber); }

/* HERO */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--rule-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--amber-dim); opacity: 0.5;
}
h1.title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
h1.title em {
  font-style: italic; font-weight: 400; color: var(--amber);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--paper-mute);
  max-width: 56ch;
  margin-bottom: 32px;
}
.lede strong { color: var(--paper); font-weight: 500; }

/* EPIGRAPH — Einstein quote under the lede */
.epigraph {
  margin: 0 0 8px 0;
  padding: 24px 0 24px 28px;
  border-left: 2px solid var(--amber);
  max-width: 62ch;
}
.epigraph > p:first-of-type {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: 24px;
  line-height: 1.35;
  color: var(--paper);
  margin: 0 0 12px 0;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  letter-spacing: -0.01em;
}
.epigraph cite {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.epigraph cite em {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--paper-mute);
}
.epigraph-gloss {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper-mute);
  margin: 0;
}
.epigraph-gloss sub { font-size: 0.75em; }

.hero-stats {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
  display: flex; flex-direction: column; gap: 28px;
}
.stat .num {
  font-family: var(--display);
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  color: var(--paper);
  font-variation-settings: "opsz" 144;
}
.stat .lbl {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
  margin-top: 8px;
}

/* SECTIONS */
section { padding: 88px 0; border-bottom: 1px solid var(--rule-soft); }
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  margin-bottom: 56px;
  align-items: baseline;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 12px;
  border-top: 1px solid var(--amber-dim);
}
h2.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
h2.section-title em { font-style: italic; color: var(--amber); }

.method-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}
.method-spine {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
  position: sticky;
  top: 100px;
  align-self: start;
}
.method-spine ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.method-spine li { padding-left: 20px; position: relative; }
.method-spine li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 10px; height: 1px; background: var(--amber-dim);
}
.method-body { max-width: 70ch; }
.method-body p { margin: 0 0 18px; color: var(--paper); font-size: 18px; line-height: 1.65; }
.method-body p.intro { font-size: 22px; line-height: 1.5; color: var(--paper); margin-bottom: 32px; }
.method-body h3 {
  font-family: var(--display);
  font-weight: 400; font-style: italic;
  font-size: 26px; color: var(--amber);
  margin: 40px 0 14px; letter-spacing: -0.01em;
}
.method-body code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--ink-soft); padding: 1px 6px;
  border: 1px solid var(--rule-soft); color: var(--paper);
}

.method-table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0 32px; font-size: 15px;
}
.method-table th, .method-table td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft); vertical-align: top;
  word-wrap: break-word;
}
.method-table th {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--amber); border-bottom: 1px solid var(--amber-dim); font-weight: 500;
}
.method-table td:first-child {
  font-family: var(--mono); font-size: 13px;
  color: var(--paper); width: 28%; white-space: nowrap;
}
.method-table td:last-child { color: var(--paper-mute); line-height: 1.55; }

/* FILTER CHIPS — sticky under the header */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 40px; padding: 16px 0 20px;
  border-bottom: 1px solid var(--rule-soft);
  position: sticky;
  /* Sits flush under the 49px-tall sticky header */
  top: 49px;
  z-index: 40;
  background: rgba(12,16,20,0.92);
  backdrop-filter: blur(10px);
}
.chip {
  font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  background: transparent; color: var(--paper-mute);
  cursor: pointer; transition: all 0.15s;
}
.chip:hover { color: var(--paper); border-color: var(--paper-dim); }
.chip.active { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.chip .count { margin-left: 6px; opacity: 0.6; }

/* ───────────────────────────────────────────────────────────
   FEATURED LONGEVITY CARD — overriding analysis, above gallery
   ─────────────────────────────────────────────────────────── */
.featured-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background:
    radial-gradient(ellipse 60% 70% at 0% 0%, rgba(212,161,74,0.12), transparent 60%),
    linear-gradient(180deg, rgba(212,161,74,0.04), transparent 80%),
    var(--ink-soft);
  border: 1px solid var(--amber-dim);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.featured-card:hover {
  border-color: var(--amber);
  color: inherit;
}
.featured-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--vermillion) 60%, transparent 100%);
  width: 100%;
}
.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  padding: 44px 44px 40px 44px;
  align-items: start;
}
.featured-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.featured-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 44px;
  line-height: 1.05;
  color: var(--paper);
  margin: 0 0 14px 0;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.featured-title em { font-style: italic; color: var(--amber); }
.featured-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-mute);
  margin: 0 0 18px 0;
  line-height: 1.5;
}
.featured-desc {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--paper-mute);
  margin: 0 0 26px 0;
  max-width: 56ch;
}
.featured-cue {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.featured-cue .arrow {
  display: inline-block;
  transition: transform 0.25s;
}
.featured-card:hover .featured-cue .arrow { transform: translateX(6px); }

.featured-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  align-self: stretch;
}
.featured-stat {
  background: rgba(8,11,14,0.6);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}
.featured-stat-wide {
  grid-column: 1 / -1;
}
.featured-stat-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: 38px;
  line-height: 1;
  color: var(--paper);
  font-variation-settings: "opsz" 144;
}
.featured-stat-wide .featured-stat-num {
  font-size: 28px;
  color: var(--amber);
}
.featured-stat-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  line-height: 1.4;
  margin-top: 10px;
}

@media (max-width: 880px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 24px;
  }
  .featured-title { font-size: 34px; }
  .featured-right { grid-template-columns: 1fr 1fr; }
}

/* CARD GRID */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.card {
  background: var(--ink-soft);
  padding: 32px;
  display: flex; flex-direction: column;
  min-height: 380px;
  text-decoration: none; color: inherit;
  transition: background 0.25s;
  opacity: 0;
  animation: fadeUp 0.6s forwards;
  position: relative;
}
.card:hover { background: var(--ink-card); color: inherit; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.card .domain {
  font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--amber); margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.card .domain .id { color: var(--paper-dim); font-size: 10px; }
.card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px; line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--paper);
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.card .subtitle {
  font-style: italic; color: var(--paper-mute);
  font-size: 15px; margin-bottom: 18px; line-height: 1.45;
}
.card .desc {
  font-size: 14.5px; color: var(--paper-mute);
  line-height: 1.55; margin-bottom: 22px; flex: 1;
}
.card .metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 20px;
}
.card .metric .v {
  font-family: var(--display); font-weight: 400;
  font-size: 22px; color: var(--paper); line-height: 1;
}
.card .metric .v .unit { font-size: 13px; color: var(--paper-dim); margin-left: 2px; }
.card .metric .l {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--paper-dim); margin-top: 6px;
}
.card .open-cue {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--amber);
  display: flex; align-items: center; gap: 8px;
}
.card .open-cue svg { width: 12px; height: 12px; transition: transform 0.2s; }
.card:hover .open-cue svg { transform: translateX(4px); }
.card[data-domain="neurology"]      .domain { color: var(--vermillion); }
.card[data-domain="psychiatry"]     .domain { color: var(--slate); }
.card[data-domain="longevity"]      .domain { color: var(--amber); }
.card[data-domain="oncology"]       .domain { color: var(--plum); }
.card[data-domain="cardiology"]     .domain { color: #a85a4a; }
.card[data-domain="obstetrics"]     .domain { color: var(--moss); }
.card[data-domain="urology"]        .domain { color: var(--moss); }
.card[data-domain="transplant"]     .domain { color: var(--amber); }
.card[data-domain="musculoskeletal"].domain { color: var(--paper-mute); }

.empty {
  grid-column: 1 / -1;
  padding: 80px 32px; text-align: center;
  color: var(--paper-dim); font-style: italic;
}

.howto {
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 40px; margin-top: 40px;
}
.howto h3 {
  font-family: var(--display);
  font-weight: 400; font-style: italic;
  font-size: 28px; color: var(--amber);
  margin: 0 0 20px;
}
.howto p { color: var(--paper-mute); margin: 0 0 16px; }
.howto p strong { color: var(--paper); font-weight: 500; }
pre.code {
  background: var(--ink); border: 1px solid var(--rule);
  padding: 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  color: var(--paper); margin: 16px 0 0;
  white-space: pre-wrap;
}

footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px; color: var(--paper-dim);
  letter-spacing: 0.04em;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.foot-grid h4 {
  font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: 18px; color: var(--paper); margin: 0 0 12px;
}
.foot-grid p, .foot-grid li { color: var(--paper-mute); font-size: 13px; line-height: 1.6; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid ul li { margin-bottom: 8px; }
.foot-rule {
  border-top: 1px solid var(--rule-soft); padding-top: 20px;
  display: flex; justify-content: space-between;
  color: var(--paper-dim); text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 11px;
}

/* ─────────── ANALYSIS PAGE ─────────── */
.analysis-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule-soft);
}
.breadcrumb {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--paper-dim); margin-bottom: 32px;
}
.breadcrumb a { color: var(--paper-mute); }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span { color: var(--paper-dim); margin: 0 10px; }

.a-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--paper);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  max-width: 22ch;
}
.a-subtitle {
  font-family: var(--display); font-style: italic;
  font-size: 22px; color: var(--amber);
  margin: 0 0 24px; font-weight: 400;
}
.a-tagline {
  font-size: 19px; line-height: 1.5;
  color: var(--paper-mute); max-width: 64ch;
  margin: 0 0 40px;
}

.a-meta-bar {
  display: flex; flex-wrap: wrap; gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.a-meta-bar .item { color: var(--paper-dim); }
.a-meta-bar .item strong { color: var(--paper); font-weight: 500; margin-left: 8px; }

/* Big CTAs */
.a-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0 0;
}
.cta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px;
  border: 1px solid var(--rule);
  background: var(--ink-soft);
  transition: all 0.2s;
}
.cta:hover { background: var(--ink-card); border-color: var(--amber); }
.cta .cta-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--paper-dim); margin-bottom: 6px;
}
.cta .cta-title {
  font-family: var(--display); font-size: 22px;
  color: var(--paper); font-weight: 400;
}
.cta .arrow { color: var(--amber); font-size: 24px; }
.cta.primary { background: var(--amber); border-color: var(--amber); }
.cta.primary .cta-label { color: rgba(12,16,20,0.65); }
.cta.primary .cta-title { color: var(--ink); }
.cta.primary .arrow { color: var(--ink); }
.cta.primary:hover { background: var(--paper); border-color: var(--paper); }

/* Two-column body */
.a-body {
  padding: 72px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}
.a-section {
  margin-bottom: 56px;
}
.a-section:last-child { margin-bottom: 0; }
.a-section .label {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--amber); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.a-section .label::after {
  content: ""; flex: 1; height: 1px;
  background: var(--rule); opacity: 0.6;
}
.a-section h3 {
  font-family: var(--display); font-weight: 400;
  font-size: 30px; color: var(--paper);
  margin: 0 0 20px; letter-spacing: -0.015em;
  font-variation-settings: "opsz" 96, "SOFT" 40;
}
.a-section p {
  margin: 0 0 16px;
  color: var(--paper-mute);
  font-size: 17px; line-height: 1.65;
}
.a-section ul {
  list-style: none; padding: 0; margin: 0;
}
.a-section ul li {
  padding: 14px 0 14px 28px;
  position: relative;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--paper-mute); font-size: 16px; line-height: 1.55;
}
.a-section ul li:last-child { border-bottom: none; }
.a-section ul li::before {
  content: ""; position: absolute; left: 0; top: 22px;
  width: 16px; height: 1px; background: var(--amber);
}

/* Antithesis callout */
.antithesis {
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--vermillion);
  padding: 28px 32px;
}
.antithesis .label { color: var(--vermillion); }
.antithesis .label::after { background: rgba(200,83,60,0.3); }
.antithesis p { color: var(--paper); font-size: 17px; line-height: 1.6; margin: 0; }

/* Sidebar */
.a-side {
  position: sticky; top: 100px;
  align-self: start;
}
.a-side .card-box {
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 28px;
  margin-bottom: 24px;
}
.a-side .card-box .label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--amber); margin-bottom: 16px;
}
.a-side .metric-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.a-side .metric-row:last-child { border-bottom: none; }
.a-side .metric-row .k {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--paper-dim);
}
.a-side .metric-row .v {
  font-family: var(--display); font-size: 18px;
  color: var(--paper); text-align: right;
}
.a-side .metric-row .v .unit { font-size: 12px; color: var(--paper-dim); margin-left: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  color: var(--paper-mute);
}

/* DAG */
.dag-frame {
  background: var(--ink-deep);
  border: 1px solid var(--rule);
  padding: 24px;
  overflow-x: auto;
}
.dag-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 600px;
}
.dag-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 16px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--paper-dim);
}
.dag-legend .item { display: flex; align-items: center; gap: 6px; }
.dag-legend .swatch {
  width: 10px; height: 10px;
  border: 1px solid var(--paper-dim);
}

/* REDUCED MOTION
   Anyone with the OS-level "reduce motion" setting (vestibular disorders,
   migraine, focus needs) gets the same content without the staggered card
   entrance, hover transforms, or arrow slide. Content remains identical;
   only the motion is removed. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay:    0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .card:hover .open-cue svg { transform: none !important; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 32px; flex-direction: row; flex-wrap: wrap; }
  .stat { flex: 1; min-width: 140px; }
  .section-head, .method-grid { grid-template-columns: 1fr; gap: 20px; }
  .method-spine { position: static; }
  .foot-grid { grid-template-columns: 1fr; }
  .top-inner { padding: 14px 20px; }
  nav.top-nav { display: none; }
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0; }
  section { padding: 56px 0; }
  .a-ctas { grid-template-columns: 1fr; }
  .a-body { grid-template-columns: 1fr; gap: 40px; }
  .a-side { position: static; }
  .a-meta-bar { gap: 18px; font-size: 10px; }
}

/* ───────────────────────────────────────────────────────────
   ABOUT section additions — prompt block, callout
   ─────────────────────────────────────────────────────────── */
pre.code.prompt {
  background: var(--ink);
  border: 1px solid var(--amber-dim);
  border-left: 3px solid var(--amber);
  padding: 22px 24px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--paper);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 8px 0 20px;
}
pre.code.prompt em {
  color: var(--amber);
  font-style: italic;
  font-family: var(--body);
  font-size: 14px;
}
.callout {
  padding: 20px 24px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--paper-mute);
  background: var(--ink-soft);
  color: var(--paper);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 12px 0;
}
.callout strong { color: var(--paper); }
.callout.warn {
  border-left-color: var(--vermillion);
}

/* ───────────────────────────────────────────────────────────
   RIGHT-TO-LEFT THEN DOWN — gallery flow
   Cards order alphabetically; visually the first card appears
   in the top-RIGHT, subsequent cards flow leftward, then wrap
   to the next row starting from the right again.
   ─────────────────────────────────────────────────────────── */
.gallery.rtl-flow {
  direction: rtl;
}
.gallery.rtl-flow .card {
  /* Card internal content stays left-to-right */
  direction: ltr;
}

/* ───────────────────────────────────────────────────────────
   BLOG / DISCUSSION page
   ─────────────────────────────────────────────────────────── */
.blog-hero { padding: 80px 0 48px; border-bottom: 1px solid var(--rule-soft); }
.blog-body { padding: 56px 0 88px; }
.form-card {
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 32px;
  margin-bottom: 48px;
}
.form-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 26px;
  color: var(--amber);
  margin: 0 0 8px;
}
.form-card .consent {
  font-size: 13px;
  color: var(--paper-dim);
  margin: 0 0 24px;
  line-height: 1.55;
  font-style: italic;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
}
.field input, .field textarea, .field select {
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--amber);
}
.field textarea { min-height: 120px; resize: vertical; font-family: var(--body); }
.field input.hp {
  /* honeypot — visually hidden but available to bots */
  position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0;
}
.btn-submit {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 28px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-submit:hover { background: var(--paper); border-color: var(--paper); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-status {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-dim);
}
.form-status.success { color: var(--moss); }
.form-status.error { color: var(--vermillion); }

/* Comment thread */
.thread { display: flex; flex-direction: column; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.comment {
  background: var(--ink-soft);
  padding: 24px 28px;
}
.comment .meta {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
  margin-bottom: 10px;
  display: flex; justify-content: space-between;
}
.comment .meta .who { color: var(--amber); }
.comment .body { color: var(--paper); font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; }
.comment .reply {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--ink);
  border-left: 2px solid var(--amber);
}
.comment .reply .meta { color: var(--amber); }
.comment .reply .body { font-size: 15px; }
.no-comments { padding: 60px; text-align: center; color: var(--paper-dim); font-style: italic; }

/* Admin panel */
.admin-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 24px;
}
.admin-toolbar input {
  flex: 1;
  background: var(--ink);
  border: 1px solid var(--rule);
  color: var(--paper);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
}
.admin-comment .actions {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.admin-comment .actions button {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--paper-mute);
  cursor: pointer;
  transition: all 0.15s;
}
.admin-comment .actions button:hover { color: var(--paper); border-color: var(--paper-dim); }
.admin-comment .actions button.approve:hover { color: var(--moss); border-color: var(--moss); }
.admin-comment .actions button.reject:hover  { color: var(--vermillion); border-color: var(--vermillion); }
.admin-comment .actions button.delete:hover  { color: var(--vermillion); border-color: var(--vermillion); }
.admin-comment .email-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-dim);
  padding-left: 8px;
}
.admin-comment .pending { color: var(--amber); }
.admin-comment .reply-form {
  display: none;
  margin-top: 14px;
  padding: 14px;
  background: var(--ink);
  border: 1px solid var(--rule);
}
.admin-comment .reply-form.open { display: block; }
.admin-comment .reply-form textarea {
  width: 100%; min-height: 80px;
  background: var(--ink-soft); border: 1px solid var(--rule);
  color: var(--paper); font-family: var(--body); font-size: 14px;
  padding: 10px;
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}
