/* ==========================================================================
   MK Drivelog — Design System
   Single source of truth. No page defines its own colors, spacing, or type.

   Direction: "Graphite & Electric Blue" — taken from the MK logo
     · Cool graphite neutrals carry the interface (logo black is #0A0F18)
     · Electric blue #016CF0 is the brand: actions, focus, active state
     · Muted, non-stoplight semantics so money reads like a ledger
     · Tabular numerals everywhere money appears
   ========================================================================== */

@layer reset, tokens, base, layout, components, utilities;

/* ==========================================================================
   TOKENS
   ========================================================================== */
@layer tokens {
  :root {
    /* --- Neutral ramp (cool graphite) --- */
    --n-0:   #ffffff;
    --n-25:  #fafbfc;
    --n-50:  #f4f6f8;
    --n-100: #eaedf1;
    --n-200: #dbdfe5;
    --n-300: #c1c7d0;
    --n-400: #98a0ab;
    --n-500: #6d7580;
    --n-600: #525a65;
    --n-700: #3b424b;
    --n-800: #262b32;
    --n-900: #181c21;
    --n-950: #0e1114;

    /* --- Brand: MK electric blue (--brand-500 is the logo blue) --- */
    --brand-50:  #eef5fe;
    --brand-100: #d8e8fd;
    --brand-200: #b0d0fb;
    --brand-300: #74adf8;
    --brand-400: #3a8cf4;
    --brand-500: #016cf0;
    --brand-600: #0057c7;
    --brand-700: #01449b;
    --brand-800: #052f68;

    /* --- Semantics (muted, ledger-appropriate) --- */
    --gain-fg:   #146c4e;
    --gain-bg:   #e6f4ed;
    --gain-br:   #b6ddc9;
    --loss-fg:   #a3352f;
    --loss-bg:   #fceceb;
    --loss-br:   #f0c5c2;
    --warn-fg:   #8a5a10;
    --warn-bg:   #fdf3e2;
    --warn-br:   #f0d9ae;
    --info-fg:   #1d5c85;
    --info-bg:   #e8f2f9;
    --info-br:   #bcd9ea;

    /* --- Semantic surface mapping (light) --- */
    --bg-body:      var(--n-50);
    --bg-surface:   var(--n-0);
    --bg-raised:    var(--n-0);
    --bg-sunken:    var(--n-100);
    --bg-hover:     var(--n-50);
    --bg-active:    var(--n-100);
    --bg-inverse:   var(--n-900);

    --fg-primary:   var(--n-900);
    --fg-secondary: var(--n-600);
    --fg-muted:     var(--n-500);
    --fg-faint:     var(--n-400);
    --fg-inverse:   var(--n-0);
    --fg-accent:    var(--brand-600);   /* 600 not 500: 6.1:1 on white for text */

    --border:        var(--n-200);
    --border-strong: var(--n-300);
    --border-faint:  var(--n-100);

    --accent:        var(--brand-500);
    --accent-hover:  var(--brand-600);
    --accent-soft:   var(--brand-50);
    --accent-border: var(--brand-200);

    /* White on #016CF0 measures 4.73:1 — passes AA for button text. */
    --action:        var(--brand-500);
    --action-hover:  var(--brand-600);
    --action-fg:     #ffffff;

    /* --- Type --- */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

    --fs-2xs: 0.6875rem;  /* 11px — table meta */
    --fs-xs:  0.75rem;    /* 12px — labels, chips */
    --fs-sm:  0.8125rem;  /* 13px — grid body */
    --fs-md:  0.875rem;   /* 14px — UI default */
    --fs-base:0.9375rem;  /* 15px — prose */
    --fs-lg:  1.0625rem;
    --fs-xl:  1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: 2.25rem;

    --lh-tight: 1.2;
    --lh-snug:  1.35;
    --lh-base:  1.55;

    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semi:   600;
    --fw-bold:   700;

    /* --- Space (4px base) --- */
    --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
    --sp-5: 1.25rem;  --sp-6: 1.5rem;   --sp-8: 2rem;     --sp-10: 2.5rem;
    --sp-12: 3rem;    --sp-16: 4rem;

    /* --- Radius --- */
    --r-xs: 3px;  --r-sm: 5px;  --r-md: 7px;  --r-lg: 10px;
    --r-xl: 14px; --r-2xl: 20px; --r-full: 999px;

    /* --- Elevation (tuned for light) --- */
    --sh-xs: 0 1px 2px rgb(16 20 26 / 0.05);
    --sh-sm: 0 1px 3px rgb(16 20 26 / 0.07), 0 1px 2px rgb(16 20 26 / 0.04);
    --sh-md: 0 4px 12px rgb(16 20 26 / 0.08), 0 1px 3px rgb(16 20 26 / 0.05);
    --sh-lg: 0 12px 32px rgb(16 20 26 / 0.11), 0 2px 8px rgb(16 20 26 / 0.06);
    --sh-xl: 0 24px 56px rgb(16 20 26 / 0.16);
    --sh-focus: 0 0 0 3px rgb(1 108 240 / 0.30);

    /* --- Motion --- */
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --dur-fast: 110ms;
    --dur-base: 180ms;

    /* --- Layout --- */
    --sidebar-w: 236px;
    --topbar-h: 56px;
    --row-h: 34px;

    color-scheme: light;
  }

  /* --- Dark theme ---------------------------------------------------------
     Applied via [data-theme="dark"] on <html>, or the OS preference when the
     user has not chosen explicitly. Not a filter — a real remap. */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { color-scheme: dark; }
  }

  :root[data-theme="dark"] { color-scheme: dark; }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg-body:      #0b0e11;
      --bg-surface:   #14181d;
      --bg-raised:    #1a1f25;
      --bg-sunken:    #0e1216;
      --bg-hover:     #1e242b;
      --bg-active:    #262d35;
      --bg-inverse:   var(--n-100);

      --fg-primary:   #e8ebee;
      --fg-secondary: #a6aeb8;
      --fg-muted:     #828b96;
      --fg-faint:     #626a75;
      --fg-inverse:   var(--n-900);
      --fg-accent:    var(--brand-300);

      --border:        #262d35;
      --border-strong: #363f49;
      --border-faint:  #1c2228;

      --accent:        var(--brand-400);
      --accent-hover:  var(--brand-300);
      --accent-soft:   rgb(1 108 240 / 0.16);
      --accent-border: rgb(1 108 240 / 0.40);

      --action:        var(--brand-500);
      --action-hover:  var(--brand-400);
      --action-fg:     #ffffff;

      --gain-fg: #56c79a; --gain-bg: rgb(32 148 106 / 0.14); --gain-br: rgb(32 148 106 / 0.32);
      --loss-fg: #e88b85; --loss-bg: rgb(200 74 66 / 0.14);  --loss-br: rgb(200 74 66 / 0.32);
      --warn-fg: #e0b263; --warn-bg: rgb(184 122 31 / 0.14); --warn-br: rgb(184 122 31 / 0.32);
      --info-fg: #6db4e0; --info-bg: rgb(45 125 180 / 0.14); --info-br: rgb(45 125 180 / 0.32);

      --sh-xs: 0 1px 2px rgb(0 0 0 / 0.4);
      --sh-sm: 0 1px 3px rgb(0 0 0 / 0.5), 0 1px 2px rgb(0 0 0 / 0.3);
      --sh-md: 0 4px 12px rgb(0 0 0 / 0.55), 0 1px 3px rgb(0 0 0 / 0.35);
      --sh-lg: 0 12px 32px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
      --sh-xl: 0 24px 56px rgb(0 0 0 / 0.7);
    }
  }

  /* Explicit dark choice must beat the media query in both directions. */
  :root[data-theme="dark"] {
    --bg-body:      #0b0e11;
    --bg-surface:   #14181d;
    --bg-raised:    #1a1f25;
    --bg-sunken:    #0e1216;
    --bg-hover:     #1e242b;
    --bg-active:    #262d35;
    --bg-inverse:   var(--n-100);

    --fg-primary:   #e8ebee;
    --fg-secondary: #a6aeb8;
    --fg-muted:     #828b96;
    --fg-faint:     #626a75;
    --fg-inverse:   var(--n-900);
    --fg-accent:    var(--brand-300);

    --border:        #262d35;
    --border-strong: #363f49;
    --border-faint:  #1c2228;

    --accent:        var(--brand-400);
    --accent-hover:  var(--brand-300);
    --accent-soft:   rgb(1 108 240 / 0.16);
    --accent-border: rgb(1 108 240 / 0.40);

    --action:        var(--brand-500);
    --action-hover:  var(--brand-400);
    --action-fg:     #ffffff;

    --gain-fg: #56c79a; --gain-bg: rgb(32 148 106 / 0.14); --gain-br: rgb(32 148 106 / 0.32);
    --loss-fg: #e88b85; --loss-bg: rgb(200 74 66 / 0.14);  --loss-br: rgb(200 74 66 / 0.32);
    --warn-fg: #e0b263; --warn-bg: rgb(184 122 31 / 0.14); --warn-br: rgb(184 122 31 / 0.32);
    --info-fg: #6db4e0; --info-bg: rgb(45 125 180 / 0.14); --info-br: rgb(45 125 180 / 0.32);

    --sh-xs: 0 1px 2px rgb(0 0 0 / 0.4);
    --sh-sm: 0 1px 3px rgb(0 0 0 / 0.5), 0 1px 2px rgb(0 0 0 / 0.3);
    --sh-md: 0 4px 12px rgb(0 0 0 / 0.55), 0 1px 3px rgb(0 0 0 / 0.35);
    --sh-lg: 0 12px 32px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
    --sh-xl: 0 24px 56px rgb(0 0 0 / 0.7);
  }
}

