/* The Low Code Factory — site stylesheet (v2)
 *
 * Values mirror docs/brand/tokens.css. Do not hard-code a hex outside :root.
 * Loaded on every public page. vercel.json serves /assets/css/* with
 * must-revalidate, so an edit here reaches users on their next request.
 *
 * Design rules this file encodes (docs/brand/style-guide.md §6, §7):
 *   - 2px radius. Effectively square; rounded reads as consumer software.
 *   - Hairline rules, never shadows, for structure.
 *   - No gradients.
 *   - Motion is a 150ms colour transition at most. No reveals, no lifts.
 */

/* ============================================================ TOKENS ===== */
:root {
  --indigo:     #3730A3;
  --indigo-600: #4338CA;
  --indigo-100: #E0E7FF;
  --amber:      #B45309;
  --amber-400:  #F59E0B;

  --paper:   #FFFFFF;
  --paper-2: #FAFAF9;
  --paper-3: #F5F5F4;
  --rule:    #E7E5E4;
  --rule-2:  #D6D3D1;
  --ink-4:   #A8A29E;
  --ink-3:   #6E6762;   /* see docs/brand/tokens.css — AA on every surface */
  --ink-2:   #57534E;
  --ink:     #1C1917;

  /* Dark plates are indigo-black, not near-black: darkened from --indigo so the
   * one thing a visitor reads as "the site's colour" belongs to the logo.
   * Running text stays warm near-black — see docs/brand/tokens.css. */
  --d-bg:     #16132E;
  --d-panel:  #211D42;
  --d-rule:   #2E2954;
  --d-rule-2: #423B71;
  --d-text:   #F5F5F4;
  --d-text-2: #C2BDD6;
  --d-text-3: #918AAB;
  --d-indigo: #A5B4FC;

  --success: #15803D;
  --warning: #A16207;
  --error:   #B91C1C;

  --font-heading: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius:    2px;
  --radius-lg: 3px;
  --content:   1200px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --duration:  150ms;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 1;   /* tabular figures — this is a numbers site */
  overflow-x: hidden;                /* backstop: nothing may scroll the page sideways */
}

/* Long unbroken strings (URLs, identifiers, code-ish tokens) must wrap rather
 * than widen the page. Wide content gets its own scroller (.table-wrap, pre). */
p, li, h1, h2, h3, h4, td, dd { overflow-wrap: break-word; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-600); }

/* A link sitting inside a block of text cannot be distinguished by colour alone:
 * indigo against body grey is ~1.3:1, well under the 3:1 WCAG requires. Anything
 * inside running prose is underlined. Buttons, arrow links and whole-row links
 * are their own affordance and opt out. */
p a:not(.btn):not(.arrow),
li a:not(.btn):not(.arrow),
figcaption a, dd a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-2);
}
p a:hover, li a:hover, figcaption a:hover, dd a:hover { text-decoration-color: var(--indigo-600); }
.ftr li a, .nav-mobile a { text-decoration: none; }   /* link lists, not text blocks */

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Visually hidden, still announced. Used to give listing sections a heading so
 * the document does not jump h1 -> h3. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* A heading that must sit at the correct level semantically but read as a
 * sub-label visually. */
.h-sm { font-size: 18px; letter-spacing: -0.008em; }

::selection { background: var(--indigo-100); color: var(--ink); }

/* Skip link — keyboard users land here first. */
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; color: var(--paper); }

/* ============================================================ LAYOUT ===== */
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

section { padding: 96px 0; }
@media (max-width: 860px) { section { padding: 64px 0; } }
section[id] { scroll-margin-top: 80px; }

.alt   { background: var(--paper-2); }
.bd-t  { border-top: 1px solid var(--rule); }
.bd-b  { border-bottom: 1px solid var(--rule); }

/* Grid and flex items default to min-width:auto, which means a wide child — a
 * <pre>, a table — sets the item's minimum size and pushes the track past the
 * viewport, even when that child has its own overflow-x:auto. min-width:0 lets
 * the item shrink and hands scrolling back to the child that asked for it. */
