/* Tickjury shared tokens, direction "Terminal". Single source of truth for the Next.js site and the Lab pages.
   Values: portal/lab/design/v2/terminal/NOTES.md. Dark first (also the no-JS default); light via [data-theme=light]. */
:root,
:root[data-theme=dark] {
  color-scheme: dark;
  /* TickJury design system (owner, 2026-11-14; CONSTRAINTS E37), replacing D-2: layered blue-black surfaces, cyan accent,
     teal hover edge; text #F2F7FA / #C6D4DC / #91A6B4. --brand-j stays the locked logo's lime. */
  --bg: #070C12; --surface: #0F171D; --surface-2: #192126; --raise: #1A292C; --nav-bar: #0F171D;
  --line: #293940; --line-2: #293940; --grid: rgba(41, 57, 64, .35);
  --ink: #F2F7FA; --ink-2: #C6D4DC; --muted: #91A6B4;
  --rules: #25F7FC; --rules-ink: #04161A; --rules-wash: rgba(37, 247, 252, .15); --teal: #04A0A8;
  --random: #7C6CE6; --random-text: #ABA2F8; --random-band: rgba(124, 108, 230, .20);
  --bench: #8A93A2;
  --brand-j: #C6F432;   /* the logo's tick-j, from the locked dark wordmark */
  --gain: #22E69A; --loss: #FF6B72; --loss-wash: rgba(255, 107, 114, .15);
  --phase-acc: #5C9DF7; --phase-up: #3DD68C; --phase-dist: #E8A53C; --phase-down: #FF6F7D;
  --v-robust: #22E69A; --v-fragile: #F5B85C; --v-overfit: #F59E47; --v-noedge: #91A6B4;
  --v-superseded: #93A8CC; --v-notadopted: #C9B48E;
  --stale: #F5B85C;
  --cta-bg: #25F7FC; --cta-fg: #04161A; --cta-hover: #7DFAFD;   /* solid cyan main button (owner 2026-11-15) */
  --focus: #25F7FC;
  /* Desk design panel (2026-10-30): control borders at 3:1 on every surface, and chart series in a fixed order
     (docs/council/2026-10-29-desk-design/SPEC.md C4, C9). Distribution above was #F59E47 (owner, N12). */
  --ctl-line: #567480;
  --ser-1: #25F7FC; --ser-2: #F2B544; --ser-3: #B8A7FF; --ser-4: #3DD68C; --ser-5: #FF8FA3; --ser-6: #9BB2D6;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 48px -24px rgba(0, 0, 0, .6);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  /* Panels, tiles and chips are square; --r-ctl is the one control radius (owner, 2026-11-01). */
  --r-sm: 0px; --r: 0px; --r-lg: 0px; --r-ctl: 8px;
  --font-sans: var(--font-geist-sans, ui-sans-serif, system-ui, sans-serif);
  --font-mono: var(--font-geist-mono, var(--font-geist-sans, ui-sans-serif, system-ui, sans-serif));   /* Inter for figures too (owner, 2026-11-14; E37) */
  --sans: var(--font-sans);
  --mono: var(--font-mono);
}
:root[data-theme=light] {
  color-scheme: light;
  /* TickJury light (owner, 2026-11-14; E37), replacing W-2: the same hues on a cool light ground with white cards and a darker
     teal, so text keeps 4.5:1 and control borders 3:1 on white (C4) */
  --bg: #EEF3F5; --surface: #FFFFFF; --surface-2: #F4F8F9; --raise: #E6EEF0; --nav-bar: #FFFFFF;
  --line: #D5E0E4; --line-2: #C3D1D6; --grid: rgba(41, 57, 64, .12);
  --ink: #0B1A20; --ink-2: #2E434C; --muted: #56707C;
  --rules: #037C83; --rules-ink: #FFFFFF; --rules-wash: rgba(3, 124, 131, .12); --teal: #037C83;
  --random: #8A7BE0; --random-text: #5B48C2; --random-band: rgba(109, 91, 208, .14);
  --bench: #6B7380;
  --brand-j: #4D7C0F;   /* the logo's tick-j, from the locked light wordmark */
  --gain: #0A7D52; --loss: #C2333C; --loss-wash: rgba(194, 51, 60, .12);
  --phase-acc: #1D4ED8; --phase-up: #15803D; --phase-dist: #A16207; --phase-down: #BE123C;
  --v-robust: #0A7D52; --v-fragile: #9A5B00; --v-overfit: #C2410C; --v-noedge: #56707C;
  --v-superseded: #3F5579; --v-notadopted: #6B5630;
  --stale: #9A5B00;
  --cta-bg: #037C83; --cta-fg: #FFFFFF; --cta-hover: #02666C;
  --focus: #037C83;
  --ctl-line: #7D939C;
  --ser-1: #037C83; --ser-2: #A14C06; --ser-3: #5B48C2; --ser-4: #15803D; --ser-5: #BE123C; --ser-6: #3F5579;
  --shadow: 0 1px 2px rgba(12, 18, 27, .04), 0 16px 40px -24px rgba(12, 18, 27, .18);
}