/* ==========================================================================
   RESET
   ========================================================================== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    tab-size: 4;
  }

  body {
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    line-height: var(--lh-base);
    color: var(--fg-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  }

  img, svg, video, canvas { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; padding: 0; }
  h1, h2, h3, h4 { font-weight: var(--fw-semi); line-height: var(--lh-tight); }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-xs);
  }

  ::selection { background: var(--accent-soft); color: var(--fg-primary); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* ==========================================================================
   BASE
   ========================================================================== */
@layer base {
  /* Every number in this app aligns in its column. This single rule is most
     of what separates a professional ledger from a spreadsheet screenshot. */
  .num, td.num, th.num, .money, .stat-value, input[type="number"], .tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "cv02", "cv03";
  }

  .money::before { content: "$"; opacity: 0.55; margin-right: 0.5px; }
  .money.is-negative { color: var(--loss-fg); }
  .money.is-negative::before { content: "-$"; }
  .money.is-zero { color: var(--fg-faint); }

  .gain { color: var(--gain-fg); }
  .loss { color: var(--loss-fg); }

  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--r-full);
    border: 3px solid var(--bg-body);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--fg-faint); }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
@layer layout {
  .shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100dvh;
  }

  .shell--bare { grid-template-columns: 1fr; }

  /* --- Sidebar --- */
  .sidebar {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: hidden;
  }

  .sidebar__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    height: var(--topbar-h);
    padding: 0 var(--sp-4);
    border-bottom: 1px solid var(--border-faint);
    flex-shrink: 0;
  }

  .sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
  }

  .sidebar__foot {
    border-top: 1px solid var(--border-faint);
    padding: var(--sp-3);
    flex-shrink: 0;
  }

  .main {
    display: flex;
    flex-direction: column;
    min-width: 0;   /* lets wide tables scroll instead of blowing out the grid */
  }

  .topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: 0 var(--sp-6);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
    flex-shrink: 0;
  }

  .page {
    padding: var(--sp-6);
    flex: 1;
    min-width: 0;
  }
  .page--flush { padding: 0; }

  .page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
    margin-bottom: var(--sp-6);
  }

  .page-title { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
  .page-sub { color: var(--fg-muted); font-size: var(--fs-md); margin-top: var(--sp-1); }

  /* --- Centred forms (login, invite, setup) --- */
  .centered {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: var(--sp-6);
    background:
      radial-gradient(1000px 520px at 50% -12%, var(--accent-soft), transparent 65%),
      var(--bg-body);
  }
  .centered__card { width: 100%; max-width: 420px; }
  .centered__card--wide { max-width: 660px; }

  @media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
      position: fixed; inset: 0 auto 0 0; z-index: 70;
      width: var(--sidebar-w);
      transform: translateX(-100%);
      transition: transform var(--dur-base) var(--ease);
      box-shadow: var(--sh-xl);
    }
    .sidebar.is-open { transform: none; }
    .page { padding: var(--sp-4); }
    .topbar { padding: 0 var(--sp-4); }
  }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
