/* ============================================================
   Reliever Brand Guidelines - 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
   No shadows. No italics. No border-radius. Hairline separation.
   ============================================================ */

:root {
  --ink: #111111;
  --ink-lift: #1A1A1A;
  --muted: #6B6B6B;
  --line: #E8E8E8;
  --field: #FAFAFA;
  --paper: #FFFFFF;
  --purple: #7030B0;
  --orange: #F0600F;
  /* enumerated alpha annex */
  --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;
}

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; }

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

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.on-ink :focus-visible,
.r-ink :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); }

/* ---------- Checker bands ---------- */

.checker-band {
  --cell: clamp(20px, 4vw, 48px);
  height: calc(var(--cell) * 2);
  background: conic-gradient(var(--ink) 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0);
  background-size: calc(var(--cell) * 2) calc(var(--cell) * 2);
}

/* ---------- 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: 20px; width: auto; }

.nav-links { display: none; }

@media (min-width: 768px) {
  .nav-links { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); }
  .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 ---------- */

.hero { min-height: auto; display: flex; align-items: center; }
@media (min-width: 1280px) { .hero { min-height: min(calc(92vh - 64px), 1080px); } }

.hero .container { width: 100%; padding-block: 96px 72px; }

.hero-lockup { width: clamp(240px, 38vw, 460px); height: auto; margin-bottom: clamp(56px, 9vh, 104px); }

.hero .kicker { color: var(--line); margin-bottom: 20px; }

.hero h1 { max-width: 12ch; color: var(--paper); }

.hero .lede { color: var(--line); margin-top: 28px; max-width: 52ch; }

/* ---------- 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: 16ch; }
.section-head .lede { margin-top: 24px; }
@media (min-width: 1280px) {
  .section-head { max-width: 66.666%; 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;
}

blockquote.designer-quote {
  border-left: 3px solid var(--ink);
  padding-left: 24px;
  margin-block: 48px;
  max-width: 58ch;
}
blockquote.designer-quote p { font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
blockquote.designer-quote footer { margin-top: 12px; }

/* ---------- 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: 62ch; }
.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); }

/* ---------- Anatomy figure ---------- */

.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(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 6%, 64px);
}
.anatomy-stage { position: relative; }
.anatomy-stage img { width: 100%; }
.anatomy-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 600;
  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: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 600;
}
.anatomy-note { margin-top: 24px; }

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

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

.variant-card .specimen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15%;
  border: 1px solid var(--line);
}
.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.ratio-wide { aspect-ratio: 16 / 9; }
.variant-card .specimen.ratio-tall { aspect-ratio: 4 / 5; }
.variant-card .specimen img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.variant-card .meta { padding-top: 12px; }
.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(--paper); border: 1px solid var(--line); padding: clamp(28px, 7%, 72px); }
.cs-wrap { position: relative; margin-inline: auto; border: 1px dashed var(--muted); }
.cs-wrap.cs-mark { max-width: 560px; padding: 10.06%; }
.cs-wrap.cs-lockup { max-width: 760px; padding: 3.72%; margin-top: 56px; }
.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);
}
.cs-s.top { top: 4px; left: 50%; transform: translateX(-50%); }
.cs-s.bottom { bottom: 4px; left: 50%; transform: translateX(-50%); }
.cs-s.left { left: 6px; top: 50%; transform: translateY(-50%); }
.cs-s.right { right: 6px; top: 50%; transform: translateY(-50%); }

/* one-bar measure: S bracket over the first upper piece of the mark */
.cs-bar {
  position: absolute;
  top: -18px;
  left: 6.85%;
  width: 12.47%;
  height: 10px;
  border-left: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
}
.cs-bar::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--muted); }
.cs-bar-label { position: absolute; top: -38px; left: 6.85%; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }

/* ---------- 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; }
/* align-items must not be stretch: stretched flex items distort the true-pixel
   specimens' intrinsic ratios (client review 2026-07-15) */
.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); }

.proof-grid { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 1024px) { .proof-grid { grid-template-columns: 7fr 5fr; align-items: stretch; } }
.proof-grid .fig { margin-block: 0; }
.proof-grid .cardframe { height: 100%; display: flex; flex-direction: column; }
.proof-grid .cardframe > div:first-child { flex: 1; display: flex; align-items: center; }

.cardframe { background: var(--paper); border: 1px solid var(--line); padding: 20px; }