/* The one button (owner, 2026-11-01): replaces .tj-cta, .tjh-btn, .tji-btn and .tc-acct. It lives here because every page
   loads tokens.css. 32 px, radius 8, 12 px; on phones 36 px painted in a 44 px tap area, kept by a transparent border. */
.tj-b { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--ctl-line); border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: 500 12px/1 var(--font-sans);
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.tj-b:hover { background-color: var(--raise); }
.tj-b svg { flex: none; }
.tj-b-pri { background-color: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-fg); font-weight: 600; }
.tj-b-pri:hover { background-color: var(--cta-hover); }
.tj-b[aria-pressed=true], .tj-b[aria-current=page] { background-color: var(--rules); border-color: var(--rules); color: var(--rules-ink); font-weight: 600; }
.tj-b-ico { width: 32px; padding: 0; }
.tj-b .tj-ok { display: none; }
.tj-b[aria-pressed=true] .tj-ok { display: block; }
@media (max-width: 760px), (pointer: coarse) {
  .tj-b { height: 44px; padding: 0 10px; border: 4px solid transparent; border-radius: 12px; background-clip: padding-box; box-shadow: inset 0 0 0 1px var(--ctl-line); outline-offset: -3px; }
  .tj-b-pri, .tj-b[aria-pressed=true], .tj-b[aria-current=page] { box-shadow: none; }
  .tj-b-ico { width: 44px; padding: 0; }
}
@media (prefers-reduced-motion: no-preference) { .tj-b { transition: background-color 120ms linear, color 120ms linear; } }

/* P-1 pill (owner, 2026-11-04): every control is a full pill; 28 px with a mouse, 32 px painted inside a 44 px tap area on
   phones. Painted corners of half the height or more pass desk-probe (CONSTRAINTS E25). Solid fill (owner, 2026-11-15, replacing
   the glass tint): a picked option or main button is solid cyan with dark ink in dark mode, solid teal with white in light. */
:root, :root[data-theme=dark], :root[data-theme=light] { --r-pill: 999px; --sel-bg: var(--rules); --sel-edge: var(--rules); --sel-ink: var(--rules-ink); }
.tj-b { height: 28px; border-radius: var(--r-pill); }
.tj-b-ico { width: 28px; }
.tj-b[aria-pressed=true], .tj-b[aria-current=page] { background: var(--sel-bg); border-color: var(--sel-edge); color: var(--sel-ink); box-shadow: inset 0 0 0 1px var(--sel-edge); font-weight: 600; }
@media (max-width: 760px), (pointer: coarse) {
  .tj-b { height: 44px; border-width: 6px; border-radius: var(--r-pill); }
  .tj-b-ico { width: 44px; }
  .tj-b[aria-pressed=true], .tj-b[aria-current=page] { border-color: transparent; box-shadow: inset 0 0 0 1px var(--sel-edge); }
}

/* TickJury ground (owner, 2026-11-14; E37): a 135-degree blue-black gradient with a faint teal glow and a 3% grain in dark;
   a flat cool ground with the same glow in light. On html too, so a page shorter than the window stays dark. */
html { background: var(--bg); }
body { font-feature-settings: "tnum"; background: radial-gradient(ellipse at 80% 0%, rgba(4, 160, 168, .08), transparent 45%), linear-gradient(135deg, #070C12, #0B1419 50%, #071A1E) fixed; }
:root[data-theme=light] body { background: radial-gradient(ellipse at 80% 0%, rgba(4, 160, 168, .07), transparent 45%), #EEF3F5 fixed; }
:root:not([data-theme=light]) body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .03; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