@layer components {

  /* --- Brand mark --- */
  .brand {
    display: flex; align-items: center; gap: var(--sp-3);
    font-weight: var(--fw-bold);
    letter-spacing: -0.02em;
    font-size: var(--fs-base);
  }
  /* The MK mark. It carries its own dark rounded background, so it sits
     correctly on both light and dark surfaces without a container. */
  .brand__mark {
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    display: block;
    object-fit: cover;
    box-shadow: var(--sh-xs);
    flex-shrink: 0;
  }
  .brand__mark--lg { width: 48px; height: 48px; border-radius: var(--r-lg); box-shadow: var(--sh-md); }
  .brand__text small {
    display: block; font-size: var(--fs-2xs); font-weight: var(--fw-medium);
    color: var(--fg-faint); letter-spacing: 0.04em; text-transform: uppercase;
    line-height: 1.1;
  }

  /* --- Buttons --- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-2);
    height: 34px; padding: 0 var(--sp-4);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: var(--fs-md); font-weight: var(--fw-medium);
    white-space: nowrap;
    transition: background var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
    user-select: none;
  }
  .btn:active { transform: translateY(0.5px); }
  .btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

  .btn--primary {
    background: var(--action); color: var(--action-fg);
    box-shadow: var(--sh-xs);
  }
  .btn--primary:hover { background: var(--action-hover); }

  .btn--secondary {
    background: var(--bg-surface); color: var(--fg-primary);
    border-color: var(--border-strong); box-shadow: var(--sh-xs);
  }
  .btn--secondary:hover { background: var(--bg-hover); border-color: var(--fg-faint); }

  .btn--ghost { background: transparent; color: var(--fg-secondary); }
  .btn--ghost:hover { background: var(--bg-hover); color: var(--fg-primary); }

  .btn--danger { background: var(--loss-fg); color: #fff; }
  .btn--danger:hover { filter: brightness(1.08); }

  .btn--sm { height: 28px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
  .btn--lg { height: 42px; padding: 0 var(--sp-6); font-size: var(--fs-base); }
  .btn--block { width: 100%; }
  .btn--icon { width: 34px; padding: 0; }
  .btn--icon.btn--sm { width: 28px; }

  /* --- Forms --- */
  .field { display: flex; flex-direction: column; gap: var(--sp-2); }
  .field + .field { margin-top: var(--sp-4); }

  .label {
    font-size: var(--fs-xs); font-weight: var(--fw-medium);
    color: var(--fg-secondary); letter-spacing: 0.01em;
  }
  .label .req { color: var(--loss-fg); margin-left: 2px; }

  .input, .select, .textarea {
    width: 100%;
    height: 36px;
    padding: 0 var(--sp-3);
    background: var(--bg-surface);
    color: var(--fg-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    font-size: var(--fs-md);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .textarea { height: auto; min-height: 84px; padding: var(--sp-2) var(--sp-3); resize: vertical; line-height: var(--lh-base); }
  .input::placeholder, .textarea::placeholder { color: var(--fg-faint); }

  .input:hover, .select:hover, .textarea:hover { border-color: var(--fg-faint); }
  .input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--sh-focus);
  }
  .input[aria-invalid="true"] { border-color: var(--loss-fg); }

  .select {
    appearance: none;
    padding-right: var(--sp-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%236d7580' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--sp-3) center;
  }

  .hint { font-size: var(--fs-xs); color: var(--fg-muted); }
  .error-text { font-size: var(--fs-xs); color: var(--loss-fg); }

  .checkbox { display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-md); }
  .checkbox input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

  /* --- Cards / panels --- */
  .card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
  }
  .card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--border-faint);
  }
  .card__title { font-size: var(--fs-base); font-weight: var(--fw-semi); letter-spacing: -0.01em; }
  .card__body { padding: var(--sp-5); }
  .card__body--flush { padding: 0; }

  /* --- Stat tiles --- */
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-4);
  }
  .stat {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-4) var(--sp-5);
    box-shadow: var(--sh-xs);
    position: relative;
    overflow: hidden;
  }
  .stat__label {
    font-size: var(--fs-xs); font-weight: var(--fw-medium);
    color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.055em;
  }
  .stat__value {
    font-size: var(--fs-3xl); font-weight: var(--fw-semi);
    letter-spacing: -0.03em; line-height: 1.1;
    margin-top: var(--sp-2);
    font-variant-numeric: tabular-nums;
  }
  .stat__meta { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--fg-muted); }
  .stat--accent::after {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  }

  /* --- Pace bar --- */
  .pace { margin-top: var(--sp-3); }
  .pace__track { height: 5px; border-radius: var(--r-full); background: var(--bg-sunken); overflow: hidden; }
  .pace__fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--brand-500), var(--brand-300)); transition: width var(--dur-base) var(--ease); }
  .pace__fill--ahead { background: linear-gradient(90deg, var(--gain-fg), #56c79a); }
  .pace__fill--behind { background: linear-gradient(90deg, var(--loss-fg), #e88b85); }

  /* --- Badges / chips --- */
  .badge {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    height: 20px; padding: 0 var(--sp-2);
    border-radius: var(--r-sm);
    font-size: var(--fs-2xs); font-weight: var(--fw-semi);
    letter-spacing: 0.03em; text-transform: uppercase;
    border: 1px solid transparent; white-space: nowrap;
  }
  .badge--neutral { background: var(--bg-sunken); color: var(--fg-secondary); border-color: var(--border); }
  .badge--gain { background: var(--gain-bg); color: var(--gain-fg); border-color: var(--gain-br); }
  .badge--loss { background: var(--loss-bg); color: var(--loss-fg); border-color: var(--loss-br); }
  .badge--warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-br); }
  .badge--info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-br); }
  .badge--accent { background: var(--accent-soft); color: var(--fg-accent); border-color: var(--accent-border); }

  /* --- Avatar --- */
  .avatar {
    width: 28px; height: 28px; border-radius: var(--r-full);
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--bg-sunken); color: var(--fg-secondary);
    font-size: var(--fs-2xs); font-weight: var(--fw-semi);
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
  }
  .avatar--lg { width: 36px; height: 36px; font-size: var(--fs-xs); }

  /* --- Nav --- */
  .nav-group__label {
    font-size: var(--fs-2xs); font-weight: var(--fw-semi);
    color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.075em;
    padding: 0 var(--sp-3); margin-bottom: var(--sp-2);
  }
  .nav-link {
    display: flex; align-items: center; gap: var(--sp-3);
    height: 32px; padding: 0 var(--sp-3);
    border-radius: var(--r-md);
    font-size: var(--fs-md); font-weight: var(--fw-medium);
    color: var(--fg-secondary);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
    position: relative;
  }
  .nav-link:hover { background: var(--bg-hover); color: var(--fg-primary); }
  .nav-link.is-active { background: var(--accent-soft); color: var(--fg-accent); font-weight: var(--fw-semi); }
  .nav-link__dot { width: 7px; height: 7px; border-radius: var(--r-full); flex-shrink: 0; background: var(--fg-faint); }
  .nav-link.is-active .nav-link__dot { background: currentColor; }
  .nav-link__count { margin-left: auto; font-size: var(--fs-2xs); color: var(--fg-faint); font-variant-numeric: tabular-nums; }

  /* --- Store switcher --- */
  .switcher { position: relative; }
  .switcher__trigger {
    display: flex; align-items: center; gap: var(--sp-3);
    width: 100%; padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--bg-surface);
    text-align: left;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .switcher__trigger:hover { background: var(--bg-hover); border-color: var(--border-strong); }
  .switcher__name { font-size: var(--fs-md); font-weight: var(--fw-semi); line-height: 1.25; }
  .switcher__company { font-size: var(--fs-2xs); color: var(--fg-muted); line-height: 1.25; }
  .switcher__body { min-width: 0; flex: 1; }
  .switcher__name, .switcher__company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .menu {
    position: absolute; z-index: 60;
    min-width: 240px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: var(--sp-2);
    display: none;
  }
  .menu.is-open { display: block; animation: menuIn var(--dur-fast) var(--ease); }
  .menu--up { bottom: calc(100% + 6px); left: 0; right: 0; }
  .menu--down { top: calc(100% + 6px); right: 0; }

  @keyframes menuIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

  .menu__item {
    display: flex; align-items: center; gap: var(--sp-3);
    width: 100%; padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-md); color: var(--fg-secondary);
    text-align: left;
  }
  .menu__item:hover { background: var(--bg-hover); color: var(--fg-primary); }
  .menu__item.is-active { color: var(--fg-accent); font-weight: var(--fw-medium); }
  .menu__label {
    font-size: var(--fs-2xs); font-weight: var(--fw-semi); color: var(--fg-faint);
    text-transform: uppercase; letter-spacing: 0.07em;
    padding: var(--sp-2) var(--sp-3) var(--sp-1);
  }
  .menu__sep { height: 1px; background: var(--border-faint); margin: var(--sp-2) 0; }

  /* --- Alerts --- */
  .alert {
    display: flex; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-sunken);
    font-size: var(--fs-md);
  }
  .alert--error   { background: var(--loss-bg); border-color: var(--loss-br); color: var(--loss-fg); }
  .alert--success { background: var(--gain-bg); border-color: var(--gain-br); color: var(--gain-fg); }
  .alert--warn    { background: var(--warn-bg); border-color: var(--warn-br); color: var(--warn-fg); }
  .alert--info    { background: var(--info-bg); border-color: var(--info-br); color: var(--info-fg); }

  /* --- Toasts --- */
  .toasts {
    position: fixed; bottom: var(--sp-5); right: var(--sp-5); z-index: 100;
    display: flex; flex-direction: column; gap: var(--sp-2);
    pointer-events: none;
  }
  .toast {
    pointer-events: auto;
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    font-size: var(--fs-md);
    animation: toastIn var(--dur-base) var(--ease);
    max-width: 380px;
  }
  .toast--error { border-color: var(--loss-br); }
  .toast--success { border-color: var(--gain-br); }
  .toast.is-leaving { animation: toastOut var(--dur-base) var(--ease) forwards; }
  @keyframes toastIn  { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

  /* --- Empty state --- */
  .empty {
    display: grid; place-items: center; gap: var(--sp-3);
    padding: var(--sp-16) var(--sp-6);
    text-align: center;
  }
  .empty__icon {
    width: 44px; height: 44px; border-radius: var(--r-lg);
    display: grid; place-items: center;
    background: var(--bg-sunken); color: var(--fg-faint);
    border: 1px solid var(--border);
  }
  .empty__title { font-size: var(--fs-lg); font-weight: var(--fw-semi); }
  .empty__text { color: var(--fg-muted); max-width: 400px; font-size: var(--fs-md); }

  /* --- Segmented control --- */
  .segmented {
    display: inline-flex; padding: 2px; gap: 2px;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
  }
  .segmented__btn {
    height: 26px; padding: 0 var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm); font-weight: var(--fw-medium);
    color: var(--fg-muted);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .segmented__btn:hover { color: var(--fg-primary); }
  .segmented__btn.is-active {
    background: var(--bg-surface); color: var(--fg-primary);
    box-shadow: var(--sh-xs);
  }

  /* --- Steps (setup wizard) --- */
  .steps { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-6); }
  .step { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--fg-faint); }
  .step__num {
    width: 22px; height: 22px; border-radius: var(--r-full);
    display: grid; place-items: center;
    border: 1px solid var(--border-strong);
    font-size: var(--fs-2xs); font-weight: var(--fw-semi);
    flex-shrink: 0;
  }
  .step.is-active { color: var(--fg-primary); font-weight: var(--fw-medium); }
  .step.is-active .step__num { background: var(--action); color: var(--action-fg); border-color: var(--action); }
  .step.is-done .step__num { background: var(--gain-bg); color: var(--gain-fg); border-color: var(--gain-br); }
  .step__bar { flex: 1; height: 1px; background: var(--border); min-width: var(--sp-4); }

  /* --- Modal --- */
  .modal-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgb(8 11 14 / 0.55);
    backdrop-filter: blur(3px);
    display: grid; place-items: center;
    padding: var(--sp-6);
    animation: fadeIn var(--dur-fast) var(--ease);
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .modal {
    width: 100%; max-width: 520px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    animation: modalIn var(--dur-base) var(--ease);
    max-height: calc(100dvh - var(--sp-12));
    display: flex; flex-direction: column;
  }
  .modal--wide { max-width: 780px; }
  @keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
  .modal__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--border-faint);
  }
  .modal__body { padding: var(--sp-5); overflow-y: auto; }
  .modal__foot {
    display: flex; justify-content: flex-end; gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--border-faint);
    background: var(--bg-sunken);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
