/* ── Kahuna Tech Scorecard — Reef tokens + components ────────────────
   Tokens from design/DESIGN_README.md ("Design tokens"). Light is the
   default; dark follows prefers-color-scheme unless <html data-theme>
   overrides it (ui.js toggle). Only the tokens change between modes;
   every component reads a token, never a raw colour.
   Rules: no red on a name or a row, ever. Goal cells are tinted pills.
   ─────────────────────────────────────────────────────────────────── */

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #ffffff;
  --surface: #ffffff;
  --subtle: #f9fafb;
  --subtle-2: #f3f4f6;
  --border: #e5e7eb;
  --border-2: #d1d5db;
  --text: #1f2937;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --chrome: #0e3f42;          /* Reef sidebar deep teal */
  --chrome-text: #e6f4f2;

  --teal-100: #e6f4f2;
  --teal-200: #c8e8e3;
  --teal-300: #9dd5cc;
  --teal-400: #5fb8ab;
  --teal-500: #1f8f82;
  --teal-600: #0f766e;        /* primary */
  --teal-700: #0d5f59;        /* primary hover */
  --teal-900: #083634;

  --coral-100: #fff4ee;
  --coral-200: #fde3d7;
  --coral-300: #f9c4ad;
  --coral-400: #f3957a;
  --coral-500: #ef5a3c;       /* attention */
  --coral-700: #b23b1e;
  --coral-800: #9a3412;

  /* goal-status tints (DESIGN_README: at/over goal teal, near light coral, under coral) */
  --tint-good-bg: #d3ede9;   --tint-good-fg: #083634;
  --tint-near-bg: #fff4ee;   --tint-near-fg: #9a3412;
  --tint-under-bg: #fde3d7;  --tint-under-fg: #9a3412;
  --tint-none-bg: #f3f4f6;   --tint-none-fg: #4b5563;

  --tile-miss-bg: #fff4ee;   --tile-miss-border: #f3957a;   --tile-miss-fg: #ef5a3c;

  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .06);

  --s1: 4.4px; --s2: 8.8px; --s3: 13.2px; --s4: 17.6px; --s5: 26.4px; --s6: 35.2px;
  --page-max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1417;
    --surface: #141d20;
    --subtle: #182326;
    --subtle-2: #1f2c2e;
    --border: #28383a;
    --border-2: #34474a;
    --text: #e6edeb;
    --muted: #b3c0bd;
    --muted-2: #8a9996;
    --chrome: #0a2e31;
    --chrome-text: #e6f4f2;
    --teal-100: #123c39; --teal-200: #174a46; --teal-300: #1f6660; --teal-400: #5fb8ab;
    --teal-500: #3fb0a2; --teal-600: #2aa398; --teal-700: #5fb8ab; --teal-900: #d3ede9;
    --coral-100: #3a1f18; --coral-200: #4a2419; --coral-300: #7a3a26; --coral-400: #f3957a;
    --coral-500: #f2755b; --coral-700: #f9c4ad; --coral-800: #fde3d7;
    --tint-good-bg: #174a46;  --tint-good-fg: #c8e8e3;
    --tint-near-bg: #3a1f18;  --tint-near-fg: #f9c4ad;
    --tint-under-bg: #4a2419; --tint-under-fg: #f9c4ad;
    --tint-none-bg: #1f2c2e;  --tint-none-fg: #b3c0bd;
    --tile-miss-bg: #2a1a15;  --tile-miss-border: #7a3a26; --tile-miss-fg: #f3957a;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1417;
  --surface: #141d20;
  --subtle: #182326;
  --subtle-2: #1f2c2e;
  --border: #28383a;
  --border-2: #34474a;
  --text: #e6edeb;
  --muted: #b3c0bd;
  --muted-2: #8a9996;
  --chrome: #0a2e31;
  --chrome-text: #e6f4f2;
  --teal-100: #123c39; --teal-200: #174a46; --teal-300: #1f6660; --teal-400: #5fb8ab;
  --teal-500: #3fb0a2; --teal-600: #2aa398; --teal-700: #5fb8ab; --teal-900: #d3ede9;
  --coral-100: #3a1f18; --coral-200: #4a2419; --coral-300: #7a3a26; --coral-400: #f3957a;
  --coral-500: #f2755b; --coral-700: #f9c4ad; --coral-800: #fde3d7;
  --tint-good-bg: #174a46;  --tint-good-fg: #c8e8e3;
  --tint-near-bg: #3a1f18;  --tint-near-fg: #f9c4ad;
  --tint-under-bg: #4a2419; --tint-under-fg: #f9c4ad;
  --tint-none-bg: #1f2c2e;  --tint-none-fg: #b3c0bd;
  --tile-miss-bg: #2a1a15;  --tile-miss-border: #7a3a26; --tile-miss-fg: #f3957a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 18px; } h4 { font-size: 16px; }
