/* ============================================================
   DASHCORE MARKETING OS
   On the dashcore style (design-kit, loaded by @vite before this file).
   The names below are this sheet's own, kept so its 500 uses stay put;
   each one is a role of the style, which also flips light and dark.
   ============================================================ */

:root {
  --navy-deep:   var(--ds-page);      /* page base + deep recesses (inputs, code, tracks) */
  --navy:        var(--ds-surface);   /* raised cards */
  --navy-2:      var(--ds-sunken);    /* hovers, chips, badges, secondary fills */
  --navy-3:      color-mix(in srgb, var(--ds-sunken) 60%, var(--ds-border)); /* glyph tiles, counts, kbd */
  --navy-line:   var(--ds-border);

  --blue:        var(--ds-accent);
  --blue-bright: var(--ds-accent-hover);
  --blue-glow:   var(--ds-accent);
  --blue-soft:   var(--ds-accent-soft);
  --blue-ring:   color-mix(in srgb, var(--ds-accent) 40%, transparent);

  /* Colour means status. Violet marked a kind of content, which is info. */
  --violet:      var(--ds-info);
  --green:       var(--ds-success);
  --amber:       var(--ds-warning);
  --red:         var(--ds-danger);

  --white:       #ffffff;
  --text:        var(--ds-text);
  --text-soft:   var(--ds-text);
  --muted:       var(--ds-text-muted);
  --subtle:      var(--ds-text-muted);

  --heading:     var(--ds-text-strong);
  --on-accent:   var(--ds-on-accent);

  --r-xs: var(--radius-sm);
  --r-sm: var(--radius-md);
  --r:    var(--radius-lg);
  --r-lg: var(--radius-xl);
  --r-xl: var(--radius-2xl);
  --pill: var(--radius-md);  /* the style is square-cornered; a dot is 50% */

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.16);
  --glow-blue: none;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur:      320ms;

  /* The style's faces: the body face for everything, numbers included, and
     the second face for the page title only. */
  --sans: var(--font-sans);
  --mono: var(--font-mono);
  --display: var(--font-sans);
  --serif: var(--font-sans);

  --sidebar-w: 244px;
  --max-w: 1240px;
}

* , *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { accent-color: var(--ds-accent); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ds-page);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--blue-ring); color: var(--on-accent); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--navy-3); border-radius: 999px; border: 2px solid var(--navy-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--navy-line); }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--ds-sidebar);
  border-right: 1px solid var(--navy-line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 14px;
}
.brand .wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.1px;
  color: var(--heading);
}
.brand .wordmark b { color: var(--blue); font-weight: 700; }
.brand .tag {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--subtle);
  margin-top: 2px;
}

.nav-group-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 11px 10px 4px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
}
.nav-link:hover { background: var(--navy-2); color: var(--heading); }
.nav-link.active {
  background: linear-gradient(90deg, var(--blue-soft), transparent);
  color: var(--heading);
  box-shadow: inset 2px 0 0 var(--blue);
}
.nav-link .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--navy-3);
  padding: 1px 7px;
  border-radius: var(--pill);
}

.sidebar-foot { margin-top: auto; padding: 11px 8px 2px; border-top: 1px solid var(--navy-line); }
.sidebar-foot .who { font-size: 12px; color: var(--muted); }
.sidebar-foot .who b { color: var(--text); font-weight: 600; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(16px, 2.4vw, 28px);
  background: color-mix(in srgb, var(--ds-page) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--navy-line);
}
.topbar .crumb { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.topbar .spacer { flex: 1; }

/* Mobile nav toggle + scrim — hidden on desktop, activated in the responsive block */
.nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: none; color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; margin-right: 2px; }
.nav-scrim { display: none; }

.content { padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2.4vw, 28px); max-width: var(--max-w); }
.content.wide { max-width: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.page-head { margin-bottom: 18px; }
.page-head h1 {
  font-family: var(--font-second);
  font-weight: 600;
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: -0.1px;
  color: var(--heading);
  line-height: 1.08;
}
.page-head p { color: var(--text-soft); margin-top: 6px; max-width: 68ch; font-size: 13px; }
.page-head .serif { font-family: var(--serif); font-style: italic; color: var(--blue-bright); }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 7px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--blue); display: inline-block; }

h2.section { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.15px; color: var(--heading); margin: 4px 0; }

/* The hidden attribute must actually hide things. Any author `display` rule
   beats the UA stylesheet's [hidden] { display: none }, so an element given a
   display value — every .btn, for one — stays visible when marked hidden. This
   had been patched per-element in a few places; one rule covers all of them and
   the next one nobody remembers to patch. */
[hidden] { display: none !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  padding: 8px 15px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* A disabled button had no styling at all, so it looked identical to a live
   one — full opacity, pointer cursor, hover glow and the press animation.
   Anything the app disables must read as disabled. */
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
/* The Connect Instagram wizard is the one place with real prose links in it.
   Everywhere else this app styles links per-component, so a bare <a> inherits
   the body colour and vanishes — fine in a nav, a dead end in a wizard whose
   whole job is sending you to three external sites. Scoped, not global. */
.wiz-prose a:not(.btn) { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 2px; }
.wiz-prose a:not(.btn):hover { color: var(--blue); }
.btn:disabled:hover { background: inherit; box-shadow: none; }
.btn:disabled:active { transform: none; }
.btn-primary { background: var(--blue); color: var(--on-accent); box-shadow: var(--glow-blue); }
.btn-primary:hover { background: var(--blue-bright); box-shadow: none; }
.btn-ghost { background: var(--navy-2); color: var(--text); border-color: var(--navy-line); }
.btn-ghost:hover { background: var(--navy-3); color: var(--heading); }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ============================================================
   CARDS + SURFACES
   ============================================================ */
.card {
  background: var(--ds-surface);
  border: 1px solid var(--navy-line);
  border-radius: var(--r);
  padding: 14px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card.hover:hover { transform: translateY(-3px); border-color: var(--blue-ring); box-shadow: var(--shadow-md); }
.card.glow { box-shadow: var(--glow-blue); border-color: var(--blue-ring); }

.grid { display: grid; gap: 10px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
/* Content Library grid-size toggle (S / M / L). */
.grid.auto.size-s { grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); }
.grid.auto.size-m { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.auto.size-l { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
/* Small grid: shrink the card chrome so titles/badges/excerpts stay legible in
   a narrow column instead of wrapping into a cramped mess. */
.grid.auto.size-s .card { padding: 11px; }
.grid.auto.size-s .asset-media { margin: -11px -11px 2px; }
.grid.auto.size-s .asset-card { gap: 6px; }
.grid.auto.size-s .asset-card h3 { font-size: 12.5px; }
.grid.auto.size-s .asset-card .excerpt { -webkit-line-clamp: 2; font-size: 11.5px; }

/* ---------- Content Library multi-select ---------- */
.asset-cell { position: relative; }
.asset-check {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--ds-surface) 85%, transparent); border: 1px solid var(--navy-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity .12s ease;
}
.asset-cell:hover .asset-check { opacity: 1; }
.asset-cell.selected .asset-check { opacity: 1; border-color: var(--blue); }
.asset-check input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--blue); }
.asset-cell.selected .card { outline: 2px solid var(--blue); outline-offset: 2px; }

.bulk-bar {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--navy-2); border: 1px solid var(--blue-ring);
  border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}
