/* Rally HQ Blueprint Prototype — Shared CSS
 *
 * Ports Midnight & Copper tokens from Rally HQ DESIGN.md into a
 * standalone stylesheet so prototype HTML renders without the SvelteKit app.
 *
 * Deviations from shipped (per blueprint/DESIGN-PRINCIPLES.md):
 *   - Space Grotesk as display font (was: Sora-for-everything)
 *   - JetBrains Mono for data atoms (court numbers, times, seeds)
 *   - --tournament-accent CSS variable per-tournament override
 *   - LIVE pulse component (new)
 *   - Action-overlay pattern (new)
 */

/* ─────────────── tokens ─────────────── */

:root {
  /* Brand — Electric Indigo */
  --brand-50:  hsl(235, 95%, 97%);
  --brand-100: hsl(235, 95%, 92%);
  --brand-300: hsl(235, 95%, 75%);
  --brand-500: hsl(235, 80%, 60%);
  --brand-600: hsl(235, 75%, 50%);
  --brand-700: hsl(235, 80%, 40%);
  --brand-900: hsl(235, 90%, 20%);

  /* Arena — Navy-based neutral */
  --arena-50:  hsl(220, 25%, 98%);
  --arena-100: hsl(220, 20%, 96%);
  --arena-200: hsl(220, 18%, 90%);
  --arena-300: hsl(220, 15%, 81%);
  --arena-400: hsl(220, 12%, 69%);
  --arena-500: hsl(220, 10%, 54%);
  --arena-600: hsl(220, 15%, 40%);
  --arena-700: hsl(220, 20%, 27%);
  --arena-800: hsl(220, 25%, 18%);
  --arena-900: hsl(220, 30%, 12%);
  --arena-950: hsl(220, 30%, 6%);

  /* Victory — Gold */
  --victory-300: hsl(45, 85%, 65%);
  --victory-500: hsl(45, 85%, 45%);
  --victory-600: hsl(45, 85%, 35%);

  /* Live — Coral */
  --live-500: hsl(12, 85%, 52%);
  --live-600: hsl(12, 85%, 45%);

  /* Semantic */
  --success-500: hsl(142, 60%, 50%);
  --error-500:   hsl(0, 85%, 55%);

  /* Surfaces — Midnight & Copper (warm light + navy dark) */
  --bg:        hsl(35, 25%, 98%);
  --surface-1: hsl(35, 20%, 99%);
  --surface-2: hsl(35, 15%, 96%);
  --card:      #ffffff;
  --card-border: var(--arena-200);
  --cta-bg:    hsl(220, 30%, 12%);
  --header-bg: hsl(220, 30%, 8%);

  /* Text */
  --text-primary: var(--arena-900);
  --text-secondary: hsl(220, 15%, 45%);
  --text-muted: hsl(220, 10%, 55%);
  --text-on-dark: hsl(0, 0%, 98%);
  --text-on-dark-muted: hsl(0, 0%, 70%);

  /* PROPOSED — per-tournament accent (R4) */
  --tournament-accent: var(--brand-600);
  --tournament-accent-soft: var(--brand-100);

  /* Type — Athletic identity (2026-05-23)
     - --font-hero: Anton (condensed uppercase). Tournament names, hero
       headlines only. Anton at small sizes is unreadable.
     - --font-display: Inter — general headings (lean on 700/800 weights).
     - --font-body: Inter — body copy.
     - --font-mono: JetBrains Mono — data atoms (scores, courts, times). */
  --font-hero:    'Anton', 'Impact', 'Oswald', 'Arial Narrow', sans-serif;
  --font-display: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Fluid scale */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl:  clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl:  clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl:  clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
  --text-5xl:  clamp(3rem, 2.25rem + 3.75vw, 4rem);

  /* Spacing — 4pt grid */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-2xl: 1.5rem; --radius-full: 9999px;

  /* Elevation */
  --shadow-sm: 0 2px 6px rgb(10 14 20 / 0.06);
  --shadow-md: 0 6px 16px rgb(10 14 20 / 0.08);
  --shadow-lg: 0 12px 30px rgb(10 14 20 / 0.12);
  --shadow-focus: 0 0 0 4px hsl(235 80% 60% / 0.25);

  /* Motion — distinctive curves, NOT Material's "decelerate" defaults.
   * Drawer settle uses an iOS-inspired ease-out for a "snap-then-settle"
   * feel rather than the linear-looking 0.4,0,0.2,1 Material standard. */
  --transition-snap:  80ms  cubic-bezier(0.2, 0, 0.1, 1);
  --transition-fast:  150ms cubic-bezier(0.32, 0.72, 0, 1);
  --transition-base:  200ms cubic-bezier(0.32, 0.72, 0, 1);
  --transition-slow:  280ms cubic-bezier(0.32, 0.72, 0, 1);

  /* Focus — accessible outline, NOT the shadcn ring-2 ring-offset-2 pattern */
  --focus-outline: 2px solid var(--brand-500);
  --focus-outline-offset: 2px;
  --focus-outline-on-dark: 2px solid var(--brand-300);
}

/* ─────────────── motion preferences ─────────────── */

@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;
  }
}

/* ─────────────── reset & base ─────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
h1 {
  font-family: var(--font-hero);
  font-size: var(--text-5xl);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
h2 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; }
h3 { font-family: var(--font-display); font-size: var(--text-xl);  font-weight: 600; line-height: 1.2; }
h4 { font-family: var(--font-display); font-size: var(--text-lg);  font-weight: 600; line-height: 1.3; }

p { color: var(--text-secondary); }

/* Mono for data atoms */
.mono, time, .court, .seed, .score {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
}

/* ─────────────── layout primitives ─────────────── */

.container { max-width: 1200px; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }

.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; gap: var(--space-3); align-items: center; }
.row-between { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }

/* ─────────────── components ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-snap),
    transform var(--transition-snap);
  min-height: 44px;
}
.btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}
.btn:active {
  transform: translateY(1px);
  transition-duration: var(--transition-snap);
}
.btn-primary { background: var(--brand-600); color: white; }
.btn-primary:hover { background: var(--brand-700); }
.btn-primary:active { box-shadow: inset 0 1px 2px hsl(235 50% 18% / 0.4); }

.btn-secondary { background: var(--card); color: var(--text-primary); border: 1px solid var(--card-border); }
.btn-secondary:hover { background: var(--surface-2); border-color: hsl(220 18% 80%); }
.btn-secondary:active { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.06); }

.btn-ghost { color: var(--text-secondary); padding: var(--space-2) var(--space-3); }
.btn-ghost:hover { color: var(--text-primary); background: var(--surface-2); }
.btn-ghost:active { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.05); }

.btn-lg { padding: var(--space-4) var(--space-6); font-size: var(--text-base); }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
/* Cards in interactive containers get a brand left-edge on hover — reuses
 * the citation chip / sidebar active-rule vocabulary as a consistent
 * "this thing is being pointed at" signal across surfaces. */
