/* ============================================================
   Reliever Brand Guidelines - Concept 101 "The Equal Sign".
   Built in the system it documents.
   Tokens: Ink #111111 · Ink Lift #1A1A1A · Muted #6B6B6B ·
   Line #E8E8E8 · Field #FAFAFA · Paper #FFFFFF ·
   Adoption Purple #7030B0 (takeover flood + translucent prism ground) ·
   Alert Orange #F0600F (takeover flood only)
   Prism blade alphas (over Field): rgba(112,48,176, .10/.18/.26/.32)
   Artwork constants (inside PNG artwork only): #000000 / #FFFFFF
   No shadows (except the one misuse tile that documents the ban).
   No italics. Radius 0 everywhere except the CSS equals echo of the mark.
   ============================================================ */

: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);
  --prism-a1: rgba(112, 48, 176, 0.10);
  --prism-a2: rgba(112, 48, 176, 0.18);
  --prism-a3: rgba(112, 48, 176, 0.26);
  --prism-a4: rgba(112, 48, 176, 0.32);
  --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; }
.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); }

/* ---------- Prism ground (Adoption Purple, translucent) ---------- */
/* Light Field base + symmetric vertical blades radiating from a light centre.
   Carries Ink text / black wordmark only. Never Paper text. */

.prism-bg {
  position: absolute;
  inset: 0;
  background: var(--field);
  overflow: hidden;
  z-index: 0;
}
.prism-bg .blade {
  position: absolute;
  top: -6%;
  bottom: -6%;
  width: 6%;
  transform: skewX(-4deg);
}
.prism-bg .blade.b1 { left: 13%; width: 5%;  background: linear-gradient(90deg, transparent, var(--prism-a2) 50%, transparent); }
.prism-bg .blade.b2 { left: 21%; width: 7%;  background: linear-gradient(90deg, transparent, var(--prism-a3) 50%, transparent); }
.prism-bg .blade.b3 { left: 31%; width: 4.5%; background: linear-gradient(90deg, transparent, var(--prism-a1) 50%, transparent); }
.prism-bg .blade.b4 { left: 40%; width: 3.5%; background: linear-gradient(90deg, transparent, var(--prism-a4) 50%, transparent); }
.prism-bg .blade.b5 { right: 13%; width: 5%;  background: linear-gradient(90deg, transparent, var(--prism-a2) 50%, transparent); }
.prism-bg .blade.b6 { right: 21%; width: 7%;  background: linear-gradient(90deg, transparent, var(--prism-a3) 50%, transparent); }
.prism-bg .blade.b7 { right: 31%; width: 4.5%; background: linear-gradient(90deg, transparent, var(--prism-a1) 50%, transparent); }
.prism-bg .blade.b8 { right: 40%; width: 3.5%; background: linear-gradient(90deg, transparent, var(--prism-a4) 50%, transparent); }
.prism-bg .blade.b5, .prism-bg .blade.b6, .prism-bg .blade.b7, .prism-bg .blade.b8 { transform: skewX(4deg); }

/* Divider bands: full-bleed, decorative */
.prism-band {
  position: relative;
  height: clamp(120px, 18vh, 220px);
  background: var(--field);
  overflow: hidden;
}
.prism-band .prism-bg { position: absolute; }

/* Small blade swatch (visual-language recipe) */
.prism-swatch {
  position: relative;
  height: 160px;
  background: var(--field);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* ---------- Equals mark (CSS echo of the wordmark's device) ---------- */
/* The one deliberate radius exception on the site. Not a shippable asset. */

.eq-mark {
  --eq-w: 24px;
  --eq-bar-h: 5px;
  --eq-gap: 5px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--eq-gap);
  width: var(--eq-w);
}
.eq-mark span {
  display: block;
  width: 100%;
  height: var(--eq-bar-h);
  background: var(--ink);
  border-radius: 2px;
}
.eq-mark.on-ink span { background: var(--paper); }
.eq-mark.big { --eq-w: 96px; --eq-bar-h: 20px; --eq-gap: 18px; }

/* ---------- 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-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 */
.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 (opens light on the prism) ---------- */

.hero { position: relative; display: flex; align-items: center; overflow: hidden; }
@media (min-width: 1280px) { .hero { min-height: min(calc(94vh - 64px), 1040px); } }

.hero .container { position: relative; z-index: 1; width: 100%; padding-block: 96px 88px; text-align: center; }

.hero-lockup { width: clamp(260px, 52vw, 620px); height: auto; margin: 0 auto clamp(48px, 8vh, 92px); }

.hero .kicker { color: var(--muted); margin-bottom: 20px; justify-content: center; }
.hero .kicker::before { content: ""; width: 24px; height: 1px; background: var(--line); }

.hero h1 { max-width: 14ch; margin-inline: auto; color: var(--ink); }

.hero .lede { color: var(--ink); margin: 28px auto 0; max-width: 56ch; }

/* ---------- 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); }
.hero .kicker::after { display: none; }

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

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 p + p { margin-top: 16px; }
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); }

/* ---------- The Mark: device figure + anatomy ---------- */

.device-figure {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 6%, 72px);
  margin-top: 48px;
}
.device-figure img { width: 100%; }

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