.bulk-bar[hidden] { display: none; }
.btn-danger { background: var(--ds-danger-fill); color: var(--on-accent); border-color: transparent; }
.btn-danger:hover { background: var(--ds-danger-fill); }
/* Chips rendered as <button> (e.g. the size toggle) need the body font + pointer. */
button.chip { font-family: inherit; cursor: pointer; line-height: 1; }
button.size-btn { min-width: 30px; text-align: center; }

/* ---------- Stat tiles ---------- */
.stat {
  background: var(--ds-surface);
  border: 1px solid var(--navy-line);
  border-radius: var(--r);
  padding: 13px 15px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-soft), transparent 70%);
}
.stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--heading); line-height: 1; margin-top: 7px; letter-spacing: -0.15px; }
.stat .sub { font-size: 11.5px; color: var(--text-soft); margin-top: 6px; }
.stat .sub b { color: var(--blue-bright); }

/* ============================================================
   BADGES / PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--pill);
  border: 1px solid var(--navy-line);
  color: var(--text-soft);
  background: var(--navy-2);
  white-space: nowrap; flex-shrink: 0;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.badge.blue   { color: var(--blue-bright); border-color: var(--blue-ring); background: var(--blue-soft); }
.badge.blue .dot { background: var(--blue); }
.badge.violet { color: var(--ds-info); border-color: color-mix(in srgb, var(--ds-info) 40%, transparent); background: var(--ds-info-soft); }
.badge.violet .dot { background: var(--violet); }
.badge.green  { color: var(--ds-success); border-color: color-mix(in srgb, var(--ds-success) 40%, transparent); background: var(--ds-success-soft); }
.badge.green .dot { background: var(--green); }
.badge.amber  { color: var(--ds-warning); border-color: color-mix(in srgb, var(--ds-warning) 40%, transparent); background: var(--ds-warning-soft); }
.badge.amber .dot { background: var(--amber); }
.badge.red    { color: var(--ds-danger); border-color: color-mix(in srgb, var(--ds-danger) 40%, transparent); background: var(--ds-danger-soft); }
.badge.red .dot { background: var(--red); }

/* status dots */
.status-idea .dot { background: var(--subtle); }
.status-draft .dot { background: var(--amber); }
.status-ready .dot { background: var(--blue); }
.status-scheduled .dot { background: var(--violet); }
.status-published .dot { background: var(--green); }
.status-generating .dot { background: var(--blue-bright); animation: pulse 1s ease-in-out infinite; }
.status-failed .dot { background: var(--red); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--navy-line); border-top-color: var(--blue); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.gen-track { width: 100%; max-width: 420px; height: 10px; background: var(--navy-3); border-radius: 999px; overflow: hidden; }
.gen-bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); transition: width 0.6s var(--ease); position: relative; }
.gen-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.gen-stat { font-family: var(--mono); font-size: 12px; color: var(--text-soft); }
.gen-stat b { color: var(--heading); }

/* ============================================================
   CONTENT / ASSET CARDS
   ============================================================ */
.asset-card { display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
/* Media bleeds to the card edge; the negative margin tracks the card padding
   (14px default, 11px in the small grid — see size-s overrides below). */
.asset-media { margin: -14px -14px 2px; }
.asset-card .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asset-card .glyph {
  width: 24px; height: 24px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--r-xs);
  background: var(--navy-3); color: var(--blue-bright);
  font-size: 12px;
}
.asset-card h3 { font-size: 13.5px; font-weight: 600; color: var(--heading); line-height: 1.28; letter-spacing: -0.1px; }
.asset-card .excerpt { font-size: 12px; color: var(--text-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.asset-card .foot { display: flex; align-items: center; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.asset-card .foot time { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-left: auto; }

/* ---------- tweet / social preview ---------- */
.tweet-preview {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--navy-line);
  background: var(--navy);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tweet-preview:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tweet-preview img { width: 100%; height: auto; }

/* ============================================================
   TABLE / LIST
   ============================================================ */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--navy-line);
  border-bottom: none;
  background: var(--ds-surface);
  transition: background var(--dur-fast) var(--ease);
}
.list-row:first-child { border-radius: var(--r) var(--r) 0 0; }
.list-row:last-child { border-bottom: 1px solid var(--navy-line); border-radius: 0 0 var(--r) var(--r); }
.list-row:hover { background: var(--navy-2); }
.list-row .glyph {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: var(--r-xs); background: var(--navy-3); color: var(--blue-bright); font-size: 13px;
}
.list-row .title { font-weight: 600; color: var(--heading); font-size: 13px; }
.list-row .meta { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.list-row .push { margin-left: auto; }

/* ============================================================
   FILTER BAR / CHIPS
   ============================================================ */
.filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  font-size: 12.5px; font-weight: 500;
  padding: 5px 12px; border-radius: var(--pill);
  border: 1px solid var(--navy-line); background: var(--navy-2); color: var(--text-soft);
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--heading); border-color: var(--blue-ring); }
.chip.active { background: var(--blue); color: var(--on-accent); border-color: var(--blue); box-shadow: var(--glow-blue); }

/* ============================================================
   BRAND KIT
   ============================================================ */
.swatch { border-radius: var(--r); overflow: hidden; border: 1px solid var(--navy-line); }
.swatch .fill { height: 84px; }
.swatch .info { padding: 10px 12px; background: var(--navy-2); }
.swatch .info .name { font-size: 13px; font-weight: 600; color: var(--heading); }
.swatch .info .hex { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }

.type-spec { padding: 18px 20px; border: 1px solid var(--navy-line); border-radius: var(--r); background: var(--ds-surface); }
.type-spec .label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

/* ============================================================
   PROSE (asset detail body)
   ============================================================ */
.prose { font-size: 14px; line-height: 1.7; color: var(--text-soft); }
.prose h1, .prose h2, .prose h3 { font-family: var(--display); color: var(--heading); letter-spacing: -0.15px; margin: 26px 0 10px; }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 16px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0 12px 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose em { font-family: var(--serif); font-style: italic; color: var(--blue-bright); font-size: 1.05em; }
.prose hr { border: none; border-top: 1px solid var(--navy-line); margin: 24px 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--navy-3); padding: 2px 6px; border-radius: 5px; color: var(--blue-bright); }
.prose blockquote { border-left: 2px solid var(--blue); padding-left: 16px; color: var(--text); font-family: var(--serif); font-size: 1.15em; font-style: italic; margin: 18px 0; }

/* copyable code block */
.codeblock {
  position: relative;
  background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--r);
  padding: 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--text-soft);
  white-space: pre-wrap; word-break: break-word;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-xs);
  background: var(--navy-2); border: 1px solid var(--navy-line); color: var(--muted); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.copy-btn:hover { color: var(--heading); border-color: var(--blue-ring); }
.copy-btn.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }

/* ============================================================
   CALENDAR
   ============================================================ */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal .dow { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--subtle); text-align: center; padding-bottom: 4px; }
