/* ==========================================================================
   Griffin Terry — "The working record"
   A portfolio built like a dated engineering log: every claim sits beside the
   artifact that proves it, and the corrections stay visible.
   ========================================================================== */

:root {
  /* Ledger paper — the pale green-bar stock of a working record, not warm cream */
  --paper:      #EFF2EC;
  --paper-2:    #E6EAE2;
  --paper-3:    #DCE1D7;

  /* Ink */
  --ink:        #15170F;
  --ink-2:      #454A3E;
  --ink-3:      #666B5D;

  /* Rules */
  --rule:       #D2D8CA;
  --rule-firm:  #AEB6A4;

  /* One accent: the correction mark */
  --mark:       #A02F12;
  --mark-wash:  #EFE2DC;

  --sans:   "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif:  "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --mono:   "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 60ch;
  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1180px;

  color-scheme: light;
}

/* ---------- Night shift ----------
   Not an inversion: the same record, read under a lamp. The green cast of the
   ledger stock survives in the ground, and the correction mark lifts so it
   still reads as pen on the page. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #13160F;
    --paper-2:    #1A1E16;
    --paper-3:    #232820;
    --ink:        #E8EBE3;
    --ink-2:      #B3B8AB;
    --ink-3:      #8A9081;
    --rule:       #2C3228;
    --rule-firm:  #5C6354;
    --mark:       #E2673E;
    --mark-wash:  #2A1D17;

    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:      #13160F;
  --paper-2:    #1A1E16;
  --paper-3:    #232820;
  --ink:        #E8EBE3;
  --ink-2:      #B3B8AB;
  --ink-3:      #8A9081;
  --rule:       #2C3228;
  --rule-firm:  #5C6354;
  --mark:       #E2673E;
  --mark-wash:  #2A1D17;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Browser surfaces belong to the design system too */
  scrollbar-color: var(--rule-firm) var(--paper);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mark); color: var(--paper); }
:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 3px;
  border-radius: 1px;
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule-firm); border: 3px solid var(--paper); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

a { color: inherit; text-decoration-color: var(--rule-firm); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--mark); }
img, video { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* Numerals read as data everywhere */
.num, table, .ledger, .meta, .mono { font-variant-numeric: tabular-nums; }

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

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead__in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.015em;
  text-decoration: none; white-space: nowrap;
}
.wordmark i { font-style: normal; font-weight: 700; color: var(--mark); }
.masthead nav { display: flex; gap: 26px; align-items: baseline; }
.masthead nav a {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--mark); }
.navtoggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
.navtoggle svg { display: block; }