p { margin: 0 0 var(--s3); }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--teal-200); }

/* ---------- shell ---------- */

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: var(--chrome);
  color: var(--chrome-text);
  padding: 0 var(--s4);
}
.topbar-inner {
  max-width: var(--page-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 56px; flex-wrap: wrap;
}
.wordmark { display: flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; color: var(--chrome-text); }
.wordmark .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--teal-400); color: #062a28; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.topbar nav { display: flex; gap: 2px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--chrome-text); opacity: .78; padding: 6px 12px; border-radius: var(--radius-btn); font-weight: 600; font-size: 14px;
}
.topbar nav a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.topbar nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .14); }
.topbar-right { display: flex; align-items: center; gap: var(--s2); }
.who-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: var(--radius-pill); background: rgba(255, 255, 255, .12); color: var(--chrome-text); font-size: 13px; font-weight: 600; cursor: pointer; border: 0;
}
.who-chip:hover { background: rgba(255, 255, 255, .2); }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-btn); border: 1px solid rgba(255, 255, 255, .18);
  background: transparent; color: var(--chrome-text); cursor: pointer; display: grid; place-items: center; font-size: 15px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }

main.page { flex: 1; width: 100%; max-width: var(--page-max); margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.footer-note {
  max-width: var(--page-max); margin: 0 auto; padding: var(--s4); color: var(--muted-2); font-size: 13px; text-align: center; border-top: 1px solid var(--border);
}

/* ---------- cards & tiles ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 18px 20px;
}
.card.elevated { box-shadow: var(--shadow); }
.card + .card { margin-top: var(--s3); }
.card-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: var(--s2); }
.section { margin-top: var(--s5); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 20px; }
.tile .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.tile .v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile .c { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile.miss { background: var(--tile-miss-bg); border-color: var(--tile-miss-border); }
.tile.miss .v { color: var(--tile-miss-fg); }

/* ---------- pills, badges, chips ---------- */

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 52px; padding: 4px 10px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.2;
  background: var(--tint-none-bg); color: var(--tint-none-fg);
}
.pill-good { background: var(--tint-good-bg); color: var(--tint-good-fg); }
.pill-near { background: var(--tint-near-bg); color: var(--tint-near-fg); }
.pill-under { background: var(--tint-under-bg); color: var(--tint-under-fg); }
.pill-none { background: var(--tint-none-bg); color: var(--tint-none-fg); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  background: var(--subtle-2); color: var(--muted);
  border: 1px solid var(--border);
}
.badge-teal { background: var(--teal-100); color: var(--teal-900); border-color: var(--teal-200); }
.badge-coral { background: var(--coral-100); color: var(--coral-800); border-color: var(--coral-200); }
.badge-row { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; }

.chip-move { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 2px 6px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; background: var(--subtle-2); color: var(--muted); }
.chip-move.up { background: var(--tint-good-bg); color: var(--tint-good-fg); }
.chip-move.new { background: var(--teal-100); color: var(--teal-700); }

.grade {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 800; font-size: 15px; background: var(--teal-100); color: var(--teal-900); border: 2px solid var(--teal-200);
}
.grade.empty { background: transparent; border: 2px dashed var(--border-2); color: var(--muted-2); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--teal-200); color: var(--teal-900); font-weight: 700; font-size: 13px; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-btn); border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--teal-600); color: #ffffff;
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.btn:hover:not(:disabled) { background: var(--teal-700); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover:not(:disabled) { background: var(--subtle-2); }
.btn-soft { background: var(--teal-100); color: var(--teal-900); }
.btn-soft:hover:not(:disabled) { background: var(--teal-200); }
.btn-coral { background: var(--coral-500); color: #ffffff; }
.btn-coral:hover:not(:disabled) { background: var(--coral-700); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* Segmented control (2-week / 4-week / 8-week; PR / NPI% / ATT%) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-btn); background: var(--subtle-2); border: 1px solid var(--border); }
.seg button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }

/* ---------- forms ---------- */

label.field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--radius-btn);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); outline: none;
}
textarea.input { height: auto; padding: 10px 12px; min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-100); }
.input-pin { text-align: center; font-size: 28px; letter-spacing: .5em; height: 60px; font-weight: 800; }
.error { color: var(--coral-700); font-size: 13px; font-weight: 600; min-height: 18px; }
.notice { padding: 12px 14px; border-radius: var(--radius-btn); background: var(--subtle); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.notice-teal { background: var(--teal-100); border-color: var(--teal-200); color: var(--teal-900); }
.notice-coral { background: var(--coral-100); border-color: var(--coral-200); color: var(--coral-800); }

/* ---------- rows (leaderboard) ---------- */

.row-list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: 52px 44px 44px 1fr 84px 60px 76px 76px 116px 72px 44px 24px;
  min-height: 64px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
}
.row.you { border-color: var(--teal-400); box-shadow: inset 3px 0 0 var(--teal-500); }
.row.incomplete { border-style: dashed; }
.row .name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rank { font-weight: 800; font-size: 18px; color: var(--muted); }
.row-head { display: grid; gap: 8px; grid-template-columns: 52px 44px 44px 1fr 84px 60px 76px 76px 116px 72px 44px 24px; padding: 0 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
@media (max-width: 900px) {
  .row, .row-head { grid-template-columns: 44px 36px 1fr 76px 64px 56px; }
  .row .hide-sm, .row-head .hide-sm { display: none; }
}

.progress { height: 8px; border-radius: var(--radius-pill); background: var(--subtle-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--teal-500); border-radius: var(--radius-pill); }

/* ---------- login ---------- */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); background: var(--subtle); }
.login-card { width: 100%; max-width: 380px; }
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: var(--s3); }
.name-grid .btn { height: 46px; justify-content: flex-start; }

/* ---------- toast ---------- */

.toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; }
.toast { padding: 10px 16px; border-radius: var(--radius-btn); background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- utilities ---------- */

.flex { display: flex; align-items: center; gap: var(--s2); }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: var(--s2); }
.right { text-align: right; }
.center { text-align: center; }
.mt-2 { margin-top: var(--s2); } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); }
.skeleton { background: linear-gradient(90deg, var(--subtle-2) 25%, var(--subtle) 37%, var(--subtle-2) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 6px; min-height: 1em; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ══════════════════════════════════════════════════════════════════════
   Appended by the frontend stage: the four screens. Every colour is a
   token from the block at the top, so light/dark both hold. Nothing
   above this line was changed.
   ══════════════════════════════════════════════════════════════════════ */

/* ---------- shared bits ---------- */

.head-right { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.head-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; background: var(--teal-100); color: var(--teal-900); border: 1px solid var(--teal-200); white-space: nowrap; }
.head-pill.grey { background: var(--subtle-2); color: var(--muted); border-color: var(--border); }
.head-pill.coral { background: var(--coral-100); color: var(--coral-800); border-color: var(--coral-200); }
.stamp { margin-top: var(--s3); padding: 10px 14px; border-radius: var(--radius-btn); background: var(--subtle-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.grade-a { background: var(--teal-600); color: #ffffff; border-color: var(--teal-600); }
.grade-b { background: var(--teal-200); color: var(--teal-900); border-color: var(--teal-300); }
.grade-c, .grade-d { background: var(--subtle-2); color: var(--muted); border-color: var(--border-2); }
.k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.only-sm { display: none !important; }
.spark { width: 100%; height: 34px; display: block; }
.spark-bar { fill: var(--border-2); }
.spark-last { fill: var(--teal-600); }
.spark-none { fill: var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; }
.chip-btn:hover:not(:disabled) { background: var(--subtle-2); }
.chip-btn[aria-pressed="true"], .chip-btn.on { background: var(--teal-600); color: #ffffff; border-color: var(--teal-600); }
.chip-btn:disabled { opacity: .5; cursor: not-allowed; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: var(--s5); align-items: start; }
.sticky-col { position: sticky; top: 16px; display: flex; flex-direction: column; gap: var(--s4); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .sticky-col { position: static; } }
.card h3 + .muted, .step-head .muted { font-size: 13px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.kv strong { font-variant-numeric: tabular-nums; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s3); }
.mono { font-variant-numeric: tabular-nums; }
.ok-text { color: var(--teal-700); font-weight: 700; font-size: 14px; }
.list-gap { display: flex; flex-direction: column; gap: 8px; }
.card .list-gap + .list-gap { margin-top: 8px; }

/* ---------- leaderboard ---------- */

.board-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin: var(--s5) 0 var(--s3); }
.board-head h2 { margin: 0; }
.board-head .sub { color: var(--muted); font-size: 14px; }
.board-head .award { margin-left: auto; }
.row-wrap { border-radius: var(--radius-card); }
.row { cursor: pointer; user-select: none; }
.row:hover { background: var(--subtle); }
.row:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.row.open { background: var(--subtle); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.row .c-rank { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.row .c-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.row .c-name .name { flex: 0 1 auto; font-size: 16px; }
.row .c-name .badge-row { flex: 1 1 auto; min-width: 0; }
.you-tag { font-size: 11px; font-weight: 700; color: var(--teal-700); text-transform: uppercase; letter-spacing: .06em; flex: none; }
.row .c-center { text-align: center; font-variant-numeric: tabular-nums; }
.row .ovr { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.row .ovr.paren, .row.incomplete .ovr { color: var(--muted-2); font-weight: 700; font-size: 17px; }
.row .chev { color: var(--muted-2); font-size: 13px; text-align: center; }
.row .pill { width: 100%; min-width: 0; padding-left: 6px; padding-right: 6px; }
.row .pill-ups { background: var(--subtle-2); color: var(--text); }
.row.incomplete .pill-pr { background: var(--subtle); color: var(--muted-2); }
.drawer { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); background: var(--subtle); padding: var(--s3) var(--s5) var(--s5); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); }
.row.incomplete + .drawer { border-style: dashed; border-top: 0; }
.drawer .col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.spark-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 56px; align-items: end; gap: 10px; }
.spark-row .lbl { font-size: 12px; color: var(--muted); }
.spark-row .last { font-weight: 700; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.npi-line { font-size: 14px; }
.data-flag { font-size: 13px; background: var(--subtle-2); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 10px 14px; color: var(--muted); }
.cat-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cat-row .lbl { flex: 1; }
.cat-row .v { font-weight: 700; width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.callups { margin-top: var(--s3); background: var(--subtle-2); border-radius: var(--radius-card); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.callups .band-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.callups .band-head .sub { font-size: 13px; color: var(--muted); }
.callup-row { display: grid; grid-template-columns: 40px minmax(120px, 1fr) minmax(0, 2fr) 200px; gap: var(--s3); align-items: center; }
.callup-row .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.callup-row .stats { font-size: 14px; color: var(--muted); }
.callup-row .count { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.trainees { margin-top: var(--s3); border: 1px dashed var(--border-2); border-radius: var(--radius-card); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.trainee-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; font-size: 14px; }
.trainee-row .days { color: var(--muted); font-size: 13px; white-space: nowrap; }
.coaches { display: flex; gap: var(--s3); flex-wrap: wrap; }
.coach-card { flex: 1 1 280px; display: flex; align-items: center; gap: var(--s3); padding: var(--s4); }
.coach-card .stats { font-size: 14px; color: var(--muted); }
.coach-card .ovr { font-weight: 800; font-size: 20px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.stat-seg { margin: var(--s2) 0; }
.empty-board { padding: var(--s4); border: 1px dashed var(--border-2); border-radius: var(--radius-card); color: var(--muted); font-size: 14px; text-align: center; }
@media (max-width: 900px) {
  /* Phone board: rank (+movement under it), name, one chosen stat, OVR. Never a horizontal scroll. */
  .row, .row-head { grid-template-columns: 48px minmax(0, 1fr) 72px 56px; gap: 6px; padding: 8px 10px; }
  .row .hide-sm, .row-head .hide-sm { display: none !important; }
  .row .only-sm, .row-head .only-sm { display: inline-flex !important; }
  .row .c-stat, .row-head .c-stat { display: none; }
  .board[data-stat="pr"] .c-pr, .board[data-stat="npi"] .c-npi, .board[data-stat="att"] .c-att { display: inline-flex; }
  .row-head .c-stat { display: none; }
  .board[data-stat="pr"] .row-head .c-pr, .board[data-stat="npi"] .row-head .c-npi, .board[data-stat="att"] .row-head .c-att { display: block; }
  .row .c-name { flex-wrap: wrap; row-gap: 2px; }
  .row .c-name .name { font-size: 15px; white-space: normal; }
  .row .ovr { font-size: 18px; }
  .stat-seg.only-sm { display: inline-flex !important; }
  .drawer { padding: var(--s3) var(--s4) var(--s4); }
  .callup-row { grid-template-columns: 36px minmax(0, 1fr); }
  .callup-row .stats, .callup-row .prog { grid-column: 2; }
  .trainee-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .trainee-row .days { grid-column: 2; }
  .board-head .award { margin-left: 0; }
}
@media (min-width: 901px) { .stat-seg { display: none !important; } }

/* ---------- trading card ---------- */

.card-page { max-width: 760px; }
.card-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.cardface { max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.cardface.back { max-width: 760px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.team-mark { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; font-weight: 700; }
.team-mark .mark { width: 30px; height: 30px; border-radius: 50%; background: var(--teal-600); color: #ffffff; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: 0; }
.jersey { font-weight: 800; font-size: 30px; color: var(--teal-600); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-id { display: flex; align-items: center; gap: 16px; }
.card-id .photo { width: 112px; height: 112px; font-size: 38px; flex: none; }
.card-id .full { font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; }
.card-id .pos { font-size: 14px; font-weight: 700; margin-top: 4px; }
.card-id .debut { font-size: 13px; color: var(--muted); margin-top: 2px; }
.heads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.head-tile { border-radius: 12px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--tint-none-bg); color: var(--tint-none-fg); }
.head-tile.good { background: var(--tint-good-bg); color: var(--tint-good-fg); }
.head-tile.near { background: var(--tint-near-bg); color: var(--tint-near-fg); }
.head-tile.under { background: var(--tint-under-bg); color: var(--tint-under-fg); }
.head-tile .v { font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.head-tile .l { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.head-tile .g { font-size: 12px; opacity: .85; }
.ovr-box { display: flex; align-items: center; gap: 14px; background: var(--subtle-2); border-radius: 12px; padding: 14px 18px; }
.ovr-box .k { display: block; }
.ovr-box .big { font-size: 34px; }
.ovr-box .rank { margin-left: auto; text-align: right; }
.ovr-box .rank .r { font-weight: 800; font-size: 22px; }
.ovr-box .rank .m { font-size: 12px; color: var(--muted); }
.card-note { font-size: 15px; line-height: 1.45; padding: 0 4px; }
.held-note { font-size: 11px; color: var(--muted-2); margin-top: auto; }
/* the card front's upsell line: dollars, their share of revenue, the goal */
.ups-line { font-size: 13px; color: var(--muted); padding: 0 4px; }
.back-title { display: flex; align-items: baseline; gap: 8px; }
.back-title .full { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.back-title .no { margin-left: auto; font-size: 13px; color: var(--muted); }
.back-sec { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted-2); margin-top: 6px; }
.box-scores { display: flex; flex-direction: column; gap: 8px; }
.box-score { background: var(--subtle-2); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.box-score .bs-head { display: flex; align-items: center; }
.box-score .bs-head .grade { margin-left: auto; }
.box-score .bs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.box-score .bs-grid .k { font-size: 11px; text-transform: none; letter-spacing: 0; }
.box-score .bs-grid .v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.box-score .note { font-size: 12px; color: var(--muted); }
.wide-table th:first-child, .wide-table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.career-line { font-size: 13px; background: var(--subtle-2); border-radius: 12px; padding: 10px 14px; }
.highs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.high { background: var(--tint-good-bg); color: var(--tint-good-fg); border-radius: 12px; padding: 10px 14px; }
.high .hk { font-size: 11px; }
.high .hv { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.high .hw { font-size: 11px; opacity: .85; }
.trans { font-size: 13px; line-height: 1.5; }
.glossary { display: flex; flex-direction: column; gap: 4px; }
.glossary div { font-size: 11px; line-height: 1.4; color: var(--muted); }
.glossary strong { color: var(--text); }
@media (max-width: 480px) {
  .card-page .only-lg { display: none !important; }
  .card-page .only-sm { display: block !important; }
  .cardface { padding: 16px; border-radius: 16px; }
  .card-id .photo { width: 96px; height: 96px; font-size: 32px; }
  .card-id .full { font-size: 26px; }
}
@media (min-width: 481px) { .card-page .only-sm { display: none !important; } }

/* ---------- Brea's console ---------- */

.check-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.chip-check .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--border-2); color: var(--surface); }
.chip-check.ok { background: var(--teal-100); border-color: var(--teal-200); color: var(--teal-900); }
.chip-check.ok .dot { background: var(--teal-600); color: #ffffff; }
.step { display: flex; flex-direction: column; gap: var(--s3); }
.step + .step { margin-top: var(--s4); }
.step-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.step-head h3 { margin: 0; }
.dropzone { border: 2px dashed var(--border-2); border-radius: var(--radius-card); background: var(--surface); padding: var(--s6) var(--s4); display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; color: inherit; font: inherit; width: 100%; }
.dropzone:hover, .dropzone.over { border-color: var(--teal-500); background: var(--teal-100); }
.dropzone strong { font-size: 16px; }
.dropzone .muted { font-size: 13px; }
.match-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--coral-100); border: 1px solid var(--coral-200); border-radius: var(--radius-card); padding: 12px 16px; font-size: 14px; color: var(--text); }
.match-box .txt { flex: 1; min-width: 200px; }
.match-box select.input { width: auto; min-width: 180px; height: 36px; }
.queue-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 16px; }
.queue-item .what { flex: 1; min-width: 220px; }
.queue-item .what .issue { font-weight: 700; font-size: 14px; }
.queue-item .what .meta { font-size: 13px; color: var(--muted); }
.att-wrap { overflow-x: auto; padding: 4px; border-radius: var(--radius-btn); outline: none; }
.att-wrap:focus-visible { box-shadow: 0 0 0 3px var(--teal-100); }
.att-grid { display: inline-flex; flex-direction: column; gap: 4px; min-width: 100%; }
.att-row { display: grid; grid-auto-flow: column; grid-auto-columns: 44px; gap: 4px; align-items: center; }
.att-row > :first-child { position: sticky; left: 0; width: 132px; background: var(--surface); z-index: 1; font-size: 13px; font-weight: 700; padding-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row.head > div { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); text-align: center; }
.att-row.head > div.wkend { color: var(--border-2); }
.att-cell { height: 32px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--subtle-2); color: var(--muted); position: relative; }
.att-cell.code-P { background: var(--subtle-2); color: var(--muted); }
.att-cell.code-O { background: transparent; color: var(--border-2); border-color: var(--border); }
.att-cell.code-S, .att-cell.code-V, .att-cell.code-R, .att-cell.code-H, .att-cell.code-F, .att-cell.code-M, .att-cell.code-J, .att-cell.code-B { background: var(--tint-good-bg); color: var(--tint-good-fg); }
.att-cell.code-L { background: var(--tint-near-bg); color: var(--tint-near-fg); }
.att-cell.code-A { background: var(--tint-under-bg); color: var(--tint-under-fg); }
.att-cell.code-Q { background: var(--coral-200); color: var(--coral-800); }
.att-cell.cur { outline: 2px solid var(--teal-600); outline-offset: 1px; }
.att-cell.dirty::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--teal-600); }
.att-cell.contra { box-shadow: inset 0 0 0 2px var(--coral-400); }
.att-cell.contra.noted { box-shadow: inset 0 0 0 2px var(--teal-300); }
.legend { font-size: 12px; color: var(--muted); }
.att-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grad-card { display: flex; flex-direction: column; gap: 10px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px 16px; }
.grad-card .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grad-card .who .summary { margin-left: auto; font-size: 13px; color: var(--muted); }
.req-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.req-pill .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--border-2); color: #ffffff; }
.req-pill.ok { background: var(--teal-100); border-color: var(--teal-200); color: var(--teal-900); }
.req-pill.ok .dot { background: var(--teal-600); }
.grad-card .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.publish-card { background: var(--subtle); }
.gate-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.gate-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #ffffff; background: var(--coral-500); }
.gate-dot.ok { background: var(--teal-600); }
.block-txt { font-size: 14px; background: var(--coral-100); color: var(--coral-800); border: 1px solid var(--coral-200); border-radius: var(--radius-btn); padding: 10px 14px; }
.anomaly { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 16px; font-size: 14px; }
.safety-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-btn); }
details.form-details > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--teal-700); list-style: none; }
details.form-details > summary::-webkit-details-marker { display: none; }
details.form-details > summary::before { content: '+ '; }
details.form-details[open] > summary::before { content: '− '; }
details.form-details .stack { margin-top: var(--s3); }

/* ---------- manager ---------- */

.manager-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.4fr); gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .manager-grid { grid-template-columns: 1fr; } }
.slider-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 14px; }
.slider-row strong { text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--teal-600); height: 28px; }
.warn-text { font-size: 13px; color: var(--coral-800); font-weight: 600; }
.history-row { display: flex; gap: 10px; font-size: 13px; align-items: baseline; }
.history-row .v { width: 32px; font-weight: 700; flex: none; }
.history-row .n { flex: 1; min-width: 0; }
.history-row .from { color: var(--muted); white-space: nowrap; }
.coverage-row { display: flex; gap: 10px; font-size: 14px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 10px 14px; align-items: baseline; }
.coverage-row strong { min-width: 90px; }
.coverage-row .t { flex: 1; color: var(--muted); }
.delta-up { color: var(--teal-700); font-weight: 700; }
.delta-down { color: var(--muted); font-weight: 700; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.settings-grid .input { height: 38px; }
.tag-award { background: var(--teal-100); color: var(--teal-900); border-color: var(--teal-200); }

/* Gusto match panel: one decision select per name; a row decided "Not a tech (office)", or one of the "New …" choices */
.match-box.is-skipped { opacity: .55; }
.match-box.is-skipped .txt { text-decoration: line-through; }
.match-box.is-new { background: var(--teal-100); border-color: var(--teal-200); }
.match-box .btn[aria-pressed="true"] { background: var(--teal-600); color: #ffffff; border-color: var(--teal-600); }
.match-box select.decide { min-width: 240px; }
.match-box .match-warn { flex-basis: 100%; }

/* "The scorecard was updated": a deploy happened while the page was open (public/ui.js) */
.update-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--teal-100); border-bottom: 1px solid var(--teal-300); color: var(--teal-900); font-size: 14px; font-weight: 600; }

/* Roster card: the "Not scored" group (people on the roster, kept off the scorecard by a manager) */
.roster-row.is-unscored { border-style: dashed; }

/* Console: what a confirm stored (kept on screen), the "not in this window" note, a blank attendance cell */
.stored-line { display: flex; flex-direction: column; gap: 6px; }
.outside-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.fresh-check { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 6px; border-top: 1px dashed currentColor; }
.last-import .outside-note { margin-top: 6px; }
.roster-link { font-weight: 700; color: var(--teal-700); }
.att-cell.code-none { background: transparent; border: 1px dashed var(--border); color: var(--muted-2); }
/* Console, Gusto step: hourly-paid projects (the per-week lines, the week picker, the report being read) */
.project-hours { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.project-week-line .btn { margin-left: 6px; vertical-align: baseline; }
.project-form select.input { width: auto; display: inline-block; margin-left: 6px; }
.project-panel { background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 16px; }

/* Console attendance: the "Needs a reason" list under the grid (one line per "?" cell: who · day · what Gusto says · one-tap codes) */
.reason-list { display: flex; flex-direction: column; gap: 6px; }
.reason-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 6px 12px; }
.reason-row .who { min-width: 170px; }
.reason-row .why { flex: 1; min-width: 180px; }
.reason-row .chip-btn { height: 30px; }

/* Roster card (manager): name · level select · quick actions */
.roster-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 10px; align-items: center; font-size: 14px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 12px; }
.roster-row .who { min-width: 0; }
.roster-row .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-row select.input { width: auto; min-width: 140px; height: 34px; padding: 0 8px; }
.roster-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.roster-row.is-off { opacity: .8; }
@media (max-width: 520px) { .roster-row { grid-template-columns: 1fr auto; } .roster-row .acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* Roster card: the date question that opens under a row (start date, last day worked), and the start date as a link */
.roster-ask { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--border-2); }
.roster-ask .field { font-size: 13px; font-weight: 600; color: var(--muted); }
.roster-ask .input { width: auto; height: 34px; padding: 0 8px; }
.roster-ask .hint { flex-basis: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--teal-700); }