.cal .day {
  min-height: 96px; border: 1px solid var(--navy-line); border-radius: var(--r-sm);
  background: var(--ds-surface); padding: 8px; display: flex; flex-direction: column; gap: 5px;
}
.cal .day .n { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.cal .day.empty { background: transparent; border-color: transparent; }
.cal .pin {
  font-size: 10.5px; line-height: 1.3; padding: 4px 6px; border-radius: 5px;
  background: var(--blue-soft); color: var(--blue-bright); border-left: 2px solid var(--blue);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cal .pin.violet { background: var(--ds-info-soft); color: var(--ds-info); border-color: var(--ds-info); }
.cal .pin.amber { background: var(--ds-warning-soft); color: var(--ds-warning); border-color: var(--ds-warning); }
.cal .pin.green { background: var(--ds-success-soft); color: var(--ds-success); border-color: var(--ds-success); }

/* ============================================================
   HERO (dashboard)
   ============================================================ */
.hero {
  border: 1px solid var(--blue-ring);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.6vw, 28px);
  background: var(--ds-surface);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero h1 { font-family: var(--font-second); font-weight: 600; font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -0.1px; color: var(--heading); line-height: 1.06; }
.hero h1 .serif { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--blue-bright); }
.hero p { color: var(--text-soft); margin-top: 10px; max-width: 60ch; font-size: 14px; }
.hero .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ============================================================
   MISC
   ============================================================ */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--navy-line); }
.subnav a { padding: 6px 11px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-soft); text-decoration: none; white-space: nowrap; }
.subnav a:hover { background: var(--navy-2); color: var(--heading); }
.subnav a.active { background: var(--navy-2); color: var(--heading); box-shadow: inset 0 0 0 1px var(--navy-line); }
.divider { height: 1px; background: var(--navy-line); margin: 28px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 40px; opacity: 0.5; margin-bottom: 12px; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--navy-3); border: 1px solid var(--navy-line); color: var(--text-soft); }

.section-head { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--heading); letter-spacing: -0.15px; }
.section-head .push { margin-left: auto; }
.section-head .line { flex: 1; height: 1px; background: var(--navy-line); }

/* fade-in */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise var(--dur) var(--ease) both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: min(84vw, 300px); height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
  }
  .shell.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none;
    transition: opacity 0.28s var(--ease);
  }
  .shell.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .cal { grid-template-columns: repeat(2, 1fr); }
  .cal .dow { display: none; }
  .week-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   GROWTH GUIDE (home)
   ============================================================ */
.guide-head { margin-bottom: 14px; }
.guide-head h1 {
  font-family: var(--font-second); font-weight: 600; font-size: clamp(18px, 1.9vw, 22px);
  letter-spacing: -0.1px; color: var(--heading); line-height: 1.1; margin-top: 4px;
}
.guide-head p { color: var(--text-soft); margin-top: 6px; max-width: 62ch; font-size: 12.5px; line-height: 1.5; }

/* Primary row: today's action (wide) + goal progress (narrow) */
.home-primary { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; align-items: start; }
.goals-col { display: flex; flex-direction: column; gap: 12px; }
.goals-col .goal-card { flex: 1; }
@media (max-width: 900px) { .home-primary { grid-template-columns: 1fr; } }

/* Posting streak */
.streak-chip {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.3px;
  color: var(--muted); padding: 3px 9px; border: 1px solid var(--navy-line); border-radius: var(--pill);
}
.streak-chip.live { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--ds-warning-soft); }
.posted-done { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--green); }

/* Today's focus — the primary action card */
.today-card {
  background: linear-gradient(160deg, var(--navy-2), var(--navy));
  border: 1px solid var(--blue-ring); border-radius: var(--r);
  padding: clamp(14px, 1.8vw, 18px); box-shadow: var(--glow-blue);
}
.today-top { display: flex; align-items: center; gap: 10px; }
.today-goal { font-family: var(--mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.today-role {
  font-family: var(--display); font-weight: 700; font-size: clamp(15px, 1.7vw, 17px);
  letter-spacing: -0.1px; color: var(--heading); margin: 8px 0 0; line-height: 1.12;
}
.today-prompt { color: var(--text-soft); font-size: 13px; line-height: 1.55; margin-top: 6px; max-width: 66ch; }
.keystone {
  display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 8px 11px;
  background: var(--blue-soft); border: 1px solid var(--blue-ring); border-radius: var(--r-sm);
  color: var(--text); font-size: 12px; font-weight: 500;
}
.keystone-ic { color: var(--blue-bright); font-size: 11px; }
.today-card .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* Goal progress cards */
.goal-card { background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r); padding: 14px; }
.goal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.goal-label { font-weight: 700; color: var(--heading); font-size: 14px; }
.goal-handle { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 7px; font-weight: 400; }
.goal-phase { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; }
.goal-phase b { color: var(--blue-bright); }
.goal-count { text-align: right; white-space: nowrap; }
.goal-current { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--heading); letter-spacing: -0.1px; }
.goal-target { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.progress { height: 7px; background: var(--navy-deep); border-radius: var(--pill); overflow: hidden; margin: 10px 0 8px; border: 1px solid var(--navy-line); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-glow), var(--blue-bright)); border-radius: var(--pill); transition: width var(--dur) var(--ease); }
.goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.goal-foot .muted { font-size: 11.5px; }
.goal-form { display: flex; align-items: center; gap: 6px; }
.goal-form input {
  width: 84px; padding: 5px 8px; background: var(--navy-deep); border: 1px solid var(--navy-line);
  border-radius: var(--r-xs); color: var(--heading); font-family: var(--mono); font-size: 12px;
}
.goal-form input:focus { outline: none; border-color: var(--blue); }

/* Roadmap phase cards — start-aligned so the expanded "now" card doesn't
   stretch the others into empty boxes. */
.roadmap-grid { align-items: start; }
.phase-card { background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r); padding: 13px; opacity: 0.7; }
.phase-card.now { opacity: 1; border-color: var(--blue-ring); background: var(--navy-2); box-shadow: var(--glow-blue); }
.phase-card.done { opacity: 0.9; }
.phase-top { display: flex; align-items: center; justify-content: space-between; min-height: 20px; }
.phase-index { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--subtle); }
.phase-check { color: var(--green); font-size: 13px; font-weight: 700; }
.phase-label { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--heading); margin-top: 9px; letter-spacing: -0.1px; }
.phase-floor { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.phase-focus { font-size: 11.5px; color: var(--text-soft); line-height: 1.45; margin-top: 8px; }
.phase-moves { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.phase-moves li { position: relative; padding-left: 15px; font-size: 11.5px; color: var(--text); line-height: 1.4; }
.phase-moves li::before { content: '→'; position: absolute; left: 0; color: var(--blue); }

/* Weekly rhythm strip */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.week-day { background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); padding: 9px 8px; text-align: center; }
.week-day.today { border-color: var(--blue-ring); background: var(--navy-2); box-shadow: var(--glow-blue); }
.week-dow { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.week-day.today .week-dow { color: var(--blue-bright); }
.week-role { font-size: 11.5px; font-weight: 600; color: var(--heading); margin-top: 6px; line-height: 1.22; }
.week-goal { font-family: var(--mono); font-size: 9px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--subtle); margin-top: 5px; }

/* Collapsible reference blocks (roadmap, weekly rhythm) */
.ref-block { border-top: 1px solid var(--navy-line); margin-top: 18px; }
.ref-block > summary {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px; cursor: pointer;
  list-style: none; user-select: none;
}
.ref-block > summary::-webkit-details-marker { display: none; }
.ref-title { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--heading); letter-spacing: -0.15px; }
.ref-note { font-size: 12px; color: var(--muted); }
.ref-note b { color: var(--blue-bright); font-weight: 600; }
.ref-caret { margin-left: auto; color: var(--muted); font-size: 12px; transition: transform var(--dur-fast) var(--ease); }
.ref-block[open] > summary .ref-caret { transform: rotate(90deg); }
.ref-block[open] > summary { margin-bottom: 4px; }
.ref-block > .grid, .ref-block > .week-strip { padding-bottom: 6px; }