a:hover > .card,
button:hover > .card,
.card[role="button"]:hover,
.card[tabindex]:hover {
  box-shadow: inset 2px 0 0 var(--brand-300);
  border-color: hsl(220 18% 80%);
}
.card[role="button"]:focus-visible,
.card[tabindex]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--arena-100);
  color: var(--arena-700);
}
.badge-brand { background: var(--brand-100); color: var(--brand-700); }
.badge-victory { background: hsl(45 85% 95%); color: var(--victory-600); }
.badge-live {
  background: var(--live-500);
  color: white;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.badge-accent {
  background: color-mix(in srgb, var(--tournament-accent) 12%, transparent);
  color: var(--tournament-accent);
}

/* PROPOSED — LIVE pulse */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live-500);
  margin-right: var(--space-2);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* PROPOSED — proposed-vs-shipped tag */
.proposed-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--victory-500);
  color: var(--arena-900);
  border-radius: var(--radius-sm);
  vertical-align: middle;
}

/* ─────────────── portal shell (Front Door / Prototype / Docs) ───────────────
   Canonical meta-page shell. Single source of truth for the three blueprint
   meta-pages so they can't drift visually. Injected by _portal-shell.js.
   See `_portal-shell.js` and big-blueprint/template/portal/_portal-shell.js. */
.portal-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
  padding: 0 var(--space-4);
  height: 56px;
  display: flex;
  align-items: center;
}
.portal-shell-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
.portal-shell .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
  text-decoration: none;
}
.portal-shell .brand-mark-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.portal-shell-nav {
  display: flex;
  gap: 14px;
  align-items: center;
}
.portal-shell-nav a {
  position: relative;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 0;
  line-height: 1;
  transition: color var(--transition-fast);
  text-decoration: none;
}
.portal-shell-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.portal-shell-nav a:hover { color: var(--text-primary); }
.portal-shell-nav a.active { color: var(--text-primary); }
.portal-shell-nav a:hover::after,
.portal-shell-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ─────────────── header (shared across pages) ─────────────── */

.header {
  background: var(--header-bg);
  color: var(--text-on-dark);
  padding: var(--space-4) 0;
  border-bottom: 1px solid hsl(220 30% 15%);
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.header .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.header .logo-accent { color: var(--brand-300); }
.header nav { display: flex; gap: var(--space-5); }
.header nav a { color: var(--text-on-dark-muted); font-size: var(--text-sm); }
.header nav a:hover, .header nav a.active { color: var(--text-on-dark); }

/* ─────────────── app-header (Authenticated chrome) ───────────────
   Shared component pattern for the Authenticated mode dark brand bar.
   Same markup across operator-game-day + captain (and future authenticated
   pages); differs only in nav items per surface. Per docs/chrome-system.md.

   Variants:
   - `.app-header` — full organizer nav (Tournaments, Series, Settings)
   - `.app-header.app-header-reduced` — magic-link captain nav (no Series/Settings) */
.app-header {
  background: var(--header-bg);
  color: var(--text-on-dark);
  padding: 0 var(--space-5);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(220 30% 15%);
  gap: var(--space-5);
}
.app-header .app-header-lead {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-width: 0;
}
.app-header .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-on-dark);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.app-header .logo-accent { color: var(--brand-300); }
.app-header nav {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}
.app-header nav a {
  color: var(--text-on-dark-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.app-header nav a:hover { color: var(--text-on-dark); }
.app-header nav a.active {
  color: var(--text-on-dark);
  border-bottom-color: var(--brand-400, var(--brand-500));
}
.app-header .app-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.app-header .app-cmdk {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  padding: var(--space-1) var(--space-2);
  border: 1px solid hsl(220 30% 22%);
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  background: transparent;
  cursor: pointer;
}
.app-header .app-cmdk:hover { color: var(--text-on-dark); border-color: hsl(220 30% 30%); }
.app-header .app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-500);
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  cursor: pointer;
}
.app-header.app-header-reduced nav { display: none; }
.app-header.app-header-reduced .app-header-lead { gap: var(--space-3); }
.app-header.app-header-reduced .app-magic-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-on-dark-muted);
  padding: 2px var(--space-2);
  border: 1px solid hsl(220 30% 22%);
  border-radius: var(--radius-sm);
}

/* Per-event sub-chrome strip — appears below .app-header on pages scoped to
   a specific tournament. Carries the tournament's name, date, and LIVE
   indicator. The per-event accent applies as a leading rule + LIVE dot. */
.app-event-strip {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--tournament-accent) 28%, var(--cta-bg)) 0%,
    var(--cta-bg) 40%,
    var(--cta-bg) 100%);
  color: var(--text-on-dark);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid hsl(220 30% 15%);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-event-strip .app-event-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  min-width: 0;
}
.app-event-strip .app-event-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-event-strip .app-event-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.app-event-strip .app-event-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.app-event-strip .app-event-state .live-dot {
  width: 8px;
  height: 8px;
  background: var(--live-500);
  border-radius: 50%;
  animation: live-pulse 2s infinite;
}

/* ─────────────── proto-nav (footer) + panel triggers ─────────────── */

/* Legacy v1 footer nav — kept in DOM for keyboard shortcuts but visually
 * hidden because top brand bar + slice header + sidebar do the same job
 * with better positioning. Removable in a future cleanup. */
.proto-footer-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--arena-900);
  color: var(--text-on-dark);
  border-top: 1px solid hsl(220 30% 20%);
  padding: var(--space-3) var(--space-4);
  display: none; /* HIDDEN — replaced by top brand bar + slice header */
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  font-size: var(--text-sm);
}
.proto-footer-nav .nav-pages select {
  background: hsl(220 30% 18%);
  color: var(--text-on-dark);
  border: 1px solid hsl(220 30% 25%);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font: inherit;
}
.proto-footer-nav .nav-actions { display: flex; gap: var(--space-2); }
.proto-footer-nav button {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  border: 1px solid hsl(220 30% 20%);
}
.proto-footer-nav button:hover, .proto-footer-nav button.active {
  background: hsl(220 30% 18%);
  color: var(--text-on-dark);
}

/* Bottom reserve no longer needed — footer nav is hidden */
/* body { padding-bottom: 80px; } */

/* ─────────────── strategy panel (right drawer) ─────────────── */

.strategy-panel, .current-state-panel {
  position: fixed;
  top: 0;
  height: 100vh;
  width: min(420px, 100%);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  overflow-y: auto;
  transition: transform var(--transition-slow);
  z-index: 50;
}
.strategy-panel { right: 0; transform: translateX(100%); border-left: 1px solid var(--card-border); }
.current-state-panel { left: 0; transform: translateX(-100%); border-right: 1px solid var(--card-border); }
.strategy-panel.open, .current-state-panel.open { transform: translateX(0); }

