/* ===========================================================================
   Hackerman — design tokens  (v0.5, 17 Nov 2026 — first review)

   v0.5 changes, from the first review ("lines and jail", "attention control"):
   - No rails, dividers, junction squares or hairline cells. Containment comes
     from surfaces (white cards on the warm page) and from space.
   - Headlines move from Regular to Medium (500) for attention.
   - Radii soften (cards 18px) so surfaces read as objects, not boxes in a grid.
   - Two-tone headings (.t-dim) and dot-matrix figures carry the emphasis.
   (v0.4 notes follow; where they mention lines, v0.5 supersedes them.)

   Derived from the landing wireframe ("created assets/website wireframe.pdf"),
   measured, not eyeballed: colours read from the PDF's own fill operators, sizes
   from a 1:1 render of its 1920px frame. Fluid values land on the wireframe at 1920.

   Direction: very clean and light. A warm-grey page held by hairline rails; the
   small square as the unit of data; Satoshi Regular for headlines; orange as the
   voice; black only for actions, thumbnails and the footer.
   =========================================================================== */

@font-face { font-family:'Satoshi'; src:url('../fonts/Satoshi-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:block; }
@font-face { font-family:'Satoshi'; src:url('../fonts/Satoshi-Medium.woff2')  format('woff2'); font-weight:500; font-style:normal; font-display:block; }

:root {
  color-scheme: light;

  /* ---- Ground and lines (from the wireframe) ---------------------------- */
  --paper:        #F5F4F1;   /* page ground                                   */
  --raised:       #FFFFFF;   /* inputs, the active nav pill, raised cards     */
  --field:        #F3F0E9;   /* the data band behind the Field (warmer)       */
  --sunk:         #ECEAE6;   /* tags, secondary buttons, nav track            */
  --sunk-hover:   #E3E1DC;
  --line:         #E3E1DC;   /* rails, dividers, junction squares             */
  --line-strong:  #C9C6BF;   /* chart baselines, "+" marks                    */
  --grid:         #E8E6E1;   /* chart gridlines                               */

  --ink:          #141414;   /* AV black: headlines, body                     */
  --ink-2:        #4A4844;   /* secondary text, tag text                      */
  --ink-3:        #6B6862;   /* meta, captions, axis           5.1:1 on paper */
  --ink-4:        #A8A59E;   /* placeholder, disabled                         */
  --action:       #0A0A0A;   /* primary buttons, send                         */
  --action-hover: #2A2927;
  --plate:        #1F1F1D;   /* thumbnail plates (logo art sits on these)     */
  --plate-tag:    #4A4844;   /* tags on plates                                */
  --dot:          #CFCBC3;   /* resting square in the Field                   */

  /* ---- Brand ------------------------------------------------------------ */
  --orange:       #F06731;   /* the voice: hits, icons, the data subject      */
  --orange-hover: #E2561F;
  --orange-ink:   #B4461A;   /* orange as small text                          */
  --orange-neon:  #FF7A22;   /* thumbnail marks on black only: brighter, to sit beside lime */
  --orange-wash:  #FDE6DB;   /* mode chip, selected rows                      */
  --lime:         #B8FD15;   /* punctuation only: "yours", live               */
  --lime-wash:    #EEFCC6;

  /* ---- Texture: film grain, for a human touch on plates and bands ----- */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-strength: .5;     /* overlay opacity on plates */
  --grain-soft: .32;        /* on the light field band   */

  /* ---- Data palette — fixed order, validated on #F5F4F1 and #FFFFFF ---- */
  --d1: #F06731;  --d2: #3366B0;  --d3: #2E9A78;  --d4: #D9A21B;
  --d5: #D9708F;  --d6: #6E9B1E;  --d7: #8B7BD8;  --d-compare: #C9C6BF;
  --blue-100:#DCE6F4; --blue-200:#B9CDEA; --blue-300:#8FB0DC; --blue-400:#6390CB;
  --blue-500:#3366B0; --blue-600:#24518F; --blue-700:#193A68;
  /* Sequential ramp: orange, the brand's own hue. Blue is now only the second categorical series. */
  --orange-100:#FCE6DA; --orange-200:#F9CBB2; --orange-300:#F5A57F; --orange-400:#F06731;
  --orange-500:#D3531F; --orange-600:#A9421A; --orange-700:#7A3114;
  --st-active:#2E9A78; --st-acquired:#3366B0; --st-public:#D9A21B; --st-inactive:#A8A59E;
  --ok:#2B7A4B; --warn:#A86A0B; --error:#B42318;

  /* Semantic roles */
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --surface: var(--raised); --paper-sunk: var(--sunk); --paper-deep: var(--sunk-hover);
  --focus: var(--ink);

  /* ---- Type: Regular leads; Medium only for small UI --------------------
     Wireframe @1920: hero 96 · section 56 · card title 32 · lede 20 · body 16 · eyebrow 14 */
  --font: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --w-regular: 400; --w-medium: 500;
  --fs-display: clamp(2.75rem, 1rem + 4.6vw, 6rem);      /* 44 → 96  */
  --fs-h2:      clamp(2rem, 1rem + 2.1vw, 3.5rem);       /* 32 → 56  */
  --fs-h3:      clamp(1.375rem, 1rem + .85vw, 2rem);     /* 22 → 32  */
  --fs-h4:      clamp(1.125rem, 1rem + .3vw, 1.375rem);  /* 18 → 22  */
  --fs-stat:    clamp(2.5rem, 1.4rem + 3vw, 4.5rem);     /* 40 → 72  */
  --fs-lede:    clamp(1.125rem, .95rem + .45vw, 1.375rem); /* 18 → 22 (v0.5.1) */
  --fs-body:    1.0625rem;                               /* 17 (v0.5.1: was 16) */
  --fs-small:   1rem;                                    /* 16 (was 15) */
  --fs-meta:    .9375rem;                                /* 15 (was 14) */
  --fs-label:   .875rem;                                 /* 14: the floor. Nothing on the site is smaller. */
  --w-head: 500;   /* v0.5: every headline */
  --lh-display: 1.1; --lh-h2: 1.12; --lh-h3: 1.2; --lh-body: 1.55; --lh-lede: 1.4;
  --tr-display: -.035em; --tr-h2: -.03em; --tr-h3: -.02em;

  /* ---- Layout: the framed page ----------------------------------------- */
  --frame-max: 1520px;                         /* rails at 200 / 1720 on a 1920 screen */
  --out: clamp(0px, 4vw - 24px, 200px);        /* always some space outside the rails */
  --pad: clamp(20px, 4.2vw, 80px);             /* content inset from the rails        */
  --junction: 8px;                             /* the square where two lines meet     */
  --nav-h: clamp(64px, 5vw, 96px);
  --section-y: clamp(72px, 8.5vw, 168px);

  /* ---- Shape: small radii, measured -------------------------------------- */
  --r-xs: 4px;  /* marks inside running text: number highlight, "your answer", search match (26 Nov) */
  --r-s: 8px;   /* tags, buttons, inputs  (v0.5: 4 → 8) */
  --r-m: 12px;  /* thumbnails, inner panels (6 → 12)  */
  --r-l: 18px;  /* cards, sheets          (10 → 18)   */
  --r-xl: 28px; /* bands inset from the page edge     */
  --card-pad: clamp(22px, 2.2vw, 40px);
  --gap: clamp(12px, 1.1vw, 20px);      /* between cards */

  /* ---- Motion ----------------------------------------------------------- */
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 360ms; --dur-4: 800ms; --dur-5: 1400ms;
}

/* Dark: the chat's dark theme, and the footer. The public site stays light. */
:root[data-theme="dark"], .on-dark {
  color-scheme: dark;
  --paper: #141414; --raised: #1F1F1E; --field: #191918; --sunk: #2A2A28; --sunk-hover: #343432;
  --line: #2E2E2C; --line-strong: #4A4945; --grid: #262625; --dot: #3D3C39;
  --ink: #FAFAF8; --ink-2: #C9C7C2; --ink-3: #9C9993; --ink-4: #5F5D59;
  --action: #FAFAF8; --action-hover: #E3E1DC; --orange-ink: #F06731; --orange-wash: #3A2318;
  --d1: #E05A26; --d2: #5C8CD6; --d3: #2F9C79; --d4: #C08A10; --d5: #CC5F82; --d6: #6F9A1C; --d7: #8577D6; --d-compare: #5F5D59;
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --surface: var(--raised); --paper-sunk: var(--sunk); --paper-deep: var(--sunk-hover); --focus: var(--lime);
}
.on-dark { background: var(--paper); color: var(--ink); }

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--w-regular) var(--fs-body)/var(--lh-body) var(--font);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--orange-wash); color: #141414; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }

/* ---- Type primitives ------------------------------------------------------ */
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--tr-display); font-weight: var(--w-head); margin: 0; }
.t-h2      { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--tr-h2); font-weight: var(--w-head); margin: 0; }
.t-h3      { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--tr-h3); font-weight: var(--w-head); margin: 0; }
.t-h4      { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -.01em; font-weight: 500; margin: 0; }
.t-stat    { font-size: var(--fs-stat); line-height: 1; letter-spacing: -.04em; font-weight: var(--w-head); font-variant-numeric: tabular-nums; }
.t-lede    { font-size: var(--fs-lede); line-height: var(--lh-lede); color: var(--fg); margin: 0; }
.t-small   { font-size: var(--fs-small); line-height: 1.5; }
.t-meta    { font-size: var(--fs-meta); line-height: 1.45; color: var(--fg-3); }
.t-label   { font-size: var(--fs-label); line-height: 1.3; color: var(--fg-2); }
.t-num     { font-variant-numeric: tabular-nums; }
.t-hit     { color: var(--orange); }
.t-dim     { color: var(--ink-4); }   /* v0.5 two-tone headings: the second clause steps back */
.t-mark    { background: linear-gradient(transparent 60%, var(--lime) 60%, var(--lime) 92%, transparent 92%); color: #141414; }
.prose     { max-width: 64ch; }