/* Secondary content pipeline strip */
.pipeline-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 108px)) 1fr; gap: 10px; align-items: stretch; }
.pipe-stat { background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); padding: 11px; text-decoration: none; transition: border-color var(--dur-fast) var(--ease); }
.pipe-stat:hover { border-color: var(--blue-ring); }
.pipe-v { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--heading); line-height: 1; }
.pipe-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.pipe-upcoming { background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); padding: 6px 11px; display: flex; flex-direction: column; justify-content: center; }
.pipe-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; text-decoration: none; border-bottom: 1px solid var(--navy-line); }
.pipe-row:last-child { border-bottom: none; }
.pipe-icon { color: var(--blue-bright); font-size: 13px; }
.pipe-title { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .pipeline-strip { grid-template-columns: repeat(3, 1fr); }
  .pipe-upcoming { grid-column: 1 / -1; }
}

/* ============================================================
   REEL CAPTIONER
   ============================================================ */
/* Form fields. These names are generic and several pages use them (the
   uploader, Quick Reel, Profile), so they are NOT scoped to one form —
   scoping them to .upload-form left every other page's fields rendering as
   raw browser defaults. */
.field-label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.file-input,
.text-input {
  width: 100%; background: var(--navy-deep); border: 1px solid var(--navy-line);
  border-radius: var(--r-sm); color: var(--text); font-family: var(--sans); font-size: 13px; padding: 10px 12px;
}
select.text-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; cursor: pointer; }
input[type="color"].text-input { padding: 4px; height: 40px; cursor: pointer; }
.file-input { padding: 9px 12px; }
.file-input::file-selector-button {
  background: var(--navy-3); color: var(--text); border: 1px solid var(--navy-line);
  border-radius: var(--r-xs); padding: 6px 12px; margin-right: 12px; cursor: pointer; font-family: inherit; font-size: 12px;
}
.text-input:focus, .file-input:focus { outline: none; border-color: var(--blue); }
.field-error { color: var(--red); font-size: 12px; margin-top: 7px; }

.reel-editor { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 22px; align-items: start; }
.reel-preview { position: sticky; top: 20px; }
.reel-video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; border-radius: var(--r); border: 1px solid var(--navy-line); }
.reel-stat { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--heading); display: flex; align-items: center; gap: 9px; }

/* B-roll live preview: sits between the source video (z 0) and captions (z 2). */
.rc-broll { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.rc-broll img, .rc-broll video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-broll.pip { display: flex; align-items: flex-start; justify-content: center; padding: 10% 7% 0; }
.rc-broll.pip img, .rc-broll.pip video { width: 78%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
/* Author display rules above beat the UA's [hidden] { display: none } — restore
   the hidden attribute explicitly or toggling these elements does nothing. */
.rc-broll[hidden], .rc-broll img[hidden], .rc-broll video[hidden] { display: none; }

/* Overlay markers under the scrub timeline. */
.tl-broll { position: relative; height: 8px; margin-top: 3px; border-radius: 4px; background: var(--navy-2); overflow: hidden; }
.tl-broll span { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); opacity: 0.85; }
.tl-broll span.pip { background: var(--blue-bright); }
.tl-broll span.generating { background: var(--amber); animation: ovpulse 0.9s ease-in-out infinite alternate; }
@keyframes ovpulse { from { opacity: 0.45; } to { opacity: 0.95; } }
@media (prefers-reduced-motion: reduce) { .tl-broll span.generating { animation: none; } }

/* B-roll picker grid + overlay rows in the reel editor. */
.ov-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.ov-picker[hidden] { display: none; }
.ov-pick { position: relative; aspect-ratio: 1; border: 1px solid var(--navy-line); border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--navy-2); padding: 0; }
.ov-pick img, .ov-pick video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ov-pick:hover { border-color: var(--blue); }
.ov-pick .tag { position: absolute; bottom: 4px; right: 4px; background: rgba(5, 13, 28, 0.8); border-radius: 4px; padding: 1px 5px; font-size: 9px; color: #fff; }
.ov-row { display: flex; align-items: center; gap: 8px; font-size: 12px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: 8px; padding: 7px 10px; flex-wrap: wrap; }
.ov-row .thumb { width: 40px; height: 30px; border-radius: 5px; object-fit: cover; background: var(--navy-2); flex: none; }
.ov-row input[type="number"] { width: 64px; }

/* Reel scrub timeline: drag the track to scrub, drag the handles to trim. */
.tl { margin-top: 4px; }
.tl-track { position: relative; height: 36px; border-radius: 8px; background: var(--navy-2); border: 1px solid var(--navy-line); cursor: pointer; touch-action: none; overflow: hidden; user-select: none; }
.tl-dim { position: absolute; top: 0; bottom: 0; background: rgba(4, 10, 22, 0.72); pointer-events: none; }
.tl-handle { position: absolute; top: 0; bottom: 0; width: 14px; background: var(--blue); border-radius: 4px; cursor: ew-resize; touch-action: none; display: flex; align-items: center; justify-content: center; }
.tl-handle::after { content: ""; width: 2px; height: 14px; border-radius: 2px; background: rgba(255, 255, 255, 0.75); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }
.tl-times { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--text-soft); margin-top: 5px; }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy-line); border-top-color: var(--blue-bright); display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.style-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.style-option {
  display: block; cursor: pointer; background: var(--navy); border: 1px solid var(--navy-line);
  border-radius: var(--r-sm); padding: 12px; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.style-option:hover { border-color: var(--blue-ring); }
.style-option.selected { border-color: var(--blue); background: var(--navy-2); box-shadow: var(--glow-blue); }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-name { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--heading); }
.style-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--blue-bright); margin-top: 3px; }
.style-desc { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.45; }

.transcript { background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); padding: 14px 16px; font-size: 13.5px; line-height: 1.7; color: var(--text-soft); max-height: 260px; overflow-y: auto; }

@media (max-width: 760px) {
  .reel-editor { grid-template-columns: 1fr; }
  .reel-preview { position: static; }
  .reel-video { max-width: 300px; }
  .style-picker { grid-template-columns: 1fr; }
}