.panel-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: var(--text-2xl);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.panel-close:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}
.panel-close:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 0;
}
.current-state-panel .panel-close { right: auto; left: var(--space-3); }

.panel-section { margin-top: var(--space-5); }
.panel-section h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.panel-section p { font-size: var(--text-sm); }
.panel-section code, .panel-section pre {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ─────────────── view switch (was: comparison toggle) ───────────────
 *
 * Three view modes — Proposed / Compare / Shipped — rendered as a
 * tab-style switch: sentence-case labels, hairline vertical separators
 * between segments, brand-color underline marking the active mode.
 * No container fill, no pill, no UPPERCASE MONO — escapes the iOS / shadcn
 * segmented-control idiom while keeping the segmented affordance legible.
 */

.compare-toggle {
  display: inline-flex;
  align-items: stretch;
  height: 30px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  font-family: var(--font-body);
}
.compare-toggle button {
  position: relative;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  border-radius: 0;
  min-height: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease-out, border-color 200ms ease-out;
}
.compare-toggle button + button::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: hsl(220 10% 35% / 0.35);
  pointer-events: none;
}
.compare-toggle button:hover {
  color: var(--text-secondary);
  border-bottom-color: hsl(220 10% 30%);
}
.compare-toggle button.active {
  color: var(--text-primary);
  border-bottom-color: var(--brand-500);
}
.compare-toggle button:focus-visible {
  outline: none;
  border-bottom-color: var(--brand-500);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px hsl(235 80% 60% / 0.4);
}

/* Dark-bar context: stronger active state — the compare toggle is the
   primary interactive control on every prototype page; active should read
   as filled, not just underlined. Height matches the chip pair (24px outer,
   20px inner buttons) so the three controls share one baseline. */