.split > *, .cs-grid > *, .cta-grid > *, .cols-2 > *, .cols-3 > *,
.grid-cells > *, .row > *, .principle > *, .step > * { min-width: 0; }

/* Two-column section: sticky label rail + content. The workhorse layout. */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: start; }
.split > .rail { position: sticky; top: 96px; }
/* The rail is a narrow column; a full-size h2 wraps to five words a line in it. */
.split > .rail h2 { font-size: clamp(24px, 2.1vw, 28px); }
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split > .rail { position: static; }
}

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (max-width: 980px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cols-2 { gap: 28px; } }

/* ============================================================== TYPE ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow-accent { color: var(--amber); }

/* The amber bar. Amber is the distinctive half of the mark and was, until now,
 * spent nowhere but the logo. It gets exactly one structural job: it opens a
 * section. Used on the hero eyebrow and on the top edge of every dark plate —
 * nowhere else. Two placements is the whole budget; a third would make it
 * decoration. */
.hero .eyebrow::before {
  content: ''; display: block;
  width: 40px; height: 3px;
  background: var(--amber-400);
  margin-bottom: 22px;
}

.display { font-size: clamp(38px, 5vw, 62px); line-height: 1.06; letter-spacing: -0.028em; }
h1 { font-size: clamp(32px, 3.8vw, 44px); }
h2 { font-size: clamp(26px, 2.7vw, 34px); letter-spacing: -0.018em; }
h3 { font-size: 21px; letter-spacing: -0.012em; }
h4 { font-size: 18px; letter-spacing: -0.008em; }

.lead { font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
@media (max-width: 640px) { .lead { font-size: 18px; } }

.prose { max-width: 72ch; }
.prose p + p { margin-top: 18px; }
.prose h2 { margin: 56px 0 16px; }
.prose h3 { margin: 40px 0 12px; }
.prose ul, .prose ol { margin: 18px 0; padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--ink-4); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
.prose a:hover { text-decoration-color: var(--indigo-600); }

.muted { color: var(--ink-3); }
.small { font-size: 14px; line-height: 1.6; }

/* ========================================================== CONTROLS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.btn:hover { background: var(--indigo); border-color: var(--indigo); color: var(--paper); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

/* On dark plates. */
.plate .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.plate .btn:hover { background: var(--amber-400); border-color: var(--amber-400); color: var(--d-bg); }
.plate .btn-ghost { background: transparent; color: var(--d-text); border-color: var(--d-rule-2); }
.plate .btn-ghost:hover { border-color: var(--d-text-3); color: var(--d-text); }

/* Inline "read more" link with an arrow. */
.arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; }
.arrow::after { content: '→'; transition: transform var(--duration) var(--ease); }
.arrow:hover::after { transform: translateX(3px); }

/* =========================================================== HEADER ====== */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 26px; height: 26px; }
.brand span {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  letter-spacing: -0.01em; white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 14.5px; font-weight: 450; color: var(--ink-2);
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--indigo); }
@media (max-width: 1040px) { .nav { display: none; } }

.menu-btn {
  display: none; width: 40px; height: 40px; flex-shrink: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--rule-2); background: var(--paper);
  border-radius: var(--radius); cursor: pointer; color: var(--ink);
}
/* Below the nav breakpoint the header is brand + hamburger only. The CTA is a
 * ~200px button; keeping it would push the hamburger off a 390px viewport and
 * force the whole document wider than the screen. It reappears in the drawer. */
@media (max-width: 1040px) {
  .menu-btn { display: inline-flex; }
  .hdr-in > .btn { display: none; }
}

.nav-mobile { display: none; border-top: 1px solid var(--rule); background: var(--paper); }
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2); font-size: 16px;
}
.nav-mobile a[aria-current="page"] { color: var(--indigo); }
.nav-mobile .btn {
  display: flex; justify-content: center;
  margin: 18px 0 20px; border-bottom: 0; color: var(--paper);
}
.nav-mobile .btn:hover { color: var(--paper); }
@media (min-width: 1041px) { .nav-mobile { display: none !important; } }

