/* Runics — per build brief v1
   Palette: #0B0B0D bg, #F2EDE4 ink, #E8B547 amber (single accent).
   Type: Fraunces (SOFT axis) display, IBM Plex Sans body, JetBrains Mono technical.
*/

:root {
  --bg:           #0B0B0D;
  --bg-lift:      #131318;
  --bg-panel:     #16161C;
  --ink:          #F2EDE4;
  --ink-dim:      #A09A90;
  --ink-faint:    #5C574F;
  --accent:       #E8B547;
  --accent-dim:   #8A6C2A;
  --rule:         rgba(242, 237, 228, 0.08);
  --rule-strong:  rgba(242, 237, 228, 0.18);

  --display: 'Fraunces', 'Times New Roman', serif;
  --body:    'IBM Plex Sans', 'Helvetica Neue', Helvetica, sans-serif;
  --mono:    'JetBrains Mono', 'Menlo', monospace;

  --max: 1200px;
  --max-text: 720px;
  --gutter: 32px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Skip link */
.skip {
  position: absolute;
  left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip:focus {
  left: 16px; top: 16px; width: auto; height: auto;
  background: var(--accent); color: var(--bg);
  padding: 8px 12px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; z-index: 1000;
}

/* ---- Type utilities ---- */

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-dim { color: var(--ink-faint); }

.display {
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  letter-spacing: -0.025em;
  line-height: 1.0;
}
.display-ital {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 300;
}

.dot { color: var(--accent); }
.period-amber::after { content: '.'; color: var(--accent); }

/* ---- Layout primitives ---- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-text { max-width: var(--max-text); margin: 0 auto; padding: 0 var(--gutter); }

.section {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) { .section { padding: 64px 0; } }

.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}
.section-head .col-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.section-head h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.section-head .tagline {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.4;
  color: var(--ink-dim);
  max-width: 52ch;
  margin: 0;
  letter-spacing: -0.005em;
}

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}

/* ---- Nav ---- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(11, 11, 13, 0.75);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav .wordmark {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 70;
}
.nav ul {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.nav ul li a { transition: color 200ms ease; }
.nav ul li a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav ul { display: none; } }

/* ---- Hero ---- */

.hero {
  padding: 120px 0 140px;
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--rule);
}
.hero .eyebrow { display: block; margin-bottom: 56px; }

.hero-stack { display: block; margin-bottom: 64px; }
.hero-line {
  display: block;
  font-family: var(--display);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero-line-1 {
  font-size: clamp(64px, 14vw, 180px);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
}
.hero-line-2 {
  font-size: clamp(22px, 4.4vw, 44px);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 144;
  color: var(--ink-dim);
  letter-spacing: -0.02em;
  margin-top: 16px;
}
.hero-line-3 {
  font-size: clamp(18px, 3.4vw, 34px);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  color: var(--ink-faint);
  letter-spacing: -0.015em;
  margin-top: 10px;
}

.hero-lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  max-width: 62ch;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  margin-bottom: 56px;
  color: var(--ink-dim);
  letter-spacing: -0.005em;
}

.hero-meta {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-meta > span {
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--rule-strong);
}
.hero-meta > span:last-child { border-right: none; }
.hero-meta .k { color: var(--ink-faint); margin-right: 10px; }
.hero-meta .v { color: var(--ink); font-weight: 500; }

@media (max-width: 720px) {
  .hero { padding: 72px 0 96px; }
  .hero .eyebrow { margin-bottom: 40px; }
  .hero-stack { margin-bottom: 48px; }
  .hero-meta > span {
    flex: 1 1 100%;
    padding: 8px 0;
    margin: 0;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
}

/* ---- Capability cards ---- */

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.cap-card {
  background: var(--bg);
  padding: 44px 40px 40px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 20px;
  min-height: 300px;
  transition: background 240ms ease;
}
.cap-card:hover { background: var(--bg-lift); }
.cap-card:hover .g-emerge { color: var(--accent); }

.cap-card .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 14px;
}
.cap-card .kicker .glyph { color: var(--ink-dim); transition: color 240ms ease; }
.cap-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 80, "opsz" 96;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.cap-card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 44ch;
  align-self: start;
}
.cap-card .patent {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap-card { padding: 32px 24px; min-height: 0; }
}