@layer utilities {
  .row { display: flex; align-items: center; gap: var(--sp-3); }
  .row--tight { gap: var(--sp-2); }
  .row--between { justify-content: space-between; }
  .row--end { justify-content: flex-end; }
  .col { display: flex; flex-direction: column; }
  .wrap { flex-wrap: wrap; }
  .grow { flex: 1; min-width: 0; }
  .stack > * + * { margin-top: var(--sp-4); }
  .stack--tight > * + * { margin-top: var(--sp-2); }
  .stack--loose > * + * { margin-top: var(--sp-6); }

  .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  @media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

  .t-xs { font-size: var(--fs-xs); }  .t-sm { font-size: var(--fs-sm); }
  .t-lg { font-size: var(--fs-lg); }  .t-xl { font-size: var(--fs-xl); }
  .t-muted { color: var(--fg-muted); } .t-faint { color: var(--fg-faint); }
  .t-accent { color: var(--fg-accent); }
  .t-medium { font-weight: var(--fw-medium); } .t-semi { font-weight: var(--fw-semi); }
  .t-right { text-align: right; } .t-center { text-align: center; }
  .t-upper { text-transform: uppercase; letter-spacing: 0.055em; }
  .t-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); }
  .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
  .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }

  .hide { display: none !important; }
  @media (max-width: 900px) { .hide-sm { display: none !important; } }
  @media (min-width: 901px) { .show-sm { display: none !important; } }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  .divider { height: 1px; background: var(--border-faint); margin: var(--sp-4) 0; }
}