/* ---- Live caption preview (client-side, over the source video) ---- */
.reel-stage { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; border: 1px solid var(--navy-line); background: #000; container-type: inline-size; }
.reel-stage > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-cap { position: absolute; left: 0; right: 0; padding: 0 6%; text-align: center; pointer-events: none; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.28em; justify-content: center; align-items: center; }
.rc-cap.mid { top: 50%; transform: translateY(-50%); }
.rc-cap.low { bottom: 14%; }
.rc-word { transition: color 90ms linear, opacity 90ms linear; }

/* Caption colours are deliberately literal, never theme variables. These sit
   ON TOP OF VIDEO, and the Remotion render that produces the actual MP4 has no
   concept of light/dark — it always draws white-on-navy. Wiring these to
   --text/--subtle/--navy-line made the preview flip with the app chrome and
   stop predicting the export: in light mode Brand Box drew near-black words on
   its dark navy card and the captions vanished. Every value below mirrors its
   component in remotion/src/styles/ — change one, change both.
   --rc-kw is the exception, and is user data (their keyword colour), not a theme. */

/* word-pop — WordPop.tsx */
.reel-stage[data-style="word-pop"] .rc-pop { font-family: var(--display); font-weight: 700; letter-spacing: -0.15px; font-size: calc(var(--rc-fs,1) * clamp(24px, 9cqw, 46px)); line-height: 1; color: #ffffff; text-transform: uppercase; text-shadow: 0 8px 34px rgba(0,0,0,0.6); }
.reel-stage[data-style="word-pop"] .rc-pop.kw { color: var(--rc-kw, #4d9bff); text-shadow: 0 0 48px rgba(47,129,255,0.55); }

/* karaoke — Karaoke.tsx */
.reel-stage[data-style="karaoke"] .rc-word { font-family: var(--display); font-weight: 700; letter-spacing: -0.15px; font-size: calc(var(--rc-fs,1) * clamp(15px, 6cqw, 26px)); color: rgba(255,255,255,0.35); text-shadow: 0 3px 16px rgba(0,0,0,0.55); }
.reel-stage[data-style="karaoke"] .rc-word.spoken { color: var(--rc-kw, #4d9bff); }
.reel-stage[data-style="karaoke"] .rc-word.current { color: #ffffff; }

/* brand-box — BrandBox.tsx */
.reel-stage[data-style="brand-box"] .rc-cap { bottom: 15%; }
.reel-stage[data-style="brand-box"] .rc-box { display: inline-flex; flex-wrap: wrap; gap: 0.3em; justify-content: center; background: rgba(9,18,34,0.88); border: 1px solid #2f81ff44; border-radius: 12px; padding: 8px 13px; max-width: 92%; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.reel-stage[data-style="brand-box"] .rc-word { font-family: var(--display); font-weight: 700; letter-spacing: -0.1px; font-size: calc(var(--rc-fs,1) * clamp(14px, 5.4cqw, 22px)); color: rgba(255,255,255,0.82); }
.reel-stage[data-style="brand-box"] .rc-word.current { color: #050d1c; background: var(--rc-kw, #4d9bff); border-radius: 5px; padding: 1px 6px; }

/* clean — Clean.tsx */
.reel-stage[data-style="clean"] .rc-cap { bottom: 11%; }
.reel-stage[data-style="clean"] .rc-word { font-family: var(--sans); font-weight: 600; letter-spacing: 0.1px; font-size: calc(var(--rc-fs,1) * clamp(13px, 5cqw, 20px)); color: rgba(255,255,255,0.6); text-shadow: 0 1px 6px rgba(0,0,0,0.7); }
.reel-stage[data-style="clean"] .rc-word.current { color: #fff; }

.rc-hint { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; color: var(--muted); font-size: 13px; pointer-events: none; }

/* ---- Reel edit controls (Phase 2) ---- */
.rc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.rc-override { display: flex; align-items: center; gap: 7px; }
.rc-override label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.rc-override select, .rc-override input[type="color"] {
  background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--r-xs);
  color: var(--text); font-family: var(--sans); font-size: 12px; padding: 5px 7px;
}
.rc-override input[type="color"] { width: 34px; height: 28px; padding: 2px; cursor: pointer; }

.rc-transcript { display: flex; flex-wrap: wrap; gap: 5px 4px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); padding: 12px; max-height: 240px; overflow-y: auto; }
.rc-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r-xs); padding: 3px 6px; font-size: 13px; color: var(--text); }
.rc-chip .rc-w { outline: none; min-width: 6px; }
.rc-chip .rc-w:focus { color: var(--heading); }
.rc-chip.removed { opacity: 0.4; }
.rc-chip.removed .rc-w { text-decoration: line-through; }
.rc-chip .rc-x { cursor: pointer; color: var(--subtle); font-size: 11px; line-height: 1; padding: 0 1px; }
.rc-chip .rc-x:hover { color: var(--red); }
.rc-chip.removed .rc-x { color: var(--blue-bright); }
.rc-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

/* ---- Hook card overlay (Phase 2) ---- */
.reel-stage .rc-hook { position: absolute; top: 12%; left: 0; right: 0; display: flex; justify-content: center; padding: 0 8%; z-index: 4; }
.reel-stage .rc-hook[hidden] { display: none; }
.reel-stage .rc-hook span { background: rgba(9,18,34,0.9); border: 1px solid var(--blue-ring); border-radius: 16px; padding: 12px 16px; font-family: var(--display); font-weight: 700; font-size: clamp(15px, 5cqw, 22px); line-height: 1.12; letter-spacing: -0.1px; color: #fff; text-align: center; box-shadow: 0 12px 34px rgba(0,0,0,0.5); }
.rc-override input[type="text"], .rc-override input[type="number"] { background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--r-xs); color: var(--text); font-family: var(--sans); font-size: 12px; padding: 5px 8px; }
.rc-override input:focus { outline: none; border-color: var(--blue); }

/* ============================================================
   LIGHT AND DARK
   Every token above is a role, and the style flips the roles on
   html[data-theme], so this sheet carries no theme of its own. Anything
   drawn over video keeps its fixed colours in both.
   ============================================================ */

/* ============================================================
   THEME TOGGLE (sidebar footer)
   ============================================================ */
.theme-toggle {
  display: flex; gap: 3px; margin-bottom: 12px;
  padding: 3px; border-radius: var(--pill);
  background: var(--navy-2); border: 1px solid var(--navy-line);
}
.theme-toggle button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  padding: 5px 4px; border: none; border-radius: var(--pill);
  background: none; color: var(--muted); cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.theme-toggle button .ic { font-size: 12px; line-height: 1; }
.theme-toggle button:hover { color: var(--heading); }
.theme-toggle button[aria-pressed="true"] {
  background: var(--blue); color: var(--on-accent); box-shadow: var(--glow-blue);
}

/* ============================================================
   GAME PLAN — the lead math, the week of slots, the scoreboard
   ============================================================ */

/* The headline arithmetic: target → required output → what actually happened. */
.gp-math {
  display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap;
  margin: 20px 0 12px;
}
.gp-fig {
  flex: 1 1 200px; padding: 18px 20px;
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r);
}
.gp-fig.bad { border-color: color-mix(in srgb, var(--red) 45%, var(--navy-line)); }
.gp-fig-v { font-family: var(--display); font-size: 38px; line-height: 1; color: var(--heading); }
.gp-fig.bad .gp-fig-v { color: var(--red); }
.gp-fig-k { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.gp-fig-n { margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.gp-arrow {
  display: flex; align-items: center; padding: 0 4px;
  font-size: 15px; color: var(--muted); font-family: var(--mono);
}
.gp-note {
  padding: 12px 16px; margin-bottom: 22px;
  background: var(--blue-soft); border: 1px solid var(--blue-ring); border-radius: var(--r);
  font-size: 13px; line-height: 1.65; color: var(--text-soft);
}
.gp-note b { color: var(--heading); }

/* The verdict — the COO's ten-second read, and the director's orders. */
.gp-verdicts { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 12px; }
.gp-verdict {
  flex: 1 1 260px; padding: 18px 20px;
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r);
}
.gp-verdict-q { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.gp-verdict-a { margin-top: 6px; font-family: var(--display); font-size: 26px; line-height: 1.1; color: var(--heading); }
.gp-verdict-n { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.gp-verdict.good { border-color: color-mix(in srgb, var(--green) 45%, var(--navy-line)); }
.gp-verdict.good .gp-verdict-a { color: var(--green); }
.gp-verdict.mixed { border-color: color-mix(in srgb, var(--amber) 45%, var(--navy-line)); }
.gp-verdict.mixed .gp-verdict-a { color: var(--amber); }
.gp-verdict.bad { border-color: color-mix(in srgb, var(--red) 45%, var(--navy-line)); }
.gp-verdict.bad .gp-verdict-a { color: var(--red); }
.gp-orders { display: grid; gap: 8px; margin-bottom: 22px; }
.gp-order {
  padding: 12px 16px; border-radius: var(--r);
  background: var(--navy-2); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--navy-line);
  font-size: 13px; line-height: 1.6; color: var(--text-soft);
}
.gp-order b { display: block; color: var(--heading); margin-bottom: 2px; }
.gp-order.bad { border-left-color: var(--red); }
.gp-order.mixed { border-left-color: var(--amber); }
.gp-order.good { border-left-color: var(--green); }

/* The briefing — the board read aloud. Prose, not chrome. */
.gp-brief {
  padding: 20px 24px; margin-bottom: 22px;
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r);
  font-size: 14.5px; line-height: 1.75; color: var(--text-soft);
}
.gp-brief p { margin: 0 0 12px; }
.gp-brief-next { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.gp-brief ol { margin: 0; padding-left: 20px; }
.gp-brief li { margin: 6px 0; }

/* Opened-up math table. */
.gp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gp-table th, .gp-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--navy-line); }
.gp-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.gp-table td { color: var(--text-soft); }
.gp-table .num { text-align: right; font-family: var(--mono); }
.gp-table b { color: var(--heading); }
.gp-table tr.off td { opacity: .45; }
.gp-table tfoot td { border-bottom: none; font-weight: 600; color: var(--heading); }
.gp-ic { display: inline-block; width: 18px; }
.gp-tag {
  margin-left: 6px; padding: 1px 6px; border-radius: var(--pill);
  background: var(--navy-3); font-size: 10px; color: var(--muted);
}

/* Admin: retarget the plan and hand-set the quota. */
.gp-settings { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--navy-line); }
.gp-settings-row { display: flex; flex-wrap: wrap; gap: 12px; }
.gp-settings label { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; }
.gp-settings label > span { font-size: 11px; font-weight: 600; color: var(--muted); }
.gp-settings input, .gp-settings select, .gp-assign-all select, .gp-who select {
  padding: 7px 9px; border-radius: var(--r-sm);
  border: 1px solid var(--navy-line); background: var(--navy); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.gp-override-head { margin: 18px 0 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
.gp-overrides { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.gp-override { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gp-override > span { font-size: 12px; color: var(--text-soft); display: flex; flex-direction: column; }
.gp-override em { font-style: normal; font-size: 10px; color: var(--muted); font-family: var(--mono); }
.gp-override input { width: 64px; text-align: right; }

/* The week. */
.gp-weeknav { display: flex; gap: 6px; }
.gp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.gp-assign-all { display: flex; gap: 6px; align-items: center; }
.gp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .gp-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gp-week { grid-template-columns: 1fr; } }
.gp-day {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px; border-radius: var(--r);
  background: var(--navy-2); border: 1px solid var(--navy-line);
}
.gp-day.today { border-color: var(--blue-ring); box-shadow: var(--glow-blue); }
.gp-day.past { opacity: .82; }
.gp-day-head { display: flex; align-items: baseline; gap: 6px; }
.gp-day-head .push { margin-left: auto; }
.gp-dow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gp-dnum { font-family: var(--display); font-size: 17px; color: var(--heading); }
.gp-dcount { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.gp-empty-day { text-align: center; font-size: 12px; padding: 8px 0; }

/* Compact week chip — one line, detail lives in the modal. */
.gp-chip {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--navy); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--navy-line);
  font-family: inherit; font-size: 11.5px; color: var(--text-soft);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.gp-chip:hover { background: var(--navy-3); border-color: var(--blue-ring); }
.gp-chip.made { border-left-color: var(--amber); }
.gp-chip.posted { border-left-color: var(--green); opacity: .72; }
.gp-chip.missed { border-left-color: var(--red); }
.gp-chip-ic { flex: none; font-size: 12px; }
.gp-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-chip-mine { margin-left: auto; color: var(--blue-bright); font-size: 15px; line-height: 1; }
.gp-daytag {
  padding: 1px 6px; border-radius: var(--pill); background: var(--blue); color: var(--on-accent);
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.gp-daybar { height: 3px; margin-bottom: 2px; }

/* Today view — full-width tasks, nothing squeezed. */
.gp-viewtabs {
  display: flex; gap: 3px; padding: 3px; border-radius: var(--pill);
  background: var(--navy-2); border: 1px solid var(--navy-line);
}
.gp-viewtabs a {
  padding: 5px 16px; border-radius: var(--pill); text-decoration: none;
  font-size: 12px; font-weight: 600; color: var(--muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.gp-viewtabs a:hover { color: var(--heading); }
.gp-viewtabs a.active { background: var(--blue); color: var(--on-accent); }

.gp-today-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.gp-today-count { font-size: 14px; color: var(--text-soft); }
.gp-today-count b { font-family: var(--display); font-size: 26px; color: var(--heading); margin-right: 4px; }
.gp-today-prog { flex: 1 1 200px; }

.gp-today { display: flex; flex-direction: column; gap: 8px; }
.gp-task {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  padding: 14px 18px; border-radius: var(--r); cursor: pointer;
  background: var(--navy-2); border: 1px solid var(--navy-line);
  border-left: 3px solid var(--navy-line);
  font-family: inherit; transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.gp-task:hover { border-color: var(--blue-ring); transform: translateX(2px); }
.gp-task.made { border-left-color: var(--amber); }
.gp-task.posted { border-left-color: var(--green); opacity: .6; }
.gp-task.missed { border-left-color: var(--red); }
.gp-task-ic { flex: none; font-size: 18px; line-height: 1.4; }
.gp-task-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.gp-task-play { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--heading); }
.gp-task-hook { font-size: 13px; line-height: 1.6; color: var(--text-soft); }
.gp-task-who { flex: none; font-size: 11px; color: var(--muted); padding-top: 3px; }
.gp-task-who.mine { color: var(--blue-bright); font-weight: 600; }
.gp-overdue { margin-top: 18px; }
.gp-state { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.gp-state.ok { color: var(--green); }
.gp-state.mid { color: var(--amber); }
.gp-state.bad { color: var(--red); }

/* The daily to-do list on the Game Plan. */
.gp-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.gp-strip a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--navy-line); border-radius: var(--r-sm); text-decoration: none; color: var(--text-soft); background: var(--navy-2); }
.gp-strip a:hover { border-color: var(--blue-ring); color: var(--heading); }
.gp-strip a.selected { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue-ring); color: var(--heading); }
.gp-strip a.today .gp-strip-day { color: var(--blue-bright); }
.gp-strip a.empty { opacity: .45; }
.gp-strip-day { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gp-strip-num { font-family: var(--display); font-size: 18px; line-height: 1; color: var(--heading); }
.gp-strip-count { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.gp-pips { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.gp-pip { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--navy-line); background: transparent; color: #fff; font-size: 11px; line-height: 1; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.gp-pip.posted { background: var(--ds-success-fill); border-color: var(--ds-success-fill); }
.gp-pip.made { border-color: var(--amber); }
.gp-pip.missed { border-color: var(--red); }
span.gp-pip { cursor: default; }
.gp-daylist { margin-bottom: 26px; }
.gp-daylist .gp-task { cursor: default; }
.gp-daylist .gp-task:hover { transform: none; }
.gp-daylist .gp-task.own { border-left-color: var(--blue-ring); }
.gp-daylist .gp-task.own.posted { border-left-color: var(--green); }
.gp-check {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--navy-line); background: var(--navy); color: var(--on-accent);
  cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.gp-check:hover { border-color: var(--green); }
.gp-check.done { background: var(--green); border-color: var(--green); }
.gp-task-del {
  flex: none; align-self: flex-start; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1;
}
.gp-task-del:hover { color: var(--red); }
.gp-add { display: flex; gap: 8px; margin-top: 14px; }
.gp-add input {
  flex: 1; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--navy-line); background: var(--navy); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.gp-add input:focus { outline: none; border-color: var(--blue-ring); }
.gp-phase-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gp-phase-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-bright); }
.gp-phase-note { font-size: 12px; color: var(--muted); }
.gp-task-worth { flex: none; font-size: 11px; color: var(--muted); font-family: var(--mono, monospace); padding-top: 3px; }

/* The slot modal. */
.gp-modal {
  width: min(560px, calc(100vw - 32px)); padding: 0; border: none;
  border-radius: var(--r-lg); background: var(--navy-2); color: var(--text);
  border: 1px solid var(--navy-line); box-shadow: var(--shadow-lg);
}
.gp-modal::backdrop { background: rgba(2, 8, 20, .72); backdrop-filter: blur(3px); }
.gp-modal-close { position: absolute; top: 12px; right: 12px; }
.gp-modal-close button {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  background: var(--navy-3); border: 1px solid var(--navy-line); color: var(--muted); font-size: 12px;
}
.gp-modal-close button:hover { color: var(--heading); }
.gp-modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 24px 26px 16px; }
.gp-modal-ic { font-size: 24px; line-height: 1.2; }
.gp-modal-head h3 { margin: 0; font-size: 18px; color: var(--heading); padding-right: 30px; }
.gp-modal-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.gp-modal-state { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.gp-modal-state.posted { color: var(--green); }
.gp-modal-state.made { color: var(--amber); }
.gp-modal-state.missed { color: var(--red); }
.gp-modal-body { padding: 0 26px 18px; }
.gp-modal-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gp-modal-body p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--text); }
.gp-modal-brief { margin-top: 10px !important; font-size: 13px !important; color: var(--muted) !important; font-style: italic; }
.gp-modal-assign { display: flex; align-items: center; gap: 10px; padding: 0 26px 18px; }
.gp-modal-assign label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gp-modal-assign select {
  flex: 1; padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--navy-line); background: var(--navy); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.gp-modal-actions {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 26px 22px;
  border-top: 1px solid var(--navy-line); background: var(--navy);
}
.gp-modal-readonly { margin: 0; padding: 16px 26px 22px; border-top: 1px solid var(--navy-line); font-size: 12.5px; color: var(--muted); }

/* The scoreboard. */
.gp-score { display: flex; flex-direction: column; gap: 8px; }
.gp-score-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--navy-2); border: 1px solid var(--navy-line);
}
.gp-score-who { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.gp-score-who b { color: var(--heading); font-size: 14px; }
.gp-score-who .muted { font-size: 11px; }
.gp-score-bar { flex: 1 1 160px; }
.gp-score-nums { display: flex; gap: 18px; }
.gp-score-n { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--mono); font-size: 15px; color: var(--text-soft); }
.gp-score-n em { font-style: normal; font-family: var(--sans); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.gp-score-n.ok { color: var(--green); }
.gp-score-n.bad { color: var(--red); }
.gp-score-n.big { color: var(--heading); font-size: 19px; }

/* ============================================================
   LATEST NEWS — magazine layout
   ============================================================ */

.mag-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 20px 0 10px; }
.mag-filters .push { margin-left: auto; }
.mag-search input {
  padding: 7px 12px; min-width: 220px; border-radius: var(--pill);
  border: 1px solid var(--navy-line); background: var(--navy-2); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.mag-sources { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--navy-line); }
.mag-source {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color var(--dur-fast) var(--ease);
}
.mag-source:hover, .mag-source.active { color: var(--blue-bright); }

/* Shared kicker + masthead styling across every card size. */
.mag-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; }
.mag-masthead {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-bright);
}
.mag-byline { display: flex; gap: 7px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.mag-dot { opacity: .5; }

/* The lead story. */
.mag-lead {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0;
  border: 1px solid var(--navy-line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--navy-2); margin-bottom: 14px;
}
@media (max-width: 860px) { .mag-lead { grid-template-columns: 1fr; } }
.mag-lead-media { display: block; min-height: 240px; background: var(--navy-3); }
.mag-lead-media img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; display: block; }
.mag-lead-body { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.mag-lead-title { margin: 12px 0 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.18; }
.mag-lead-title a { color: var(--heading); text-decoration: none; }
.mag-lead-title a:hover { color: var(--blue-bright); }
.mag-lead-standfirst { margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-soft); }
.mag-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* The two features under the lead. */
.mag-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
@media (max-width: 860px) { .mag-featured { grid-template-columns: 1fr; } }
.mag-feature {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  border: 1px solid var(--navy-line); border-radius: var(--r); overflow: hidden; background: var(--navy-2);
}
@media (max-width: 520px) { .mag-feature { grid-template-columns: 1fr; } }
.mag-feature-media { display: block; background: var(--navy-3); }
.mag-feature-media img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; }
.mag-feature-body { padding: 16px 18px; min-width: 0; }
.mag-feature-body h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.35; font-family: var(--serif); font-weight: 400; }
.mag-feature-body h3 a { color: var(--heading); text-decoration: none; }
.mag-feature-body h3 a:hover { color: var(--blue-bright); }
.mag-feature-body p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-soft); }

