/* ==========================================================================
   WIT Labs · site.css
   Design system extracted from ALT B "Agent Console / Live Build".
   Paper base, ink UI surfaces, terracotta only as the cursor block
   (active, approved, chosen). See site/README.md for the component catalogue.

   Sections:
     1. Tokens            8. Console panel         15. Layer stack
     2. Base              9. Module cards          16. CTA band
     3. Layout           10. Component list        17. Footer
     4. Type scale       11. Venture row           18. Page hero, breadcrumb
     5. Buttons, links   12. Thesis card           19. Tables, rows, notes
     6. Chips, tags      13. Principles, review    20. Accordion, tabs, filters
     7. Header / nav     14. Command palette       21. Person card
                                                   22. Forms, stepper
                                                   23. Reduced motion
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root{
  /* brand core */
  --paper:#F2F0EB;
  --ink:#101010;
  --terra:#C0451F;         /* fills, marks, cursor block */
  --terra-ink:#A63A18;     /* terracotta TEXT on paper/white (5.7:1 on paper) */
  --grey:#8A857A;          /* decor on paper, text on ink */

  /* derived neutrals */
  --paper-2:#E9E6DF;
  --line:#D8D4CB;
  --line-strong:#B9B4A9;
  --ink-2:#1A1917;
  --ink-line:#2C2A27;
  --ink-hover:#2A2926;
  --grey-text:#5E5A52;     /* secondary text on paper (AA) */
  --grey-faint:#8A857A;    /* pending text on ink (5.2:1) */
  --on-ink:#DDD9D0;        /* body text on ink */
  --on-ink-2:#CFCBC2;
  --placeholder:#6F6B63;   /* 5.3:1 on white */
  --white:#FFFFFF;

  /* type */
  --f-sans:"Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono:"IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* layout */
  --max:1280px;
  --gut:40px;
  --sec:136px;             /* section vertical rhythm */
  --sec-tight:96px;
  --nav-h:72px;

  /* radii */
  --r-ui:12px;             /* panels, cards */
  --r-in:8px;              /* inner blocks, rows */
  --r-ctl:6px;             /* buttons, inputs */
  --r-tag:4px;

  /* elevation (used sparingly: console, palette) */
  --shadow-console:0 1px 0 rgba(255,255,255,.04) inset, 0 30px 60px -30px rgba(16,16,16,.45);
  --shadow-pop:0 24px 50px -32px rgba(16,16,16,.35);
}
@media (max-width:760px){
  :root{ --gut:20px; --sec:80px; --sec-tight:64px; }
}

/* 2. BASE ================================================================== */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:calc(var(--nav-h) + 16px); }
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--f-sans); font-size:17px; line-height:1.55;
  font-variation-settings:"wdth" 100;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img{ display:block; max-width:100%; }
a{ color:inherit; }
p{ margin:0; }
h1,h2,h3,h4{ margin:0; font-weight:700; }
ul,ol{ margin:0; padding:0; list-style:none; }
figure{ margin:0; }
button{ font:inherit; color:inherit; }
:focus-visible{ outline:2px solid var(--terra); outline-offset:3px; border-radius:2px; }
[hidden]{ display:none!important; }
.sr{ position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip{ position:absolute; left:12px; top:-60px; z-index:100; background:var(--ink); color:var(--paper); padding:10px 14px; border-radius:var(--r-ctl); text-decoration:none; }
.skip:focus{ top:12px; }

/* 3. LAYOUT ================================================================ */
.wrap{ max-width:calc(var(--max) + var(--gut)*2); margin:0 auto; padding:0 var(--gut); }
.wrap--narrow{ max-width:calc(880px + var(--gut)*2); }

/* sections */
.sec{ padding:var(--sec) 0; border-top:1px solid var(--line); }
.sec--tight{ padding:var(--sec-tight) 0; }
.sec--flush{ border-top:0; }
.sec--ink{ background:var(--ink); color:var(--paper); border-top-color:var(--ink); }
.sec--ink .tag, .sec--ink .muted{ color:var(--grey); }
.sec--ink .lede{ color:var(--on-ink); }

/* section header: tag + h2 left, lede right, bottom aligned */
/* v5.1: top aligned; with a tag above the h2 the lede starts at the h2's first line */
.sec-head{ display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); gap:56px; align-items:start; }
.sec-head .tag{ margin-bottom:22px; display:block; }
.sec-head .lede{ padding-top:10px; }
.sec-head:has(.tag) .lede, .sec-head:has(.idx) .lede{ padding-top:50px; }
@media (max-width:1080px){ .sec-head .lede, .sec-head:has(.tag) .lede, .sec-head:has(.idx) .lede{ padding-top:0; } }
.sec-head--stack{ grid-template-columns:minmax(0,1fr); gap:24px; }
.sec-foot{ margin-top:40px; display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap; }
.sec-foot .muted{ font-size:15px; }
.sec-body{ margin-top:64px; }
@media (max-width:1080px){ .sec-head{ grid-template-columns:1fr; gap:24px; } }
@media (max-width:560px){ .sec-body{ margin-top:44px; } }

/* two column split (12 col ratios) */
.split{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:56px; align-items:start; }
.split--7-5{ grid-template-columns:minmax(0,7fr) minmax(0,5fr); }
.split--5-7{ grid-template-columns:minmax(0,5fr) minmax(0,7fr); }
.split--4-8{ grid-template-columns:minmax(0,4fr) minmax(0,8fr); }
.split--8-4{ grid-template-columns:minmax(0,8fr) minmax(0,4fr); }
.split--wide{ gap:64px; }
.split--center{ align-items:center; }
.split--end{ align-items:end; }
.split > * > .h2, .block > .h2{ margin-top:22px; }
.split > * > .h2:first-child, .block > .h2:first-child{ margin-top:0; }
.split > * > .lede, .block > .lede{ margin-top:28px; }
.split > * > .textlink, .block > .textlink{ display:inline-block; margin-top:32px; }
@media (max-width:1080px){ .split{ grid-template-columns:1fr; gap:44px; } }

