/* ============================================================
   EVIE — BRAND KIT  ·  step 5 of 7
   Direction: HARD ANODISE (PRODUCT.md §References → Direction taken)
   Every colour below was derived in OKLCH and measured against
   WCAG 2.2 before it was written here. See BRANDKIT.md §Palette.
   ============================================================ */

/* ---- THEME: LIGHT (default) ----------------------------------
   Warm ground adopted from Afhechting (03). Ground hue 70,
   chroma <= 0.009 — warm to the eye, semantically silent. ------ */
.t-light{
  --ground:#f9f6f2;        /* oklch(97.4% 0.0060 70) */
  --raised:#fefcfb;        /* oklch(99.3% 0.0030 70) */
  --sunken:#f1ece8;        /* oklch(94.6% 0.0080 68) */
  --recess:#e7e2dd;        /* oklch(91.6% 0.0090 68) */
  --rule:#dcd6d1;          /* oklch(88.0% 0.0100 68) */
  --rule-strong:#7e7871;   /* oklch(57.5% 0.0120 68)  4.27:1 on raised */
  --ink:#1c1713;           /* oklch(21.0% 0.0120 62)  16.50:1 */
  --ink-muted:#47413c;     /* oklch(38.0% 0.0110 64)   9.33:1 */
  --ink-faint:#625d58;     /* oklch(48.0% 0.0100 66)   6.04:1 */
  --open-fill:#047685;     /* oklch(52.0% 0.0890 210) */
  --open-text:#015461;     /* oklch(41.0% 0.0710 212) */
  --open-wash:#ddf1f5;     /* oklch(94.5% 0.0220 208) */
  --resolved-fill:#1a7457; /* oklch(50.0% 0.0950 166) */
  --resolved-text:#005940; /* oklch(41.0% 0.0850 166) */
  --resolved-wash:#dff2e9; /* oklch(94.5% 0.0240 166) */
  --custody-fill:#a85f2d;  /* oklch(56.0% 0.1150 52) */
  --custody-text:#793d16;  /* oklch(43.0% 0.0980 50) */
  --custody-wash:#fce9db;  /* oklch(94.5% 0.0280 60) */
  --urgent-fill:#c02c26;   /* oklch(53.0% 0.1850 28) */
  --urgent-text:#a01011;   /* oklch(45.0% 0.1750 28) */
  --urgent-wash:#ffe4df;   /* oklch(94.0% 0.0300 32) */
  --unclear-fill:#7b7875;  /* oklch(57.5% 0.0060 70) -- 3.41:1 on recess, the Run's track */
  --unclear-text:#4a4744;  /* oklch(40.0% 0.0060 70) */
  --ink-disabled:#7f7b77;  /* oklch(58.5% 0.0080 68) -- explicit colour, never an opacity */
  --unclear-wash:#e7e4e1;  /* oklch(92.0% 0.0050 70) */
  --lift:0 1px 0 rgba(28,23,19,.04), 0 10px 30px -16px rgba(28,23,19,.26);
  --well:inset 0 1px 2px rgba(28,23,19,.07);
  --sheen:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,0) 44%);
}

/* ---- THEME: DARK (peer, not inversion) ---------------------- */
.t-dark{
  --ground:#14110e;        /* oklch(18.0% 0.0070 66) */
  --raised:#1d1a17;        /* oklch(22.0% 0.0080 66) */
  --sunken:#0c0a08;        /* oklch(14.5% 0.0060 66) */
  --recess:#27231f;        /* oklch(26.0% 0.0090 66) */
  --rule:#342f2b;          /* oklch(31.0% 0.0100 66) */
  --rule-strong:#756f69;   /* oklch(54.5% 0.0120 66)  3.49:1 on raised, 3.14:1 on recess */
  --ink:#f0eeeb;           /* oklch(95.0% 0.0040 75)  16.25:1 */
  --ink-muted:#c1bdb8;     /* oklch(80.0% 0.0080 72)  10.07:1 */
  --ink-faint:#96918c;     /* oklch(66.0% 0.0100 70)   6.03:1 */
  --open-fill:#48becb;     /* oklch(74.0% 0.1050 206) */
  --open-text:#78d5e1;     /* oklch(82.0% 0.0900 206) */
  --open-wash:#0b2e33;     /* oklch(28.0% 0.0400 208) */
  --resolved-fill:#69c6a2; /* oklch(76.0% 0.1050 166) */
  --resolved-text:#8ddaba; /* oklch(83.0% 0.0900 166) */
  --resolved-wash:#122f24; /* oklch(28.0% 0.0420 166) */
  --custody-fill:#e89c75;  /* oklch(76.0% 0.1050 48) */
  --custody-text:#f9bb99;  /* oklch(84.0% 0.0850 50) */
  --custody-wash:#3d2515;  /* oklch(29.0% 0.0450 52) */
  --urgent-fill:#f17260;   /* oklch(70.0% 0.1600 30) */
  --urgent-text:#ff9686;   /* oklch(78.0% 0.1290 30) */
  --urgent-wash:#461d18;   /* oklch(29.0% 0.0650 28) */
  --unclear-fill:#7a7774;  /* oklch(57.0% 0.0060 70) -- 3.50:1 on recess, the Run's track */
  --unclear-text:#a19e9a;  /* oklch(70.0% 0.0060 70) */
  --ink-disabled:#7c7873;  /* oklch(57.5% 0.0090 68) -- explicit colour, never an opacity */
  --unclear-wash:#23211f;  /* oklch(25.0% 0.0050 70) */
  --lift:0 1px 0 rgba(255,255,255,.030), 0 12px 32px -18px rgba(0,0,0,.9);
  --well:inset 0 1px 2px rgba(0,0,0,.55);
  --sheen:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,0) 44%);
}

