/* Mission Control board · jacknbauhs.com
   Colors, type and spacing live here as tokens. Change a value once and the whole board follows. */
:root {
  --bg: #0B0A14;
  --surface: #14122A;
  --surface-2: #1C1938;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #ECEAF6;
  --text-2: #CFCBE6;
  --text-3: #B8B4D4;
  --muted: #9A96B8;
  --accent: #8B5CF6;
  --accent-strong: #7C3AED;
  --accent-text: #C4B5FD;
  --up: #34D399;
  --down: #F87171;
  --warn: #FCD34D;
  --flag: #F472B6;
  --flag-text: #F9A8D4;
  --info: #7DD3FC;
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Unbounded", "Geist", system-ui, sans-serif;
  --gutter: clamp(16px, 4.4vw, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #EDE9FE; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
button { font-family: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Starfield + orbit behind the top of the page */
.sky { position: absolute; inset: 0 0 auto 0; height: 760px; pointer-events: none; overflow: hidden; z-index: 0; }
.sky svg { width: 100%; height: 100%; }

/* Site header (links back to the Squarespace pages) */
.site-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}
.wordmark { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.18em; color: var(--text); white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--muted); white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); padding: 24px 0 22px; border-bottom: 2px solid var(--accent); }
.menu-button { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); border-radius: 10px; }
.menu-button svg { width: 22px; height: 22px; }

/* Mission Control bar */
.mc-bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 56px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-soft); background: rgba(20, 18, 42, 0.7);
}
.mc-brand { display: flex; align-items: center; gap: 12px; }
.mc-brand strong { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.16em; white-space: nowrap; }
.mc-nav { display: flex; gap: 24px; font-size: 14px; }
.mc-nav a { color: var(--muted); white-space: nowrap; }
.mc-nav a:hover, .mc-nav a.is-active { color: var(--text); }
.status { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex-shrink: 0; }