/* ============================================================ HERO ======= */
.hero { padding: 104px 0 88px; border-bottom: 1px solid var(--rule); }
@media (max-width: 860px) { .hero { padding: 64px 0 56px; } }
.hero .display { margin-top: 20px; max-width: 24ch; }
.hero .lead { margin-top: 28px; max-width: 74ch; }
.hero .support { margin-top: 16px; max-width: 66ch; color: var(--ink-3); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* Page header for interior pages — quieter than the homepage hero. */
.phead { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); }
@media (max-width: 860px) { .phead { padding: 48px 0 40px; } }
.phead h1 { margin-top: 18px; max-width: 22ch; }
.phead .lead { margin-top: 22px; }
.phead .support { margin-top: 16px; max-width: 68ch; color: var(--ink-3); }

.crumb { font-size: 13.5px; color: var(--ink-3); }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--indigo); }
.crumb span { padding: 0 8px; color: var(--rule-2); }

/* ===================================================== SELECTED WORK ===== */
/* Desktop: four rows. Mobile: a 2x2 grid of the numbers, so the proof lands
 * inside the second screen. Nothing is hidden at either size — the rows carry
 * sector, title and metric, and no more. */
.work-list { border-top: 1px solid var(--rule); }
.work-row {
  display: grid; grid-template-columns: 160px 1fr 220px; gap: 32px;
  align-items: center; padding: 24px 0;
  border-bottom: 1px solid var(--rule); color: inherit;
  transition: background var(--duration) var(--ease);
}
.work-row:hover { background: var(--paper); color: inherit; }
.alt .work-row:hover { background: var(--paper); }
.work-row .sector {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.work-row h3 { font-size: 19px; }
.work-row:hover h3 { color: var(--indigo); }
.work-row .fig { text-align: right; }
/* .metric / .metric-label are spans here (they sit inside an <a>, which may not
 * contain block-level flow content in older parsers). Force the stack. */
.work-row .fig .metric { display: block; font-size: 28px; }
.work-row .fig .metric-label { display: block; font-size: 12.5px; }

@media (max-width: 700px) {
  .work-list {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1px; background: var(--rule);
    border: 1px solid var(--rule); border-top: 1px solid var(--rule);
  }
  .work-row {
    display: block; padding: 22px 18px; border-bottom: 0;
    background: var(--paper);
  }
  .work-row .fig { text-align: left; }
  .work-row .fig .metric { font-size: 30px; }
  .work-row .sector { display: block; margin-top: 10px; }
  .work-row h3 { font-size: 15px; margin-top: 8px; letter-spacing: -0.005em; }
  .work-row .fig .metric-label { font-size: 11.5px; margin-top: 4px; }
}

/* ================================================== STATEMENT LIST ======= */
/* Principles asserted flatly. A principle that argues for itself is weaker than
 * one that does not. */
.stmts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; margin-top: 8px; }
.stmts > div { padding: 18px 0; border-bottom: 1px solid var(--d-rule); }
.stmts h3 { font-size: 17px; letter-spacing: -0.008em; }
@media (max-width: 820px) { .stmts { grid-template-columns: 1fr; gap: 0; } }

/* ==================================================== ENGAGEMENT ROW ===== */
.models { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.models div { background: var(--paper); padding: 22px 18px; }
.models .n {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-3);   /* --ink-4 is a marker colour: 2.41:1, fails AA as text */
}
.models h3 { font-size: 16px; margin-top: 10px; letter-spacing: -0.005em; }
.alt .models div { background: var(--paper-2); }
@media (max-width: 980px) { .models { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .models { grid-template-columns: 1fr; } }

/* ================================================== CREDIBILITY STRIP ==== */
/* Four delivery qualities, visibly separated. Deliberately NOT the same list as
 * "What we do" below it — a strip that repeats the next section is 200px spent
 * saying nothing. */
.strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.strip-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-in > div {
  padding: 22px 24px;
  border-left: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase; color: var(--ink-3);
}
.strip-in > div:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 860px) {
  .strip-in { grid-template-columns: repeat(2, 1fr); }
  .strip-in > div { padding: 16px 18px; border-top: 1px solid var(--rule); }
  .strip-in > div:nth-child(-n+2) { border-top: 0; }
  .strip-in > div:nth-child(odd) { border-left: 0; padding-left: 0; }
}