.anatomy-fig {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 6%, 56px);
}
.anatomy-stage { position: relative; }
.anatomy-stage img { width: 100%; }
/* center-balance axis drawn over the construction image (neutral only) */
.balance-axis { position: absolute; top: 6%; bottom: 6%; left: 50%; width: 1px; background: var(--muted); }
.balance-axis .lbl {
  position: absolute; top: -6px; left: 6px; white-space: nowrap;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.anatomy-caption { margin-top: 14px; font-size: 0.8125rem; color: var(--muted); }

.anatomy-list li {
  border-top: 1px solid var(--line);
  padding-block: 16px;
}
.anatomy-list li:last-child { border-bottom: 1px solid var(--line); }
.anatomy-list li strong { font-weight: 600; }
.anatomy-list li .data { color: var(--muted); }
.anatomy-list li .data strong { color: var(--ink); }

/* Icon idea illustration */
.icon-idea {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 5%, 48px);
  margin-top: 40px;
}
.icon-idea .stage { display: flex; align-items: center; justify-content: center; min-width: 140px; padding: 16px 32px; }
.icon-idea .note { flex: 1 1 260px; }
.icon-idea .note .caption { margin-top: 8px; }

/* ---------- 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 .specimen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12% 16%;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 7;
}
.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 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 { color: var(--paper); }

/* ---------- Clearspace figure ---------- */

.cs-fig { background: var(--paper); border: 1px solid var(--line); padding: clamp(28px, 7%, 72px); margin-top: 40px; }
.cs-wrap { position: relative; max-width: 720px; margin-inline: auto; border: 1px dashed var(--muted); padding: 12.6% 5.5%; }
/* padding = clearspace (0.6 x cap-height on top/bottom; equivalent on the sides).
   The cropped wordmark is 3086 x 458 (aspect 6.74); one equals-device = 275px = 0.6 cap. */
.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: 6px; top: 50%; transform: translateY(-50%); }
.cs-s.right { right: 6px; top: 50%; transform: translateY(-50%); }

/* inset unit proof: the equals device drawn as the clearspace module */
.cs-unit { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.cs-unit .eq-mark { --eq-w: 40px; --eq-bar-h: 8px; --eq-gap: 7px; }
.cs-unit .lbl { font-size: 0.8125rem; color: var(--muted); }

/* ---------- 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: 12px; 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: 5fr 7fr; align-items: stretch; } }
.proof-grid .fig { margin-block: 0; }
.proof-grid .cardframe { height: 100%; display: flex; flex-direction: column; }
.proof-grid .cardframe > .imgwrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.proof-grid .cardframe > .imgwrap img { width: 100%; max-width: 360px; }

.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); } }
@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: 14%;
}
.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-prism { padding: 12%; }
.tile .demo.ground-prism .prism-bg { z-index: 0; }
.tile .demo.ground-prism .subject { position: relative; z-index: 1; }
.tile .demo.ground-busy { padding: 0; }
.tile .demo.ground-busy {
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(45deg, var(--paper) 0 5px, transparent 5px 11px),
    repeating-linear-gradient(-45deg, var(--paper) 0 5px, transparent 5px 11px);
}
.tile .demo.ground-busy > img.fg { position: relative; width: 82%; }

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

/* restore-the-bar overlay: an Ink bar drawn back into the equals gap (illustrative) */
.demo-restore { position: relative; width: 88%; }
.demo-restore img { width: 100%; }
.demo-restore .barback {
  position: absolute;
  left: 45.4%; width: 9.2%;
  top: 40.6%; height: 18.8%;
  background: var(--ink);
}

/* recolor demo: wordmark shape filled Muted via mask (no doctored file) */
.mask-word {
  width: 88%;
  aspect-ratio: 3086 / 458;
  background-color: var(--muted);
  -webkit-mask-image: url(../assets/logos/wordmark-black-crop.png);
  mask-image: url(../assets/logos/wordmark-black-crop.png);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}

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

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

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

/* prism treatment card (documents the translucent ground honestly) */
.prism-card { border: 1px solid var(--line); background: var(--field); margin-top: 24px; }
.prism-card .prism-swatch { border: none; border-bottom: 1px solid var(--line); }
.prism-card .body-block { padding: 20px; }
.prism-card .rule-line { margin-top: 10px; font-weight: 600; }

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

/* 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: 660px; }
.guardrail li { padding-block: 8px; }
.guardrail li strong { font-weight: 600; }
.guardrail p + p { margin-top: 12px; }
.r-ink .guardrail { border-left-color: var(--paper); }

.rules-list { margin-top: 32px; max-width: 680px; 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); }
.rules-list.plain { counter-reset: none; }
.rules-list.plain li { grid-template-columns: 1fr; }
.rules-list.plain li::before { content: none; }

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

.takeover-demo-block { margin-top: 72px; }

.takeover-control {
  display: flex;
  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 / strips ---------- */

.ref-grid { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 640px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .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 motif figure (light exhibit inside the Ink section) */
.prism-motif { display: grid; gap: 32px; margin-top: 48px; }
@media (min-width: 1024px) { .prism-motif { grid-template-columns: 7fr 5fr; align-items: start; } }
.prism-motif .frame { background: var(--paper); border: 1px solid var(--line); padding: 20px; }
.prism-motif .frame img { width: 100%; }
.prism-motif .recipe .prism-swatch { margin-bottom: 14px; }
.prism-motif .recipe .code { font-size: 0.8125rem; color: var(--line); }
.prism-motif .recipe .code span { display: block; padding-block: 4px; border-top: 1px solid var(--hairline-on-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 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; }
}

.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 { max-height: 82vh; object-fit: contain; background: var(--field); } }

.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 img { width: 100%; }

.app-close { margin-top: 96px; }
.app-close .pull { max-width: 28ch; }

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

.gap-note { margin-top: 24px; color: var(--line); max-width: 66ch; }
.dl-note { margin-top: 40px; color: var(--line); max-width: 64ch; }

/* ---------- 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 .foot-mark { display: inline-flex; align-items: center; gap: 14px; }
.site-footer .foot-mark img { height: 26px; width: auto; }
.site-footer .lines { color: var(--line); }
.site-footer .lines span { display: block; }
@media (min-width: 768px) { .site-footer .lines { text-align: right; } }

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