/* The rest of the issue. */
.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.mag-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--navy-line); border-radius: var(--r); overflow: hidden;
  background: var(--navy-2); transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.mag-card:hover { border-color: var(--blue-ring); transform: translateY(-2px); }
.mag-card-media { display: block; background: var(--navy-3); }
.mag-card-media img { width: 100%; height: 148px; object-fit: cover; display: block; }
.mag-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.mag-card-body h3 { margin: 8px 0 0; font-size: 15px; line-height: 1.38; font-family: var(--serif); font-weight: 400; }
.mag-card-body h3 a { color: var(--heading); text-decoration: none; }
.mag-card-body h3 a:hover { color: var(--blue-bright); }
.mag-card-body p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-soft); }

/* The one action that matters on every story. */
.mag-make {
  margin-top: auto; padding-top: 12px; font-size: 11.5px; font-weight: 600;
  color: var(--blue-bright); text-decoration: none; align-self: flex-start;
}
.mag-make:hover { text-decoration: underline; }

/* ============================================================
   GAME PLAN — the written strategy document
   ============================================================ */

.gp-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; }
.gp-jump a {
  padding: 6px 14px; border-radius: var(--pill); font-size: 12px; font-weight: 600;
  color: var(--text-soft); text-decoration: none;
  background: var(--navy-2); border: 1px solid var(--navy-line);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.gp-jump a:hover { color: var(--blue-bright); border-color: var(--blue-ring); }

.doc {
  margin: 0 0 34px; padding: 34px clamp(20px, 3vw, 44px);
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: var(--r-lg);
  scroll-margin-top: 20px;
}
.doc-head { padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--navy-line); }
.doc-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-bright); }
.doc-title { margin: 10px 0 0; font-family: var(--display); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; color: var(--heading); }
.doc-sub { margin: 10px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--text-soft); }
.doc-meta { margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.doc-sec { padding-top: 30px; }
@media (min-width: 1000px) {
  /* Two columns: the heading sits alongside its content rather than above it,
     so the block fills the container while the reading measure stays sane. */
  .doc-sec { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0 36px; }
  .doc-sec > h3 { grid-column: 1; position: sticky; top: 16px; align-self: start; }
  .doc-sec > :not(h3) { grid-column: 2; }
}
.doc-sec h3 {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px;
  font-size: 19px; color: var(--heading); font-weight: 600;
}
/* Prose keeps a readable measure; structural blocks below fill the column. */
.doc-sec > p { max-width: 78ch; }
.doc-n { font-family: var(--mono); font-size: 12px; color: var(--blue-bright); }
.doc-sec p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.75; color: var(--text-soft); }
.doc-sec p b { color: var(--heading); }