/* ============================================================ CARDS ====== */
/* Hairline grid, not floating cards. Square corners, no shadow. */
.grid-cells { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .g3, .g2 { grid-template-columns: 1fr; } }

.cell { background: var(--paper); padding: 32px 30px; }
.cell .num {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--ink-3);
}
.cell h3 { margin: 12px 0 10px; }
.cell p { font-size: 15.5px; line-height: 1.65; }
.cell ul { margin-top: 14px; padding-left: 0; list-style: none; }
.cell ul li {
  font-size: 14px; color: var(--ink-3); padding: 5px 0 5px 14px;
  position: relative; line-height: 1.5;
}
.cell ul li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 5px; height: 1px; background: var(--rule-2);
}
.alt .cell { background: var(--paper-2); }

/* ========================================================= PRINCIPLES ==== */
.principles { border-top: 1px solid var(--rule); }
.principle {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.principle h3 { padding-right: 24px; font-size: 18px; letter-spacing: -0.008em; }
.principle p { font-size: 16px; }
@media (max-width: 860px) { .principle { grid-template-columns: 1fr; gap: 8px; } .principle h3 { padding-right: 0; } }

/* ============================================================ STEPS ====== */
.steps { counter-reset: step; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step .n {
  font-family: var(--font-mono); font-size: 13px; color: var(--indigo);
  padding-top: 3px;
}
.step h3 { margin-bottom: 8px; font-size: 18px; letter-spacing: -0.008em; }
.step p { font-size: 16px; }
@media (max-width: 700px) { .step { grid-template-columns: 1fr; gap: 6px; } }

/* =========================================================== METRICS ===== */
.metric { font-family: var(--font-heading); font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.metric-label { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 700px) { .metrics { grid-template-columns: 1fr; gap: 20px; } }

/* ============================================================ TABLE ====== */
.table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  background: var(--paper-3); border-bottom: 1px solid var(--rule-2);
}
.table td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); }