/* ---------- 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); } }

.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-muted { background: var(--muted); border-color: var(--muted); }
.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: 55%; }

.tile .demo img.subject { width: 60%; }

.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; }

/* mask-based demos (no doctored files shipped) */
.mask-mark {
  width: 60%;
  aspect-ratio: 2437 / 1228;
  background-color: var(--ink);
  -webkit-mask-image: url(../assets/logos/crops/mark-cropped.png);
  mask-image: url(../assets/logos/crops/mark-cropped.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-mark.grey { background-color: var(--muted); }

.pullapart { position: relative; width: 60%; aspect-ratio: 2437 / 1228; }
.pullapart .half {
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  -webkit-mask-image: url(../assets/logos/crops/mark-cropped.png);
  mask-image: url(../assets/logos/crops/mark-cropped.png);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.pullapart .half.top { clip-path: inset(0 0 52% 0); transform: translate(-3%, -7%); }
.pullapart .half.bottom { clip-path: inset(48% 0 0 0); transform: translate(3%, 7%); }

.deleted { position: relative; }
.deleted .gone { position: absolute; left: 31%; top: -1%; width: 14.2%; height: 50.5%; background: var(--paper); }

.outlined { position: relative; width: 60%; aspect-ratio: 2437 / 1228; }
.outlined .layer {
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  -webkit-mask-image: url(../assets/logos/crops/mark-cropped.png);
  mask-image: url(../assets/logos/crops/mark-cropped.png);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.outlined .layer.o1 { transform: translate(0.6%, 1.2%); }
.outlined .layer.o2 { transform: translate(-0.6%, -1.2%); }
.outlined .layer.o3 { transform: translate(0.6%, -1.2%); }
.outlined .layer.o4 { transform: translate(-0.6%, 1.2%); }
.outlined .layer.inner { background-color: var(--paper); }

.demo-stretch img.subject { transform: scaleX(1.4); width: 46%; }
.demo-rotate img.subject { transform: rotate(-12deg); }
.demo-shadow img.subject { filter: drop-shadow(0 12px 16px var(--ink-scrim)); }

.typedR { font-size: clamp(4rem, 10vw, 6rem); font-weight: 800; line-height: 1; }

.wordmisuse { display: flex; align-items: center; gap: 2px; font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -0.01em; }
.wordmisuse img { height: 1.05em; width: auto; }

/* ---------- 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.no-border { border-color: transparent; }
.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; }

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

.data-table { margin-top: 40px; }
.data-table caption { text-align: left; padding-bottom: 12px; }
.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; }

/* stacked reflow on small screens */
@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; }
}

/* dark table (downloads) */
.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); }
}

/* ---------- Guardrails / rules blocks ---------- */

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

.rules-list { margin-top: 32px; max-width: 640px; 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;
}
.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; }

/* control on flooded surfaces */
.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; }

/* static fallback figures (no-JS documentation) */
.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 / strips ---------- */

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

.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(3, 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; }
.color-refs .ref-tile .tag { color: var(--muted); }
.color-refs .ref-tile .cap { color: var(--ink); }

/* 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: 62ch; }

/* ---------- 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; }

.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 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 — preview is block so the max-width/ellipsis rules engage (QA D-001) */
.scale-table td .preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; line-height: 1.1; }
/* nine columns cannot fit below ~1024px: the scale table keeps the stacked reflow up to 1023px
   (wider than the generic 767px reflow breakpoint), and the table itself goes display:block so
   the nowrap previews cannot inflate the table's intrinsic width past the viewport */
@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; }
}

.numerals-demo { border: 1px solid var(--line); background: var(--paper); padding: 24px; margin-top: 48px; max-width: 480px; }
.numerals-demo 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; }
.numerals-demo li:first-child { border-top: none; padding-top: 0; }

/* ---------- 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; } }

/* R5 photographic-ink interlude band between sections (client review 2026-07-15):
   shorter than the Applications showpiece so the later full 78vh moment keeps its rank */
.interlude { padding-bottom: 24px; }
.interlude img { width: 100%; height: auto; }
@media (min-width: 1024px) { .interlude img { height: 56vh; object-fit: cover; object-position: center; } }

.app-pair { display: grid; gap: 32px; margin-top: 96px; }
@media (min-width: 1280px) { .app-pair { grid-template-columns: 7fr 5fr; align-items: center; } }
.app-pair .fig { margin-block: 0; }
.app-pair .frame { background: var(--paper); border: 1px solid var(--line); }
.app-pair .frame img { width: 100%; }

.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: 320px; }

.app-portrait { display: grid; gap: 32px; margin-top: 96px; }
@media (min-width: 1024px) { .app-portrait { grid-template-columns: 5fr 7fr; align-items: center; } }
.app-portrait .frame { border: 1px solid var(--ink); background: var(--ink); }
.app-portrait .frame img { width: 100%; }
.app-portrait .pull { max-width: 24ch; }

/* ---------- 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; }

/* ---------- 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; }
/* flex-start, not stretch: the footer lockup is a live 28px min-size proof and must keep its intrinsic ratio (client review 2026-07-15) */
@media (min-width: 768px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; align-items: center; }
}
.site-footer img { height: 28px; width: auto; }
.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;
}