.proto-top-bar .compare-toggle {
  background: hsl(220 30% 16%);
  border: 1px solid hsl(220 30% 24%);
  border-radius: 999px;
  padding: 2px;
  height: 24px !important;
  display: inline-flex;
  align-items: center;
}
.proto-top-bar .compare-toggle button {
  color: hsl(220 10% 65%);
  padding: 0 10px;
  height: 18px;
  font-size: 11px;
  border-radius: 999px;
  font-weight: 500;
  border-bottom: none !important;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.proto-top-bar .compare-toggle button + button::before {
  display: none;
}
.proto-top-bar .compare-toggle button:hover {
  color: var(--text-on-dark);
  background: hsl(220 30% 22%);
}
.proto-top-bar .compare-toggle button.active {
  color: var(--text-on-dark);
  background: var(--brand-600);
  font-weight: 600;
}
.proto-top-bar .compare-toggle button.active:hover {
  background: var(--brand-600);
}
.proto-top-bar .compare-toggle button:focus-visible {
  outline: var(--focus-outline-on-dark);
  outline-offset: 2px;
}
/* Light-shell variant */
body.proto-shell-light .proto-top-bar .compare-toggle {
  background: var(--surface-2);
  border-color: var(--card-border);
}
body.proto-shell-light .proto-top-bar .compare-toggle button {
  color: var(--text-secondary);
}
body.proto-shell-light .proto-top-bar .compare-toggle button:hover {
  color: var(--text-primary);
  background: var(--surface-1);
}
body.proto-shell-light .proto-top-bar .compare-toggle button.active {
  color: white;
  background: var(--brand-600);
}

/* Floating fallback (pages without a top bar) — bottom-right hairline panel,
 * no pill, sits above page content. Sharp corners, dark surface. */
.compare-toggle-floating {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 35;
  background: hsl(220 30% 10% / 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(220 30% 22%);
  border-radius: 2px;
  padding: 0 4px;
}
.compare-toggle-floating .compare-toggle button {
  color: hsl(220 10% 65%);
}
.compare-toggle-floating .compare-toggle button.active {
  color: var(--text-on-dark);
  border-bottom-color: var(--brand-300);
}

.proposed-view, .shipped-view {
  transition: opacity var(--transition-base);
}
[data-view="proposed"] .shipped-view { display: none; }
[data-view="shipped"] .proposed-view  { display: none; }
[data-view="split"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
[data-view="split"] .proposed-view, [data-view="split"] .shipped-view {
  display: block;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
}
[data-view="split"] .proposed-view::before {
  content: "PROPOSED";
  position: absolute;
  top: -10px; left: var(--space-4);
  background: var(--victory-500);
  color: var(--arena-900);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
[data-view="split"] .shipped-view::before {
  content: "SHIPPED";
  position: absolute;
  top: -10px; left: var(--space-4);
  background: var(--arena-700);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ─────────────── tournament-page specifics ─────────────── */

.tournament-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tournament-accent) 18%, var(--cta-bg)) 0%,
    var(--cta-bg) 100%);
  color: var(--text-on-dark);
  padding: var(--space-12) 0 var(--space-10);
}
.tournament-hero h1 {
  color: var(--text-on-dark);
  font-size: var(--text-5xl);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.tournament-hero .subtitle { color: var(--text-on-dark-muted); margin-top: var(--space-2); }

.match-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.match-card:hover {
  border-color: hsl(220 18% 80%);
  box-shadow: inset 2px 0 0 var(--brand-300);
}
.match-card.live { border-color: var(--live-500); box-shadow: 0 0 0 1px var(--live-500); }
.match-card.live:hover {
  border-color: var(--live-500);
  box-shadow: 0 0 0 1px var(--live-500), inset 2px 0 0 var(--live-500);
}
.match-card .court {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
}
.match-card .teams { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.match-card .team { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2) 0; }
.match-card .team.winner { font-weight: 700; }
.match-card .team .score { font-size: var(--text-xl); color: var(--text-primary); }

/* Action-overlay primitive (PROPOSED) */
.action-overlay {
  position: sticky;
  bottom: var(--space-4);
  display: flex;
  gap: var(--space-2);
  background: color-mix(in srgb, var(--cta-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  margin-top: var(--space-6);
  box-shadow: var(--shadow-lg);
  z-index: 30;
}
.action-overlay .btn { color: var(--text-on-dark); border-color: hsl(220 30% 25%); }

/* ─────────────── utility ─────────────── */

.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }
.tiny  { font-size: var(--text-xs); }
.hidden { display: none; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ─────────────── flow breadcrumb (proto-nav.js) ─────────────── */

.proto-flow-breadcrumb {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 34;
  background: color-mix(in srgb, var(--cta-bg) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(220 30% 22%);
  color: var(--text-on-dark);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.proto-flow-breadcrumb .flow-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.proto-flow-breadcrumb .flow-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.proto-flow-breadcrumb .flow-name {
  font-family: var(--font-display);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proto-flow-breadcrumb .flow-step {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  padding: 2px 8px;
  background: hsl(220 30% 18%);
  border-radius: var(--radius-full);
}

.proto-flow-breadcrumb .flow-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.proto-flow-breadcrumb .flow-nav-btn {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  border-radius: var(--radius-md);
  border: 1px solid hsl(220 30% 22%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.proto-flow-breadcrumb .flow-nav-btn:hover {
  background: hsl(220 30% 18%);
  color: var(--text-on-dark);
}
.proto-flow-breadcrumb .flow-nav-btn.primary {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
}
.proto-flow-breadcrumb .flow-nav-btn.primary:hover {
  background: var(--brand-700);
}
.proto-flow-breadcrumb .flow-nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.proto-flow-breadcrumb .flow-page-name {
  display: inline-block;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Reserve combined top space when flow is active (top bar 56 + breadcrumb ~40) */
body:has(.proto-top-bar):has(.proto-flow-breadcrumb) { padding-top: 96px; }
body:has(.proto-flow-breadcrumb):not(:has(.proto-top-bar)) { padding-top: 40px; }
body:has(.proto-top-bar):has(.proto-flow-breadcrumb) .proto-slice-sidebar { top: 96px; }

/* ─────────────── annotation overlay (proto-annotate.js) ─────────────── */

.anno-fab {
  position: fixed;
  bottom: 90px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--victory-500);
  color: var(--arena-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 45;
  cursor: pointer;
  transition: transform 200ms;
}
.anno-fab:hover { transform: scale(1.05); }
.anno-fab .badge-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--live-500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.anno-mode-active * {
  cursor: crosshair !important;
}
.anno-mode-active .proto-footer-nav,
.anno-mode-active .strategy-panel,
.anno-mode-active .current-state-panel,
.anno-mode-active .chat-window,
.anno-mode-active .chat-fab,
.anno-mode-active .anno-fab,
.anno-mode-active .anno-popover,
.anno-mode-active .anno-marker {
  cursor: default !important;
}

.anno-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--victory-500);
  color: var(--arena-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 38;
  cursor: pointer;
  font-family: var(--font-mono);
}
.anno-marker.resolved {
  background: var(--success-500);
  color: white;
  opacity: 0.65;
}

.anno-popover {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  z-index: 46;
  font-size: var(--text-sm);
}
.anno-popover h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.anno-popover textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--space-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--text-sm);
  resize: vertical;
  margin-bottom: var(--space-3);
  background: var(--surface-1);
}
.anno-popover .anno-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}
.anno-popover .anno-actions button {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
}
.anno-popover .btn-primary {
  background: var(--brand-600);
  color: white;
}
.anno-popover .btn-secondary {
  background: var(--surface-2);
  color: var(--text-secondary);
}
.anno-popover .anno-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.anno-popover .anno-body {
  margin-bottom: var(--space-3);
  white-space: pre-wrap;
  line-height: 1.5;
}

.anno-list-panel {
  position: fixed;
  bottom: 90px;
  left: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 45;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.anno-list-panel.open { display: flex; }
.anno-list-panel .anno-list-header {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.anno-list-panel .anno-list-header h3 {
  font-size: var(--text-base);
  margin: 0;
}
.anno-list-panel .anno-list-body {
  overflow-y: auto;
  padding: var(--space-2);
  flex: 1;
}
.anno-list-panel .anno-list-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.anno-list-panel .anno-item {
  padding: var(--space-3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
}
.anno-list-panel .anno-item:hover {
  background: var(--surface-2);
}
.anno-list-panel .anno-item .anno-item-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  display: flex;
  justify-content: space-between;
}
.anno-list-panel .anno-item .anno-item-body {
  line-height: 1.4;
  color: var(--text-secondary);
}

/* ─────────────── unified top bar (proto-nav.js, on every prototype page) ───────────────
 *
 * Single 56px region: brand + breadcrumb on the left, compare + trace badges +
 * global nav on the right. Replaces the earlier 36px brand bar + 44px slice
 * header stack — same affordances, ~30% less vertical chrome.
 */

.proto-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  background: var(--arena-900);
  color: var(--text-on-dark);
  height: 56px;
  border-bottom: 1px solid hsl(220 30% 16%);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.25);
}

/* Light variant — used on the front door + docs viewer, where the chrome
   should recede (these pages ARE the blueprint product, not mock surfaces
   that need a clear shell/content separation). */
body.proto-shell-light .proto-top-bar {
  background: var(--card);
  color: var(--text-primary);
  border-bottom-color: var(--card-border);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.03);
}
body.proto-shell-light .proto-top-bar .brand-mark { color: var(--text-primary); }
body.proto-shell-light .proto-top-bar .brand-mark-tag { color: var(--text-muted); }
body.proto-shell-light .proto-top-bar .top-bar-crumb a,
body.proto-shell-light .proto-top-bar .top-bar-crumb .slice-label,
body.proto-shell-light .proto-top-bar .top-bar-crumb .page-label {
  color: var(--text-secondary);
}
body.proto-shell-light .proto-top-bar .top-bar-crumb .slice-label { color: var(--text-primary); }
body.proto-shell-light .proto-top-bar .top-bar-crumb a:hover { color: var(--text-primary); }
body.proto-shell-light .proto-top-bar .top-bar-crumb .sep { color: var(--text-muted); opacity: 0.5; }
body.proto-shell-light .proto-top-bar .top-bar-nav { border-left-color: var(--card-border); }
body.proto-shell-light .proto-top-bar .top-bar-nav a { color: var(--text-muted); }
body.proto-shell-light .proto-top-bar .top-bar-nav a:hover,
body.proto-shell-light .proto-top-bar .top-bar-nav a.is-active,
body.proto-shell-light .proto-top-bar .top-bar-nav a.active { color: var(--text-primary); }
body.proto-shell-light .proto-top-bar .chrome-toggle { border-color: var(--card-border); color: var(--text-secondary); }
body.proto-shell-light .proto-top-bar .chrome-toggle:hover { background: var(--surface-2); color: var(--text-primary); }
.proto-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-4);
  gap: var(--space-4);
}
.proto-top-bar .top-bar-lead {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1 1 auto;
}
.proto-top-bar .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
  line-height: 1;
}
.proto-top-bar .brand-mark-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(220 10% 58%);
  font-weight: 500;
}
/* Breadcrumb — hard-pixel sizing (12px) so it lives on the same rhythm
   as the compare toggle + nav links + chips. Was previously fluid text-sm
   which scaled to 16px on wide viewports, making the crumb the *largest*
   element in the bar. */
.proto-top-bar .top-bar-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
}
.proto-top-bar .top-bar-crumb a,
.proto-top-bar .top-bar-crumb .slice-label,
.proto-top-bar .top-bar-crumb .page-label {
  font-size: 12px;
  color: hsl(220 10% 68%);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}