.doc-pull {
  margin: 4px 0 18px !important; padding: 16px 20px;
  border-left: 3px solid var(--blue); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--blue-soft);
  font-family: var(--serif); font-size: 17.5px !important; line-height: 1.55 !important; color: var(--heading) !important;
}
.doc-aside {
  font-size: 13px !important; color: var(--muted) !important; font-style: italic;
  padding-left: 14px; border-left: 2px solid var(--navy-line);
}

.doc-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 16px; }
@media (max-width: 720px) { .doc-split { grid-template-columns: 1fr; } }
.doc-h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-h4.yes { color: var(--green); }
.doc-h4.no { color: var(--red); }

.doc-list { margin: 0; padding: 0; list-style: none; }
.doc-list li {
  position: relative; padding: 0 0 10px 20px;
  font-size: 14px; line-height: 1.65; color: var(--text-soft);
}
.doc-list li::before { content: "–"; position: absolute; left: 2px; color: var(--muted); }
.doc-list.yes li::before { content: "✓"; color: var(--green); font-size: 11px; top: 3px; }
.doc-list.no li::before { content: "✕"; color: var(--red); font-size: 11px; top: 3px; }

.doc-persona { padding: 20px 22px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r); }
.doc-persona-name { font-family: var(--serif); font-size: 18px; color: var(--heading); margin-bottom: 10px; }
.doc-dl { margin: 14px 0 0; display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 18px; }
@media (max-width: 620px) { .doc-dl { grid-template-columns: 1fr; gap: 2px 0; } .doc-dl dd { margin-bottom: 10px; } }
.doc-dl dt { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.doc-dl dd { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-soft); }
.doc-flag { margin: 16px 0 0 !important; font-size: 12.5px !important; color: var(--amber) !important; }