/* even grids */
.grid{ display:grid; gap:20px; }
.grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4{ grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1080px){ .grid-3, .grid-4{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){ .grid-2, .grid-3, .grid-4{ grid-template-columns:1fr; } }

/* 4. TYPE SCALE ============================================================ */
.h-display{
  font-size:clamp(44px, 6.1vw, 88px); line-height:.98; letter-spacing:-.035em;
  font-variation-settings:"wdth" 86; font-weight:720;
}
.h-page{
  font-size:clamp(40px, 5.2vw, 76px); line-height:1; letter-spacing:-.032em;
  font-variation-settings:"wdth" 86; font-weight:720; max-width:20ch;
}
.h2{
  font-size:clamp(32px, 3.9vw, 54px); line-height:1.03; letter-spacing:-.028em;
  font-variation-settings:"wdth" 88; font-weight:700; max-width:18ch;
}
/* v5.1: no orphan words in headings and short paragraphs (Chromium, Safari 17.4+; ignored elsewhere) */
.h-display, .h-page, .h2, .h3, .thesis h3, .cta-band h2, .person-name{ text-wrap:balance; }
.lede, .prose p, .acc-a p, .cta-band p, .hint, .note, .v-desc, .person-bio, .vc-one{ text-wrap:pretty; }
.h3{ font-size:24px; line-height:1.12; letter-spacing:-.02em; font-variation-settings:"wdth" 90; font-weight:700; }
.h4{ font-size:19px; line-height:1.3; letter-spacing:-.01em; font-variation-settings:"wdth" 92; font-weight:600; }
.lede{ font-size:clamp(17px,1.35vw,19px); line-height:1.55; color:var(--ink); max-width:58ch; }
.prose{ max-width:66ch; }
.prose > * + *{ margin-top:1em; }
.prose h2, .prose h3{ margin-top:1.8em; }
.small{ font-size:14px; line-height:1.55; }
.muted{ color:var(--grey-text); }
.mono{ font-family:var(--f-mono); font-weight:500; }
.en{ font-style:italic; color:var(--grey-text); }
@media (max-width:760px){
  .h-display{ font-size:clamp(40px, 11.6vw, 56px); }
  .h-page{ font-size:clamp(36px, 10.4vw, 52px); }
}

/* cursor block: the brand motif (active, approved, chosen) */
.caret{ display:inline-block; width:0; height:0; position:relative; vertical-align:baseline; }
.caret::after{ content:""; position:absolute; left:.06em; bottom:-.02em; width:.3em; height:.76em; background:var(--terra); }
.caret.blink::after{ animation:blink 1.05s steps(1) infinite; }
@keyframes blink{ 50%{ opacity:0; } }

/* 5. BUTTONS, LINKS ======================================================== */
.btn{
  display:inline-flex; align-items:center; gap:10px; min-height:46px; padding:0 20px;
  border-radius:var(--r-ctl); text-decoration:none; font-weight:600; font-size:15px;
  font-variation-settings:"wdth" 100; letter-spacing:-.005em;
  border:1px solid transparent; cursor:pointer; transition:background-color .15s, border-color .15s, color .15s;
}
.btn-ink{ background:var(--ink); color:var(--paper); }
.btn-ink:hover{ background:var(--ink-hover); }
.btn-line{ border-color:var(--line-strong); color:var(--ink); background:transparent; }
.btn-line:hover{ border-color:var(--ink); }
.btn-white{ background:var(--white); color:var(--ink); }
.btn-white:hover{ background:var(--paper); }
.btn-sm{ min-height:40px; padding:0 14px; font-size:14px; }
.btn[disabled], .btn[aria-disabled="true"]{ opacity:.45; cursor:default; }
.btn[aria-busy="true"]{ opacity:.6; cursor:progress; }
.btn-row{ display:flex; flex-wrap:wrap; gap:12px; }
.textlink{ font-weight:600; text-decoration:none; border-bottom:1px solid var(--line-strong); padding-bottom:2px; }
.textlink:hover{ border-color:var(--ink); }
/* v5.1: 44px touch targets on touch screens */
@media (pointer:coarse){
  .textlink{ display:inline-flex; align-items:center; min-height:44px; padding-bottom:0; border-bottom:0; text-decoration:underline; text-decoration-color:var(--line-strong); text-underline-offset:6px; text-decoration-thickness:1px; }
  .replay{ height:44px; }
  .role-sw{ min-height:44px; }
  .crumbs a{ display:inline-flex; align-items:center; min-height:32px; }
}
.sec--ink .btn-line{ color:var(--paper); border-color:#45423d; }
.sec--ink .btn-line:hover{ border-color:var(--paper); }

/* 6. CHIPS, TAGS =========================================================== */
.tag{
  font-family:var(--f-mono); font-size:12px; font-weight:500; letter-spacing:.04em;
  color:var(--grey-text); display:inline-block;
}
.chip{
  display:inline-flex; align-items:center; gap:10px; min-height:30px; height:auto; padding:6px 12px; max-width:100%;
  border:1px solid var(--line-strong); border-radius:99px; line-height:1.35;
  font-family:var(--f-mono); font-size:12px; font-weight:500; letter-spacing:.04em; color:var(--ink);
}
.chip i{ width:6px; height:12px; background:var(--terra); display:inline-block; flex:none; }
@media (max-width:420px){ .chip{ border-radius:14px; font-size:11px; letter-spacing:.03em; } .chip i{ align-self:flex-start; margin-top:2px; } }
.meta{ font-family:var(--f-mono); font-size:12px; letter-spacing:.06em; color:var(--grey-text); }
.mtag{ font-family:var(--f-mono); font-size:11.5px; font-weight:500; letter-spacing:.03em; padding:3px 8px; border:1px solid var(--line-strong); border-radius:var(--r-tag); color:var(--grey-text); display:inline-block; }
.mtags{ display:flex; flex-wrap:wrap; gap:6px; }

/* 7. HEADER / NAV ========================================================== */
.nav{ position:sticky; top:0; z-index:40; background:rgba(242,240,235,.92); backdrop-filter:saturate(1.2) blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom:1px solid transparent; transition:border-color .2s; }
.nav.is-scrolled{ border-bottom-color:var(--line); }
.nav-in{ display:flex; align-items:center; justify-content:space-between; height:var(--nav-h); gap:24px; }
.nav-logo img{ height:38px; width:auto; }
.nav-links{ display:flex; gap:28px; font-size:15px; font-weight:500; }
@media (max-width:1180px){ .nav-links{ gap:18px; font-size:14.5px; } .nav-in{ gap:20px; } }
.nav-links a{ text-decoration:none; color:var(--ink); padding:6px 0; position:relative; }
.nav-links a:hover{ color:var(--grey-text); }
.nav-links a[aria-current="page"]::before{ content:""; position:absolute; left:-10px; top:50%; width:4px; height:12px; margin-top:-6px; background:var(--terra); }
.nav-cta{ min-height:40px; padding:0 16px; font-size:14px; }
.nav-toggle{ display:none; background:none; border:1px solid var(--line-strong); border-radius:var(--r-ctl); height:40px; padding:0 14px; font-weight:600; font-size:14px; cursor:pointer; }
.nav-panel{ display:none; }
/* v5.1: hamburger only below 980px (7 links + CTA fit from 981px on); the open panel is a full screen overlay */
@media (max-width:980px){
  .nav-links, .nav .nav-cta{ display:none; }
  .nav-toggle{ display:inline-flex; align-items:center; }
  .nav-panel.is-open{ display:block; position:fixed; top:var(--nav-h); left:0; right:0; bottom:0; max-width:none; background:var(--paper); overflow-y:auto; overscroll-behavior:contain; border-top:1px solid var(--line); padding:12px var(--gut) calc(24px + env(safe-area-inset-bottom)); z-index:39; }
  html.nav-open{ overflow:hidden; }
  /* backdrop-filter would make the header the containing block of the fixed panel */
  html.nav-open .nav{ -webkit-backdrop-filter:none; backdrop-filter:none; background:var(--paper); border-bottom-color:var(--line); }
  .nav-panel .btn{ width:100%; justify-content:center; min-height:52px; }
  .nav-panel .nav-more{ margin-top:20px; display:flex; flex-wrap:wrap; gap:4px 20px; }
  .nav-panel .nav-more a{ border-bottom:0; font-size:15px; font-weight:600; font-variation-settings:"wdth" 100; padding:10px 0; color:var(--grey-text); }
  .nav-panel .nav-contact{ margin-top:12px; }
  .nav-panel a{ display:block; padding:12px 0; text-decoration:none; font-size:20px; font-weight:600; font-variation-settings:"wdth" 90; border-bottom:1px solid var(--line); }
  .nav-panel a[aria-current="page"]{ box-shadow:inset 6px 0 0 var(--terra); padding-left:18px; }
  .nav-panel .btn{ margin-top:20px; display:inline-flex; border:0; font-size:15px; padding:0 20px; }
}

/* 8. CONSOLE PANEL (ink surface, agent run) ================================ */
.console{
  background:var(--ink); color:var(--paper); border-radius:var(--r-ui);
  font-family:var(--f-mono); font-size:13px; line-height:1.55;
  box-shadow:var(--shadow-console);
  display:flex; flex-direction:column;
}
.con-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--ink-line); }
.con-title{ color:var(--grey); }
.con-title b{ color:var(--paper); font-weight:500; }
.state-pill{ display:inline-flex; align-items:center; gap:8px; color:var(--paper); font-size:12px; }
.state-pill i{ width:6px; height:12px; background:var(--grey); display:inline-block; }
.console[data-run="running"] .state-pill i{ background:var(--terra); animation:blink 1.05s steps(1) infinite; }
.console[data-run="done"] .state-pill i{ background:var(--terra); }
.con-inputs{ margin:1em 0; padding:14px 18px; border-bottom:1px solid var(--ink-line); display:grid; gap:4px; }
.con-inputs div{ display:grid; grid-template-columns:78px 1fr; gap:10px; }
.con-inputs dt{ color:var(--grey); }
.con-inputs dd{ margin:0; color:var(--on-ink); }
.steps{ padding:6px 0; flex:1; position:relative; }
.step{ position:relative; padding:12px 18px 12px 48px; border-bottom:1px solid var(--ink-line); }
.step:last-child{ border-bottom:0; }
.step-row{ display:flex; align-items:baseline; gap:12px; }
.step-idx{ position:absolute; left:18px; top:12px; color:var(--grey); width:18px; }
.step-marker{ position:absolute; left:18px; top:15px; width:7px; height:15px; background:var(--terra); display:none; }
.step-name{ font-family:var(--f-sans); font-size:15px; font-weight:600; font-variation-settings:"wdth" 95; letter-spacing:-.005em; color:var(--paper); }
.step-status{ margin-left:auto; font-size:12px; color:var(--grey); white-space:nowrap; }
.step-logs{ display:none; margin-top:8px; color:var(--on-ink-2); }
.step-logs p{ padding-left:14px; position:relative; }
.step-logs p::before{ content:""; position:absolute; left:0; top:.72em; width:6px; height:1px; background:var(--grey); }
.step-logs p.hidden{ visibility:hidden; }
/* approval row: human sign-off under a step */
.approve{ display:none; margin-top:6px; align-items:center; gap:10px; color:var(--paper); }
.approve .box{ width:16px; height:16px; border:1px solid var(--grey); border-radius:3px; display:inline-grid; place-items:center; flex:none; }
.approve .box svg{ width:11px; height:11px; opacity:0; }
.approve .who{ color:var(--grey); }
/* step states: pending | running | await | done */
.step[data-s="pending"] .step-name{ color:var(--grey-faint); }
.step[data-s="running"] .step-idx, .step[data-s="await"] .step-idx{ visibility:hidden; }
.step[data-s="running"] .step-marker{ display:block; animation:blink 1.05s steps(1) infinite; }
.step[data-s="await"] .step-marker{ display:block; }
.step[data-s="running"] .step-logs, .step[data-s="await"] .step-logs{ display:block; }
.step[data-s="await"] .approve, .step[data-s="done"] .approve{ display:flex; }
.step[data-s="await"] .approve .box{ border-color:var(--paper); }
.step[data-s="done"] .approve .box{ background:var(--terra); border-color:var(--terra); }
.step[data-s="done"] .approve .box svg{ opacity:1; }
.step[data-s="running"] .step-status, .step[data-s="await"] .step-status{ color:var(--paper); }
/* static variant: show logs of done steps too (for subpage diagrams) */
.console--static .step[data-s="done"] .step-logs{ display:block; }
.con-foot{ border-top:1px solid var(--ink-line); padding:14px 18px; display:flex; align-items:center; gap:16px; }
.segs{ display:grid; grid-template-columns:repeat(5,1fr); gap:4px; flex:1; }
.segs span{ height:4px; background:var(--ink-line); border-radius:1px; transition:background-color .3s; }
.segs span.on{ background:var(--terra); }
.replay{
  background:transparent; border:1px solid #45423d; color:var(--paper); border-radius:var(--r-ctl);
  height:34px; padding:0 12px; font-family:var(--f-mono); font-size:12px; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
}
.replay:hover{ border-color:var(--paper); }
.replay:focus-visible{ outline-color:var(--paper); }
.con-note{ padding:0 18px 16px; color:var(--grey); font-size:12px; }
@media (max-width:760px){
  .console{ font-size:12.5px; }
  .con-inputs div{ grid-template-columns:70px 1fr; }
  .step{ padding-left:42px; padding-right:14px; }
  .step-idx, .step-marker{ left:16px; }
  .step-row{ flex-wrap:wrap; row-gap:2px; }
}
@media (max-width:380px){
  .con-head{ flex-wrap:wrap; gap:6px 12px; }
  .approve{ flex-wrap:wrap; row-gap:2px; }
  .approve .who{ flex-basis:100%; padding-left:26px; }
  .con-inputs div{ grid-template-columns:1fr; gap:0; }
  .console{ font-size:12px; }
}