/* Definition table — the "at a glance" pattern. */
.facts { border-top: 1px solid var(--rule); }
.fact { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.fact dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.fact dd { color: var(--ink); font-size: 15.5px; }
@media (max-width: 640px) { .fact { grid-template-columns: 1fr; gap: 2px; } }

/* ============================================================== CTA ====== */
/* Wide statement + stacked actions. Lives here rather than in a page's inline
 * <style> so every page that uses it collapses on mobile, not just the home page. */
.cta-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ============================================================ PLATE ====== */
/* Inverted section. Used sparingly — once per page at most.
 * The 2px amber top edge is the mark itself: amber sitting on indigo. It is the
 * only saturated colour on the page, which is what makes it read as a signature
 * rather than as trim. */
.plate { background: var(--d-bg); color: var(--d-text-2); border-top: 2px solid var(--amber-400); }
.plate h1, .plate h2, .plate h3, .plate h4 { color: var(--d-text); }
.plate .eyebrow { color: var(--d-text-3); }
.plate .eyebrow-accent { color: var(--amber-400); }
.plate .lead { color: var(--d-text-2); }
.plate a { color: var(--amber-400); }
.plate a:hover { color: #FBBF24; }
.plate .grid-cells { background: var(--d-rule); border-color: var(--d-rule); }
.plate .cell { background: var(--d-panel); }
.plate .cell .num { color: var(--d-text-3); }
/* .cell ul li sets an explicit ink colour, so it does not inherit the plate's
 * light-on-dark text and lands at 3.9:1 on the panel. Invert it. */
.plate .cell ul li { color: var(--d-text-2); }
.plate .cell ul li::before { background: var(--d-rule-2); }
.plate .principles, .plate .principle { border-color: var(--d-rule); }
.plate .facts, .plate .fact { border-color: var(--d-rule); }
.plate .fact dt { color: var(--d-text-3); }
.plate .fact dd { color: var(--d-text); }
.plate .muted { color: var(--d-text-3); }
.plate .table th { background: var(--d-panel); color: var(--d-text-3); border-color: var(--d-rule-2); }
.plate .table td { border-color: var(--d-rule); color: var(--d-text-2); }
.plate .table td:first-child { color: var(--d-text); }
.plate .table-wrap { border-color: var(--d-rule); }

/* ============================================================ CALLOUT ==== */
/* A quiet aside. Amber rule on the left; never a filled panel. */
.callout {
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  color: var(--ink-2);
}
.callout .k {
  display: block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 6px;
}
.plate .callout { border-left-color: var(--amber-400); color: var(--d-text-2); }
.plate .callout .k { color: var(--amber-400); }

/* Blockquote — used for agent output and verbatim excerpts. */
.quote {
  border-left: 2px solid var(--rule-2);
  padding-left: 22px; margin: 24px 0;
  color: var(--ink-2);
}
.quote p + p { margin-top: 12px; }

/* ============================================================= CODE ====== */
pre, code, .mono { font-family: var(--font-mono); }
code { font-size: 0.9em; background: var(--paper-3); padding: 2px 5px; border-radius: var(--radius); color: var(--ink); }
pre {
  background: var(--d-bg); color: var(--d-text-2);
  padding: 20px 22px; overflow-x: auto;
  font-size: 13px; line-height: 1.65;
  border-radius: var(--radius); margin: 24px 0;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.plate pre { background: var(--d-panel); border: 1px solid var(--d-rule); }

/* ============================================================ FIGURE ===== */
figure { margin: 36px 0; }
figure img { border: 1px solid var(--rule); border-radius: var(--radius); width: 100%; }
.plate figure img { border-color: var(--d-rule); }
figcaption {
  margin-top: 12px; font-size: 13.5px; color: var(--ink-3);
  line-height: 1.55; padding-left: 14px; border-left: 2px solid var(--rule);
}
.plate figcaption { color: var(--d-text-3); border-left-color: var(--d-rule-2); }

/* ============================================================== TAGS ===== */
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 4px 8px; border: 1px solid var(--rule-2); color: var(--ink-3);
  border-radius: var(--radius); background: var(--paper);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.status.pilot::before { background: var(--amber-400); }

/* ============================================================= INDEX ===== */
/* Row-based listing: case studies, insights. Not cards. */
.rows { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 150px 1fr 200px; gap: 32px;
  padding: 30px 0; border-bottom: 1px solid var(--rule);
  align-items: start;
  transition: background var(--duration) var(--ease);
}
a.row:hover { background: var(--paper-2); }
a.row { color: inherit; }
.row .meta { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
.row .meta .date { display: block; margin-top: 6px; color: var(--ink-4); }
.row h3 { margin-bottom: 8px; }
a.row:hover h3 { color: var(--indigo); }
.row p { font-size: 15.5px; }
.row .outcome { text-align: right; }
.row .outcome .metric { font-size: 24px; }
.row .outcome .metric-label { font-size: 12.5px; }
@media (max-width: 980px) {
  .row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .row .outcome { text-align: left; }
}

/* ============================================================ FOOTER ===== */
.ftr { border-top: 1px solid var(--rule); background: var(--paper-2); padding: 56px 0 32px; }
.ftr-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .ftr-grid { grid-template-columns: 1fr; } }
.ftr-h {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px;
}
.ftr ul { list-style: none; }
.ftr li { margin-bottom: 9px; }
.ftr li a { color: var(--ink-2); font-size: 15px; }
.ftr li a:hover { color: var(--indigo); }
.ftr-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3);
}
.ftr-bottom a { color: var(--ink-3); }

/* ============================================================== FORM ===== */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px;
  padding: 12px 14px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: inset 0 0 0 1px var(--indigo);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field .err { display: none; margin-top: 6px; font-size: 13.5px; color: var(--error); }
.field.invalid .err { display: block; }
.field.invalid input { border-color: var(--error); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.notice { border: 1px solid var(--rule-2); border-left: 2px solid var(--success); padding: 18px 20px; }
.notice h3 { margin-bottom: 6px; font-size: 18px; letter-spacing: -0.008em; }

/* ======================================================= CASE STUDY ====== */
/* Long-form body with a sticky "at a glance" rail on the right. */
.cs-grid { display: grid; grid-template-columns: 1fr 300px; gap: 72px; align-items: start; }
.cs-grid > aside { position: sticky; top: 96px; }
@media (max-width: 1040px) {
  .cs-grid { grid-template-columns: 1fr; gap: 48px; }
  .cs-grid > aside { position: static; }
}
.cs-aside { border-top: 2px solid var(--ink); padding-top: 20px; }
.cs-aside h3 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px;
}
.cs-aside .fact { grid-template-columns: 1fr; gap: 2px; padding: 11px 0; }
.cs-aside .fact dd { font-size: 15px; }

/* Section numbering carries the case-study template, which is a real sequence. */
.cs-sec { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 56px; }
.cs-sec:first-child { margin-top: 0; }
.cs-sec > .n {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 20px;
}
.cs-sec h2 { margin: 0 0 16px; }
.cs-sec p + p { margin-top: 16px; }
.cs-sec ul { margin: 18px 0; padding-left: 20px; }
.cs-sec li { margin: 9px 0; }
.cs-sec li::marker { color: var(--ink-4); }
.cs-sec strong { color: var(--ink); font-weight: 600; }
.cs-hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; max-width: 720px; }
@media (max-width: 700px) { .cs-hero-metrics { grid-template-columns: 1fr; gap: 20px; } }