.proto-top-bar .top-bar-crumb a:hover { color: var(--text-on-dark); }
.proto-top-bar .top-bar-crumb .slice-label {
  color: var(--text-on-dark);
  font-weight: 500;
}
.proto-top-bar .top-bar-crumb .page-label {
  color: hsl(220 10% 75%);
}
.proto-top-bar .top-bar-crumb .sep {
  color: hsl(220 10% 32%);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  flex-shrink: 0;
  margin: 0 -1px;
}
.proto-top-bar .top-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.proto-top-bar .top-bar-badges {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.proto-top-bar .top-bar-nav {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid hsl(220 30% 18%);
  height: 20px;
}
.proto-top-bar .top-bar-nav a {
  position: relative;
  color: hsl(220 10% 70%);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 2px 0;
  transition: color var(--transition-fast);
}
.proto-top-bar .top-bar-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.proto-top-bar .top-bar-nav a:hover,
.proto-top-bar .top-bar-nav a.active,
.proto-top-bar .top-bar-nav a.is-active { color: var(--text-on-dark); }
.proto-top-bar .top-bar-nav a:hover::after,
.proto-top-bar .top-bar-nav a.active::after,
.proto-top-bar .top-bar-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.proto-top-bar .top-bar-nav a:focus-visible {
  outline: var(--focus-outline-on-dark);
  outline-offset: 4px;
}
.proto-top-bar .brand-mark { transition: color var(--transition-fast); }
.proto-top-bar .brand-mark:hover .brand-mark-tag { color: hsl(220 10% 78%); }
.proto-top-bar .brand-mark:focus-visible {
  outline: var(--focus-outline-on-dark);
  outline-offset: 4px;
}
.proto-top-bar .top-bar-crumb a { transition: color var(--transition-fast); }
.proto-top-bar .top-bar-crumb a:focus-visible {
  outline: var(--focus-outline-on-dark);
  outline-offset: 2px;
}

/* Reserve space below the top bar */
body:has(.proto-top-bar) { padding-top: 56px; }

/* ─────────────── citation chip + overlay (replaces .badge-trace) ───────────────
 *
 * The chip is intentionally NOT a pill: a 2px vertical brand-rule + mono IDs
 * + a hairline chevron. Reads as a margin annotation, not a status badge.
 * Click expands an overlay anchored below the chip with full citation titles,
 * each row gated by its own colored rule (gold = finding, indigo = rule).
 */

/* Citation chip — sibling of .chrome-toggle. Same height, same hairline
   style, same dot-leader rhythm. Reads as one of two reviewer-affordance
   chips, not a one-off treatment. */
.citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 9px 0 9px;
  background: hsl(220 30% 18%);
  border: 1px solid hsl(220 30% 24%);
  color: hsl(220 10% 78%);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  min-height: 0;
  border-radius: 999px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}
.citation-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-400, var(--brand-500));
  flex-shrink: 0;
}
.citation-chip:hover,
.citation-chip[aria-expanded="true"] {
  background: hsl(220 30% 22%);
  border-color: hsl(220 30% 30%);
  color: var(--text-on-dark);
}
.citation-chip[aria-expanded="true"] {
  border-color: var(--brand-500);
}
.citation-chip .citation-codes { display: inline-flex; align-items: baseline; gap: 4px; }
.citation-chip .citation-sep { color: hsl(220 10% 42%); }
.citation-chip .citation-overflow {
  color: hsl(220 10% 60%);
  font-size: 10px;
  padding-left: 2px;
}
.citation-chip .citation-chevron {
  font-family: var(--font-body);
  font-size: 9px;
  color: hsl(220 10% 60%);
  transition: transform var(--transition-fast);
}
.citation-chip[aria-expanded="true"] .citation-chevron {
  transform: rotate(180deg);
  color: var(--text-on-dark-muted);
}
/* Light-shell variant */
body.proto-shell-light .citation-chip {
  background: var(--surface-2);
  border-color: var(--card-border);
  color: var(--text-secondary);
}
body.proto-shell-light .citation-chip:hover,
body.proto-shell-light .citation-chip[aria-expanded="true"] {
  background: var(--surface-1);
  border-color: var(--text-muted);
  color: var(--text-primary);
}
body.proto-shell-light .citation-chip[aria-expanded="true"] {
  border-color: var(--brand-500);
}
body.proto-shell-light .citation-chip .citation-sep { color: var(--card-border); }
body.proto-shell-light .citation-chip .citation-overflow,
body.proto-shell-light .citation-chip .citation-chevron { color: var(--text-muted); }

.citation-overlay {
  position: fixed;
  top: 56px;
  width: min(420px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--card-border);
  border-top: 2px solid var(--brand-500);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) 0 var(--space-2);
  z-index: 36;
  font-family: var(--font-body);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}
.citation-overlay.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.citation-overlay-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--card-border);
  margin-bottom: var(--space-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.citation-overlay-heading .source-path {
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  color: var(--text-muted);
}
.citation-row {
  display: grid;
  grid-template-columns: 3px 36px 1fr;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
}
.citation-row + .citation-row { padding-top: var(--space-1); }
.citation-row .rule {
  align-self: stretch;
  background: var(--brand-500);
  border-radius: 0;
}
.citation-row.is-finding .rule { background: var(--victory-500); }
.citation-row .short {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  padding-top: 2px;
}
.citation-row .title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}
.citation-row.unknown .title {
  color: var(--text-muted);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .citation-overlay { transition: none; }
  .citation-chip .citation-chevron { transition: none; }
}

/* ─────────────── slice sidebar (proto-nav.js, persistent left rail) ─────────────── */

.proto-slice-sidebar {
  position: fixed;
  top: 56px; /* below unified top bar */
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--surface-1);
  border-right: 1px solid var(--card-border);
  overflow-y: auto;
  padding: var(--space-5) var(--space-2) var(--space-5) var(--space-2);
  z-index: 20;
  display: none;
}
@media (min-width: 1080px) {
  .proto-slice-sidebar { display: block; }
  body.proto-has-sidebar { padding-left: 240px; }
}

/* Section structure — slice header sits up top, page + flow + other groups
 * stack below with breathing space, no card backgrounds or section borders. */
.slice-sidebar-section { margin-bottom: var(--space-6); padding: 0 var(--space-2); }
.slice-sidebar-section:last-child { margin-bottom: 0; }

.slice-sidebar-section h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  letter-spacing: -0.005em;
}

/* Section labels — lowercase mono, faint, no underline-rule. Reads as
 * editorial section markers rather than the UPPERCASE TAILWIND label idiom. */
.slice-sidebar-section h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: hsl(220 10% 55%);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.slice-sidebar-summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}

.slice-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0 calc(-1 * var(--space-2));
  display: grid;
  gap: 1px;
}

/* Each row: subtle hover, NO background fill on active. Active state =
 * 3px brand left-rule + bolder text. Matches the citation-chip + overlay
 * vocabulary — the brand rule means "current/active anchor" throughout. */