/* Roster card: "Add a tech" — one-click suggestions, then the plain form */
.add-tech { background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 14px; }
.suggest-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; background: var(--teal-100); border: 1px solid var(--teal-200); border-radius: var(--radius-btn); padding: 8px 12px; }
.suggest-row .who { flex: 1; min-width: 200px; }
.suggest-row .acts, .dup-notice .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dup-notice { display: flex; flex-direction: column; gap: 8px; }

/* Roster card: one person on two rows — "Possible duplicates", and the merge preview (lib/merge.js) */
.dup-pairs { color: var(--text); }
.dup-pair { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 12px; }
.dup-pair .who { flex: 1; min-width: 200px; }
.dup-pair .acts, .merge-box .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.merge-box { background: var(--surface); border: 1px solid var(--teal-200); border-radius: var(--radius-card); padding: 12px 14px; font-size: 14px; }
.merge-box h4 { margin: 0; font-size: 16px; }
.merge-section ul { margin: 4px 0 0; padding-left: 18px; }
.merge-section li { margin: 2px 0; }
.add-form .input { height: 38px; }

/* ---------- the Garage (vehicle scorecard: public/garage.html) ---------- */

.garage-page { max-width: 760px; }
.truck-list { display: flex; flex-direction: column; gap: 10px; }
.truck-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.truck-card.mine { border-color: var(--teal-400); box-shadow: inset 3px 0 0 var(--teal-500); }   /* the same treatment as .row.you */
.truck-card.dirty { border-color: var(--teal-500); }
.truck-card .line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.truck-card .truck-link { display: inline-flex; align-items: baseline; gap: 8px; color: inherit; }
.truck-card .jersey { font-size: 22px; }
.truck-card .nick { font-weight: 700; }
.truck-card .crew { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.truck-card .crew-one { display: inline-flex; align-items: center; gap: 4px; }
.truck-card .rig { margin-left: auto; }
.truck-card .parts .spark { width: 120px; height: 28px; flex: none; }
.truck-card .flagged { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.truck-card .flagged .badge { margin-left: 4px; }
.truck-entry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--border-2); }
.drive-input { height: 48px; width: 96px; font-size: 20px; font-weight: 700; text-align: center; border-radius: var(--radius-btn); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-variant-numeric: tabular-nums; }
.drive-input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-100); }
.chip-btn.lg { height: 44px; padding: 0 16px; font-size: 14px; }
.chip-btn.flag[aria-pressed="true"] { background: var(--coral-500); color: #ffffff; border-color: var(--coral-500); }
.flag-panel { flex-basis: 100%; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.flag-panel .check-date { width: auto; min-width: 150px; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); margin-top: var(--s3); background: var(--bg); border-top: 1px solid var(--border); }
.truck-form { display: flex; flex-direction: column; gap: 10px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 14px; }
.truck-form .input { height: 38px; }
.check-row { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; font-size: 13px; }
.check-row .input { height: 36px; padding: 0 8px; }
.check-row .mono { min-width: 90px; }
@media (max-width: 700px) { .check-row { grid-template-columns: 1fr 1fr; } .check-row > :first-child { grid-column: 1 / -1; } }
.shop-row, .log-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 12px; }
.shop-row .t, .log-row .t { flex: 1; min-width: 160px; }
.truck-face .card-id .full { font-size: 26px; }
.truck-back .trans div { padding: 2px 0; }
@media (max-width: 480px) { .truck-card .rig { margin-left: 0; } .drive-input { width: 84px; } }