main { position: relative; z-index: 1; padding: 0 var(--gutter) 40px; max-width: 1440px; margin: 0 auto; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding-top: 64px; }
.hero h1 { margin: 16px 0 20px; font-size: clamp(38px, 5vw, 62px); line-height: 1.04; font-weight: 600; letter-spacing: -0.025em; }
.hero p.lede { margin: 0; font-size: 18px; line-height: 1.55; color: var(--text-3); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { min-height: 52px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 12px; font-size: 16px; font-weight: 600; }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #6D28D9; color: #fff; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.16); color: var(--text); font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-card { padding: 22px 24px 18px; background: rgba(20, 18, 42, 0.92); }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.chart-title { font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.big-stat { text-align: right; }
.big-stat .num { font-size: 38px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.swatch.line { width: 18px; height: 3px; border-radius: 2px; }
.source { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.stat { padding: 20px 22px; border-radius: 16px; }
.stat .num { font-size: 34px; font-weight: 500; letter-spacing: -0.02em; display: block; }
.stat p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Sections */
section.block { margin-top: 104px; scroll-margin-top: 24px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.block-head h2 { margin: 8px 0 8px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.block-head p { margin: 0; color: var(--muted); max-width: 42em; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-12 { grid-column: span 12; }

/* Tables that turn into cards on phones */
.table-card { overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--line); }
table.data td { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
.name { font-weight: 600; font-size: 16px; display: block; }
.sub { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.up { color: var(--up); } .down { color: var(--down); }
.table-foot { padding: 14px 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--muted); }

.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; border: 1px solid; }
.chip-flag { background: rgba(244, 114, 182, 0.12); color: var(--flag-text); border-color: rgba(244, 114, 182, 0.35); }
.chip-warn { background: rgba(251, 191, 36, 0.10); color: var(--warn); border-color: rgba(251, 191, 36, 0.35); }
.chip-ok { background: rgba(52, 211, 153, 0.10); color: #6EE7B7; border-color: rgba(52, 211, 153, 0.35); }
.chip-info { background: rgba(125, 211, 252, 0.10); color: var(--info); border-color: rgba(125, 211, 252, 0.35); }
.chip-neutral { background: rgba(236, 234, 246, 0.06); color: var(--text-2); border-color: rgba(236, 234, 246, 0.18); }
.chip-accent { background: rgba(139, 92, 246, 0.14); color: var(--accent-text); border-color: rgba(139, 92, 246, 0.45); }

/* Flags panel */
.flags { padding: 24px; display: flex; flex-direction: column; gap: 16px; border-color: rgba(244, 114, 182, 0.22); }
.flag-head { display: flex; align-items: center; gap: 16px; }
.flag-head p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-3); }
.flag-list { list-style: none; margin: 0; padding: 0; }
.flag-list li { padding: 12px 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.flag-list .why { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.labels div { padding: 16px 18px; border-radius: 14px; }
.labels p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Rip EV */
.skeleton { display: inline-block; height: 10px; border-radius: 5px; background: rgba(236, 234, 246, 0.08); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #2A2552; color: var(--text); font-weight: 500; }

/* Calls */
.empty { padding: 32px; text-align: left; }
.empty h3 { margin: 0 0 8px; font-size: 20px; }
.empty p { margin: 0; color: var(--muted); max-width: 40em; }

/* Drops */
.drops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.drop { padding: 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.drop.is-next { background: var(--surface-2); border-color: rgba(139, 92, 246, 0.45); }
.drop .date { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.drop.is-next .date { color: var(--accent-text); }
.drop h3 { margin: 0; font-size: 16px; }
.drop p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.locator { padding: 24px; display: flex; flex-direction: column; gap: 12px; border-style: dashed; border-color: rgba(236, 234, 246, 0.18); }
.locator h3 { margin: 0; font-size: 20px; }
.locator p { margin: 0; font-size: 14px; color: var(--muted); }
.locator .btn { margin-top: auto; min-height: 44px; font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.12); color: var(--muted); background: transparent; justify-content: center; }

/* Card page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; padding-top: 28px; }
.card-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
.card-title h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -0.025em; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.kpi { padding: 18px 22px; border-radius: 16px; }
.kpi .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi .num { display: block; font-size: 28px; font-weight: 500; margin-top: 6px; }
.kpi p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.summary { padding: 22px 24px; margin-top: 24px; font-size: 16px; line-height: 1.6; color: var(--text-2); }

/* Footer */
.site-footer { position: relative; z-index: 1; margin-top: 112px; padding: 40px var(--gutter); border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 32px; font-size: 14px; }
.site-footer h2 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; font-weight: 500; color: var(--muted); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer p { margin: 12px 0 0; color: var(--muted); max-width: 30em; }
.fineprint { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Tablet */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .span-8, .span-7, .span-5, .span-4 { grid-column: span 12; }
  .labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 18px; font-size: 14px; }
}

/* Small laptop and tablet landscape: keep the Mission Control bar on one row */
@media (min-width: 821px) and (max-width: 1100px) {
  .mc-brand .muted { display: none; }
  .mc-nav { gap: 18px; }
}

/* Phone */
@media (max-width: 820px) {
  .site-nav { display: none; }
  .site-nav.is-open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; z-index: 10; }
  .site-nav.is-open a { padding: 12px 0; width: 100%; border: 0; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .mc-bar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .mc-nav { order: 3; width: 100%; overflow-x: auto; gap: 20px; padding-bottom: 2px; }
  .status { font-size: 11px; }
  .hero { padding-top: 32px; }
  .hero p.lede { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .stats, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat .num { font-size: 26px; }
  .kpi .num { font-size: 22px; }
  section.block { margin-top: 64px; }
  .labels, .drops { grid-template-columns: minmax(0, 1fr); }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  table.data td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  table.data td[data-label]::before { content: attr(data-label); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  table.data td.first { display: block; padding-bottom: 6px; }
  .site-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer > div:first-child { grid-column: 1 / -1; }
  .chart-card { padding: 16px; }
  .big-stat .num { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

table.data td.num, table.data td.first.num { white-space: nowrap; }

/* Sub-sections inside a block: this week's file vs the whole market */
.sub-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 40px 0 14px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.block-head + .sub-h { margin-top: 0; }
.sub-h span { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.empty-state { padding: 22px 24px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.empty-state p { margin: 0; font-size: 14px; color: var(--muted); max-width: 46em; }
.big-flag { font-size: 44px; font-weight: 500; color: var(--flag); letter-spacing: -0.02em; white-space: nowrap; }
.stack { display: inline-flex; flex-direction: column; align-items: flex-start; }
.stack .sub { white-space: nowrap; }
.call-text { display: block; margin-top: 4px; color: var(--text-2); line-height: 1.5; }
table.data.calls td.first .sub { margin-top: 4px; }
table.data.calls a.sub { color: var(--accent-text); }
table.data tr.is-selectable { cursor: pointer; }
table.data tr.is-selectable:hover td, table.data tr.is-selectable:focus-visible td { background: rgba(236, 234, 246, 0.03); }
table.data tr.is-selected td { background: rgba(139, 92, 246, 0.10); }
table.data tr.is-selectable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.data.rip td, table.data.rip th { padding-left: 14px; padding-right: 14px; }
.rip-chart { position: relative; }
.chart-tip { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--text-2); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.chart-tip strong { color: var(--text); font-weight: 500; }
.chart-tip[hidden] { display: none; }
.labels { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.labels div { padding: 14px 16px; }
@media (max-width: 820px) {
  .labels { grid-template-columns: minmax(0, 1fr); }
  table.data td .stack { align-items: flex-end; text-align: right; }
  .big-flag { font-size: 34px; }
  .sub-h { margin-top: 32px; }
}
.sub-h + .labels { margin-top: 0; }
table.data.rip th { white-space: nowrap; }