.slice-sidebar-list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 7px var(--space-3) 7px calc(var(--space-3) + 5px);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.3;
  text-decoration: none;
  border-radius: 0;
  transition: color var(--transition-fast);
}
.slice-sidebar-list a:hover {
  color: var(--text-primary);
}
.slice-sidebar-list a:hover .row-icon { color: var(--text-secondary); }
.slice-sidebar-list a:focus-visible {
  outline: none;
  color: var(--text-primary);
  box-shadow: inset 2px 0 0 var(--brand-300);
}
.slice-sidebar-list a.active {
  color: var(--text-primary);
  font-weight: 600;
}
.slice-sidebar-list a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--brand-500);
  border-radius: 0;
}
.slice-sidebar-list .page-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Row metadata (phase, flow page count) — flat mono, no pill, no bg.
 * Reads like a footnote on the row, not a status chip. */
.slice-sidebar-list .page-phase,
.slice-sidebar-list .flow-pages {
  font-family: var(--font-mono);
  font-size: 10px;
  color: hsl(220 10% 55%);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
  background: none;
  padding: 0;
  border-radius: 0;
}
.slice-sidebar-list a.active .page-phase {
  color: var(--text-muted);
}

/* Flow rows get a small custom inline-SVG marker (asymmetric: pages don't,
 * which signals "page = primary entity, flow = derived sequence"). */
.slice-sidebar-list .row-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.slice-sidebar-flows a { padding-left: var(--space-3); }
.slice-sidebar-flows .flow-title {
  font-weight: 500;
  color: var(--text-secondary);
}
.slice-sidebar-flows a:hover .flow-title { color: var(--text-primary); }

/* Singleton-slice "other slices" group — soft typographic affordance with
 * a subtle top hairline. Only renders when current slice has ≤1 page. */
.slice-sidebar-other {
  border-top: 1px solid var(--card-border);
  padding-top: var(--space-4);
  margin-top: var(--space-2);
}
.slice-sidebar-other .slice-sidebar-list a {
  color: var(--text-muted);
}
.slice-sidebar-other .slice-sidebar-list a:hover { color: var(--text-primary); }

/* ─────────────── proto footer (version surface, proto-nav.js) ───────────────
 *
 * Static document-flow footer at the bottom of every prototype page (skipped
 * on the portal index). Anchors the prototype in time: product name + version
 * + build date + a lowercase context tag. Mono throughout, display-font only
 * on the product name — the asymmetry escapes the centered "© year · v1.0"
 * SaaS-footer idiom.
 */

.proto-footer {
  margin-top: var(--space-12);
  padding: var(--space-5) var(--space-5);
  border-top: 1px solid var(--card-border);
  background: var(--surface-1);
  color: var(--text-muted);
}
.proto-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.proto-footer-mark {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}
.proto-footer-product {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.proto-footer-version {
  color: var(--text-muted);
}
.proto-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
}
.proto-footer-meta .sep {
  color: hsl(220 10% 75%);
}
.proto-footer-context {
  text-transform: lowercase;
  color: hsl(220 10% 55%);
}

@media (max-width: 640px) {
  .proto-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* Chrome suppression — page-level production chrome (marketing / authenticated
   headers on landing, create-tournament, leagues, partner) is suppressed by
   default in blueprint mode so the unified shell isn't doubled up. Reviewers
   toggle "show production chrome" in the top bar to restore it for fidelity
   review. See docs/chrome-system.md. */
[data-page-chrome] {
  display: none !important;
}
body.show-production-chrome [data-page-chrome] {
  display: block !important;
}

/* Chrome-preview toggle — sibling of .citation-chip. Same 24px height,
   same hairline + radius, same dot-leader position. The pair reads as one
   visual family on the right side of the bar. */
.proto-top-bar .chrome-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid hsl(220 30% 22%);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  line-height: 1;
  color: hsl(220 10% 70%);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.proto-top-bar .chrome-toggle:hover {
  background: hsl(220 30% 16%);
  border-color: hsl(220 30% 30%);
  color: var(--text-on-dark);
}
body.show-production-chrome .proto-top-bar .chrome-toggle {
  background: color-mix(in srgb, var(--brand-500) 18%, hsl(220 30% 16%));
  color: var(--text-on-dark);
  border-color: var(--brand-500);
}
.proto-top-bar .chrome-toggle .toggle-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
}
body.show-production-chrome .proto-top-bar .chrome-toggle .toggle-dot {
  opacity: 1;
  background: var(--brand-400, var(--brand-500));
}

/* Strategy-panel systems block (lifecycle phase + chrome mode) — surfaced
   per docs/tournament-lifecycle.md + docs/chrome-system.md. */
.strategy-panel .panel-systems {
  background: var(--surface-1);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: var(--text-sm);
}
.strategy-panel .panel-systems strong {
  color: var(--text-primary);
  font-weight: 600;
}
.strategy-panel .panel-systems-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--card-border);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.strategy-panel .panel-systems-link:hover {
  text-decoration-color: var(--brand-500);
}

/* Tournament lifecycle strip — injected by proto-nav.js after the top bar
   on tournament-state pages. Suppressed for cross-phase pages (marketing,
   billing, partner, channel-partners). See docs/tournament-lifecycle.md. */
.proto-lifecycle-strip {
  background: var(--surface-1);
  border-bottom: 1px solid var(--card-border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.proto-lifecycle-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow-x: auto;
}
.proto-lifecycle-inner .lifecycle-leader {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: var(--space-3);
  white-space: nowrap;
}
.proto-lifecycle-strip .lifecycle-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  white-space: nowrap;
}
.proto-lifecycle-strip .lifecycle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}
.proto-lifecycle-strip .lifecycle-cell.is-adapt {
  color: var(--text-secondary);
}
.proto-lifecycle-strip .lifecycle-cell.is-adapt .lifecycle-dot {
  opacity: 0.6;
  background: var(--brand-300);
}
.proto-lifecycle-strip .lifecycle-cell.is-current {
  color: var(--brand-700);
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
  font-weight: 600;
}
.proto-lifecycle-strip .lifecycle-cell.is-current .lifecycle-dot {
  opacity: 1;
  background: var(--brand-600);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent);
}
.proto-lifecycle-strip .lifecycle-sep {
  color: hsl(220 10% 75%);
  margin: 0 2px;
}

/* Inline SVG icon convention — used for in-content marks that replaced emoji.
   Pages embed <svg class="icon-svg">…</svg> directly; this class handles sizing
   and baseline alignment so they sit in text and buttons consistently. */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-svg.filled { fill: currentColor; stroke: none; }
.icon-svg.lg { width: 1.5em; height: 1.5em; }
.icon-svg.xl { width: 2.25em; height: 2.25em; }


/* ============================================================
 * v3 studio surface — Family aesthetic (Bebas Neue + saturated + bento + photos)
 * Source: brand-kit.json forked from letspepper preset
 *   + composition reference: v2 src/routes/+page.svelte (existing live site)
 *   + IA constraints: blueprint/research/02.5-jobs-to-be-done.md
 * Scope: .v3 wrapper only
 * ============================================================ */

