/* ─────────────────────────────────────────────────────────────────
   LEVR — BRAND TOKENS + CORE PATTERNS  (v1, 2026-06-09)
   ─────────────────────────────────────────────────────────────────
   The LEVR house style. Adapted faithfully from the Flywheel v7
   dashboard shell (the multi-client chrome shipped across SGA, ETS,
   Aeir, Drain Detective). This is the source of truth for every
   LEVR-facing surface: facilitator platform, dashboards, build
   plans, showcases, kickoff docs, internal tools, client review
   pages.

   Locked decisions (do NOT change without updating the brand guide):
   - Accent is solid black. Quiet, editorial, brand-as-ink.
   - Sidebar bg is light-grey #FAFAFA; main bg is pure white.
   - Cards have a default elevation shadow + hover lift.
   - Typography: Geist (sans) + JetBrains Mono (numbers/captions/labels).
   - Cards have generous radii (24px outer, 20px inner).
   - Main content max-width: 1400px, centered horizontally.

   Font loading (put in <head>):
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
   ─────────────────────────────────────────────────────────────── */

:root {
  /* ── CORE PALETTE ── */
  --accent: #000000; /* active nav, primary CTA fill, focus ring, badges */
  --accent-soft: rgba(
    0,
    0,
    0,
    0.1
  ); /* active nav bg, pinned states, active filters */
  --accent-fg: #ffffff; /* text/icon on top of --accent */

  --bg: #ffffff; /* main page background (pure white) */
  --surface: #ffffff; /* card backgrounds (separated by shadow + border) */
  --ink: #111111; /* primary text */
  --ink-soft: #2a2a2a; /* secondary text */
  --muted: #6b6b6b; /* tertiary text, captions */
  --line: #e8e8e8; /* borders, dividers */
  --line-strong: #d6d6d6; /* stronger borders, button outlines */

  --sidebar-bg: #fafafa; /* the one pane that is slightly grey */
  --hover-surface: #f3f3f3; /* nav hover, kbd, filter hover */

  /* ── SHADOWS ── */
  --shadow-card: 0 1px 2px rgba(17, 17, 17, 0.05);
  --shadow-card-hover:
    0 8px 20px rgba(17, 17, 17, 0.08), 0 1px 2px rgba(17, 17, 17, 0.04);
  --shadow-elevated: 0 20px 40px rgba(17, 17, 17, 0.16);

  /* ── CATEGORICAL CHIP PASTELS (taxonomy/status — never brand bleed) ── */
  --chip-draft-bg: #f8e7d6;
  --chip-draft-fg: #8b4513; /* peach   */
  --chip-ready-bg: #d7ebdd;
  --chip-ready-fg: #1f5132; /* green   */
  --chip-review-bg: #e6e0f4;
  --chip-review-fg: #4b3a82; /* lavender */
  --chip-published-bg: #d9e5f3;
  --chip-published-fg: #1e3a6e; /* blue   */
  --chip-archived-bg: #e6e4dc;
  --chip-archived-fg: #5c5c5c; /* grey    */

  /* ── RADII ── */
  --radius-card: 24px; /* outer cards */
  --radius-card-sm: 20px; /* inner cards */
  --radius-control: 8px; /* search input, workspace pill */
  --radius-control-sm: 6px; /* nav items, filter buttons */
  --radius-pill: 999px; /* buttons, avatar pills, count badges */
  --radius-chip: 4px; /* status/type chips */

  /* ── SPACING / LAYOUT ── */
  --pad-main: 56px 64px 96px; /* top / sides / bottom */
  --pad-breadcrumb: 16px 64px;
  --main-max-width: 1400px;
  --sidebar-width: 280px;

  /* ── TYPE SCALE ── */
  --fs-body: 14px;
  --fs-h1: 32px; /* page title */
  --fs-h2: 19px; /* section heading (18-20px) */
  --fs-h3: 16px; /* card title */
  --fs-subhead: 14.5px;
  --fs-caption: 11px; /* mono label (10.5-11px) */
}

/* ─────────────────────────────────────────────────────────────────
   BASE TYPOGRAPHY
   Geist for everything readable; JetBrains Mono for numbers,
   captions, kbd, mono labels.
   ─────────────────────────────────────────────────────────────── */
html,
body {
  background: var(--bg);
  color: var(--ink);
}
body {
  font-family: "Geist", system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
.h1 {
  font-family: "Geist", system-ui, sans-serif;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h2,
.h2 {
  font-family: "Geist", system-ui, sans-serif;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h3,
.h3 {
  font-family: "Geist", system-ui, sans-serif;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.subhead {
  font-size: var(--fs-subhead);
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* Mono uppercase kicker — the signature section opener.
   Often prefixed with a numbered <span class="num">01</span>. */
.kicker,
.caption {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .num {
  color: var(--ink);
  margin-right: 8px;
}

/* ─────────────────────────────────────────────────────────────────
   BUTTONS
   ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 120ms ease;
}
.btn-primary:hover {
  opacity: 0.9;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease;
}
.btn-ghost:hover {
  background: var(--hover-surface);
}

/* ─────────────────────────────────────────────────────────────────
   CHIPS (categorical taxonomy / status — pastel-tinted, never brand)
   ─────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: "Geist", sans-serif;
}
.chip-draft {
  background: var(--chip-draft-bg);
  color: var(--chip-draft-fg);
}
.chip-ready {
  background: var(--chip-ready-bg);
  color: var(--chip-ready-fg);
}
.chip-review {
  background: var(--chip-review-bg);
  color: var(--chip-review-fg);
}
.chip-published {
  background: var(--chip-published-bg);
  color: var(--chip-published-fg);
}
.chip-archived {
  background: var(--chip-archived-bg);
  color: var(--chip-archived-fg);
}

/* ─────────────────────────────────────────────────────────────────
   CARDS — radii 24/20, generous padding (~26x28), hover lift.
   Grid tracks must use minmax(0, 1fr) so columns stay pixel-equal.
   ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
  min-width: 0;
}
.card.clickable {
  cursor: pointer;
}
.card.clickable:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────
   SEARCH + KBD
   ─────────────────────────────────────────────────────────────── */
.search {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  transition: border-color 120ms ease;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  background: var(--hover-surface);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────────────
   SIDEBAR NAV ITEM (280px auto-hide sidebar; bg #FAFAFA)
   ─────────────────────────────────────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-control-sm);
  font-size: 13.5px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 120ms ease,
    color 120ms ease,
    border-color 120ms ease;
}
.nav-item:hover {
  background: var(--hover-surface);
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  border-color: rgba(0, 0, 0, 0.15);
}
.nav-item .count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--hover-surface);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  min-width: 22px;
  text-align: center;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}