/* Glyph baseline */
.glyph { display: inline-block; vertical-align: middle; color: var(--ink); }
.glyph .g-ground,
.glyph .g-emerge {
  transition: stroke 300ms ease;
}
.glyph-host:hover .g-emerge { color: var(--accent); }

/* ---- Platform toggle callout ---- */

.toggle-callout {
  position: relative;
  border-left: 3px solid var(--accent);
  background:
    linear-gradient(90deg, rgba(232,181,71,0.08) 0%, rgba(232,181,71,0.03) 30%, transparent 55%),
    var(--bg-panel);
  padding: 56px 48px 52px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 48px;
  align-items: start;
}
.toggle-callout .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 10px;
}
.toggle-callout h2 {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 22ch;
}
.toggle-callout h2 em {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 300;
}
.toggle-callout p {
  margin: 0 0 24px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.55;
  max-width: 62ch;
}
.toggle-callout .cite {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
}
@media (max-width: 720px) {
  .toggle-callout { grid-template-columns: 1fr; gap: 20px; padding: 32px 24px; }
}

/* ---- Configurations table ---- */

.cfg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.cfg-table thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--rule-strong);
}
.cfg-table thead th:first-child { padding-left: 0; }
.cfg-table thead th:last-child { text-align: right; padding-right: 0; }
.cfg-table tbody tr {
  border-bottom: 1px solid var(--rule);
  transition: background 200ms ease;
}
.cfg-table tbody tr:hover { background: rgba(255,255,255,0.015); }
.cfg-table tbody tr:hover .g-emerge { color: var(--accent); }
.cfg-table td {
  padding: 26px 20px;
  vertical-align: middle;
}
.cfg-table td:first-child { padding-left: 0; }
.cfg-table td:last-child { text-align: right; padding-right: 0; }
.cfg-table .domain { display: flex; align-items: center; gap: 18px; }
.cfg-table .domain .glyph { color: var(--ink-dim); flex: 0 0 auto; }
.cfg-table .domain .name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 350;
  font-variation-settings: "SOFT" 80, "opsz" 72;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.cfg-table .domain .name .sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
  font-weight: 500;
}
.cfg-table .verb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.ship-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(232,181,71,0.4);
  padding: 4px 10px 4px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.ship-tag .dot-amber {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(232,181,71,0.14);
}

.cfg-note {
  margin-top: 40px;
  max-width: 64ch;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-faint);
  padding-left: 20px;
  border-left: 1px solid var(--rule-strong);
}

@media (max-width: 720px) {
  .cfg-table { font-size: 13px; }
  .cfg-table td { padding: 16px 10px; }
  .cfg-table .domain .name { font-size: 17px; }
  .cfg-table .domain .glyph { width: 22px; height: auto; }
}

/* ---- Portfolio list ---- */

.portfolio-list { display: flex; flex-direction: column; }
.portfolio-row {
  display: grid;
  grid-template-columns: 140px 92px 44px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 16px 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 200ms ease, padding-left 300ms ease;
}
.portfolio-row:first-child { border-top: 1px solid var(--rule-strong); }
.portfolio-row:hover {
  background: rgba(255,255,255,0.02);
  padding-left: 10px;
}
.portfolio-row:hover .g-emerge { color: var(--accent); }
.portfolio-row .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.portfolio-row .layer {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.portfolio-row .glyph-cell { color: var(--ink-dim); }
.portfolio-row .title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 350;
  font-variation-settings: "SOFT" 80, "opsz" 72;
  letter-spacing: -0.005em;
  line-height: 1.35;
  color: var(--ink);
}
.portfolio-row .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-align: right;
  white-space: nowrap;
}
.portfolio-row.platform-row {
  background: rgba(232, 181, 71, 0.04);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}
.portfolio-row.platform-row:hover { padding-left: 22px; }
.portfolio-row.platform-row .layer { color: var(--accent); }
.portfolio-row.platform-row .glyph-cell { color: var(--accent); }
.portfolio-row.pending-row {
  opacity: 0.4;
}
.portfolio-row.pending-row:hover { opacity: 0.7; }