/* ========================================================== ARTICLE ====== */
.art { max-width: 720px; margin: 0 auto; }
.art-meta {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; gap: 20px; flex-wrap: wrap;
}
.art h1 { margin: 20px 0 24px; }
.art .standfirst {
  font-size: 21px; line-height: 1.55; color: var(--ink-2);
  padding-bottom: 32px; border-bottom: 1px solid var(--rule);
}
.art .body { margin-top: 36px; font-size: 17.5px; }
.art .body p + p { margin-top: 20px; }
.art .body h2 { font-size: 25px; margin: 48px 0 14px; }
.art .body h3 { font-size: 19px; margin: 34px 0 10px; }
.art .body ul, .art .body ol { margin: 20px 0; padding-left: 22px; }
.art .body li { margin: 10px 0; }
.art .body li::marker { color: var(--ink-4); }
.art .body strong { color: var(--ink); font-weight: 600; }
.art .body > .callout { margin: 32px 0; }
.art-foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }

/* ========================================== WHITE-PAPER EMAIL GATE ======= */
.wp-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28,25,23,0.6);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.wp-modal.open { display: flex; }
.wp-card {
  background: var(--paper); border: 1px solid var(--rule-2);
  border-radius: var(--radius); max-width: 460px; width: 100%;
  padding: 36px 34px; position: relative;
}
.wp-card h3 { margin-bottom: 8px; }
.wp-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; display: inline-flex;
  align-items: center; justify-content: center;
  border: 0; background: none; cursor: pointer; color: var(--ink-3);
  font-size: 20px; line-height: 1;
}
.wp-close:hover { color: var(--ink); }

/* ===================================================== REDUCED MOTION ==== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================== PRINT ==== */
@media print {
  .hdr, .ftr, .menu-btn { display: none; }
  body { color: #000; font-size: 11pt; }
  .plate { background: #fff; color: #000; }
}
