/* ============================================================
   Reliever Brand Guidelines - Concept 102 "Expected Value E[R]".
   Built in the system it documents.
   Tokens: Ink #111111 · Ink Lift #1A1A1A · Muted #6B6B6B ·
   Line #E8E8E8 · Field #FAFAFA · Paper #FFFFFF ·
   Adoption Purple #7030B0 · Alert Orange #F0600F
   Artwork constants (inside PNG artwork only): #000000 / #FFFFFF
   Prism lavenders are image-borne only (they live inside the
   Artboard-3 photography), never a CSS fill.
   No shadows (except the one "never add effects" misuse tile).
   No italic type (the only italic is the artwork serif E, in the PNG).
   Border-radius 0 everywhere except the app-tile figure.
   Host Grotesk only; no serif webfont, ever.
   ============================================================ */

:root {
  --ink: #111111;
  --ink-lift: #1A1A1A;
  --muted: #6B6B6B;
  --line: #E8E8E8;
  --field: #FAFAFA;
  --paper: #FFFFFF;
  --purple: #7030B0;
  --orange: #F0600F;
  /* enumerated alpha annex (QA whitelist) */
  --nav-ground: rgba(255, 255, 255, 0.92);
  --hairline-on-ink: rgba(232, 232, 232, 0.18);
  --ink-scrim: rgba(17, 17, 17, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */

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

html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Host Grotesk', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-style: normal;
  -webkit-font-smoothing: antialiased;
}

/* no italic anywhere in UI/body — emphasis is weight, never slant */
em, i { font-style: normal; font-weight: 600; }

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

button {
  font: inherit; color: inherit; background: none;
  border: none; cursor: pointer; border-radius: 0;
}
a { color: inherit; }

/* ---------- Type scale (documented in section 05) ---------- */

.display-1 {
  font-size: clamp(3rem, 2rem + 7vw, 6.5rem);
  font-weight: 800; line-height: 0.95;
  letter-spacing: -0.03em; text-transform: uppercase;
}
.display-2 {
  font-size: clamp(2rem, 1.5rem + 3vw, 3.25rem);
  font-weight: 700; line-height: 1.02;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.heading-3 { font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.heading-4 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.lede { font-size: 1.25rem; font-weight: 400; line-height: 1.55; letter-spacing: -0.005em; max-width: 62ch; }
.body { font-size: 1rem; line-height: 1.6; }
.data { font-size: 0.875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.caption { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.label {
  font-size: 0.75rem; font-weight: 600; line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.micro {
  font-size: 0.6875rem; font-weight: 600; line-height: 1.35;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1.25rem; }
.tnum { font-variant-numeric: tabular-nums; }

/* Inline E[R] notation — set UPRIGHT in Host Grotesk, never a serif face */
.notation { font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; font-style: normal; }

/* ---------- Focus (monochrome, designed) ---------- */

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.on-ink :focus-visible,
.r-ink :focus-visible,
.hero :focus-visible,
.on-prism :focus-visible { outline-color: var(--paper); }
.takeover-panel.is-adopted :focus-visible { outline-color: var(--paper); }
.takeover-panel.is-alert :focus-visible { outline-color: var(--ink); }

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  padding: 12px 20px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 600; font-size: 0.875rem;
}
.skip-link:focus { top: 12px; }

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

.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (min-width: 768px) { .container { padding-inline: 40px; } }
@media (min-width: 1280px) { .container { padding-inline: 48px; } }

.section { padding-block: 96px 104px; }
.section.r-ink { padding-block: 120px 128px; }
@media (min-width: 1280px) {
  .section { padding-block: 140px 148px; }
  .section.r-ink { padding-block: 180px 188px; }
}

/* Surface registers */
.r-paper { background: var(--paper); }
.r-field { background: var(--field); }
.r-ink {
  background-color: var(--ink);
  background-image: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%);
  color: var(--paper);
}
.r-ink .caption { color: var(--line); }

/* Ruled subsections (ledger structure) */
.ruled { border-top: 1px solid var(--line); padding-top: 48px; margin-top: 72px; }
.r-ink .ruled { border-top-color: var(--hairline-on-ink); }

/* Full-bleed helper */
.bleed { width: 100vw; margin-inline: calc(50% - 50vw); }

/* ---------- Prism divider bands (image-borne, decorative) ---------- */

.prism-band {
  background: #000000;
  height: clamp(120px, 20vh, 260px);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.prism-band img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

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

.site-nav {
  position: sticky; top: 0; z-index: 50; height: 56px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .site-nav { background: var(--nav-ground); backdrop-filter: blur(10px); }
}
@media (min-width: 1280px) { .site-nav { height: 64px; } }

.site-nav .container {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.nav-home { display: inline-flex; align-items: center; padding: 12px 8px; margin-left: -8px; }
.nav-home img { height: 24px; width: auto; }

.nav-links { display: none; }
@media (min-width: 768px) {
  .nav-links { display: flex; align-items: center; gap: clamp(12px, 1.7vw, 24px); }
  .nav-links a {
    font-size: 0.8125rem; font-weight: 500; color: var(--ink);
    text-decoration: none; padding: 8px 2px; white-space: nowrap;
  }
  .nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .nav-links a[aria-current="true"] {
    font-weight: 600; text-decoration: underline;
    text-underline-offset: 4px; text-decoration-thickness: 2px;
  }
  .menu-toggle { display: none; }
}

.menu-toggle {
  min-width: 44px; min-height: 44px; padding: 8px 12px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; border: 1px solid var(--ink);
}
.menu-toggle:hover { background: var(--field); }
.menu-toggle:active { transform: translateY(1px); }

/* Mobile menu overlay: a takeover of value, not of color */
.menu-overlay {
  position: fixed; inset: 0; z-index: 60;
  background-color: var(--ink);
  background-image: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%);
  color: var(--paper); display: none; overflow-y: auto;
}
.menu-overlay.is-open { display: block; }
body.menu-locked { overflow: hidden; }
.menu-overlay .container { padding-block: 24px 64px; }
.menu-head { display: flex; justify-content: flex-end; }
.menu-close {
  min-width: 44px; min-height: 44px; padding: 8px 12px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--paper); border: 1px solid var(--paper);
}
.menu-list { margin-top: 32px; }
.menu-list li + li { border-top: 1px solid var(--hairline-on-ink); }
.menu-list a {
  display: flex; align-items: baseline; gap: 20px;
  padding: 18px 0; min-height: 44px; text-decoration: none; color: var(--paper);
  font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
}
.menu-list a .ord { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--line); }
.menu-list a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- Hero (prism register) ---------- */

.hero { background: #000000; color: var(--paper); }
.hero .hero-art { width: 100%; }
.hero .hero-art img {
  width: 100%; height: auto; display: block;
  max-height: 62vh; object-fit: cover; object-position: center;
}
.hero .container { width: 100%; padding-block: 40px 88px; }
@media (min-width: 768px) { .hero .container { padding-block: 56px 120px; } }
.hero .kicker { color: var(--line); margin-bottom: 22px; }
.hero .kicker::after { background: var(--hairline-on-ink); }
.hero h1 { max-width: 13ch; color: var(--paper); }
.hero .lede { color: var(--line); margin-top: 28px; max-width: 54ch; }

/* ---------- Section header pattern ---------- */

.kicker {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.r-ink .kicker { color: var(--line); }
.kicker::after { content: ""; width: 24px; height: 1px; background: var(--line); }
.r-ink .kicker::after { background: var(--hairline-on-ink); }

.section-head { margin-bottom: 56px; }
.section-head h2 { margin-top: 18px; max-width: 18ch; }
.section-head .lede { margin-top: 24px; }
@media (min-width: 1280px) {
  .section-head { max-width: 72%; margin-bottom: 72px; }
}
.subhead { margin-bottom: 24px; }

/* ---------- Pull quotes / statements ---------- */

.statement {
  font-size: clamp(1.75rem, 1.25rem + 2.6vw, 2.875rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  max-width: 22ch; margin-block: 64px;
}
.aside-quote {
  border-left: 3px solid var(--ink); padding-left: 24px;
  font-size: 1.25rem; font-weight: 600; line-height: 1.4;
  max-width: 30ch; margin-block: 40px;
}
.payoff {
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2rem);
  font-weight: 700; line-height: 1.25; letter-spacing: -0.01em;
  max-width: 26ch; margin-block: 40px;
}
.r-ink .payoff { color: var(--paper); }

/* ---------- Definition list (positioning block) ---------- */

.def-list { margin-block: 48px; max-width: 640px; }
.def-row {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  padding-block: 14px; border-top: 1px solid var(--line);
}
.def-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) {
  .def-row { grid-template-columns: 180px 1fr; gap: 24px; align-items: baseline; }
}
.def-row dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.def-row dd { font-weight: 600; }

/* ---------- Generic figure ---------- */

figure.fig { margin-block: 40px; }
figure.fig figcaption { margin-top: 14px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); max-width: 64ch; }
.r-ink figure.fig figcaption { color: var(--line); }
figure.fig .fig-title { display: block; font-weight: 600; color: var(--ink); font-size: 0.875rem; margin-bottom: 2px; }
.r-ink figure.fig .fig-title { color: var(--paper); }

/* ---------- Notation anatomy figure (#mark) ---------- */

.anatomy-grid { display: grid; gap: 48px; margin-top: 48px; }
@media (min-width: 1024px) { .anatomy-grid { grid-template-columns: 7fr 5fr; align-items: start; } }

.anatomy-fig { background: var(--field); border: 1px solid var(--line); padding: clamp(28px, 6%, 72px); }
.anatomy-stage { position: relative; }
.anatomy-stage img { width: 100%; }
.anatomy-marker {
  position: absolute; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper);
  font-size: 0.6875rem; font-weight: 700;
  transform: translate(-50%, -50%);
}
.anatomy-list li {
  border-top: 1px solid var(--line); padding-block: 16px;
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
}
.anatomy-list li:last-child { border-bottom: 1px solid var(--line); }
.anatomy-list .n {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); font-size: 0.6875rem; font-weight: 700;
}
.anatomy-list strong { font-weight: 600; }
.anatomy-list p { font-size: 0.9375rem; line-height: 1.5; }

/* ---------- Icon idea block ---------- */

.icon-idea { display: grid; gap: 40px; margin-top: 40px; align-items: center; }
@media (min-width: 768px) { .icon-idea { grid-template-columns: 260px 1fr; } }
.icon-idea .icon-stage {
  background: var(--field); border: 1px solid var(--line);
  padding: 44px; display: flex; align-items: center; justify-content: center;
}
.icon-idea .icon-stage img { width: 70%; height: auto; }

/* ---------- Variant cards ---------- */

.variant-grid { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 768px) {
  .variant-grid { grid-template-columns: repeat(2, 1fr); }
  .variant-card.wide { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .variant-grid { grid-template-columns: repeat(2, 1fr); }
  .variant-card.wide { grid-column: 1 / -1; }
}
.variant-card .specimen {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(28px, 8%, 72px); border: 1px solid var(--line);
}
.variant-card.wide .specimen { padding-block: clamp(40px, 9%, 96px); }
.variant-card .specimen.ground-light { background: var(--field); }
.variant-card .specimen.ground-dark {
  background-color: var(--ink);
  background-image: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%);
  border-color: var(--ink);
}
.variant-card .specimen.wordmark img { width: min(72%, 520px); height: auto; }
.variant-card .specimen.icon img { width: min(38%, 150px); height: auto; }

.variant-card .meta { padding-top: 14px; }
.variant-card .meta .filename { display: block; color: var(--muted); word-break: break-all; }
.variant-card .meta .use { display: block; margin-top: 6px; }
.variant-card .meta .dl { display: block; margin-top: 8px; }

/* ---------- Text links ---------- */

.text-link {
  font-weight: 500; color: var(--ink); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: text-decoration-thickness 180ms var(--ease);
}
.text-link:hover { text-decoration-thickness: 2px; }
.r-ink .text-link, .on-ink .text-link { color: var(--paper); }

/* ---------- Clearspace figures ---------- */

.cs-fig { background: var(--field); border: 1px solid var(--line); padding: clamp(28px, 7%, 72px); }
.cs-fig + .cs-fig { margin-top: 32px; }
.cs-wrap { position: relative; margin-inline: auto; border: 1px dashed var(--muted); }
.cs-wrap.cs-wordmark { max-width: 640px; padding: 60px 52px; }
.cs-wrap.cs-icon { max-width: 300px; padding: 54px; }
.cs-art { position: relative; }
.cs-art img { width: 100%; }
.cs-s {
  position: absolute; font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase;
}
.cs-s.top { top: 5px; left: 50%; transform: translateX(-50%); }
.cs-s.bottom { bottom: 5px; left: 50%; transform: translateX(-50%); }
.cs-s.left { left: 7px; top: 50%; transform: translateY(-50%); }
.cs-s.right { right: 7px; top: 50%; transform: translateY(-50%); }

/* ---------- Minimum size specimens ---------- */

.minsize-fig { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 5%, 56px); }
.minsize-row { display: flex; align-items: flex-end; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap; }
.minsize-item { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.minsize-item img { width: auto; }
.minsize-item .sz { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.minsize-row + .minsize-row { margin-top: 40px; }

.proof-grid { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 1024px) { .proof-grid { grid-template-columns: 6fr 6fr; align-items: stretch; } }
.proof-grid .fig { margin-block: 0; }
.cardframe { background: var(--paper); border: 1px solid var(--line); padding: 20px; }
.cardframe.mark-crop { padding: 0; overflow: hidden; }
.cardframe.mark-crop img { width: 100%; }

/* ---------- App-tile safe-area figure (the ONLY radius in this guide) ---------- */

.tile-figs { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 640px) { .tile-figs { grid-template-columns: repeat(3, 1fr); } }
.app-tile {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 22%;              /* iOS-superellipse-style; sanctioned single radius */
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid var(--line);
}
.app-tile.paper { background: var(--field); }
.app-tile.ink { background-color: var(--ink); background-image: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%); border-color: var(--ink); }
.app-tile.purple { background: var(--purple); border-color: var(--purple); }
.app-tile img { width: 46%; height: auto; }
.app-tile .safe { position: absolute; inset: 18%; border: 1px dashed var(--muted); border-radius: 14%; pointer-events: none; }
.app-tile.ink .safe, .app-tile.purple .safe { border-color: rgba(232,232,232,0.55); }
.tile-cap { margin-top: 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }
.tile-figs figure { margin: 0; }

/* ---------- Misuse grid ---------- */

.rule-row { display: grid; gap: 24px; margin-block: 40px; }
@media (min-width: 768px) { .rule-row { grid-template-columns: repeat(2, 1fr); } }

.misuse-grid { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 768px) { .misuse-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .misuse-grid { grid-template-columns: repeat(3, 1fr); } }

.tile .demo {
  position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line);
  background: var(--paper); display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 12%;
}
.tile .demo.ground-ink {
  background-color: var(--ink);
  background-image: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%);
  border-color: var(--ink);
}
.tile .demo.ground-busy { padding: 0; }
.tile .demo.ground-busy > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .demo.ground-busy > img.fg { position: relative; width: 66%; z-index: 1; }
.tile .demo.ground-prism { padding: 0; background: #000; }
.tile .demo.ground-prism > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .demo.ground-prism > img.fg { position: relative; width: 46%; z-index: 1; }

.tile .demo img.subject { width: 78%; }
.tile.icon-demo .demo img.subject { width: 40%; }

.tile .verdict { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; }
.tile .verdict svg { flex: none; margin-top: 2px; }
.tile .verdict p { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.tile .verdict p strong { color: var(--ink); font-weight: 600; }

/* masked demos (no doctored files shipped) */
.mask-wordmark {
  width: 78%; aspect-ratio: 4831 / 1637;
  background-color: var(--ink);
  -webkit-mask-image: url(../assets/logos/102_reliever-id-primary-black.png);
  mask-image: url(../assets/logos/102_reliever-id-primary-black.png);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.mask-wordmark.grey { background-color: var(--muted); }

/* "never remove the brackets": show the [R] icon with the brackets masked away → lone R */
.nobrackets { position: relative; width: 46%; aspect-ratio: 1679 / 1637; }
.nobrackets .icon-fill {
  position: absolute; inset: 0; background-color: var(--ink);
  -webkit-mask-image: url(../assets/logos/102_reliever-icon-black.png);
  mask-image: url(../assets/logos/102_reliever-icon-black.png);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
/* Paper bars covering the two brackets (content bbox x[409,1531] in 1679 canvas;
   left bracket ~24.4%..31%, right bracket ~85%..91.2% of full canvas width) */
.nobrackets .bar { position: absolute; top: 20%; height: 60%; background: var(--paper); }
.nobrackets .bar.l { left: 23%; width: 9.5%; }
.nobrackets .bar.r { left: 84%; width: 9.5%; }

/* "never upright/swap the E": cover the italic serif E, drop an upright grotesk E */
.swapE { position: relative; width: 78%; aspect-ratio: 4831 / 1637; }
.swapE img { width: 100%; }
.swapE .cover { position: absolute; top: 30%; left: 53%; width: 13.5%; height: 40%; background: var(--paper); }
.swapE .glyphE {
  position: absolute; top: 50%; left: 59.6%; transform: translate(-50%, -50%);
  font-weight: 700; line-height: 1; color: var(--ink);
  font-size: clamp(1.6rem, 7.2vw, 3.6rem); letter-spacing: -0.02em;
}

.demo-stretch img.subject { transform: scaleX(1.42); width: 62%; }
.demo-shadow img.subject { filter: drop-shadow(0 10px 14px var(--ink-scrim)); }

/* ---------- Swatches ---------- */

.swatch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
@media (min-width: 768px) { .swatch-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .swatch-grid { grid-template-columns: repeat(6, 1fr); } }

.swatch .chip { height: 88px; border: 1px solid var(--line); }
.swatch .chip.c-ink { background: var(--ink); border-color: var(--ink); }
.swatch .chip.c-lift { background: radial-gradient(120% 90% at 30% 20%, #1A1A1A 0%, #111111 65%); border-color: var(--ink); }
.swatch .chip.c-muted { background: var(--muted); border-color: var(--muted); }
.swatch .chip.c-line { background: var(--line); border-color: var(--line); }
.swatch .chip.c-field { background: var(--field); }
.swatch .chip.c-paper { background: var(--paper); }
.swatch h4 { margin-top: 12px; }
.swatch .vals { margin-top: 4px; color: var(--muted); }
.swatch .role { margin-top: 6px; }

.takeover-cards { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 768px) { .takeover-cards { grid-template-columns: repeat(2, 1fr); } }
.takeover-card { border: 2px solid var(--ink); background: var(--paper); }
.takeover-card .chip { height: 120px; display: flex; align-items: flex-end; padding: 16px 20px; }
.takeover-card.purple .chip { background: var(--purple); color: var(--paper); }
.takeover-card.orange .chip { background: var(--orange); color: var(--ink); }
.takeover-card .body-block { padding: 20px; }
.takeover-card .rule-line { margin-top: 12px; font-weight: 600; }

.guardrail { border-left: 3px solid var(--ink); padding: 4px 0 4px 24px; margin-block: 48px; max-width: 660px; }
.guardrail li { padding-block: 8px; }
.guardrail li strong { font-weight: 600; }
.r-ink .guardrail { border-left-color: var(--paper); }

/* ---------- Data tables ---------- */

.data-table { margin-top: 40px; }
.data-table th {
  text-align: left; font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--line); color: var(--ink); padding: 10px 14px;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.875rem; font-variant-numeric: tabular-nums; vertical-align: top; }
.data-table td.fail { color: var(--muted); }
.data-table .fname { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }

@media (max-width: 767px) {
  .data-table.reflow thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table.reflow tr { display: block; border-bottom: 1px solid var(--line); padding-block: 12px; }
  .data-table.reflow td { display: flex; justify-content: space-between; gap: 16px; border: none; padding: 4px 0; text-align: right; }
  .data-table.reflow td::before { content: attr(data-th); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; flex: none; }
}
.r-ink .data-table th { background: transparent; color: var(--line); border-top: 1px solid var(--hairline-on-ink); border-bottom: 1px solid var(--hairline-on-ink); }
.r-ink .data-table td { border-bottom-color: var(--hairline-on-ink); }
@media (max-width: 767px) {
  .r-ink .data-table.reflow tr { border-bottom-color: var(--hairline-on-ink); }
  .r-ink .data-table.reflow td::before { color: var(--line); }
}

/* ---------- Rules blocks ---------- */

.rules-list { margin-top: 32px; max-width: 660px; counter-reset: rule; }
.rules-list li {
  counter-increment: rule; display: grid; grid-template-columns: 36px 1fr;
  gap: 14px; padding-block: 12px; border-top: 1px solid var(--line);
}
.rules-list li:last-child { border-bottom: 1px solid var(--line); }
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); padding-top: 4px;
}
.rules-list.plain { counter-reset: none; }
.rules-list.plain li { grid-template-columns: 1fr; }
.rules-list.plain li::before { display: none; }
.rules-list li strong { font-weight: 600; }
.r-ink .rules-list li { border-color: var(--hairline-on-ink); }
.r-ink .rules-list li::before { color: var(--line); }

/* ---------- Takeover demo ---------- */

.takeover-demo-block { margin-top: 72px; }
.takeover-control { display: flex; margin-bottom: 0; border: 1px solid var(--ink); max-width: 480px; }
.takeover-control [role="radio"] {
  flex: 1; min-height: 44px; font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-right: 1px solid var(--ink); transition: background-color 180ms var(--ease);
}
.takeover-control [role="radio"]:last-child { border-right: none; }
.takeover-control [role="radio"]:hover { background: var(--field); }
.takeover-control [role="radio"][aria-checked="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.takeover-panel.is-adopted .takeover-control { border-color: var(--paper); }
.takeover-panel.is-adopted .takeover-control [role="radio"] { border-color: var(--paper); color: var(--paper); }
.takeover-panel.is-adopted .takeover-control [role="radio"]:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.takeover-panel.is-adopted .takeover-control [role="radio"][aria-checked="true"] { background: var(--paper); color: var(--ink); }
.takeover-panel.is-alert .takeover-control { border-color: var(--ink); }
.takeover-panel.is-alert .takeover-control [role="radio"] { border-color: var(--ink); color: var(--ink); }
.takeover-panel.is-alert .takeover-control [role="radio"]:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.takeover-panel.is-alert .takeover-control [role="radio"][aria-checked="true"] { background: var(--ink); color: var(--paper); }

.takeover-panel { background: var(--field); transition: background-color 240ms var(--ease); padding-block: 64px; }
.takeover-panel.is-adopted { background-color: var(--purple); color: var(--paper); }
.takeover-panel.is-alert { background-color: var(--orange); color: var(--ink); }
.takeover-panel .panel-inner { max-width: 640px; }

.ledger-card { background: var(--paper); border: 1px solid var(--line); padding: 28px; margin-top: 32px; }
.takeover-panel.is-adopted .ledger-card { background: transparent; border-color: var(--paper); }
.takeover-panel.is-alert .ledger-card { background: transparent; border-color: var(--ink); }
.ledger-card .org { color: var(--muted); }
.takeover-panel.is-adopted .ledger-card .org { color: var(--paper); }
.takeover-panel.is-alert .ledger-card .org { color: var(--ink); }
.ledger-card .balance { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ledger-rows { margin-top: 20px; }
.ledger-rows li {
  display: flex; justify-content: space-between; gap: 24px; padding-block: 8px;
  border-top: 1px solid var(--line); font-size: 0.875rem; font-variant-numeric: tabular-nums;
}
.takeover-panel.is-adopted .ledger-rows li { border-top-color: var(--paper); }
.takeover-panel.is-alert .ledger-rows li { border-top-color: var(--ink); }
.demo-status { margin-top: 28px; min-height: 72px; }
.demo-status .status-display { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.demo-status .status-note { margin-top: 8px; font-size: 0.875rem; }
.takeover-fallback .takeover-panel { transition: none; margin-bottom: 32px; }
.takeover-fallback figcaption { margin-top: 12px; margin-bottom: 40px; font-size: 0.8125rem; color: var(--muted); }

/* ---------- Reference figures / prism reference ---------- */

.color-refs { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 768px) { .color-refs { grid-template-columns: repeat(2, 1fr); } }
.color-refs .ref-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.color-refs .ref-tile .tag { display: block; margin-top: 12px; color: var(--muted); }
.color-refs .ref-tile .cap { display: block; margin-top: 4px; color: var(--ink); font-size: 0.875rem; }

.ref-grid { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 768px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .ref-grid { grid-template-columns: repeat(4, 1fr); } }
.ref-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ref-tile .tag { display: block; margin-top: 12px; color: var(--line); }
.ref-tile .cap { display: block; margin-top: 4px; color: var(--paper); font-size: 0.875rem; }

/* prism specimen tile (visual language) */
.prism-specimen { margin-top: 48px; }
.prism-specimen .stage { background: #000; }
.prism-specimen .stage img { width: 100%; height: auto; display: block; }

/* principles */
.principles { margin-top: 56px; }
.principles li {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px;
  padding-block: 24px; border-top: 1px solid var(--hairline-on-ink);
}
.principles li:last-child { border-bottom: 1px solid var(--hairline-on-ink); }
.principles .ord { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--line); padding-top: 6px; }
.principles h3 { color: var(--paper); }
.principles p { margin-top: 8px; color: var(--line); max-width: 64ch; }

/* ---------- Typography section ---------- */

.face-card { border: 1px solid var(--line); background: var(--field); padding: clamp(28px, 5%, 56px); margin-top: 48px; }
.face-card .glyphs { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.face-card .facts { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: 24px; }
.face-card .facts dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.poster-specimen { border: 1px solid var(--line); background: var(--paper); padding: clamp(28px, 6%, 72px); margin-top: 48px; }
.poster-specimen .line { max-width: 12ch; }

.role-specimens { display: grid; gap: 24px; margin-top: 48px; }
@media (min-width: 1024px) { .role-specimens { grid-template-columns: repeat(3, 1fr); } }
.role-card { border: 1px solid var(--line); background: var(--paper); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.role-card .demo-display { font-size: 1.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-transform: uppercase; }
.role-card .demo-body { font-size: 1rem; line-height: 1.6; }
.role-card .demo-data { font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.role-card .demo-data .lbl { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.role-card .numerals-demo { margin-top: 12px; }
.role-card .numerals-demo li { display: flex; justify-content: space-between; gap: 24px; padding-block: 6px; border-top: 1px solid var(--line); }
.role-card .numerals-demo li:first-child { border-top: none; }
.role-card p.note { font-size: 0.8125rem; color: var(--muted); margin-top: auto; }

.weight-ladder { margin-top: 48px; }
.weight-ladder li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: baseline; padding-block: 14px; border-top: 1px solid var(--line); }
.weight-ladder li:last-child { border-bottom: 1px solid var(--line); }
.weight-ladder .w { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.weight-ladder .spec { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }

.scale-table td .preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; line-height: 1.1; }
@media (max-width: 1023px) {
  .scale-table.reflow, .scale-table.reflow tbody { display: block; }
  .scale-table.reflow thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scale-table.reflow tr { display: block; border-bottom: 1px solid var(--line); padding-block: 12px; }
  .scale-table.reflow td { display: flex; justify-content: space-between; gap: 16px; border: none; padding: 4px 0; text-align: right; }
  .scale-table.reflow td::before { content: attr(data-th); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: left; flex: none; }
  .scale-table td .preview { max-width: 100%; }
  .scale-table.reflow td.preview-cell { display: block; text-align: left; }
  .scale-table.reflow td.preview-cell::before { display: none; }
}

/* ---------- Applications ---------- */

.showpiece { margin-top: 0; }
.showpiece img { width: 100%; height: auto; }
@media (min-width: 1024px) { .showpiece img { height: 78vh; object-fit: cover; object-position: center; } }

.app-interface { margin-top: 96px; display: grid; gap: 24px; }
@media (min-width: 1024px) { .app-interface { grid-template-columns: 8fr 4fr; align-items: start; } }
.app-interface .frame { background: var(--paper); border: 1px solid var(--line); }
.app-interface .frame img { width: 100%; }
.app-interface .detail { max-width: 340px; }
.app-interface .detail .cardframe { padding: 0; overflow: hidden; }
.app-interface .detail .cardframe img { width: 100%; }

.app-pull { margin-top: 96px; }
.app-pull .pull { max-width: 22ch; font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------- Downloads ---------- */

.zip-block { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.zip-button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px;
  background: var(--paper); color: var(--ink); font-size: 1.125rem; font-weight: 600;
  text-decoration: none; transition: background-color 180ms var(--ease);
}
.zip-button:hover { background: var(--field); }
.zip-button:active { transform: translateY(1px); }
.dl-note { margin-top: 40px; color: var(--line); max-width: 62ch; }
.dl-gap { margin-top: 24px; color: var(--line); max-width: 62ch; }

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

.site-footer { border-top: 1px solid var(--hairline-on-ink); padding-block: 48px 56px; }
.site-footer .container { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
@media (min-width: 768px) { .site-footer .container { flex-direction: row; justify-content: space-between; align-items: center; } }
.site-footer img { height: 24px; width: auto; }   /* live wordmark min-size proof */
.site-footer .lines { color: var(--line); }
.site-footer .lines span { display: block; }

/* ---------- Reveal motion (opt-in via html.js) ---------- */

html.js .reveal { opacity: 0; transform: translateY(12px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- Utilities ---------- */

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.mt-72 { margin-top: 72px; }
.max-68 { max-width: 68ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