@media (max-width: 720px) {
  .portfolio-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 6px;
    padding: 16px 0;
  }
  .portfolio-row .num { grid-column: 1; grid-row: 1; }
  .portfolio-row .meta { grid-column: 2; grid-row: 1; }
  .portfolio-row .glyph-cell { display: none; }
  .portfolio-row .layer { grid-column: 1 / -1; grid-row: 3; }
  .portfolio-row .title { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- Chapter One (Foresera) ---- */

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.chapter-left .eyebrow { display: block; margin-bottom: 16px; }
.chapter-left h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(48px, 7vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.chapter-left p {
  margin: 0 0 36px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 44ch;
}
.chapter-left .link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 4px;
  transition: border-color 200ms, color 200ms;
}
.chapter-left .link:hover { border-bottom-color: var(--accent); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stat {
  background: var(--bg);
  padding: 36px 32px 32px;
  min-height: 180px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 12px;
}
.stat .big {
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  align-self: start;
  color: var(--ink);
}
.stat .big .suffix {
  font-size: 32px;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  color: var(--accent);
  font-weight: 300;
  vertical-align: top;
  margin-left: 2px;
}
.stat .big.ital {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: 40px;
}
.stat .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.stat .sublabel {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.4;
  font-weight: 300;
}

@media (max-width: 720px) {
  .chapter { grid-template-columns: 1fr; gap: 48px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */

.footer {
  padding: 120px 0 80px;
  border-top: 1px solid var(--rule);
  position: relative; z-index: 1;
}
.wordmark-big {
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(120px, 22vw, 300px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-bottom: 48px;
  display: block;
  color: var(--ink);
}
.foot-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.foot-meta .label {
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.foot-meta a { border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; }

@media (max-width: 720px) {
  .footer { padding: 80px 0 56px; }
  .foot-meta { grid-template-columns: 1fr 1fr; }
}

/* ---- Alphabet page ---- */

.alpha-hero { padding: 120px 0 80px; }
.alpha-hero .eyebrow { display: block; margin-bottom: 32px; }
.alpha-hero h1 {
  margin: 0 0 32px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(56px, 10vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.alpha-hero h1 em {
  display: block;
  color: var(--ink-dim);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 300;
  margin-top: 4px;
}
.alpha-hero .alpha-lede {
  max-width: 62ch;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-dim);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  line-height: 1.5;
}

.construction {
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: center;
  background: var(--bg-panel);
  border-left: 3px solid var(--accent);
  padding: 48px 48px 48px 44px;
}
.construction-glyph {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.construction-glyph svg { width: 180px; height: auto; }
.construction h3 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 96;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 28ch;
}
.construction p {
  margin: 0 0 24px;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 56ch;
}
.construction .legend {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.construction .legend .sw {
  display: inline-block;
  width: 18px; height: 3px;
  margin-right: 10px;
  vertical-align: middle;
}
.construction .legend .sw.ground { background: var(--ink); }
.construction .legend .sw.emerge { background: var(--accent); }

@media (max-width: 720px) {
  .construction { grid-template-columns: 1fr; gap: 32px; padding: 32px 24px 32px 20px; }
  .construction-glyph svg { width: 140px; }
  .construction .legend { flex-direction: column; gap: 12px; }
}

.family {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}
.family-head {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: baseline;
}
.family-head .eyebrow { display: block; margin-bottom: 16px; }
.family-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.028em;
}
.family-head .desc {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-dim);
  max-width: 52ch;
  margin: 0;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.letter {
  background: var(--bg);
  padding: 48px 40px 40px;
  display: grid;
  grid-template-rows: 1fr auto auto auto auto;
  gap: 14px;
  min-height: 380px;
  transition: background 240ms ease;
}
.letter:hover { background: var(--bg-lift); }
.letter:hover .g-emerge { color: var(--accent); }
.letter .letter-glyph {
  display: flex; align-items: center; justify-content: center;
  min-height: 160px;
  color: var(--ink);
}
.letter .letter-glyph svg { width: 110px; height: auto; }
.letter .name {
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 96;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.015em;
}
.letter .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.letter .api {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.letter .api .method {
  color: var(--ink-dim);
  margin-right: 8px;
}
.letter .defn {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-dim);
}

@media (max-width: 900px) {
  .letter-grid { grid-template-columns: 1fr 1fr; }
  .family-head { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .letter-grid { grid-template-columns: 1fr; }
}

/* ---- Foresera spelling strip ---- */

.spelling {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
}
.spelling .eyebrow { display: block; margin-bottom: 24px; }
.spelling h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.spelling .equation {
  margin: 0 0 48px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 62ch;
}
.spelling .equation .eq-word {
  font-style: normal;
  color: var(--accent);
  font-variation-settings: "SOFT" 70, "opsz" 96;
  font-weight: 350;
}
.spelling-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  overflow-x: auto;
}
.spelling-letter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1 1 0;
  min-width: 72px;
  transition: color 240ms ease;
}
.spelling-letter:hover .g-emerge { color: var(--accent); }
.spelling-letter svg { width: 44px; height: auto; color: var(--ink); }
.spelling-letter .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.reserve {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px dashed var(--rule-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  line-height: 1.6;
}
.reserve .reserve-letters { color: var(--accent); }

@media (max-width: 720px) {
  .spelling-letter { min-width: 56px; }
  .spelling-letter svg { width: 32px; }
}

/* ---- Family resemblance strip ---- */

.resemblance {
  padding: 96px 0 120px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.resemblance .eyebrow { display: block; margin-bottom: 20px; }
.resemblance h2 {
  margin: 0 0 56px;
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.028em;
}
.resemblance-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  color: var(--ink);
}
.resemblance-row .glyph-host { transition: opacity 240ms ease; }
.resemblance-row .glyph-host:hover { opacity: 1; }
.resemblance-row svg { width: 36px; height: auto; }

@media (max-width: 720px) {
  .resemblance-row { gap: 20px; }
}

.hero-verbs { display: none; }
.hero-line-2, .hero-line-3 { display: none; }

.hero-chain-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 28px;
  font-family: var(--display);
  line-height: 1;
  letter-spacing: -0.035em;
  font-size: clamp(48px, 9vw, 128px);
}
.hero-chain-row .hero-line-1 { font-size: 1em; }
.hero-chain-row .chain-arrow {
  color: var(--ink-faint);
  font-weight: 300;
  font-size: 0.5em;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  transform: translateY(-0.15em);
}
.hero-chain-row .chain-slot {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}
.hero-chain-row .chain-word {
  display: inline-block;
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--ink-dim);
  line-height: 1;
  letter-spacing: -0.035em;
  transition: opacity 400ms ease;
}
.hero-chain-row .chain-word:not(.is-active) {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  pointer-events: none;
}
.hero-chain-row .chain-word.is-active { opacity: 1; }
.hero-chain-row .chain-slot-last .chain-word { color: var(--ink-faint); }
.chain-arrow {
  color: var(--ink-faint);
  font-weight: 300;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: 0.85em;
}
.chain-slot {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  vertical-align: baseline;
  min-width: 4.5ch;
}
.chain-word {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--ink-faint);
  line-height: 1.1;
  transition: color 320ms ease, opacity 320ms ease, transform 320ms ease;
  letter-spacing: -0.025em;
}
.chain-word:not(.is-active) {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  color: var(--ink-faint);
}
.chain-word.is-active {
  position: relative;
  opacity: 1;
  transform: none;
  color: var(--ink-dim);
}
.chain-slot::after {
  content: '';
  position: absolute;
  left: 0; right: 6px; bottom: -8px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0.6;
}

.chain-caption {
  display: block;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
}

@media (max-width: 720px) {
  .hero-chain { font-size: clamp(26px, 7vw, 42px); gap: 10px 14px; }
}
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 95, "opsz" 72;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 36ch;
  margin: 0 0 32px;
}
.hero-sub .accented {
  font-style: normal;
  font-variation-settings: "SOFT" 70, "opsz" 96;
  color: var(--accent);
  font-weight: 350;
}

/* ---- API / Loop section ---- */
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule-strong);
  margin-bottom: 56px;
}
.code-block { background: var(--bg-panel); padding: 28px 32px; }
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.code-lbl { color: var(--accent); }
.code-url { color: var(--ink-faint); font-size: 10px; }
pre.code {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.j-s { color: var(--accent); }
.j-n { color: var(--ink-dim); }

.endpoint-rail {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.endpoint-rail .ep {
  background: var(--bg);
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: background 240ms ease;
  color: var(--ink);
}
.endpoint-rail .ep:hover { background: var(--bg-lift); }
.endpoint-rail .ep:hover .g-emerge { color: var(--accent); }
.endpoint-rail .ep.active { background: rgba(232,181,71,0.06); }
.endpoint-rail .ep.active .g-emerge { color: var(--accent); }
.endpoint-rail .ep-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.endpoint-rail .ep-path {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

@media (max-width: 900px) {
  .code-grid { grid-template-columns: 1fr; }
  .endpoint-rail { grid-template-columns: repeat(4, 1fr); }
  .endpoint-rail .ep-path { display: none; }
}

/* ---- Composition cells in config table ---- */
.comp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--ink-dim);
}
.comp-glyph { color: var(--ink-dim); transition: color 240ms ease; }
.comp-plus {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  margin: 0 2px;
}
.cfg-table tr:hover .comp-glyph .g-emerge { color: var(--accent); }

@media (max-width: 900px) {
  .comp-row { gap: 3px; }
  .comp-glyph svg { width: 16px; height: auto; }
}

/* ---- Hero composer: See. + {verb} + {verb} — compounding as the thesis ---- */

.hero-dials {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 32px);
  margin: 8px 0 48px;
  flex-wrap: wrap;
  row-gap: 16px;
}
.hd-see {
  font-family: var(--display);
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-weight: 350;
  letter-spacing: -0.035em;
  font-size: clamp(72px, 10vw, 132px);
  line-height: 0.9;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  white-space: nowrap;
}
.hd-see-arrow {
  color: var(--ink-faint);
  font-weight: 300;
  font-size: 0.34em;
  transform: translateY(-0.4em);
}
.hd-plus {
  font-family: var(--display);
  color: var(--accent);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  transform: translateY(-0.35em);
  opacity: 0.85;
}
.hd-slot { position: relative; }
.hd-slot-word {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 90, "opsz" 144;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: opacity 260ms ease, filter 260ms ease, border-color 200ms ease;
}
.hd-slot-word:hover,
.hd-slot-word:focus-visible { border-bottom-color: var(--accent); }
.hd-slot-word em { font-style: italic; }
.hd-slot-word .dot { color: var(--accent); font-style: normal; }
.hd-slot-word.is-swapping { opacity: 0; filter: blur(2px); }

.hd-readout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 28px;
  row-gap: 8px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}
