/* Paton Hawksley Hub: design system v2, three styles (30 Nov 2026)
   ONE set of parts for the mock-ups AND the live app. Each person picks a style; the style only swaps tokens
   (colours, font, roundness, the hero card and the page light). Parts never hard-code a colour.
     <html data-theme="daylight">  A, Daylight spectrum (the default for new people)
     <html data-theme="calm">      B, Calm workshop
     <html data-theme="night">     C, Night optics
   Rules (unchanged from v1):
   - Accent is for the ONE primary action per screen, the active nav item and progress. Nowhere else.
   - Red / amber / green carry MEANING only: red = overdue / problem, amber = needs attention, green = done / ready.
   - Whole rows and cards are the tap target. No horizontal-only scrolling anywhere.
   - Type scale 13 / 15 / 17 / 21 / 28; spacing in multiples of 4. Sentence case everywhere, no all-caps labels. */

/* ---------- A: Daylight spectrum (default) ---------- */
:root, [data-theme="daylight"] {
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #1A1D29; --ink-2: #5B6072; --ink-3: #8A8FA2;
  --bg: #F6F7FB; --surface: #FFFFFF; --surface-2: #F1F2F8; --line: #E5E7F0; --line-2: #D5D8E4;
  --accent: #4F46C8; --accent-hover: #3F37B0; --accent-soft: #EFEEFC; --accent-ink: #FFFFFF; --focus: #A9A4F2;
  --red: #B42318; --red-soft: #FDECEA; --amber: #7A4E00; --amber-soft: #FFF0D2; --green: #18663A; --green-soft: #E2F5EA;
  --neutral-soft: #EEEFF5;
  --r-ctl: 14px; --r-card: 18px; --r-pill: 99px;
  --shadow: none; --card-border: 1px solid var(--line);
  --fill: linear-gradient(90deg, #6A3FD8, #3A6FF0, #14A8A0);
  --page-light: linear-gradient(180deg, rgba(246,247,251,0) 40px, #F6F7FB 300px), linear-gradient(100deg, #E6DCFF 0%, #D8E6FF 25%, #D3F2EC 48%, #F4F4CF 68%, #FFE6CC 84%, #FFD9DE 100%);
  --hero-bg: var(--surface); --hero-ink: var(--ink); --hero-ink-2: var(--ink-2); --hero-border: var(--card-border); --hero-edge: none;
  --hero-btn-bg: var(--accent); --hero-btn-ink: var(--accent-ink); --hero-track: var(--surface-2); --hero-fill: var(--fill);
}
/* ---------- B: Calm workshop ---------- */
[data-theme="calm"] {
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #17302D; --ink-2: #4E6662; --ink-3: #829591;
  --bg: #EDF2EF; --surface: #FFFFFF; --surface-2: #E1EEEA; --line: #DCE6E2; --line-2: #C7D5D0;
  --accent: #0F6B64; --accent-hover: #0B5852; --accent-soft: #E1EEEA; --accent-ink: #FFFFFF; --focus: #8FCFC6;
  --red: #A8261B; --red-soft: #FBE9E6; --amber: #6A4300; --amber-soft: #FFE9B8; --green: #1D6638; --green-soft: #DCF0E3;
  --neutral-soft: #E8EEEC;
  --r-ctl: 99px; --r-card: 24px; --r-pill: 99px;
  --shadow: none; --card-border: 0;
  --fill: #0F6B64;
  --page-light: none;
  --hero-bg: #0F6B64; --hero-ink: #FFFFFF; --hero-ink-2: #DDF1ED; --hero-border: 0; --hero-edge: none;
  --hero-btn-bg: #FFFFFF; --hero-btn-ink: #0F6B64; --hero-track: rgba(255,255,255,.22); --hero-fill: #FFFFFF;
}
/* ---------- C: Night optics ---------- */
[data-theme="night"] {
  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #EEF0FB; --ink-2: #A5ABD0; --ink-3: #7A80AE;
  --bg: #121530; --surface: #1C2046; --surface-2: #262B5C; --line: #2A2F63; --line-2: #3A4080;
  --accent: #8EA2FF; --accent-hover: #A7B6FF; --accent-soft: #262B5C; --accent-ink: #101330; --focus: #8EA2FF;
  --red: #FF9A8F; --red-soft: #4A1E25; --amber: #FFD27A; --amber-soft: #4A3712; --green: #7BE3A8; --green-soft: #173D2E;
  --neutral-soft: #262B5C;
  --r-ctl: 14px; --r-card: 18px; --r-pill: 99px;
  --shadow: none; --card-border: 0;
  --fill: linear-gradient(90deg, #8B5CF6, #3B82F6, #10B9A6);
  --page-light: none;
  --hero-bg: #1D2148; --hero-ink: var(--ink); --hero-ink-2: #C3C8E6; --hero-border: 1px solid rgba(142,162,255,.25);
  --hero-edge: linear-gradient(90deg, #8B5CF6, #3B82F6, #10B9A6, #A3D63F, #FACC15, #F97316, #EF4444);
  --hero-btn-bg: var(--accent); --hero-btn-ink: var(--accent-ink); --hero-track: #2C3163; --hero-fill: var(--fill);
}

/* ---------- page ---------- */
.page { background: var(--bg); color: var(--ink); font-family: var(--font); }
.page-light { background-image: var(--page-light); }

/* ---------- type ---------- */
.t-xs { font-size: 13px; line-height: 18px; }
.t-sm { font-size: 15px; line-height: 21px; }
.t-md { font-size: 17px; line-height: 24px; }
.t-lg { font-size: 21px; line-height: 28px; letter-spacing: -0.01em; }
.t-xl { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; }
.w5 { font-weight: 500; } .w6 { font-weight: 600; } .w7 { font-weight: 700; }
.ink-2 { color: var(--ink-2); } .ink-3 { color: var(--ink-3); }
.label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-2); }
.eyebrow { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons: exactly three kinds ---------- */
.btn { box-sizing: border-box; font: 600 15px/1 var(--font); height: 44px; padding: 0 18px; border-radius: var(--r-ctl); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; border: 1px solid transparent; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-link { background: none; border: 0; padding: 0 4px; height: auto; color: var(--accent); }
.btn-lg { height: 54px; font-size: 17px; padding: 0 22px; }
.btn-block { width: 100%; }
.btn:focus-visible, .row:focus-visible, .trow:focus-visible, .field:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-card); border: var(--card-border); box-shadow: var(--shadow); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: var(--card-border); border-radius: var(--r-card); padding: 12px 14px; min-height: 64px; font: inherit; color: inherit; cursor: pointer; box-sizing: border-box; }
.row:hover { border-color: var(--line-2); }
/* a group = one panel of rows with dividers (lists); rows on their own stay separate cards */
.group { background: var(--surface); border: var(--card-border); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.group > .row { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.group > .row:last-child { border-bottom: 0; }
[data-theme="calm"] .group { background: none; gap: 8px; overflow: visible; }
[data-theme="calm"] .group > .row { border-radius: var(--r-card); border-bottom: 0; }
.chev { flex: none; color: var(--ink-3); }

/* ---------- the hero card (the one thing to do next) ---------- */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); border: var(--hero-border); border-radius: calc(var(--r-card) + 4px); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.hero::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px; border-radius: 2px; background: var(--hero-edge); }
.hero .eyebrow { color: var(--accent); }
[data-theme="calm"] .hero .eyebrow { color: #BFE6DF; }
.hero .ink-2 { color: var(--hero-ink-2); }
.hero .btn-primary { background: var(--hero-btn-bg); color: var(--hero-btn-ink); }
.hero .progress { background: var(--hero-track); }
.hero .progress > i { background: var(--hero-fill); }

/* ---------- status tags: meaning only ---------- */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-neutral { background: var(--neutral-soft); color: var(--ink-2); }

/* ---------- numbers that matter ---------- */
.qty { flex: none; min-width: 44px; height: 36px; padding: 0 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme="calm"] .qty { border-radius: var(--r-pill); }
[data-theme="night"] .qty { color: #C9D2FF; }

/* ---------- progress ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--fill); border-radius: 99px; }

/* ---------- fields ---------- */
.field { width: 100%; box-sizing: border-box; height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); padding: 0 16px; font: 500 16px var(--font); color: var(--ink); }
.field::placeholder { color: var(--ink-3); }

/* ---------- segmented choice (e.g. Everyone / Gina / Debbie) ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: var(--r-ctl); padding: 3px; }
.seg > * { height: 38px; border-radius: calc(var(--r-ctl) - 3px); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.seg > .on { background: var(--surface); color: var(--ink); }
[data-theme="night"] .seg > .on { background: var(--line-2); }

/* ---------- phone tabs + PC sidebar ---------- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 6px 18px; }
[data-theme="calm"] .tabs { border-top: 0; border-radius: 26px 26px 0 0; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 0; border-radius: 12px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.tab.on { color: var(--accent); background: var(--accent-soft); }
[data-theme="calm"] .tab.on { background: none; }
.side { width: 232px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; box-sizing: border-box; }
.brand { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nav-item { height: 42px; padding: 0 12px; border-radius: var(--r-ctl); display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.nav-item.on { background: var(--accent-soft); color: var(--accent); }
.nav-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--amber-soft); color: var(--amber); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- PC table: every row is one button ---------- */
.table { background: var(--surface); border: var(--card-border); border-radius: var(--r-card); overflow: hidden; }
.thead, .trow { display: grid; gap: 12px; align-items: center; padding: 0 20px; }
.thead { height: 40px; font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.trow { min-height: 60px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.trow:last-child { border-bottom: 0; }
.trow:hover, .trow.on { background: var(--accent-soft); }

/* ---------- "Your style" chooser ---------- */
.styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.style-pick { border: 2px solid var(--line); border-radius: 16px; padding: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.style-pick.on { border-color: var(--accent); }
.style-pick .swatch { height: 64px; border-radius: 10px; }