/* ---------- Shared typography ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
}
.label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3);
}
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.05em; }
.prose strong { font-weight: 600; }

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

.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 5vw, 64px); }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  letter-spacing: -0.03em; line-height: 0.98;
  max-width: 17ch; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--mark); }
.hero .lede { margin-top: 26px; }
.hero__acts { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 20px; text-decoration: none; border: 1px solid var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--mark); border-color: var(--mark); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn--line:hover { border-color: var(--ink); transform: translateY(-1px); }

/* The authored moment: an erratum, struck and corrected */
.erratum {
  margin-top: clamp(40px, 6vw, 60px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0 22px;
  max-width: 62ch;
}
.erratum__h {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.erratum__h span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mark); }
.erratum__h hr { flex: 1; border: 0; border-top: 1px solid var(--rule); margin: 0; }
.erratum p { font-size: 1.02rem; color: var(--ink-2); }
.erratum .fix { font-family: var(--mono); font-size: 0.97rem; margin-top: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.erratum .was {
  position: relative; color: var(--ink-3); margin-right: 6px;
  text-decoration: line-through; text-decoration-color: var(--mark); text-decoration-thickness: 1.5px;
}
.erratum .arrow { color: var(--ink-3); margin: 0 8px; }
.erratum .now { color: var(--mark); font-weight: 600; }

/* ---------- Section frame ---------- */

.band { padding: clamp(56px, 8vw, 92px) 0; border-top: 1px solid var(--rule); }
.band__head { margin-bottom: clamp(30px, 4vw, 48px); }
.band__head h2 {
  font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.025em; line-height: 1.04; max-width: 20ch; text-wrap: balance;
}
.band__head p { margin-top: 14px; color: var(--ink-2); max-width: 60ch; }

/* ---------- Ledger table ---------- */

.ledger { width: 100%; border-collapse: collapse; }
.ledger caption { text-align: left; padding-bottom: 12px; }
.ledger th {
  text-align: left; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  padding: 0 16px 9px 0; border-bottom: 1px solid var(--ink);
}
.ledger td { padding: 15px 16px 15px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.ledger tr:last-child td { border-bottom: 1px solid var(--rule-firm); }
.ledger .fig {
  font-family: var(--mono); font-size: 1.22rem; font-weight: 500; white-space: nowrap;
  letter-spacing: -0.02em;
}
.ledger .what { color: var(--ink); }
.ledger .src { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); }

/* ---------- Work entries (deliberate scale mismatch) ---------- */

.entry { display: block; text-decoration: none; color: inherit; border-top: 1px solid var(--rule); padding: 34px 0; }
.entry:first-of-type { border-top: 1px solid var(--ink); }
.entry__top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.entry h3 { font-family: var(--serif); font-weight: 450; letter-spacing: -0.025em; line-height: 1; }
.entry__role { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.entry p { color: var(--ink-2); margin-top: 14px; max-width: 58ch; }
.entry__more {
  margin-top: 18px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.09em;
  text-transform: uppercase; display: inline-flex; gap: 9px; align-items: center; color: var(--ink);
  border-bottom: 1px solid var(--rule-firm); padding-bottom: 3px;
  transition: border-color .2s, color .2s;
}
.entry:hover .entry__more { color: var(--mark); border-bottom-color: var(--mark); }
.entry__more .a { transition: transform .22s cubic-bezier(.22,1,.36,1); }
.entry:hover .entry__more .a { transform: translateX(5px); }

/* The lead entry gets the weight */
.entry--lead { padding: 40px 0 44px; }
.entry--lead h3 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.entry--lead .entry__body { display: grid; grid-template-columns: 1.35fr 0.75fr; gap: clamp(24px, 4vw, 52px); align-items: start; margin-top: 20px; }
.entry--lead p { font-size: 1.06rem; margin-top: 0; }
.entry--lead .entry__shot {
  border: 1px solid var(--rule); background: var(--paper-2); padding: 14px;
}
.entry--lead .entry__shot img { height: clamp(360px, 38vw, 470px); width: auto; margin: 0 auto; }
.entry--lead .entry__shot figcaption { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.entry--sub h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.tags { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.tags li { list-style: none; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.tags li::before { content: "—"; margin-right: 7px; color: var(--rule-firm); }

/* ---------- Claim / proof pairs ---------- */

.pairs { border-top: 1px solid var(--ink); }
.pair {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(20px, 4vw, 56px); padding: 30px 0; border-bottom: 1px solid var(--rule);
}
.pair__claim { font-family: var(--serif); font-weight: 450; font-size: clamp(1.35rem, 2.4vw, 1.85rem); letter-spacing: -0.02em; line-height: 1.36; }
.pair__proof { color: var(--ink-2); font-size: 0.99rem; max-width: 58ch; }
.pair__proof .receipt {
  display: block; margin-top: 12px; font-family: var(--mono); font-size: 0.78rem;
  color: var(--ink-3); padding-left: 15px; border-left: 1px solid var(--rule-firm);
  line-height: 1.6; max-width: 62ch;
}

/* ---------- Record rows (experience) ---------- */

.record { border-top: 1px solid var(--ink); }
.rec { display: grid; grid-template-columns: 170px 1fr; gap: clamp(18px, 3vw, 40px); padding: 26px 0; border-bottom: 1px solid var(--rule); }
.rec__when { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-3); letter-spacing: 0.02em; padding-top: 4px; font-variant-numeric: tabular-nums; }
.rec h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.02em; }
.rec__where { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.01em; color: var(--mark); margin-top: 6px; }
.rec p { color: var(--ink-2); margin-top: 11px; font-size: 0.99rem; max-width: 58ch; }

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about__card { border: 1px solid var(--rule); background: var(--paper-2); padding: 22px; }
.about__card img { width: 100%; filter: grayscale(1) contrast(1.04); }
:root[data-theme="dark"] .about__card img { filter: grayscale(1) contrast(1.02) brightness(0.86); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about__card img { filter: grayscale(1) contrast(1.02) brightness(0.86); }
}
.about__card dl { margin: 18px 0 0; display: grid; gap: 12px; }
.about__card dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.about__card dd { margin: 3px 0 0; font-size: 0.93rem; line-height: 1.45; }

/* ---------- Colophon ---------- */

.colophon { border-top: 1px solid var(--ink); padding: 34px 0 54px; }
.colophon__in { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }

.contact { padding: clamp(64px, 9vw, 108px) 0; border-top: 1px solid var(--rule); }
.contact h2 { font-family: var(--serif); font-size: clamp(2.2rem, 5.4vw, 3.8rem); letter-spacing: -0.03em; line-height: 1.02; max-width: 16ch; }
.contact p { margin-top: 16px; color: var(--ink-2); max-width: 54ch; }
.contact .hero__acts { margin-top: 30px; }

/* ---------- One authored motion moment ---------- */

@keyframes strike { from { text-decoration-color: transparent; } to { text-decoration-color: var(--mark); } }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.erratum .was { animation: strike .5s cubic-bezier(.22,1,.36,1) 1.1s both; }
.erratum .arrow, .erratum .now { animation: settle .55s cubic-bezier(.22,1,.36,1) 1.5s both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .erratum .was, .erratum .arrow, .erratum .now { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .entry--lead .entry__body { grid-template-columns: 1fr; }
  .entry--lead .entry__shot img { height: 400px; }
  .pair { grid-template-columns: 1fr; gap: 12px; }
  .about { grid-template-columns: 1fr; }
  .rec { grid-template-columns: 1fr; gap: 6px; }
  .rec__when { padding-top: 0; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .navtoggle { display: block; }
  .masthead nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; gap: 0; padding: 6px var(--gutter) 14px;
  }
  .masthead nav.open { display: flex; }
  .masthead nav a { padding: 11px 0; }
  .ledger .src { display: none; }
  .ledger td, .ledger th { padding-right: 10px; }
}

/* ---------- Theme toggle ---------- */

.themetoggle {
  background: none; border: 1px solid var(--rule-firm); color: var(--ink);
  width: 34px; height: 34px; padding: 0; cursor: pointer;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  transition: border-color .18s, color .18s, background .18s;
}
.themetoggle:hover { border-color: var(--mark); color: var(--mark); }
.themetoggle svg { display: block; width: 17px; height: 17px; }
/* One icon shows per theme; the other is removed from the box entirely. */
.themetoggle .i-moon { display: none; }
:root[data-theme="dark"] .themetoggle .i-sun { display: none; }
:root[data-theme="dark"] .themetoggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themetoggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .themetoggle .i-moon { display: block; }
}

.masthead__right { display: flex; align-items: center; gap: 22px; }

@media (max-width: 680px) {
  .masthead__right { gap: 12px; }
}

/* ==========================================================================
   Case studies
   ========================================================================== */

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--primary:hover { background: var(--mark); border-color: var(--mark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.backlink {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none; display: inline-flex; gap: 8px; align-items: center;
  margin-bottom: 30px; transition: color .18s;
}
.backlink:hover { color: var(--mark); }

.case-hero { padding: clamp(40px, 6vw, 68px) 0 clamp(26px, 3vw, 38px); }
.case-logo { max-width: 190px; height: auto; display: block; margin-bottom: 14px; }
.case-hero h1 {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(2.4rem, 5.6vw, 4.2rem); letter-spacing: -0.03em; line-height: 1;
  max-width: 18ch; text-wrap: balance;
}
.case-hero .lead {
  margin-top: 22px; font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.55;
  color: var(--ink-2); max-width: 58ch;
}

/* The case header reads as a record entry, not a stat strip. */
.case-meta {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--ink);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px;
}
.case-meta div span {
  display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.case-meta div b { font-weight: 500; font-size: 0.98rem; }

.case-body { padding: 0 0 40px; }
.case-section { padding: clamp(34px, 4.5vw, 52px) 0; border-top: 1px solid var(--rule); }
.case-section:first-child { border-top: 0; }
.case-section h2 {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.06;
  margin-bottom: 18px; max-width: 22ch; text-wrap: balance;
}
.case-section h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.32rem;
  letter-spacing: -0.02em; margin: 30px 0 10px;
}
.case-section p { color: var(--ink-2); margin-bottom: 15px; max-width: 58ch; }
.case-section p strong, .case-section li strong { color: var(--ink); font-weight: 600; }
.case-section ul { list-style: none; margin: 8px 0 18px; max-width: 58ch; }
.case-section ul li { position: relative; padding-left: 22px; margin-bottom: 11px; color: var(--ink-2); }
.case-section ul li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 9px; height: 1px; background: var(--mark);
}

/* Figures: mono numerals on a hairline rule, never big-number tiles. */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0 26px; margin: 6px 0 20px; border-top: 1px solid var(--ink);
}
.stat { padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.stat b {
  display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 5px; color: var(--ink-3); font-size: 0.88rem; line-height: 1.45; }

/* A marginal note in the record. 1px rule — never a thick colored bar. */
.callout {
  margin: 22px 0; padding: 18px 0 18px 20px;
  border-left: 1px solid var(--mark); background: var(--paper-2);
  padding-right: 20px; color: var(--ink-2); max-width: 66ch;
}
.callout b { color: var(--ink); font-weight: 600; }

.pcard__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
  border: 1px solid var(--rule-firm); padding: 5px 10px;
}

.placeholder {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 16px 0; color: var(--ink-2); max-width: 62ch; font-size: 0.99rem;
}
.placeholder b { color: var(--ink); font-weight: 600; }

/* Plates */
.shots { column-count: 2; column-gap: 18px; margin: 12px 0; }
.shot {
  break-inside: avoid; margin-bottom: 18px; background: var(--paper-2);
  border: 1px solid var(--rule); padding: 12px;
}
.shot img { width: 100%; display: block; }
.shot figcaption {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
  margin-top: 10px; line-height: 1.55;
}
.shot--empty { padding: 30px; text-align: center; }

.demo-video { margin: 14px 0 6px; background: var(--paper-2); border: 1px solid var(--rule); padding: 12px; }
.demo-video video { width: 100%; display: block; }
.demo-video figcaption {
  font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3);
  margin-top: 11px; line-height: 1.55; max-width: 70ch;
}

@media (max-width: 760px) {
  .shots { column-count: 1; }
  .case-meta { grid-template-columns: 1fr 1fr; gap: 18px; }
}

/* ---------- next4 case study: system components ---------- */

/* Numbered steps: the sequence is the information, so the numbers stay. */
.flow { display: grid; gap: 0; margin: 10px 0 22px; max-width: 70ch; border-top: 1px solid var(--ink); }
.flow__step {
  display: grid; grid-template-columns: 30px 1fr; gap: 18px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.flow__step b {
  font-family: var(--mono); font-size: 0.86rem; font-weight: 500; color: var(--mark);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.flow__step h4 { font-family: var(--serif); font-weight: 500; font-size: 1.14rem; letter-spacing: -0.015em; margin: 0 0 6px; }
.flow__step p { color: var(--ink-2); font-size: 0.97rem; margin: 0; max-width: 58ch; }

/* Pillars: hairline-separated entries, not a grid of boxes. */
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0 40px; margin: 10px 0 22px;
}
.gcard { padding: 18px 0; border-top: 1px solid var(--rule); }
.gcard span {
  display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mark); margin-bottom: 8px;
}
.gcard h4 { font-family: var(--serif); font-weight: 500; font-size: 1.16rem; letter-spacing: -0.015em; margin: 0 0 8px; }
.gcard p { color: var(--ink-2); font-size: 0.94rem; margin: 0; max-width: 48ch; }

/* The compliance rules: a label column against its meaning. */
.rules { display: grid; gap: 0; margin: 10px 0 22px; max-width: 76ch; border-top: 1px solid var(--ink); }
.rule {
  display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--rule);
}
.rule b {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--ink);
  letter-spacing: 0.01em;
}
.rule span { color: var(--ink-2); font-size: 0.95rem; }