/* 9. MODULE CARDS (switch row: BUILD / FUND / GROW / OPERATE) ============== */
.modules{ margin-top:72px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line-strong); border-radius:var(--r-ui); overflow:hidden; background:var(--paper); }
.modules--3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.module{ padding:26px 24px 30px; border-right:1px solid var(--line); display:grid; grid-template-rows:auto 1fr; gap:44px; min-height:220px; }
.module:last-child{ border-right:0; }
.module-key{ display:flex; align-items:center; justify-content:space-between; font-family:var(--f-mono); font-size:13px; font-weight:500; letter-spacing:.06em; }
.module-key .sw{ width:30px; height:16px; border-radius:99px; background:var(--ink); position:relative; flex:none; }
.module-key .sw::after{ content:""; position:absolute; right:3px; top:3px; width:10px; height:10px; border-radius:50%; background:var(--paper); }
.module-key .sw.off{ background:var(--line-strong); }
.module-key .sw.off::after{ right:auto; left:3px; }
.module p{ font-size:19px; line-height:1.3; font-weight:600; font-variation-settings:"wdth" 92; letter-spacing:-.01em; align-self:end; }
@media (max-width:1080px){
  .modules, .modules--3{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .module:nth-child(2n){ border-right:0; }
  .module:nth-child(-n+2){ border-bottom:1px solid var(--line); }
}
@media (max-width:560px){
  .modules, .modules--3{ grid-template-columns:1fr; margin-top:48px; }
  .module{ border-right:0; border-bottom:1px solid var(--line); min-height:0; gap:22px; }
  .module:last-child{ border-bottom:0; }
}

/* 10. COMPONENT LIST PANEL + PROOF LINE ==================================== */
.comp{ border:1px solid var(--line-strong); border-radius:var(--r-ui); background:var(--white); overflow:hidden; }
.comp-head{ display:flex; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line); font-family:var(--f-mono); font-size:12px; color:var(--grey-text); }
.comp li{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 18px; border-bottom:1px solid var(--line); font-weight:600; font-size:16px; }
.comp li:last-child{ border-bottom:0; }
.comp li span{ font-family:var(--f-mono); font-weight:500; font-size:12px; color:var(--grey-text); display:inline-flex; align-items:center; gap:8px; }
.comp li span::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--ink); }
.proof{ margin-top:72px; padding:28px 0; border-top:1px solid var(--ink); border-bottom:1px solid var(--ink); font-family:var(--f-mono); font-weight:500; font-size:clamp(18px,2.2vw,30px); letter-spacing:.01em; line-height:1.3; text-transform:uppercase; }
/* v5.1: proof as a list, items never break in the middle; stacked on small screens */
ul.proof{ display:flex; flex-wrap:wrap; gap:8px 0; }
ul.proof li{ white-space:nowrap; }
ul.proof li + li::before{ content:"·"; margin:0 .6em; color:var(--grey); }
@media (max-width:760px){ ul.proof{ flex-direction:column; gap:10px; } ul.proof li{ white-space:normal; } ul.proof li + li::before{ display:none; } }
.note{ font-size:14px; line-height:1.55; color:var(--grey-text); max-width:56ch; padding-left:14px; border-left:2px solid var(--line-strong); }