.v3 {
	/* Family aesthetic tokens (from brand-kit.json — forked from letspepper) */
	--v3-bg: #0a0a0a;
	--v3-card: #171717;
	--v3-card-2: #1f1f1f;
	--v3-fg: #fafafa;
	--v3-fg-muted: #a3a3a3;
	--v3-fg-dim: #737373;
	--v3-border: #262626;
	--v3-yellow: #f5b91a;       /* Pepper Yellow — primary */
	--v3-green: #5a9a4e;        /* Pepper Green — secondary */
	--v3-red: #d94c35;          /* Hot Red — accent / heat */

	--v3-font-display: 'Bebas Neue', Impact, sans-serif;
	--v3-font-body: 'Inter', system-ui, sans-serif;
	--v3-font-mono: 'JetBrains Mono', 'Space Mono', Menlo, monospace;

	background: var(--v3-bg);
	color: var(--v3-fg);
	font-family: var(--v3-font-body);
	min-height: 100vh;
	margin: 0;
	padding: 0;
}

.v3 *, .v3 *::before, .v3 *::after { box-sizing: border-box; }

.v3 a { color: inherit; text-decoration: none; }

/* Grid-lines overlay — carry from v2 (signature texture) */
.v3-grid-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(245, 185, 26, 0.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(245, 185, 26, 0.08) 1px, transparent 1px);
	background-size: 80px 80px;
	z-index: 1;
}

/* ===== Header ===== */
.v3-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(10, 10, 10, 0.9);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--v3-border);
}
.v3-header-inner {
	max-width: 1280px; margin: 0 auto;
	padding: 14px 24px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; flex-wrap: wrap;
}
.v3-wordmark {
	font-family: var(--v3-font-display);
	font-size: 24px; letter-spacing: 0.02em;
	color: var(--v3-fg);
	display: inline-flex; align-items: center; gap: 12px;
}
.v3-wordmark-avatar {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--v3-fg);
	border: 1px solid var(--v3-border);
	display: block;
}
.v3-wordmark-text {
	display: inline-flex; align-items: baseline; gap: 8px;
}
.v3-wordmark-mark { color: var(--v3-yellow); }
.v3-wordmark-tag {
	font-family: var(--v3-font-mono);
	font-size: 10px; letter-spacing: 0.15em;
	color: var(--v3-fg-dim);
	text-transform: uppercase;
	padding-left: 8px;
	border-left: 1px solid var(--v3-border);
}
.v3-nav {
	display: flex; gap: 20px; align-items: center;
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.1em;
	text-transform: uppercase;
}
.v3-nav a {
	color: var(--v3-fg-muted);
	transition: color 150ms;
}
.v3-nav a:hover { color: var(--v3-yellow); }
.v3-header-cta {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.1em;
	text-transform: uppercase; font-weight: 700;
	background: var(--v3-yellow); color: #000 !important;
	padding: 10px 16px;
	transition: background 150ms;
}
.v3-header-cta:hover { background: var(--v3-fg); }

/* ===== Hero (full-bleed with photo + grain — v2 carry) ===== */
.v3-hero {
	position: relative;
	min-height: 92vh;
	display: flex; flex-direction: column; justify-content: flex-end;
	padding: 48px 24px;
	overflow: hidden;
}
@media (min-width: 1024px) { .v3-hero { padding: 48px 48px; } }
.v3-hero-bg {
	position: absolute; inset: 0; z-index: 0;
}
.v3-hero-bg img {
	width: 100%; height: 100%; object-fit: cover;
	opacity: 0.4; mix-blend-mode: luminosity;
}
.v3-hero-bg::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(to top, var(--v3-bg), rgba(10,10,10,0.8) 50%, rgba(10,10,10,0.6));
}
.v3-hero-content {
	position: relative; z-index: 10;
	max-width: 1280px; margin: 0 auto; width: 100%;
	display: grid; gap: 32px;
}
@media (min-width: 768px) {
	.v3-hero-content { grid-template-columns: auto 1fr; align-items: end; }
}
.v3-hero-portrait {
	width: 140px; height: 140px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--v3-yellow);
	box-shadow: 0 0 0 8px rgba(245, 185, 26, 0.12);
	justify-self: start;
	display: block;
}
@media (min-width: 768px) {
	.v3-hero-portrait { width: 180px; height: 180px; }
}
.v3-hero-text { min-width: 0; }
.v3-hero-eyebrow {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
	color: var(--v3-yellow);
	margin-bottom: 16px;
}
.v3-hero-headline {
	font-family: var(--v3-font-display);
	font-size: clamp(3rem, 11vw, 9rem);
	font-weight: 400;
	line-height: 0.88;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0 0 32px;
	color: var(--v3-fg);
}
.v3-hero-headline .v3-line-2 { color: var(--v3-yellow); display: block; }
.v3-hero-sub {
	max-width: 32rem; margin-left: auto;
	text-align: right;
	color: var(--v3-fg-muted);
	font-size: 17px; line-height: 1.55;
	margin-bottom: 24px;
}
.v3-hero-sub a {
	color: var(--v3-fg);
	border-bottom: 1px solid var(--v3-border);
}
.v3-hero-sub a:hover { border-bottom-color: var(--v3-yellow); color: var(--v3-yellow); }
.v3-hero-ctas {
	display: flex; gap: 16px; justify-content: flex-end; flex-wrap: wrap;
}
.v3-cta-primary, .v3-cta-secondary {
	font-family: var(--v3-font-mono);
	font-size: 12px; letter-spacing: 0.1em;
	font-weight: 700; text-transform: uppercase;
	padding: 14px 22px;
	transition: all 150ms;
}
.v3-cta-primary {
	background: var(--v3-yellow); color: #000;
}
.v3-cta-primary:hover { background: var(--v3-fg); }
.v3-cta-secondary {
	background: rgba(0,0,0,0.2); color: var(--v3-fg);
	border: 1px solid rgba(255,255,255,0.3);
	backdrop-filter: blur(4px);
}
.v3-cta-secondary:hover { border-color: var(--v3-yellow); color: var(--v3-yellow); }
.v3-hero-scroll {
	position: absolute; bottom: 24px; left: 24px;
	display: flex; align-items: center; gap: 12px; z-index: 10;
}
@media (min-width: 1024px) { .v3-hero-scroll { left: 48px; } }
.v3-hero-scroll-line {
	width: 1px; height: 56px;
	background: linear-gradient(to bottom, var(--v3-yellow), transparent);
}
.v3-hero-scroll-text {
	font-family: var(--v3-font-mono);
	font-size: 10px; letter-spacing: 0.2em;
	color: var(--v3-fg-dim);
	text-transform: uppercase;
	transform: rotate(-90deg) translateY(24px);
	transform-origin: left center;
}