/* ==========================================================================
   DATA GRID
   The spreadsheet that replaces the desk manager's Excel sheet.
   Real <input>s styled as cells: native keyboard nav, native a11y, no
   edit-mode state machine to get out of sync.
   ========================================================================== */
@layer components {

  .grid-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3); flex-wrap: wrap;
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    position: sticky; top: var(--topbar-h); z-index: 30;
  }

  .grid-wrap {
    overflow: auto;
    background: var(--bg-surface);
    /* Fill the viewport below topbar + toolbar + summary so the grid itself
       scrolls rather than the page. */
    max-height: calc(100dvh - var(--topbar-h) - 52px - 48px);
  }

  .grid {
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--fs-sm);
    width: max-content;
    min-width: 100%;
  }

  /* --- Header --- */
  .grid thead th {
    position: sticky; top: 0; z-index: 20;
    background: var(--bg-sunken);
    color: var(--fg-secondary);
    font-size: var(--fs-2xs);
    font-weight: var(--fw-semi);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 0 var(--sp-2);
    height: 32px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-strong);
    border-right: 1px solid var(--border-faint);
  }
  .grid thead th.t-right { text-align: right; }
  .grid thead th.is-sticky { z-index: 25; }

  /* --- Body --- */
  .grid tbody td {
    height: var(--row-h);
    padding: 0;
    border-bottom: 1px solid var(--border-faint);
    border-right: 1px solid var(--border-faint);
    background: var(--bg-surface);
    vertical-align: middle;
  }
  .grid tbody tr:hover td { background: var(--bg-hover); }
  .grid tbody tr.is-filtered { display: none; }
  .grid tbody tr.is-saving td { background: var(--accent-soft); }

  /* Row number + actions rails */
  .grid__num {
    width: 40px; min-width: 40px;
    position: sticky; left: 0; z-index: 15;
    text-align: center;
    color: var(--fg-faint);
    font-size: var(--fs-2xs);
    font-variant-numeric: tabular-nums;
    background: var(--bg-sunken) !important;
    border-right: 1px solid var(--border) !important;
  }
  .grid thead .grid__num { z-index: 26; }

  .grid__actions {
    width: 38px; min-width: 38px;
    text-align: center;
    border-right: 0 !important;
  }

  /* Frozen columns. Which ones, and how many, is configured per log — the
     left offset is emitted inline from the real column widths so they stack
     flush against each other as you scroll. */
  .grid .is-sticky { position: sticky; z-index: 14; }
  .grid tbody .is-sticky { background: var(--bg-surface); }
  .grid tbody tr:hover .is-sticky { background: var(--bg-hover); }
  .grid tbody .is-sticky-last { border-right: 1px solid var(--border) !important; }
  .grid thead .is-sticky-last { border-right: 1px solid var(--border-strong) !important; }

  /* --- Cells --- */
  .cell {
    width: 100%; height: calc(var(--row-h) - 2px);
    padding: 0 var(--sp-2);
    border: 0; background: transparent;
    color: var(--fg-primary);
    font-size: var(--fs-sm);
    font-family: inherit;
    border-radius: 0;
    outline: none;
  }
  .cell:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
  .cell:focus {
    background: var(--bg-surface);
    box-shadow: inset 0 0 0 2px var(--accent);
    position: relative; z-index: 10;
  }
  .cell--money, .cell.num { text-align: right; font-variant-numeric: tabular-nums; }
  .cell--upper { text-transform: uppercase; }
  .cell--select {
    appearance: none;
    padding-right: var(--sp-3);
    cursor: pointer;
  }
  .cell--check { width: auto; margin: 0 auto; display: block; accent-color: var(--accent); cursor: pointer; }
  .cell::placeholder { color: var(--fg-faint); }
  .cell[type="date"] { font-variant-numeric: tabular-nums; }

  /* Computed columns are never editable — make that visually obvious */
  .grid td.is-computed { background: var(--bg-sunken); }
  .grid tbody tr:hover td.is-computed { background: var(--bg-active); }
  .cell-static {
    display: block; padding: 0 var(--sp-2);
    font-variant-numeric: tabular-nums;
    font-weight: var(--fw-medium);
    color: var(--fg-secondary);
  }
  td.t-right .cell-static { text-align: right; }

  .cell-delete { opacity: 0; transition: opacity var(--dur-fast) var(--ease); color: var(--fg-faint); }
  .grid tbody tr:hover .cell-delete { opacity: 1; }
  .cell-delete:hover { color: var(--loss-fg); background: var(--loss-bg); }

  /* --- Totals row --- */
  .grid tfoot td {
    position: sticky; bottom: 0; z-index: 18;
    height: 36px;
    padding: 0 var(--sp-2);
    background: var(--bg-sunken);
    border-top: 2px solid var(--border-strong);
    border-right: 1px solid var(--border-faint);
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .grid tfoot .is-sticky { z-index: 19; }
  .grid tfoot .grid__num { z-index: 20; }

  /* --- Summary bar --- */
  .grid-summary {
    display: flex; align-items: center; gap: var(--sp-6);
    padding: 0 var(--sp-5);
    height: 48px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    overflow-x: auto;
    flex-shrink: 0;
  }
  .grid-summary__item { display: flex; align-items: baseline; gap: var(--sp-2); white-space: nowrap; }
  .grid-summary__label {
    font-size: var(--fs-2xs); color: var(--fg-muted);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--fw-medium);
  }
  .grid-summary__value { font-size: var(--fs-base); font-weight: var(--fw-semi); letter-spacing: -0.01em; }
  .grid-summary__spacer { flex: 1; min-width: var(--sp-4); }

  .input--search { font-size: var(--fs-sm); }

  @media (max-width: 900px) {
    .grid-toolbar { position: static; }
    .grid-wrap { max-height: none; }
    .grid .is-sticky { position: static; left: auto !important; }
  }
}