/* 11. VENTURE ROW ========================================================== */
.ventures{ margin-top:64px; border-top:1px solid var(--ink); }
.venture{ position:relative; display:grid; grid-template-columns:220px minmax(0,4fr) minmax(0,5fr) auto; gap:32px; align-items:center; padding:30px 0; border-bottom:1px solid var(--line); transition:background-color .15s, box-shadow .15s; }
/* v5.1: the whole row opens the detail page (stretched name link); buttons stay on top */
.venture:hover{ background:var(--paper-2); box-shadow:-12px 0 0 var(--paper-2), 12px 0 0 var(--paper-2); }
.v-name a{ color:inherit; text-decoration:none; }
.v-name a::before{ content:""; position:absolute; inset:0; }
.v-name a:focus-visible{ outline:none; }
.v-name a:focus-visible::before{ outline:2px solid var(--terra); outline-offset:4px; border-radius:2px; }
.venture:hover .v-name a::after{ content:""; display:inline-block; width:6px; height:14px; margin-left:8px; background:var(--terra); vertical-align:-1px; }
.v-links{ position:relative; z-index:1; }
.v-logo{ height:56px; display:flex; align-items:center; }
.v-logo img{ max-height:44px; width:auto; }
/* v5: venture logos single colour (ink) in lists, original colours on hover or keyboard focus inside the row */
.venture .v-logo img, .venture .v-logo .v-pb{ filter:grayscale(1) brightness(0); transition:filter .2s; }
.venture:hover .v-logo img, .venture:focus-within .v-logo img,
.venture:hover .v-logo .v-pb, .venture:focus-within .v-logo .v-pb{ filter:none; }
.v-logo.fk img{ max-height:52px; }
.v-pb{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:24px; letter-spacing:-.02em; color:#1C315F; }
.v-pb img{ height:36px; width:auto; max-height:none; }
.v-name{ font-size:22px; font-weight:700; letter-spacing:-.015em; font-variation-settings:"wdth" 92; }
.v-tags{ margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
.v-tags span{ font-family:var(--f-mono); font-size:11.5px; font-weight:500; letter-spacing:.03em; padding:3px 8px; border:1px solid var(--line-strong); border-radius:var(--r-tag); color:var(--grey-text); }
.v-desc{ font-size:16px; line-height:1.5; }
.v-links{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.v-links .btn{ min-height:40px; padding:0 14px; font-size:14px; }
@media (max-width:1080px){
  .venture{ grid-template-columns:1fr; gap:14px; }
  .v-links{ justify-content:flex-start; }
}

/* 12. THESIS CARD ========================================================== */
.theses{ margin-top:64px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.thesis{ border:1px solid var(--line-strong); border-radius:var(--r-ui); padding:24px; display:flex; flex-direction:column; gap:18px; background:var(--paper); min-height:300px; }
.thesis.own{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.thesis .cat{ font-family:var(--f-mono); font-size:12px; color:var(--grey-text); display:flex; justify-content:space-between; gap:12px; }
.thesis.own .cat{ color:var(--grey); }
.thesis h3{ font-size:24px; line-height:1.12; letter-spacing:-.02em; font-variation-settings:"wdth" 90; }
.thesis .prob{ font-size:15.5px; line-height:1.5; }
.thesis dl{ margin:auto 0 0; display:grid; gap:8px; padding-top:16px; border-top:1px solid var(--line); font-size:14px; }
.thesis.own dl{ border-top-color:var(--ink-line); }
.thesis dl div{ display:grid; grid-template-columns:104px 1fr; gap:10px; }
.thesis dt{ color:var(--grey-text); }
.thesis.own dt{ color:var(--grey); }
.thesis dd{ margin:0; font-weight:600; }
.thesis .btn{ align-self:flex-start; }
@media (max-width:1080px){ .theses{ grid-template-columns:1fr; } .thesis{ min-height:0; } }

/* 13. PRINCIPLES LIST + REVIEW CARD ======================================== */
.principles{ margin-top:44px; display:grid; gap:0; border-top:1px solid var(--line); }
.principles li{ padding:18px 0; border-bottom:1px solid var(--line); display:grid; grid-template-columns:22px 1fr; gap:12px; }
.principles .k{ width:8px; height:16px; margin-top:5px; background:var(--line-strong); transition:background-color .2s; }
.principles li.lit .k, .principles--lit li .k{ background:var(--terra); }
.principles b{ display:block; font-size:17px; }
.principles span{ font-size:15.5px; color:var(--grey-text); }

.review{ border:1px solid var(--ink); border-radius:var(--r-ui); background:var(--white); overflow:hidden; }
.rv-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 20px; background:var(--ink); color:var(--paper); font-family:var(--f-mono); font-size:12px; }
.rv-head .st{ display:inline-flex; align-items:center; gap:8px; }
.rv-head .st i{ width:6px; height:12px; background:var(--grey); }
.review[data-state="approved"] .rv-head .st i{ background:var(--terra); }
.rv-body{ padding:22px 20px; }
.rv-kicker{ font-family:var(--f-mono); font-size:12px; color:var(--grey-text); }
.rv-title{ margin-top:8px; font-size:22px; line-height:1.2; font-weight:700; letter-spacing:-.015em; font-variation-settings:"wdth" 92; }
.rv-draft{ margin-top:16px; padding:14px 16px; background:var(--paper); border-radius:var(--r-in); font-size:15px; line-height:1.55; }
.rv-draft ul{ margin-top:6px; padding-left:18px; list-style:disc; }
.rv-meta{ margin:18px 0 0; display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:var(--r-in); }
.rv-meta div{ padding:12px 14px; border-bottom:1px solid var(--line); }
.rv-meta div:nth-child(odd){ border-right:1px solid var(--line); }
.rv-meta div:nth-last-child(-n+2){ border-bottom:0; }
.rv-meta dt{ font-family:var(--f-mono); font-size:11.5px; color:var(--grey-text); }
.rv-meta dd{ margin:3px 0 0; font-size:14.5px; font-weight:600; }
.rv-actions{ margin-top:20px; display:flex; gap:10px; flex-wrap:wrap; }
.rv-actions .btn{ min-height:42px; font-size:14px; }
.rv-log{ border-top:1px solid var(--line); padding:14px 20px 18px; font-family:var(--f-mono); font-size:12px; color:var(--grey-text); display:grid; gap:6px; }
.rv-log p{ display:grid; grid-template-columns:52px 1fr; gap:10px; }
.rv-log p b{ font-weight:500; color:var(--ink); }
@media (max-width:480px){ .rv-meta{ grid-template-columns:1fr; } .rv-meta div{ border-right:0!important; border-bottom:1px solid var(--line)!important; } .rv-meta div:last-child{ border-bottom:0!important; } }

/* 14. COMMAND PALETTE ("Ben..." doors) ===================================== */
.palette{ border:1px solid var(--ink); border-radius:var(--r-ui); background:var(--white); overflow:hidden; box-shadow:var(--shadow-pop); }
.pal-input{ display:flex; align-items:center; gap:0; padding:0 20px; height:68px; border-bottom:1px solid var(--line); }
.pal-input label{ font-size:clamp(22px,2.4vw,30px); font-weight:700; letter-spacing:-.02em; font-variation-settings:"wdth" 88; flex:none; }
.pal-input input{ flex:1; min-width:0; height:100%; border:0; background:transparent; font:inherit; font-size:clamp(18px,2vw,24px); font-weight:500; letter-spacing:-.01em; color:var(--ink); padding:0 0 0 10px; outline:none; font-variation-settings:"wdth" 92; caret-color:var(--terra); }
.pal-input input::placeholder{ color:var(--placeholder); }
.pal-input:focus-within{ box-shadow:inset 0 -2px 0 var(--terra); }
.pal-kbd{ font-family:var(--f-mono); font-size:11.5px; color:var(--grey-text); border:1px solid var(--line-strong); border-radius:var(--r-tag); padding:2px 6px; flex:none; }
.pal-list{ padding:8px; }
.door{ display:grid; grid-template-columns:18px 1fr auto; gap:14px; align-items:center; padding:16px 14px; border-radius:var(--r-in); text-decoration:none; color:var(--ink); }
.door .cur{ width:9px; height:24px; background:transparent; }
.door .say{ font-size:clamp(17px,1.6vw,21px); line-height:1.3; font-weight:600; letter-spacing:-.012em; font-variation-settings:"wdth" 94; }
.door .dest{ font-size:14px; font-weight:600; color:var(--grey-text); white-space:nowrap; }
.door.is-active{ background:var(--paper); }
.door.is-active .cur{ background:var(--terra); }
.door.is-active .dest{ color:var(--ink); }
.door:focus-visible{ outline-offset:-2px; }
.pal-empty{ padding:18px 14px; color:var(--grey-text); font-size:15px; }
.pal-foot{ border-top:1px solid var(--line); padding:10px 20px; font-family:var(--f-mono); font-size:11.5px; color:var(--grey-text); display:flex; gap:18px; flex-wrap:wrap; }
@media (max-width:560px){
  .door{ grid-template-columns:12px 1fr; gap:12px; padding:14px 10px; }
  .door .cur{ width:7px; }
  .door .dest{ grid-column:2; white-space:normal; color:var(--ink); font-family:var(--f-mono); font-size:12px; font-weight:500; letter-spacing:.02em; }
  .door .dest::after{ content:" →"; }
  .pal-kbd, .pal-foot{ display:none; }
}

/* 15. LAYER STACK ========================================================== */
.stack{ display:grid; gap:8px; }
.layer{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:18px 20px; border:1px solid var(--line-strong); border-radius:var(--r-in); background:var(--paper); }
.layer b{ font-size:17px; font-weight:650; letter-spacing:-.01em; }
.layer span{ font-family:var(--f-mono); font-size:12px; color:var(--grey-text); text-align:right; }
.layer.top{ background:var(--white); border-color:var(--ink); }
.layer.top .vs{ display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.layer.top .vs em{ font-style:normal; font-size:13px; font-weight:600; padding:3px 9px; border-radius:var(--r-tag); background:var(--paper); }
.layer.base{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.layer.base span{ color:var(--grey); }
@media (max-width:480px){ .layer{ grid-template-columns:1fr; gap:4px; } .layer span{ text-align:left; } }

/* 16. CTA BAND (terracotta closing) ======================================== */
.cta-band{ background:var(--terra); color:var(--white); padding:var(--sec) 0; }
.cta-band h2{ font-size:clamp(56px, 10vw, 156px); line-height:.92; letter-spacing:-.045em; font-variation-settings:"wdth" 84; font-weight:760; overflow-wrap:anywhere; }
.cta-band--sentence h2{ font-size:clamp(40px, 5.6vw, 84px); line-height:.98; letter-spacing:-.035em; max-width:18ch; }
.cta-row{ margin-top:56px; display:flex; justify-content:space-between; align-items:end; gap:32px; flex-wrap:wrap; }
.cta-band p{ font-size:clamp(18px,1.6vw,22px); line-height:1.45; max-width:44ch; }
.cta-band .btn:focus-visible, .cta-band a:focus-visible{ outline-color:var(--white); }
.cta-band--ink{ background:var(--ink); color:var(--paper); }

/* 17. FOOTER =============================================================== */
.foot{ padding:80px 0 36px; }
.foot-grid{ display:grid; grid-template-columns:minmax(0,4fr) repeat(3,minmax(0,2fr)) minmax(0,2fr); gap:40px; }
.foot-brand img{ height:48px; width:auto; }
.foot-brand p{ margin-top:18px; font-size:15px; color:var(--grey-text); max-width:30ch; }
.foot-cta{ margin-top:20px; }
.foot h3{ font-family:var(--f-mono); font-size:12px; font-weight:500; color:var(--grey-text); letter-spacing:.04em; margin-bottom:14px; }
.foot li{ margin:0; font-size:14.5px; }
.foot li a{ display:inline-flex; align-items:center; min-height:36px; text-decoration:none; }
.foot-contact a{ text-decoration:none; border-bottom:1px solid var(--line-strong); }
.foot-contact a:hover{ border-color:var(--ink); }
@media (pointer:coarse){ .foot-contact a{ position:relative; } .foot-contact a::after{ content:""; position:absolute; inset:-14px -4px; } }
.foot li a:hover{ text-decoration:underline; text-underline-offset:3px; }
.foot-contact{ margin-top:64px; padding-top:22px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; font-size:14px; }
.foot-legal{ margin-top:14px; display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; font-size:12.5px; color:var(--grey-text); }
.foot-health{ margin-top:14px; font-size:12.5px; color:var(--grey-text); max-width:110ch; }
@media (max-width:1080px){ .foot-grid{ grid-template-columns:1fr 1fr; } .foot-brand{ grid-column:1/-1; } }
@media (max-width:760px){ .foot li a{ min-height:44px; font-size:15.5px; } .foot-grid{ gap:28px 20px; } .foot-legal{ flex-direction:column; gap:8px; } }

/* 18. PAGE HERO (subpages) + BREADCRUMB ==================================== */
.page-hero{ padding:40px 0 var(--sec-tight); }
.page-hero .crumbs{ margin-bottom:40px; }
.page-hero-grid{ display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); gap:56px; align-items:end; }
.page-hero-grid--solo{ grid-template-columns:minmax(0,1fr); }
.page-hero .h-page{ margin-top:32px; }
.page-hero .chip + .h-page, .page-hero .tag + .h-page{ margin-top:28px; }
.page-hero-body{ margin-top:32px; padding-top:26px; border-top:1px solid var(--line); display:grid; gap:26px; max-width:720px; }
.page-hero-aside{ align-self:end; }
@media (max-width:1080px){ .page-hero-grid{ grid-template-columns:1fr; gap:40px; } }
/* v5.1: tablets and small laptops keep the two column hero */
@media (min-width:901px) and (max-width:1080px){ .page-hero-grid:not(.page-hero-grid--solo){ grid-template-columns:minmax(0,6fr) minmax(0,6fr); gap:40px; } }
@media (max-width:760px){ .page-hero{ padding-top:24px; } .page-hero .crumbs{ margin-bottom:28px; } }

.crumbs ol{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 0; font-family:var(--f-mono); font-size:12px; letter-spacing:.02em; color:var(--grey-text); }
.crumbs li + li::before{ content:"/"; margin:0 10px; color:var(--line-strong); }
.crumbs a{ text-decoration:none; color:var(--grey-text); }
.crumbs a:hover{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.crumbs [aria-current="page"]{ color:var(--ink); }

/* 19. TABLES, ROWS, BULLETS ================================================ */
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table{ width:100%; border-collapse:collapse; border-top:1px solid var(--ink); font-size:16px; }
.table th{ text-align:left; font-family:var(--f-mono); font-size:12px; font-weight:500; letter-spacing:.04em; color:var(--grey-text); padding:14px 24px 14px 0; border-bottom:1px solid var(--line-strong); }
.table td{ padding:18px 24px 18px 0; border-bottom:1px solid var(--line); vertical-align:top; }
.table td:first-child{ font-weight:600; }
/* definition rows */
.rows{ margin:0; border-top:1px solid var(--line); }
.rows > div{ display:grid; grid-template-columns:minmax(0,4fr) minmax(0,8fr); gap:24px; padding:18px 0; border-bottom:1px solid var(--line); }
.rows dt{ font-family:var(--f-mono); font-size:12.5px; font-weight:500; color:var(--grey-text); padding-top:3px; }
.rows dd{ margin:0; }
@media (max-width:640px){ .rows > div{ grid-template-columns:1fr; gap:6px; } }
/* hairline list with small cursor marker */
.bullets li{ position:relative; padding:12px 0 12px 22px; border-bottom:1px solid var(--line); }
.bullets li::before{ content:""; position:absolute; left:0; top:20px; width:6px; height:12px; background:var(--line-strong); }
.bullets--mono li{ font-family:var(--f-mono); font-size:13.5px; }
/* inline checklist, mono small ("Hizmetin niteliği · karar sahibi ...") */
.checklist{ display:flex; flex-wrap:wrap; gap:8px; }
.checklist li{ font-family:var(--f-mono); font-size:12px; letter-spacing:.03em; padding:6px 10px; border:1px solid var(--line-strong); border-radius:var(--r-tag); display:inline-flex; align-items:center; gap:8px; }
.checklist li::before{ content:""; width:5px; height:10px; background:var(--ink); }
/* plain panel card */
.card{ border:1px solid var(--line-strong); border-radius:var(--r-ui); padding:24px; background:var(--paper); display:flex; flex-direction:column; gap:14px; }
.card--white{ background:var(--white); }
.card--ink{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.card--ink .muted{ color:var(--grey); }

/* 20. ACCORDION, TABS, FILTER CHIPS ======================================== */
.accordion{ border-top:1px solid var(--ink); }
.acc{ border-bottom:1px solid var(--line); }
.acc > summary{ list-style:none; cursor:pointer; display:grid; grid-template-columns:18px minmax(0,1fr) 20px; gap:12px; align-items:center; padding:22px 0; font-size:clamp(17px,1.5vw,20px); line-height:1.3; font-weight:600; letter-spacing:-.012em; font-variation-settings:"wdth" 94; }
.acc > summary::-webkit-details-marker{ display:none; }
.acc > summary::before{ content:""; width:8px; height:18px; background:transparent; transition:background-color .15s; }
.acc[open] > summary::before{ background:var(--terra); }
.acc > summary:hover::before{ background:var(--line-strong); }
.acc[open] > summary:hover::before{ background:var(--terra); }
.acc-icon{ position:relative; width:14px; height:14px; justify-self:end; }
.acc-icon::before, .acc-icon::after{ content:""; position:absolute; left:0; top:6px; width:14px; height:2px; background:var(--ink); transition:transform .2s; }
.acc-icon::after{ transform:rotate(90deg); }
.acc[open] .acc-icon::after{ transform:rotate(0deg); }
.acc > summary:focus-visible{ outline-offset:-2px; }
.acc-a{ padding:0 32px 26px 30px; max-width:72ch; color:var(--ink); }
.acc-a p + p{ margin-top:.8em; }

.tabs{ display:block; }
.tab-list{ display:flex; gap:4px; border-bottom:1px solid var(--line-strong); overflow-x:auto; scrollbar-width:none; }
.tab-list::-webkit-scrollbar{ display:none; }
.tab{ flex:none; display:inline-flex; align-items:center; gap:10px; height:48px; padding:0 16px; background:none; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; font-size:15px; font-weight:600; color:var(--grey-text); cursor:pointer; }
.tab::before{ content:""; width:5px; height:12px; background:transparent; }
.tab:hover{ color:var(--ink); }
.tab[aria-selected="true"]{ color:var(--ink); border-bottom-color:var(--ink); }
.tab[aria-selected="true"]::before{ background:var(--terra); }
.tab:focus-visible{ outline-offset:-2px; }
.tab-panel{ padding-top:32px; }
.tab-panel:focus-visible{ outline-offset:6px; }

.filters{ display:flex; flex-wrap:wrap; gap:8px; }
.fchip{ display:inline-flex; align-items:center; gap:10px; height:38px; padding:0 14px; border:1px solid var(--line-strong); border-radius:99px; background:transparent; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer; transition:background-color .15s, border-color .15s, color .15s; }
.fchip::before{ content:""; width:5px; height:11px; background:var(--line-strong); }
.fchip:hover{ border-color:var(--ink); }
.fchip[aria-pressed="true"]{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.fchip[aria-pressed="true"]::before{ background:var(--terra); }
.filter-count{ font-family:var(--f-mono); font-size:12px; color:var(--grey-text); }

/* 21. PERSON CARD ========================================================== */
.people{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px 20px; }
@media (max-width:1080px){ .people{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px){ .people{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 14px; } }
.person{ display:grid; gap:14px; align-content:start; }
.avatar{ position:relative; aspect-ratio:1/1; background:var(--paper-2); border:1px solid var(--line); border-radius:var(--r-ui); overflow:hidden; display:grid; place-items:end center; }
.avatar img, .avatar svg{ width:100%; height:100%; object-fit:cover; display:block; }
.avatar:empty::after{ content:""; position:absolute; left:18px; bottom:18px; width:10px; height:22px; background:var(--line-strong); }
.person-name{ font-size:19px; line-height:1.2; font-weight:700; letter-spacing:-.015em; font-variation-settings:"wdth" 92; }
.person-role{ margin-top:4px; font-family:var(--f-mono); font-size:12px; line-height:1.5; color:var(--grey-text); }
.person-venture{ height:28px; display:flex; align-items:center; margin-top:-4px; }
.person-venture img{ max-height:24px; width:auto; }
.person-link{ font-size:14px; font-weight:600; text-decoration:none; border-bottom:1px solid var(--line-strong); justify-self:start; padding-bottom:1px; }
.person-link:hover{ border-color:var(--ink); }

/* 22. FORMS + STEPPER ====================================================== */
.form{ display:grid; gap:24px; max-width:760px; }
.split > .form, .split > div > .form{ max-width:none; }
.form-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 20px; }
.form-grid > .full{ grid-column:1/-1; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }
.fieldset{ border:0; padding:0; margin:0; min-width:0; display:grid; gap:20px; }
.fieldset + .fieldset{ padding-top:24px; border-top:1px solid var(--line); }
.form-step > .fieldset:first-child, .form-step + .form-step > .fieldset:first-child, .fieldset.form-step + .fieldset.form-step{ padding-top:0; border-top:0; }
.fieldset > legend{ margin-bottom:18px; }
.fieldset > legend.label{ margin-bottom:10px; }
.legend{ padding:0; font-size:19px; font-weight:700; letter-spacing:-.012em; font-variation-settings:"wdth" 92; }
.field{ display:grid; gap:8px; align-content:start; }
.label{ font-weight:600; font-size:15px; line-height:1.35; }
.label .opt{ font-family:var(--f-mono); font-size:11.5px; font-weight:500; color:var(--grey-text); margin-left:6px; }
.hint{ font-size:13.5px; line-height:1.45; color:var(--grey-text); }
.input, .select, .textarea{
  width:100%; min-height:48px; padding:12px 14px; border:1px solid var(--line-strong); border-radius:var(--r-ctl);
  background:var(--white); color:var(--ink); font:inherit; font-size:16px; line-height:1.4;
  caret-color:var(--terra); transition:border-color .15s, box-shadow .15s;
}
.textarea{ min-height:140px; resize:vertical; line-height:1.5; }
.select{ appearance:none; -webkit-appearance:none; padding-right:40px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23101010' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 15px center; }
.input::placeholder, .textarea::placeholder{ color:var(--placeholder); }
.input:hover, .select:hover, .textarea:hover{ border-color:var(--grey); }
.input:focus, .select:focus, .textarea:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 1px var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible{ outline:none; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"]{ border-color:var(--terra); box-shadow:0 0 0 1px var(--terra); }
.input:disabled, .select:disabled, .textarea:disabled{ background:var(--paper-2); color:var(--grey-text); cursor:not-allowed; }
.field-error{ display:flex; gap:8px; align-items:flex-start; font-size:13.5px; line-height:1.4; font-weight:600; color:var(--terra-ink); }
.field-error::before{ content:""; flex:none; width:4px; height:14px; margin-top:2px; background:var(--terra); }
.field-error:empty{ display:none; }

/* checkbox + radio */
.check{ display:grid; grid-template-columns:20px minmax(0,1fr); gap:12px; align-items:start; font-size:15px; line-height:1.45; cursor:pointer; }
.check input{ appearance:none; -webkit-appearance:none; margin:1px 0 0; width:20px; height:20px; border:1px solid var(--grey); background:var(--white); display:grid; place-items:center; cursor:pointer; transition:background-color .12s, border-color .12s; }
.check input[type="checkbox"]{ border-radius:3px; }
.check input[type="radio"]{ border-radius:50%; }
.check input[type="checkbox"]:checked{ background:var(--terra) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.6 2.6L10 3.4' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E") center/13px no-repeat; border-color:var(--terra); }
.check input[type="radio"]:checked{ border-color:var(--ink); background:radial-gradient(circle, var(--ink) 0 4.5px, var(--white) 5px); }
.check input:focus-visible{ outline:2px solid var(--terra); outline-offset:2px; }
.check input[aria-invalid="true"]{ border-color:var(--terra); }
.check a{ font-weight:600; }
.choices{ display:grid; gap:10px; }
.choices--row{ grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); }
/* radio / checkbox as selectable cards */
.choice{ border:1px solid var(--line-strong); border-radius:var(--r-in); padding:16px; background:transparent; position:relative; transition:border-color .15s, background-color .15s; }
.choice:hover{ border-color:var(--ink); }
.choice:has(input:checked){ border-color:var(--ink); background:var(--white); box-shadow:inset 4px 0 0 var(--terra); }
.choice .check{ font-weight:600; }
.choice .hint{ margin:4px 0 0 32px; }

/* form level states */
.form-status{ padding:14px 16px; border-radius:var(--r-in); border:1px solid var(--terra); background:var(--white); color:var(--ink); font-size:15px; display:flex; gap:12px; }
.form-status::before{ content:""; flex:none; width:6px; height:18px; margin-top:2px; background:var(--terra); }
.form-status:empty{ display:none; }
.form-success{ border:1px solid var(--ink); border-radius:var(--r-ui); background:var(--white); padding:28px 24px; display:grid; grid-template-columns:18px minmax(0,1fr); gap:14px; font-size:18px; line-height:1.45; font-weight:600; max-width:760px; }
.form-success::before{ content:""; width:9px; height:24px; background:var(--terra); margin-top:1px; }
.form-success-next{ display:block; margin-top:14px; font-size:16px; }
.form-success:focus{ outline:none; }
.form-success:focus-visible{ outline:2px solid var(--terra); outline-offset:3px; }
.form-actions{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.form-actions .hint{ flex:1 1 220px; }
.hp{ position:absolute!important; left:-9999px!important; width:1px; height:1px; overflow:hidden; }

/* stepper (multi-step form progress) */
.stepper{ display:grid; grid-template-columns:repeat(var(--steps,3),minmax(0,1fr)); gap:6px; counter-reset:stp; }
.stepper li{ counter-increment:stp; display:grid; gap:10px; font-size:14px; font-weight:600; color:var(--grey-text); }
.stepper li::before{ content:""; height:4px; border-radius:1px; background:var(--line); }
.stepper li span::before{ content:counter(stp) "  "; font-family:var(--f-mono); font-weight:500; font-size:12px; margin-right:4px; }
.stepper li.is-done{ color:var(--ink); }
.stepper li.is-done::before{ background:var(--ink); }
.stepper li[aria-current="step"]{ color:var(--ink); }
.stepper li[aria-current="step"]::before{ background:var(--terra); }
@media (max-width:560px){ .stepper li{ font-size:12.5px; line-height:1.3; } }
.form-step[hidden]{ display:none!important; }

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