/* =========================================================
   Shaurin Survase — Portfolio
   One stylesheet for every page. Dark theme only.
   Sections:
     1. Tokens        6. Overview page
     2. Base          7. Case-study pages
     3. Layout        8. Deep-dive page
     4. Header/footer 9. Responsive
     5. Shared blocks
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #0E0F11;
  --surface: #16181B;
  --border: #262930;
  --rule: #23262B;
  --rule-strong: #3A3D43;
  --chip-border: #33363C;

  --text: #EDEAE3;
  --text-2: #D8D5CE;
  --text-3: #C9C6BF;
  --muted: #B3B0A9;
  --muted-2: #A6A39C;
  --faint: #8A8781;
  --on-accent: #111214;

  /* Default accent (saffron). Pages override via body class. */
  --accent: #E7A64A;
  --accent-bg: #1B160F;
  --accent-border: #4A3B25;

  --adapt: #6FCFBF;
  --gts: #E7A64A;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, Consolas, monospace;

  --gutter: clamp(20px, 8.3vw, 120px);
  --section-gap: clamp(88px, 10vw, 140px);
  --radius: 20px;
  --radius-sm: 14px;
  --header-h: 80px;
}

/* Per-project accents */
.theme-adapt { --accent: var(--adapt); --accent-bg: #0F1A19; --accent-border: #2E4744; }
.theme-gts   { --accent: var(--gts);   --accent-bg: #1B160F; --accent-border: #4A3B25; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
img { max-width: 100%; display: block; }
strong { color: var(--text); font-weight: 600; }
em { font-style: italic; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* Bracketed placeholders still to be filled in: search the code for class="todo" */
.todo { color: var(--faint); border-bottom: 1px dashed var(--faint); }

.icon { width: 1em; height: 1em; flex-shrink: 0; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-top: var(--section-gap); }

.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.label {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.serif { font-family: var(--serif); }

.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(40px, 4.4vw, 56px); line-height: 1.05; }
.section-head--lg h2 { font-size: clamp(44px, 5.4vw, 72px); line-height: 1; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 48px; }
.section-head-row .side-note { font-size: 18px; color: var(--muted-2); max-width: 460px; line-height: 1.55; }
.section > .section-head { margin-bottom: 48px; }

/* Two columns: heading on the left, prose on the right */
.split { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 80px; }
.prose { display: flex; flex-direction: column; gap: 24px; font-size: 21px; line-height: 1.7; color: var(--text-3); max-width: 780px; }
.prose em { color: var(--text); }

/* ---------- 4. Header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .container { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 28px; color: var(--text); white-space: nowrap; }
.site-nav { display: flex; gap: 36px; font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.site-nav a, .header-link { padding: 12px 0; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.header-link { font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.header-context { font-size: 16px; color: var(--muted-2); text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-context b { color: var(--text); font-weight: 600; }

.page-footer { border-top: 1px solid var(--rule); padding: 64px 0 72px; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: var(--section-gap); }
.page-footer .next { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; }
.page-footer .next--right { align-items: flex-end; text-align: right; }
.page-footer .next .big { font-family: var(--serif); font-size: clamp(32px, 3.2vw, 44px); line-height: 1.1; }
.page-footer .back { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; padding: 12px 0; }
.text-adapt { color: var(--adapt); }
.text-gts { color: var(--gts); }

/* ---------- 5. Shared blocks ---------- */

/* Buttons */
.btn { height: 56px; padding: 0 28px; display: inline-flex; align-items: center; gap: 12px; border-radius: 999px; font-weight: 500; font-size: 17px; }
.btn--primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn--ghost { border: 1px solid var(--rule-strong); }

/* Page hero */
.hero { padding-top: clamp(72px, 9vw, 120px); padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.hero h1 { font-family: var(--serif); line-height: 0.95; letter-spacing: -0.02em; font-size: clamp(56px, 10vw, 144px); }
.hero h1 .accent, .accent-text { color: var(--accent); font-style: italic; }
.hero .tagline { font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.2; color: var(--text-2); max-width: 1040px; }
.hero .note { font-size: 18px; color: var(--faint); }

/* "In 30 seconds" summary card */
.summary-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 48px; display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 48px; row-gap: 12px;
}
.summary-card .title { display: flex; flex-direction: column; gap: 12px; }
.summary-card .title .serif { font-size: 40px; line-height: 1.05; }
.summary-rows { display: flex; flex-direction: column; }
.summary-row { padding: 18px 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: baseline; }
.summary-row + .summary-row { border-top: 1px solid var(--border); }
.summary-row dt { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.summary-row dd { margin: 0; font-size: 19px; line-height: 1.6; color: var(--text-2); }
.jump-links { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jump-links .label { margin-right: 8px; }
.jump-links a { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--chip-border); border-radius: 999px; font-size: 15px; }

/* Facts strip (role / status / …) */
.facts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.facts > div { padding: 32px 24px; display: flex; flex-direction: column; gap: 10px; }
.facts > div:first-child { padding-left: 0; }
.facts > div + div { border-left: 1px solid var(--rule); }
.facts .value { font-size: 20px; line-height: 1.4; }
.facts--lg .value { font-size: 22px; }

/* Image / screenshot slots */
.shot {
  border-radius: var(--radius); background: var(--accent-bg); border: 1px dashed var(--accent-border);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  color: var(--accent); font-family: var(--mono); font-size: 15px; overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:has(img) { border-style: solid; padding: 0; }

/* Generic card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 24px; font-weight: 500; line-height: 1.3; }
.card p { font-size: 18px; line-height: 1.65; color: var(--muted-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.chips span { padding: 6px 12px; border: 1px solid var(--chip-border); border-radius: 999px; color: var(--text-3); }

/* Small labelled columns (tech stack etc.) */
.kv { display: flex; flex-direction: column; gap: 8px; }
.kv .value { font-size: 18px; color: var(--text); }

/* Ruled list rows */
.rows > * { padding: 14px 0; font-size: 18px; color: var(--text-3); }
.rows > * + * { border-top: 1px solid var(--border); }

/* Arrow-numbered "numbered top rule" items */
.ruled { border-top: 2px solid var(--accent); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ruled--dashed { border-top-style: dashed; border-top-color: var(--rule-strong); }
.ruled .step { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.ruled--dashed .step { color: var(--faint); }
.ruled h3 { font-size: 22px; font-weight: 500; }
.ruled p { font-size: 17px; line-height: 1.6; color: var(--muted-2); }

/* Quote */
.quote { border-top: 1px solid var(--rule-strong); padding-top: 28px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.quote p { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.35; color: var(--text); }

/* ---------- 6. Overview page ---------- */
.home-hero { padding-top: clamp(80px, 10vw, 140px); padding-bottom: 110px; display: flex; flex-direction: column; gap: 36px; }
.home-hero .eyebrow { font-size: 14px; }
.home-hero h1 { font-family: var(--serif); font-size: clamp(48px, 7.2vw, 104px); line-height: 1; letter-spacing: -0.01em; max-width: 1100px; }
.home-hero .lede { font-size: 22px; line-height: 1.6; color: var(--muted); max-width: 760px; }
.home-hero .actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }

.project-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px;
  display: flex; flex-direction: column; gap: 28px; color: var(--text); transition: border-color .2s;
}
.project-card:hover { color: var(--text); border-color: var(--accent-border); }
.project-card .meta { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.project-card .meta .kind { color: var(--accent); }
.project-card .meta .platform { color: var(--faint); }
.project-card .shot { height: 240px; border-radius: var(--radius-sm); font-size: 14px; }
.project-card h3 { font-family: var(--serif); font-size: 56px; line-height: 1; }
.project-card .desc { font-size: 19px; line-height: 1.6; color: var(--muted); }
.project-card .mini-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid #2A2D32; border-bottom: 1px solid #2A2D32; padding: 20px 0; }
.project-card .mini-facts .label { font-size: 12px; letter-spacing: 0.06em; }
.project-card .mini-facts .value { font-size: 16px; line-height: 1.45; margin-top: 6px; }
.project-card .cta { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--accent); }

.habits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.habit { border-top: 1px solid var(--rule-strong); padding-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.habit .num { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.habit h3 { font-size: 26px; font-weight: 500; line-height: 1.3; }
.habit p { font-size: 18px; line-height: 1.65; color: var(--muted-2); }

.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
.about .left { display: flex; flex-direction: column; gap: 28px; }
.about .left h2 { font-family: var(--serif); font-size: clamp(44px, 5.4vw, 72px); line-height: 1; }
.about .portrait { aspect-ratio: 4 / 3; border-radius: 16px; background: var(--surface); border: 1px dashed var(--chip-border); color: var(--faint); }
.about .right { display: flex; flex-direction: column; gap: 24px; padding-top: 112px; font-size: 20px; line-height: 1.7; color: var(--text-3); }
.about .right .value { font-size: 20px; color: var(--text); }

.contact { border-top: 1px solid var(--rule); padding: 80px 0 72px; margin-top: var(--section-gap); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.contact .big { font-family: var(--serif); font-size: clamp(44px, 4.4vw, 64px); line-height: 1; }
.contact .email { font-size: 22px; color: var(--accent); display: inline-block; margin-top: 20px; }
.contact .links { display: flex; flex-wrap: wrap; gap: 32px; font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.contact .links a { padding: 12px 0; }

/* ---------- 7. Case-study pages ---------- */
.media { padding-top: 80px; }
.media .shot { min-height: clamp(280px, 40vw, 620px); }
.media--split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.media--split .shot { min-height: clamp(280px, 38vw, 560px); }

/* ADAPT: four-stage pipeline */
.pipeline { display: flex; align-items: stretch; gap: 16px; }
.pipeline .stage { flex: 1 1 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.pipeline .stage .label { color: var(--accent); }
.pipeline .stage h3 { font-size: 20px; font-weight: 500; }
.pipeline .stage p { font-size: 16px; line-height: 1.55; color: var(--muted-2); }
.pipeline .arrow { display: flex; align-items: center; color: #5E5B56; font-size: 28px; }

/* ADAPT: angle presets */
.angles { display: flex; flex-wrap: wrap; gap: 12px; }
.angles span { width: 96px; height: 64px; border: 1px solid var(--rule-strong); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 22px; }
.angles span.on { border-color: var(--accent); color: var(--accent); }
.exercise-list { list-style: none; margin: 0; padding: 0; }
.exercise-list li { padding: 16px 0; font-size: 21px; }
.exercise-list li + li { border-top: 1px solid var(--rule); }
.exercise-list li.accent { color: var(--accent); }

/* GTS: who-it's-for cards */
.who-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.who-card .eyebrow { font-size: 12px; }
.who-card h3 { font-size: 22px; font-weight: 500; line-height: 1.3; }
.who-card p { font-size: 17px; line-height: 1.6; color: var(--muted-2); }
.rule-quote { border-top: 1px solid var(--rule-strong); padding-top: 24px; font-family: var(--serif); font-size: 30px; line-height: 1.35; color: var(--text); }

/* GTS: the two tools */
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px; display: flex; flex-direction: column; gap: 24px; }
.tool-card h3 { font-size: 28px; font-weight: 500; line-height: 1.3; }

/* GTS: constraint → decision rows */
.decisions { list-style: none; margin: 0; padding: 0; }
.decision { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 24px; align-items: center; padding: 32px 0; border-top: 1px solid var(--rule); }
.decision:last-child { border-bottom: 1px solid var(--rule); }
.decision .side { display: flex; flex-direction: column; gap: 8px; }
.decision .label { font-size: 12px; }
.decision .side--decision .label { color: var(--accent); }
.decision .constraint { font-size: 22px; line-height: 1.45; }
.decision .answer { font-size: 20px; line-height: 1.55; color: var(--text-3); }
.decision .arrow { color: var(--accent); display: flex; justify-content: center; font-size: 28px; }

/* GTS: link card to the deep dive */
.cta-card {
  margin-top: 48px; background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: var(--radius);
  padding: 40px 44px; display: flex; justify-content: space-between; align-items: center; gap: 40px; color: var(--text);
}
.cta-card:hover { color: var(--text); border-color: var(--accent); }
.cta-card .text { display: flex; flex-direction: column; gap: 10px; }
.cta-card .title { font-family: var(--serif); font-size: clamp(30px, 2.8vw, 40px); line-height: 1.1; }
.cta-card p { font-size: 18px; line-height: 1.55; color: var(--muted-2); max-width: 760px; }
.cta-card .round { width: 64px; height: 64px; flex-shrink: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 24px; }

/* Stats (big numbers) */
.stat { border-top: 2px solid var(--accent); padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.stat .num { font-family: var(--serif); font-size: 72px; line-height: 1; }
.stat p { font-size: 18px; color: var(--muted-2); }

.stack { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 24px; }
.stack--ruled { border-top: 1px solid var(--rule-strong); padding-top: 28px; }

/* ---------- 8. Deep-dive page ---------- */
.results { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.results > div { padding: 36px 32px; display: flex; flex-direction: column; gap: 10px; }
.results > div:first-child { padding-left: 0; }
.results > div + div { border-left: 1px solid var(--rule); }
.results .num { font-family: var(--serif); font-size: clamp(48px, 4.4vw, 64px); line-height: 1; color: var(--accent); }
.results p { font-size: 17px; line-height: 1.5; color: var(--muted-2); }

.compare { margin-top: 80px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px; display: flex; flex-direction: column; gap: 36px; }
.compare .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.compare .head h3 { font-size: 24px; font-weight: 500; }
.compare .head p { font-size: 16px; line-height: 1.5; color: var(--muted-2); max-width: 560px; text-align: right; }
.bar { display: flex; flex-direction: column; gap: 12px; }
.bar .row { display: flex; justify-content: space-between; gap: 16px; font-size: 17px; color: var(--text-3); }
.bar .row b { font-family: var(--mono); font-weight: 400; color: var(--text); white-space: nowrap; }
.bar .track { height: 36px; display: flex; }
.bar .fill { border-radius: 8px; background: var(--rule-strong); width: 100%; }
.bar--small .row b { color: var(--accent); }
/* 0.5 MB vs 90 MB is ~0.6% — kept visible with a minimum width */
.bar--small .fill { background: var(--accent); width: max(0.56%, 8px); border-radius: 4px; }
.compare .rule { border-top: 1px solid #2A2D32; padding-top: 28px; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; }

.opt-toolbar { display: flex; gap: 12px; }
.opt-toolbar button {
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent;
  color: var(--text); font-family: inherit; font-size: 15px; cursor: pointer;
}
.opt-toolbar button:hover { border-color: var(--accent); color: var(--accent); }

.layer-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding: 56px 0 12px; border-top: 1px solid var(--border); }
.layer-label:first-child { padding-top: 20px; border-top: 0; }

.opt { border-top: 1px solid var(--border); }
.opt:last-child { border-bottom: 1px solid var(--border); }
.opt summary {
  list-style: none; cursor: pointer; padding: 28px 0;
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 170px 44px; gap: 24px; align-items: center;
}
.opt summary::-webkit-details-marker { display: none; }
.opt summary .n { font-family: var(--mono); font-size: 15px; color: var(--faint); }
.opt summary .t { display: flex; flex-direction: column; gap: 6px; }
.opt summary .t b { font-size: 24px; font-weight: 500; color: var(--text); }
.opt summary .t span { font-size: 17px; color: var(--muted-2); }
.opt summary:hover .t b { color: var(--accent); }
.opt .chev { display: flex; justify-content: center; color: var(--muted-2); font-size: 22px; transition: transform .2s; }
.opt[open] .chev { transform: rotate(180deg); }
.tag { justify-self: start; padding: 6px 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--chip-border); color: var(--text-3); white-space: nowrap; }
.tag--accent { border-color: var(--accent-border); color: var(--accent); }
.opt .body { padding: 0 0 40px 80px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.opt .body .label { font-size: 12px; }
.opt .body .label--accent { color: var(--accent); }
.opt .body p { font-size: 17px; line-height: 1.65; color: var(--text-3); margin-top: 10px; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline .arrow { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .about .right { padding-top: 0; }
  .opt summary { grid-template-columns: 44px minmax(0, 1fr) auto 32px; }
  .opt .body { padding-left: 68px; }
  .header-context { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  body { font-size: 17px; }
  .brand { font-size: 24px; }
  .site-nav { gap: 18px; font-size: 12px; }
  .site-nav .hide-sm { display: none; }
  .header-link { font-size: 12px; }

  .section-head-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .summary-card { grid-template-columns: 1fr; padding: 28px 24px; row-gap: 8px; }
  .summary-row { grid-template-columns: 1fr; gap: 6px; }
  .summary-row dd { font-size: 17px; }

  .project-cards, .habits, .about, .grid-2, .grid-3, .media--split { grid-template-columns: 1fr; }
  .habits { gap: 32px; }
  .about { gap: 32px; }
  .project-card { padding: 28px 24px; }
  .project-card h3 { font-size: 44px; }
  .project-card .mini-facts { grid-template-columns: 1fr; gap: 12px; }

  .results { grid-template-columns: 1fr; }
  .results > div { padding: 28px 0; }
  .results > div + div { border-left: 0; border-top: 1px solid var(--rule); }

  .decision { grid-template-columns: 1fr; gap: 12px; }
  .decision .arrow { justify-content: flex-start; transform: rotate(90deg); width: 28px; }

  .compare { padding: 28px 24px; }
  .compare .head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .compare .head p { text-align: left; }

  .cta-card { padding: 28px 24px; }
  .card, .tool-card { padding: 28px 24px; }

  .opt summary { grid-template-columns: 32px minmax(0, 1fr) 28px; gap: 12px; }
  .opt summary .tag { grid-column: 2; grid-row: 2; }
  .opt summary .chev { grid-column: 3; grid-row: 1; }
  .opt summary .t b { font-size: 20px; }
  .opt .body { padding: 0 0 32px 0; grid-template-columns: 1fr; gap: 20px; }

  .contact, .page-footer { flex-direction: column; align-items: flex-start; }
  .page-footer .next--right { align-items: flex-start; text-align: left; }
  .prose, .about .right { font-size: 18px; }
  .quote p, .rule-quote { font-size: 24px; }
  .stat .num { font-size: 56px; }
}

@media (max-width: 560px) {
  .grid-4, .pipeline, .facts { grid-template-columns: 1fr; }
  .facts > div { padding-left: 0; border-left: 0 !important; }
  .facts > div + div { border-top: 1px solid var(--rule); }
  .stack { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .site-nav .hide-xs { display: none; }
  .opt-toolbar { flex-wrap: wrap; }
}