/* ==========================================================================
   LIST TABLES (management pages — distinct from the editable data grid)
   ========================================================================== */
@layer components {
  .table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
  .table th {
    text-align: left;
    font-size: var(--fs-2xs); font-weight: var(--fw-semi);
    color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em;
    padding: var(--sp-2) var(--sp-4);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  .table td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-faint);
    vertical-align: middle;
  }
  .table tbody tr:last-child td { border-bottom: 0; }
  .table tbody tr:hover { background: var(--bg-hover); }
  .table .t-right, .table th.t-right { text-align: right; }
  .table .col-tight { width: 1%; white-space: nowrap; }

  .inline-form { display: inline-flex; align-items: center; gap: var(--sp-2); }
  .select--inline { height: 28px; font-size: var(--fs-sm); width: auto; min-width: 120px; }

  .copy-field {
    display: flex; gap: var(--sp-2); align-items: center;
    background: var(--bg-sunken);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-2) var(--sp-3);
  }
  .copy-field code {
    flex: 1; min-width: 0;
    font-family: var(--font-mono); font-size: var(--fs-xs);
    color: var(--fg-secondary);
    overflow-x: auto; white-space: nowrap;
  }

  .swatch {
    width: 14px; height: 14px; border-radius: var(--r-xs);
    border: 1px solid var(--border-strong); flex-shrink: 0; display: inline-block;
  }
}