.hd-readout-math {
  font-family: var(--display);
  font-weight: 350;
  font-variation-settings: "SOFT" 70, "opsz" 144;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  white-space: nowrap;
}
.hd-readout-math .hd-times,
.hd-readout-math .hd-eq {
  color: var(--ink-faint);
  font-weight: 300;
  padding: 0 0.15em;
}
.hd-readout-math em {
  font-style: normal;
  color: var(--accent);
}
.hd-readout-label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 96;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-dim);
  line-height: 1.25;
  align-self: end;
  padding-bottom: 6px;
}
.hd-readout-now {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.hd-readout-now em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hd-readout-k {
  color: var(--ink-faint);
  margin-right: 4px;
}
.hd-readout-idx {
  margin-left: auto;
  color: var(--accent-dim, var(--ink-faint));
}

@media (max-width: 640px) {
  .hd-readout { grid-template-columns: 1fr; }
  .hd-readout-label { padding-bottom: 0; }
}

@media (max-width: 720px) {
  .hero-dials { gap: 18px; row-gap: 12px; }
  .hd-see { font-size: clamp(56px, 14vw, 96px); gap: 12px; }
  .hd-slot-word { font-size: clamp(42px, 10vw, 72px); }
  .hd-readout-math { font-size: clamp(34px, 9vw, 52px); }
}

/* ---- Reduced motion ---- */

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