.doc-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.doc-channel { padding: 14px 16px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); }
.doc-channel-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-channel-top b { color: var(--heading); font-size: 14px; }
.doc-channel-top .push { margin-left: auto; font-size: 12px; }
.doc-channel p { margin: 8px 0 0 !important; font-size: 13px !important; }

.doc-ladder { margin: 0; padding: 0; list-style: none; counter-reset: rung; }
.doc-ladder li {
  counter-increment: rung; position: relative; padding: 12px 0 12px 44px;
  border-bottom: 1px solid var(--navy-line);
}
.doc-ladder li:last-child { border-bottom: none; }
.doc-ladder li::before {
  content: counter(rung); position: absolute; left: 0; top: 12px;
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--navy-3); color: var(--blue-bright); font-family: var(--mono); font-size: 11px;
}
.doc-ladder b { display: block; color: var(--heading); font-size: 14.5px; margin-bottom: 3px; }
.doc-ladder span { font-size: 13.5px; line-height: 1.6; color: var(--text-soft); }

.doc-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.doc-phase { padding: 20px 22px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r); }
.doc-phase-days { font-family: var(--mono); font-size: 11px; color: var(--blue-bright); letter-spacing: .06em; }
.doc-phase-name { margin-top: 4px; font-family: var(--serif); font-size: 20px; color: var(--heading); }
.doc-phase-goal { margin: 8px 0 14px !important; font-size: 14px !important; }
.doc-exit { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--navy-line); }
.doc-exit-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.doc-exit ul { margin: 8px 0 0; padding-left: 18px; }
.doc-exit li { font-size: 13px; line-height: 1.7; color: var(--text-soft); }

.doc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 820px) { .doc-metrics { grid-template-columns: 1fr; } }

.doc-rules { margin: 0; padding-left: 22px; columns: 2; column-gap: 40px; }
@media (max-width: 900px) { .doc-rules { columns: 1; } }
.doc-rules li { break-inside: avoid; }
.doc-rules li { padding: 7px 0; font-size: 14px; line-height: 1.65; color: var(--text-soft); }
.doc-rules li::marker { color: var(--blue-bright); font-family: var(--mono); font-size: 12px; }

.doc-risks { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.doc-risk { padding: 14px 16px; background: var(--navy); border: 1px solid var(--navy-line); border-radius: var(--r-sm); }
.doc-risk-if { font-size: 14px; line-height: 1.65; color: var(--heading); }
.doc-risk-if b { color: var(--red); }
.doc-risk-then { margin-top: 7px; font-size: 13.5px; line-height: 1.65; color: var(--text-soft); }
.doc-risk-then b { color: var(--green); }

.doc-note { margin-top: 34px; padding: 26px 28px; background: var(--blue-soft); border: 1px solid var(--blue-ring); border-radius: var(--r); }
.doc-note h3 { margin-bottom: 16px; }
.doc-note p { font-size: 14.5px !important; line-height: 1.8 !important; max-width: 82ch; }
.doc-note p:last-child { margin-bottom: 0; }

/* Hand-off from the strategy document to the page where it gets done. */
.gp-hand-off {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 20px;
  background: var(--blue-soft); border: 1px solid var(--blue-ring); border-radius: var(--r);
}
.gp-hand-off b { display: block; color: var(--heading); font-size: 15px; }
.gp-hand-off span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-soft); }
.gp-hand-off .btn { margin-left: auto; }

/* Stories with no usable image: collapse the media slot rather than reserving
   an empty one, which previously squeezed the copy into the 150px column. */
.mag-lead.no-media, .mag-feature.no-media { grid-template-columns: minmax(0, 1fr); }
.mag-lead.no-media .mag-lead-body { max-width: 80ch; }
.mag-feature.no-media .mag-feature-body { padding: 18px 20px; }
.mag-card.no-media .mag-card-body { padding-top: 16px; }

/* ============================================================
   ASSET DETAIL — media first, details second, download in reach
   ============================================================ */

.asset-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.asset-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }

/* Below 900px the sidebar was winning its 300px and squeezing the media into
   whatever was left — the asset became a sliver under a wall of metadata.
   Stack instead, media first, and let it take the full width. */
@media (max-width: 900px) {
  .asset-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .asset-side { position: static; top: auto; }
}

.asset-stage { margin-bottom: 16px; }
.asset-stage.video { max-width: 420px; }
.asset-stage.image { max-width: 520px; }
@media (max-width: 900px) {
  .asset-stage.video, .asset-stage.image { max-width: none; }
}

/* Getting the file out is the job — not a link buried in a metadata card. */
.asset-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 26px; }
.asset-actions-note { flex-basis: 100%; font-size: 12px; line-height: 1.5; }
@media (max-width: 600px) {
  .asset-actions .btn { flex: 1 1 auto; justify-content: center; padding-top: 11px; padding-bottom: 11px; }
}

/* Render internals: available, not in the way. */
.asset-fold { margin: 0; }
.asset-fold .ref-title { font-size: 13px; }
