/* Batch site. Dark, data-forward, one accent.
   Palette validated (dataviz six-checks): accent #f0902f on #14161b >= 3:1;
   status pair #2fd0c3 / #f56262 deutan dE 13.2 + signed numbers (never color-alone). */

:root {
  --bg: #0c0d10;
  --surface: #14161b;
  --surface-2: #1a1d24;
  --border: rgba(240, 242, 245, 0.09);
  --border-strong: rgba(240, 242, 245, 0.16);
  --text: #f2f3f5;
  --text-2: #9aa0ab;
  --text-3: #697080;
  --accent: #f0902f;
  --accent-dim: rgba(240, 144, 47, 0.14);
  --up: #2fd0c3;
  --down: #f56262;
  --radius: 10px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 13, 16, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: 0.04em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { margin-left: auto; }

.btn {
  display: inline-block; font-size: 14px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #17110a; }
.btn-primary:hover { background: #f6a04a; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { margin: 18px 0 26px; color: var(--text-2); font-size: 1.06rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 8px;
}
.hero-panel .panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hero-panel .panel-title { font-size: 14px; font-weight: 600; }
.hero-panel .panel-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 1.7rem; letter-spacing: -0.02em; font-weight: 750; }
.section-head p { color: var(--text-2); max-width: 65ch; margin-top: 6px; }
.rule { border: 0; border-top: 1px solid var(--border); }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 720px; }
th {
  text-align: right; font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
th:first-child, td:first-child, th.tl, td.tl { text-align: left; }
td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background 0.12s ease; }
tbody tr:hover { background: var(--surface-2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--up); }
.neg { color: var(--down); }
.dim { color: var(--text-3); }
.cell-name { display: flex; align-items: center; gap: 12px; }
.batch-dotmark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent);
  font-weight: 800; font-size: 13px; font-family: var(--mono);
}
.cell-name .n { font-weight: 600; }
.cell-name .s { font-size: 12px; color: var(--text-3); }

/* ---------- chips ---------- */
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text-2); white-space: nowrap;
}
.chip-accent { border-color: transparent; background: var(--accent-dim); color: var(--accent); }
.chip-low { border-color: transparent; background: rgba(245, 98, 98, 0.12); color: var(--down); }
.chip-med { border-color: transparent; background: rgba(240, 144, 47, 0.12); color: var(--accent); }
.chip-high { border-color: transparent; background: rgba(47, 208, 195, 0.11); color: var(--up); }

/* ---------- batch story cards ---------- */
.story-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.story {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px; min-height: 168px;
  transition: border-color 0.15s ease;
}
.story:hover { border-color: var(--border-strong); }
.story .mix { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.story h3 { font-size: 1.02rem; font-weight: 700; }
.story p { font-size: 13.5px; color: var(--text-2); flex: 1; }
.story .tail { display: flex; justify-content: space-between; align-items: center; }

/* ---------- pillars ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.pillar { padding: 18px 0; border-top: 1px solid var(--border); }
.pillar h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.pillar p { font-size: 14px; color: var(--text-2); }

/* ---------- stat strip ---------- */
.stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { flex: 1; padding: 16px 20px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .v { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- batch detail ---------- */
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.detail-head h1 { font-size: 2rem; letter-spacing: -0.02em; }
.detail-sub { color: var(--text-2); max-width: 72ch; margin-bottom: 22px; }
.nav-hero { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 8px 0 18px; }
.nav-hero .big { font-family: var(--mono); font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-hero .unit { color: var(--text-3); font-size: 0.95rem; }
.chart-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; }

/* ---------- chart ---------- */
.chart svg { display: block; width: 100%; height: auto; }
.chart .gridline { stroke: rgba(240, 242, 245, 0.06); }
.chart .axis-label { fill: var(--text-3); font-size: 11px; font-family: var(--mono); }
.chart .nav-line { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .nav-area { fill: url(#navFill); }
.chart .base-100 { stroke: rgba(240, 242, 245, 0.16); stroke-dasharray: 3 4; }
.spark svg { display: block; }
.spark path { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-linecap: round; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; display: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 11px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.tooltip .t-date { color: var(--text-3); font-family: var(--mono); font-size: 11px; }
.tooltip .t-val { font-family: var(--mono); font-weight: 700; }

/* ---------- notes / flags ---------- */
.note {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 6px; background: var(--surface); padding: 12px 16px;
  font-size: 14px; color: var(--text-2); margin: 16px 0;
}

/* ---------- pantry ---------- */
.criteria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 30px; }
.criterion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.criterion .v { font-family: var(--mono); font-weight: 700; }
.criterion .l { font-size: 13px; color: var(--text-2); }

/* ---------- waitlist ---------- */
.waitlist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; text-align: left; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.waitlist h2 { font-size: 1.6rem; letter-spacing: -0.02em; }
.waitlist p { color: var(--text-2); margin-top: 8px; max-width: 48ch; }
.wl-form { display: flex; gap: 10px; }
.wl-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 11px 18px; color: var(--text); font-size: 14.5px; font-family: var(--font);
}
.wl-form input::placeholder { color: var(--text-3); }
.wl-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.wl-msg { font-size: 13px; margin-top: 10px; color: var(--text-2); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 36px 0 48px; margin-top: 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; font-size: 14px; color: var(--text-2); }
.foot-links a:hover { color: var(--text); }
.legal { font-size: 12.5px; color: var(--text-3); max-width: 88ch; margin-top: 20px; }
.asof { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

/* ---------- states ---------- */
.skeleton { border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 200% 100%; min-height: 120px; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: shimmer 1.4s infinite linear; }
  @keyframes shimmer { to { background-position: -200% 0; } }
}
.error-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--text-2); background: var(--surface); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .waitlist { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .criteria { grid-template-columns: 1fr; }
  .stats { flex-direction: column; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-links { display: none; }
  .hero { padding: 44px 0 36px; }
  section { padding: 40px 0; }
}