/* ==========================================================================
   PRINT — the nightly recap gets printed and handed round the tower
   ========================================================================== */
.print-only { display: none; }

@media print {
  @page { margin: 14mm; size: portrait; }

  :root {
    --bg-body: #fff; --bg-surface: #fff; --bg-sunken: #fff; --bg-hover: #fff;
    --fg-primary: #000; --fg-secondary: #333; --fg-muted: #555; --fg-faint: #777;
    --border: #ccc; --border-faint: #ddd; --border-strong: #999;
  }

  .sidebar, .topbar, .no-print, .toasts, .grid-toolbar, .cell-delete { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; }

  .print-only { display: block; }
  .print-head {
    font-size: 13pt; margin-bottom: 10mm; padding-bottom: 3mm;
    border-bottom: 1.5pt solid #000;
  }

  body { font-size: 9.5pt; background: #fff; color: #000; }

  .card {
    border: 1pt solid #bbb; box-shadow: none; border-radius: 0;
    break-inside: avoid; page-break-inside: avoid;
    margin-bottom: 6mm;
  }
  .stat { border: 1pt solid #bbb; box-shadow: none; break-inside: avoid; }
  .stat__value { font-size: 15pt; }
  .stat-grid { gap: 4mm; }

  .grid-2, .grid-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }

  .table { font-size: 8.5pt; }
  .table th, .table td { padding: 1.5mm 2mm; }
  .table thead { display: table-header-group; }   /* repeat headers across pages */
  tr { break-inside: avoid; page-break-inside: avoid; }

  .pace__track { border: 0.5pt solid #bbb; }
  .pace__fill { background: #666 !important; }
  .badge { border: 0.5pt solid #999; }
  a { text-decoration: none; color: #000; }
}

@layer components {
  /* Labelled inline number input — makes it obvious which box is which
     without burning a table header on each. */
  .goal-input { display: inline-flex; align-items: stretch; }
  .goal-input__tag {
    display: inline-flex; align-items: center;
    padding: 0 var(--sp-2);
    font-size: var(--fs-2xs); font-weight: var(--fw-medium);
    color: var(--fg-muted);
    background: var(--bg-sunken);
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: var(--r-md) 0 0 var(--r-md);
    white-space: nowrap;
  }
  .goal-input .input {
    height: 28px; width: 72px;
    border-radius: 0 var(--r-md) var(--r-md) 0;
  }
}

@layer components {
  /* --- Salesboard theme picker --- */
  .theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--sp-3);
  }
  .theme-opt { cursor: pointer; }
  .theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
  .theme-opt__card {
    display: block;
    padding: var(--sp-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    background: var(--bg-surface);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    height: 100%;
  }
  .theme-opt:hover .theme-opt__card { border-color: var(--fg-faint); }
  .theme-opt input:checked + .theme-opt__card {
    border-color: var(--accent);
    box-shadow: var(--sh-focus);
  }
  .theme-opt input:focus-visible + .theme-opt__card { outline: 2px solid var(--accent); outline-offset: 2px; }

  .theme-opt__name { display: block; font-weight: var(--fw-semi); font-size: var(--fs-md); margin-top: var(--sp-2); }
  .theme-opt__hint { display: block; font-size: var(--fs-2xs); color: var(--fg-muted); line-height: 1.4; margin-top: 2px; }

  .theme-swatch {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
    height: 52px; padding: var(--sp-2);
    border-radius: var(--r-md);
    border: 1px solid var(--border-faint);
  }
  .theme-swatch__bar { height: 6px; border-radius: 999px; width: 100%; }
  .theme-swatch__bar--short { width: 55%; }

  .theme-swatch--midnight { background: linear-gradient(160deg, #0d1424, #070b14); }
  .theme-swatch--midnight .theme-swatch__bar { background: linear-gradient(90deg, #2f8bff, #7cc0ff); }

  .theme-swatch--graphite { background: linear-gradient(160deg, #131719, #0b0d0f); }
  .theme-swatch--graphite .theme-swatch__bar { background: linear-gradient(90deg, #cfd6db, #ffffff); }

  .theme-swatch--showroom { background: linear-gradient(160deg, #ffffff, #eef1f5); border-color: #d3dae2; }
  .theme-swatch--showroom .theme-swatch__bar { background: linear-gradient(90deg, #0057c7, #016cf0); }

  .theme-swatch--victory { background: linear-gradient(160deg, #14100a, #0a0805); }
  .theme-swatch--victory .theme-swatch__bar { background: linear-gradient(90deg, #e8b44a, #ffd97a); }

  .theme-swatch--circuit { background: linear-gradient(160deg, #001028, #000308); }
  .theme-swatch--circuit .theme-swatch__bar { background: linear-gradient(90deg, #00a2ff, #6fe0ff); }
}