/* Phone plates, evenly sized */
.shots--phone { column-count: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shots--phone .shot { break-inside: auto; margin-bottom: 0; }

/* Horizontal asset strip */
.strip {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { height: 9px; }
.strip::-webkit-scrollbar-thumb { background: var(--rule-firm); border-radius: 0; }
.strip figure {
  flex: 0 0 auto; width: 224px; scroll-snap-align: start; margin: 0;
  background: var(--paper-2); border: 1px solid var(--rule); overflow: hidden;
}
.strip img, .strip video { display: block; width: 100%; height: auto; }

/* Media beside text */
.split { display: grid; grid-template-columns: 236px 1fr; gap: 34px; align-items: start; margin: 12px 0 8px; }
.split video, .split img { width: 100%; border: 1px solid var(--rule); display: block; background: var(--paper-2); }
.split p { color: var(--ink-2); margin-bottom: 14px; max-width: 58ch; }
.split p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
  .split video, .split img { max-width: 260px; }
  .shots--phone { grid-template-columns: repeat(2, 1fr); }
  .rule { grid-template-columns: 1fr; gap: 5px; }
  .grid-cards { gap: 0 24px; }
}
@media (max-width: 560px) {
  .shots--phone { grid-template-columns: 1fr; }
  .flow__step { grid-template-columns: 24px 1fr; gap: 12px; }
}

/* Case-study figures table */
.tablewrap { overflow-x: auto; margin: 10px 0 20px; }
.figures { width: 100%; border-collapse: collapse; min-width: 560px; font-variant-numeric: tabular-nums; }
.figures th {
  text-align: left; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  padding: 0 14px 9px 0; border-bottom: 1px solid var(--ink);
}
.figures td {
  padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink-2); font-family: var(--mono); font-size: 0.9rem;
}
.figures td.rowlabel { color: var(--ink); font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.figures td.profit,
.figures td.em { color: var(--mark); font-weight: 500; }
.figures tr:last-child td { border-bottom: 0; }