/* ===== Section header pattern ===== */
.v3-section {
	padding: 96px 24px;
	border-top: 1px solid var(--v3-border);
	position: relative;
}
@media (min-width: 1024px) { .v3-section { padding: 96px 48px; } }
.v3-section-inner { max-width: 1280px; margin: 0 auto; }
.v3-section-header {
	display: grid; gap: 32px;
	margin-bottom: 64px;
}
@media (min-width: 1024px) {
	.v3-section-header { grid-template-columns: 1fr 1fr; align-items: end; }
}
.v3-section-eyebrow {
	font-family: var(--v3-font-mono);
	font-size: 12px; letter-spacing: 0.2em;
	color: var(--v3-yellow);
	text-transform: uppercase;
	margin-bottom: 16px;
}
.v3-section-title {
	font-family: var(--v3-font-display);
	font-size: clamp(2.5rem, 6vw, 5rem);
	font-weight: 400; line-height: 0.95;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0;
}
.v3-section-sub {
	color: var(--v3-fg-muted);
	font-size: 17px; line-height: 1.55;
	max-width: 28rem;
}
@media (min-width: 1024px) { .v3-section-sub { margin-left: auto; text-align: left; } }

/* ===== Bento grid (carry pattern from v2) ===== */
.v3-bento {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
@media (min-width: 768px)  { .v3-bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .v3-bento { grid-template-columns: repeat(3, 1fr); } }
.v3-bento-card {
	background: var(--v3-card);
	border: 1px solid var(--v3-border);
	padding: 28px;
	min-height: 280px;
	display: flex; flex-direction: column; justify-content: space-between;
	position: relative; overflow: hidden;
	transition: border-color 200ms, transform 200ms;
	cursor: pointer;
}
.v3-bento-card:hover {
	border-color: var(--v3-yellow);
	transform: translateY(-2px);
}
.v3-bento-card.is-large { grid-column: span 1; grid-row: span 2; min-height: 572px; }
@media (min-width: 1024px) { .v3-bento-card.is-large { grid-column: span 2; } }
.v3-bento-card.is-wide { grid-column: span 1; }
@media (min-width: 1024px) { .v3-bento-card.is-wide { grid-column: span 2; } }
.v3-bento-status {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--v3-font-mono);
	font-size: 10px; letter-spacing: 0.15em;
	color: var(--v3-yellow);
	text-transform: uppercase;
	margin-bottom: 12px;
}
.v3-bento-status::before {
	content: '';
	display: inline-block; width: 6px; height: 6px;
	border-radius: 50%; background: var(--v3-yellow);
}
.v3-bento-status.is-shipping::before { background: var(--v3-green); }
.v3-bento-status.is-shipping { color: var(--v3-green); }
.v3-bento-status.is-flight::before { background: var(--v3-yellow); }
.v3-bento-status.is-client::before { background: var(--v3-red); }
.v3-bento-status.is-client { color: var(--v3-red); }
.v3-bento-name {
	font-family: var(--v3-font-display);
	font-size: 32px; letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1; margin: 0 0 12px;
	color: var(--v3-fg);
}
.v3-bento-card.is-large .v3-bento-name { font-size: 56px; }
.v3-bento-desc {
	font-size: 14px; line-height: 1.55;
	color: var(--v3-fg-muted);
	flex-grow: 1;
	margin: 0 0 16px;
}
.v3-bento-url {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.05em;
	color: var(--v3-yellow);
	margin-top: auto;
}
.v3-bento-card.is-photo {
	padding: 0; min-height: 280px;
	background-size: cover; background-position: center;
}
.v3-bento-card.is-photo .v3-bento-photo-overlay {
	display: flex; flex-direction: column; justify-content: flex-end;
	padding: 28px; height: 100%; width: 100%;
	background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}

/* ===== Receipt-list compact (supporting items below bento) ===== */
.v3-receipts {
	margin-top: 64px;
}
.v3-receipt-row {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
	gap: 16px 32px;
	padding: 18px 0;
	border-bottom: 1px solid var(--v3-border);
	align-items: baseline;
}
.v3-receipt-row:hover .v3-receipt-name { color: var(--v3-yellow); }
.v3-receipt-name {
	font-family: var(--v3-font-display);
	font-size: 22px;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	transition: color 150ms;
}
.v3-receipt-desc {
	font-size: 14px; line-height: 1.5;
	color: var(--v3-fg-muted);
}
.v3-receipt-url {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.05em;
	color: var(--v3-yellow);
	white-space: nowrap;
}
@media (max-width: 720px) {
	.v3-receipt-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ===== Writing list ===== */
.v3-post-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--v3-border);
	align-items: baseline;
}
.v3-post-title {
	font-family: var(--v3-font-display);
	font-size: 24px;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: var(--v3-fg);
	transition: color 150ms;
}
.v3-post-title:hover { color: var(--v3-yellow); }
.v3-post-date {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--v3-fg-dim);
}

/* ===== Topics ===== */
.v3-topics-grid {
	display: grid; gap: 24px;
}
@media (min-width: 768px) { .v3-topics-grid { grid-template-columns: 1fr 1fr; } }
.v3-topic-card {
	border-left: 2px solid var(--v3-yellow);
	padding: 12px 24px;
}
.v3-topic-name {
	font-family: var(--v3-font-display);
	font-size: 26px;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: var(--v3-fg);
	display: block; margin-bottom: 4px;
}
.v3-topic-name:hover { color: var(--v3-yellow); }
.v3-topic-count {
	font-family: var(--v3-font-mono);
	font-size: 10px; letter-spacing: 0.1em;
	color: var(--v3-fg-dim);
	text-transform: uppercase;
	margin-left: 12px;
}
.v3-topic-desc {
	color: var(--v3-fg-muted);
	font-size: 15px; line-height: 1.5;
	margin: 6px 0 0;
}

/* ===== Footer ===== */
.v3-footer {
	border-top: 1px solid var(--v3-border);
	padding: 64px 24px 32px;
	background: #050505;
}
@media (min-width: 1024px) { .v3-footer { padding-left: 48px; padding-right: 48px; } }
.v3-footer-inner {
	max-width: 1280px; margin: 0 auto;
	display: grid; gap: 32px;
}
@media (min-width: 768px)  { .v3-footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .v3-footer-inner { grid-template-columns: repeat(4, 1fr); } }
.v3-footer h4 {
	font-family: var(--v3-font-mono);
	font-size: 11px; letter-spacing: 0.15em;
	color: var(--v3-yellow);
	text-transform: uppercase;
	margin: 0 0 16px;
}
.v3-footer ul { list-style: none; margin: 0; padding: 0; }
.v3-footer li {
	margin-bottom: 8px;
	font-size: 14px;
	color: var(--v3-fg-muted);
}
.v3-footer li a:hover { color: var(--v3-yellow); }
.v3-footer-meta {
	max-width: 1280px; margin: 32px auto 0;
	padding-top: 24px;
	border-top: 1px solid var(--v3-border);
	font-family: var(--v3-font-mono);
	font-size: 10px; letter-spacing: 0.15em;
	color: var(--v3-fg-dim);
	text-transform: uppercase;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