:root{
  --ff-display:'Cabinet Grotesk',system-ui,sans-serif;
  --ff-text:'Switzer',system-ui,sans-serif;
  --ff-mono:'IBM Plex Mono',ui-monospace,monospace;

  /* SPACING — additive ladder, adopted from Afhechting (03).
     Each step is the sum of the two before it.                 */
  --s1:4px; --s2:8px; --s3:12px; --s4:20px;
  --s5:32px; --s6:52px; --s7:84px; --s8:136px;

  /* SHAPE — machined is cut, living is round, nothing between. */
  --r-flush:0;      /* rails, wells, datum        */
  --r-cut:2px;      /* tags, inputs, buttons      */
  --r-panel:3px;    /* panels, cards              */
  --r-living:999px; /* people, presence, avatars  */
  --chamfer:7px;    /* the 45° cut, one corner    */

  --dur-fast:120ms; --dur-base:220ms; --dur-slow:420ms;
  --ease-machined:cubic-bezier(.2,0,0,1);
  --ease-settle:cubic-bezier(.32,.72,0,1);
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{width:1440px;font-family:var(--ff-text);font-weight:400;font-size:15px;
  line-height:1.55;background:#14110e;color:#f0eeeb;
  font-feature-settings:"ss01" 1;}
img,svg{display:block}

/* ---------- TYPE SCALE ---------------------------------------
   ONE display weight (700). Hierarchy is size + optical tracking.
   Display leading floor is 1.045, measured: É rises 0.849em and
   ĳ drops 0.196em in Cabinet Grotesk 700. The scale sets 1.08.  */
.d104{font:700 104px/1.08 var(--ff-display);letter-spacing:-.038em}
.d64 {font:700 64px/1.08  var(--ff-display);letter-spacing:-.032em}
.d40 {font:700 40px/1.12  var(--ff-display);letter-spacing:-.024em}
.d26 {font:700 26px/1.22  var(--ff-display);letter-spacing:-.016em}
.d18 {font:700 18px/1.34  var(--ff-display);letter-spacing:-.008em}

.x20{font-size:20px;line-height:1.50;letter-spacing:-.004em}
.x17{font-size:17px;line-height:1.58;letter-spacing:-.002em}
.x15{font-size:15px;line-height:1.55}
.x13{font-size:13px;line-height:1.50}
.med{font-weight:500}

/* 12px is the floor. PRODUCT.md open item: 02 shipped 10.5px. */
.lab{font-family:var(--ff-mono);font-weight:500;font-size:12px;line-height:1.2;
  letter-spacing:.10em;text-transform:uppercase}
.num{font-family:var(--ff-mono);font-weight:400;font-size:14px;
  font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.num-s{font-family:var(--ff-mono);font-weight:400;font-size:12px;
  font-variant-numeric:tabular-nums}

.ink{color:var(--ink)} .im{color:var(--ink-muted)} .if{color:var(--ink-faint)}

/* ---------- BOARD SCAFFOLD ----------------------------------- */
.band{width:1440px;padding:var(--s7) var(--s6);background:var(--ground);color:var(--ink)}
.band--tight{padding:var(--s6) var(--s6)}
.wrap{width:1336px;margin:0 auto}
.hr{height:1px;background:var(--rule);border:0}

/* the datum: 1px ticks every 8px, long tick every 40px */
.datum{height:9px;
  background-image:
    repeating-linear-gradient(90deg,var(--rule-strong) 0 1px,transparent 1px 40px),
    repeating-linear-gradient(90deg,var(--rule) 0 1px,transparent 1px 8px);
  background-size:100% 9px,100% 5px;background-repeat:no-repeat repeat-x}

.shead{display:flex;align-items:baseline;gap:var(--s4);margin-bottom:var(--s5)}
.shead .idx{font-family:var(--ff-mono);font-weight:500;font-size:12px;letter-spacing:.10em;
  color:var(--open-text);border:1px solid var(--rule-strong);padding:3px 7px;border-radius:var(--r-cut)}
.shead h2{font:700 26px/1.22 var(--ff-display);letter-spacing:-.016em;color:var(--ink)}
.shead p{color:var(--ink-muted);font-size:13px;max-width:620px;margin-left:auto;text-align:right}

/* ---------- PANEL / PLATE ------------------------------------ */
.panel{background:var(--raised);border:1px solid var(--rule);border-radius:var(--r-panel);
  box-shadow:var(--lift);position:relative}
.panel::before{content:"";position:absolute;inset:0;border-radius:inherit;
  background:var(--sheen);pointer-events:none}
.panel__bar{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
  padding:11px 16px;border-bottom:1px solid var(--rule);background:var(--sunken);
  border-radius:var(--r-panel) var(--r-panel) 0 0;position:relative;z-index:1}
.pad{padding:var(--s4);position:relative;z-index:1}
.well{background:var(--sunken);box-shadow:var(--well);border-radius:var(--r-flush)}

/* the chamfer — machined surfaces are cut, never rounded */
.cut{clip-path:polygon(0 0,calc(100% - var(--chamfer)) 0,100% var(--chamfer),100% 100%,0 100%);
  border-radius:0}

/* ---------- THE MARK ----------------------------------------- */
/* de klem — the caliper. A fixed jaw on the datum, a beam, and a
   solid sliding jaw at the measurement. Reads: this much, and it
   is closed. Not a waveform, a microphone, a bubble or a tooth. */
.mk{display:block}
/* the mark paints via presentation attributes on the symbol itself, because
   CSS class selectors do not reach into a <use> shadow tree. The accent is a
   custom property (--acc), which does inherit. */

/* ---------- WORDMARK ----------------------------------------- */
.wm{font-family:var(--ff-display);font-weight:700;color:var(--ink);white-space:nowrap}
.lock{display:inline-flex;align-items:center;gap:.34em}

/* WORDMARK A "DATUM" — the square tick that replaces the i-dot.
   Measured in Cabinet Grotesk 700: i advance .230em, stem ink .112em
   starting .059em from the origin, cap height .670em, x-height .487em.
   The tick is stem-width square with its top ON the cap line, so it
   reads as an instrument mark rather than a styled dot. The -.2116em
   is the calibrated offset that puts the dotless i on the baseline. */
.tick-i{position:relative;display:inline-block;width:.230em;height:1em;vertical-align:baseline}
.tick-i .stem{position:absolute;left:0;bottom:-.2116em;line-height:1}
.tick-i .dot{position:absolute;left:.059em;bottom:.558em;
  width:.112em;height:.112em;background:currentColor}

/* ---------- STATE ENCODING ----------------------------------- */
/* colour is never alone: fill + silhouette + glyph + word.      */
.tag{display:inline-flex;align-items:center;gap:6px;padding:4px 8px 4px 6px;
  border:1px solid var(--rule-strong);border-radius:var(--r-cut);background:var(--raised);
  font-family:var(--ff-mono);font-size:12px;font-weight:500;letter-spacing:.03em;
  white-space:nowrap;color:var(--ink-muted)}
.tag svg{width:13px;height:13px;flex:0 0 13px}
.tag--resolved{color:var(--resolved-text);background:var(--resolved-wash);border-color:transparent}
.tag--custody {color:var(--custody-text); background:var(--custody-wash); border-color:transparent}
.tag--open    {color:var(--open-text);    background:var(--open-wash);    border-color:transparent}
.tag--urgent  {color:var(--urgent-text);  background:var(--urgent-wash);  border-color:transparent}
.tag--unclear {color:var(--unclear-text); background:var(--unclear-wash);
  border-color:var(--unclear-text);border-style:dashed}

/* the run — one piece of work on its rail */
.rail{position:relative;height:6px;background:var(--recess);box-shadow:var(--well);border-radius:0}
.rail .fill{position:absolute;left:0;top:0;bottom:0}
.rail .cap{position:absolute;top:-3px;width:4px;height:12px}
.rail .cap--hollow{background:transparent;border:1.5px solid currentColor;width:6px}
.rail .hatch{position:absolute;top:0;bottom:0;
  background-image:repeating-linear-gradient(-45deg,currentColor 0 1px,transparent 1px 5px);opacity:.55}
.rail .gap{position:absolute;top:-2px;bottom:-2px;width:3px;background:var(--raised)}
/* the relay — the stretch of the run a human is now carrying. Sits between
   the fill and the round cap, so it needs the same absolute frame as its
   siblings; without it the segment renders in flow and pushes the rail. */
.rail .relay{position:absolute;top:0;bottom:0}
.st{--c:var(--ink-faint)}
.st--resolved{--c:var(--resolved-fill)}
.st--custody {--c:var(--custody-fill)}
.st--open    {--c:var(--open-fill)}
.st--urgent  {--c:var(--urgent-fill)}
.st--unclear {--c:var(--unclear-fill)}

/* ---------- ICON GRID ---------------------------------------- */
/* 1.5px stroke on a 24 grid = 1px optical at 16px. Butt caps,
   miter joins. Round caps are reserved for living things.       */
.ico{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;
  stroke-linecap:butt;stroke-linejoin:miter}

/* ---------- CAPTIONS ----------------------------------------- */
.cap-lab{font-family:var(--ff-mono);font-size:12px;letter-spacing:.10em;
  text-transform:uppercase;color:var(--ink-faint)}
.note{font-size:13px;line-height:1.55;color:var(--ink-muted);max-width:56ch}
.note b{color:var(--ink-muted);font-weight:500}
.grid{display:grid;gap:var(--s5)}
.g2{grid-template-columns:1fr 1fr}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
.row{display:flex;gap:var(--s5)}
.mono-flat{filter:grayscale(1)}

/* ---------- ACCESSIBILITY ------------------------------------ */
/* WCAG 2.2 AA. See ../design-system/A11Y-AUDIT.md for the measured
   basis of every value here.                                    */

/* The Focus Ring Rule (2.4.11 / 2.4.7).
   open-fill clears 3:1 on all four surfaces and all five washes in
   both themes (worst 4.15:1, light, on recess), so the ring needs no
   per-surface variant. Full-bleed elements take the ring INSET --
   an outset ring on a flush table row is clipped by the panel's
   overflow, and a clipped ring is not a visible ring.            */
:where(a,button,[role="button"],input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--open-fill);outline-offset:2px;transition:none}
:where(tr,li,.row,.tag):focus-visible{
  outline:2px solid var(--open-fill);outline-offset:-2px;transition:none}

/* The Not-Obscured Rule (2.4.11). Any fixed/sticky bar must not be
   able to hide a focused element that was scrolled to.           */
:root{--sticky-top:56px}
:where(a,button,input,select,textarea,tr,li,[tabindex]){
  scroll-margin-top:calc(var(--sticky-top) + var(--s2));
  scroll-margin-bottom:var(--s5)}

/* The 24px Rule (2.5.8). Measured on the HIT AREA, not the ink: an
   icon may be 16px, its button may not.                          */
:where(button,a[role="button"],[role="tab"],.icon-btn,.tag[tabindex]){
  min-block-size:24px;min-inline-size:24px}
.icon-btn{display:inline-grid;place-items:center;
  inline-size:24px;block-size:24px;padding:0}

/* The Min-Height Rule (1.4.12). Controls declare min-block-size,
   never height, so nothing clips when a user applies line-height
   1.5 / letter-spacing 0.12em.                                   */
:where(.btn,.field,.panel__bar,.topbar){height:auto}
.btn{min-block-size:36px}
.btn--lg{min-block-size:44px}
.btn--mini{min-block-size:24px}
.field{min-block-size:32px}
.panel__bar{min-block-size:44px}
.topbar{min-block-size:56px}

/* Disabled is a colour, never an opacity. A stacked opacity
   multiplier is how a disabled control becomes invisible.        */
:where(button,input,select,textarea,.btn)[disabled],
:where(button,input,select,textarea,.btn):disabled,
[aria-disabled="true"]{color:var(--ink-disabled);cursor:not-allowed}

/* Reduced motion removes TRAVEL and keeps FEEDBACK. A state that
   changed with no transition at all is a state the user can miss,
   so --dur-base degrades to a 120ms crossfade in place rather than
   to zero. These are kit.css's own token names; the product system
   uses --transition-* / --motion-* (DESIGN.md SS1).              */
@media (prefers-reduced-motion:reduce){
  :root{--dur-fast:0ms;--dur-base:120ms;--dur-slow:0ms;--stagger:0ms}
  *,*::before,*::after{animation-duration:.01ms !important;
    animation-iteration-count:1 !important;scroll-behavior:auto !important}
  .drawer,.sheet{transition-property:opacity;transform:none !important}
  .skeleton{animation:none;background:var(--sunken)}
}

/* The No-Loop Rule (2.2.2). Skeletons are static, not shimmering:
   a shimmer is an indefinite loop with no pause control.         */
.skeleton{background:var(--sunken);animation:none}
