/* MSWIM2D design system - geometric/computational aesthetic
   Distinct from MIDL: cooler steel-blue accent, slate ink, 2D ecliptic identity */
:root {
  --bg:    #FAFBFC;
  --ink:   #1A1F2E;
  --rule:  #1a1f2e1a;
  --mute:  #1a1f2e88;
  --accent: #5B8FA8;
  --accent-glow: #5b8fa830;
  --paper: #F0F3F6;
  /* data-confidence tiers: final reuses --accent (steel blue) */
  --tier-final: #5B8FA8;
  --tier-preliminary: #C77D11;  /* amber - provisional */
  --tier-prediction: #C0392B;   /* red - forecast */
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg); color: var(--ink);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55;
}
a { color: var(--ink); text-decoration: none; }
.mono, code, pre { font-family: "JetBrains Mono", monospace; }
strong { font-weight: 600; }
img { max-width: 100%; height: auto; }

/* ---------- shell ---------- */
.shell { max-width: 1200px; margin: 0 auto; padding: 0 56px; }

/* ---------- nav ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.nav-right {
  display: flex; align-items: center; gap: 30px;
  font: 500 14px/1 "Inter Tight", system-ui, sans-serif;
}
.nav-right a { color: var(--mute); transition: color .15s; }
.nav-right a:hover, .nav-right a.active { color: var(--ink); }
.nav-right .cta {
  border: 1px solid var(--accent); padding: 9px 16px; border-radius: 999px;
  color: var(--accent); transition: background .15s, color .15s;
}
.nav-right .cta:hover, .nav-right .cta.active {
  background: var(--accent); color: #fff;
}

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 14px; }
.logo svg, .logo img { display: block; flex-shrink: 0; }
.logo .word {
  font: 700 30px/1 "Rajdhani", sans-serif;
  letter-spacing: 0.04em; color: var(--ink); text-transform: uppercase;
}
.logo .tag {
  font: 400 12px/1 "Inter Tight", system-ui, sans-serif;
  color: var(--mute); margin-top: 5px;
}

/* ---------- hero (home page) ---------- */
.hero {
  padding: 74px 0 56px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px; align-items: center;
  border-bottom: 1px solid var(--rule);
}
.eyebrow {
  display: inline-block; text-decoration: none;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.eyebrow:hover { text-decoration: underline; }
.eyebrow-legacy { margin-left: 14px; color: var(--mute); }
h1 {
  font: 600 60px/0.96 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.03em; margin: 0 0 28px; text-wrap: balance; color: var(--ink);
}
.hero-body { font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 56ch; }
.hero-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 34px;
}
.hero-visual {
  display: flex; justify-content: flex-end; align-items: center;
}
.cta-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff; padding: 16px 22px; border-radius: 999px;
  font: 500 14px/1 "Inter Tight", sans-serif; letter-spacing: 0.02em;
  transition: background .15s, color .15s, transform 0.2s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.2s cubic-bezier(0.22,1,0.36,1);
  border: 0; cursor: pointer;
}
.cta-primary .arrow { width: 16px; height: 10px; }
.cta-primary:hover { background: var(--ink); color: #fff;
  transform: translateY(-2px); box-shadow: 0 4px 16px rgba(26,31,46,0.18); }
.cta-primary:active { transform: translateY(0) scale(0.98); box-shadow: none; }

/* ---------- page head (sub-pages) ---------- */
.page-head {
  padding: 64px 0 28px;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px; align-items: end;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { font-size: 60px; margin-bottom: 0; }
.page-head .lede {
  font-size: 16.5px; line-height: 1.6; color: var(--ink);
  max-width: 50ch; padding-bottom: 6px;
}

/* ---------- hero movie ---------- */
.hero-movie {
  max-width: 500px; width: 100%; height: auto; display: block;
  aspect-ratio: 1 / 1; object-fit: cover;
  /* Circular vignette: opaque center fading out to the page bg at the edges */
  -webkit-mask-image: radial-gradient(circle at center, #000 46%, rgba(0,0,0,0) 70%);
          mask-image: radial-gradient(circle at center, #000 46%, rgba(0,0,0,0) 70%);
}

/* ---------- sections ---------- */
section { padding: 56px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 32px; }
h2 {
  font: 600 36px/1.05 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.025em; margin: 0; color: var(--ink);
}
h3 {
  font: 600 19px/1.2 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.015em; margin: 28px 0 10px; color: var(--ink);
}
h4 {
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute); margin: 0 0 18px;
}
p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.65; }

/* ---------- cards / grid ---------- */
.grid-3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
}
.card {
  background: var(--paper); padding: 28px 26px;
}
.card p { font-size: 14.5px; margin: 0 0 8px; }
/* Equal-height cards whose action button is pinned to the bottom, so a
   shorter description doesn't leave its button floating higher than its
   neighbours' (the paragraph grows to fill the leftover space). */
.cards-bottom .card { display: flex; flex-direction: column; }
.cards-bottom .card p { flex: 1 0 auto; }
.card h4 { margin-bottom: 18px; }
.card .var { font-family: "JetBrains Mono", monospace; font-size: 13.5px; }

/* why section */
.why-lead { font-size: 17px; line-height: 1.6; max-width: 64ch; margin: 0 0 36px; }
.why-card h4 {
  font: 600 18px/1.2 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 12px;
}
.why-card .body { font-size: 14.5px; color: #1a1f2ec0; }
.more-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; padding-top: 16px;
  font: 500 13px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.more-link:hover { color: var(--accent); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 14.5px; }
thead th {
  text-align: left;
  font: 500 10.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
  padding: 12px 14px; border-bottom: 1px solid var(--rule); background: var(--paper);
}
tbody td { padding: 14px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td code, .var { font-family: "JetBrains Mono", monospace; font-size: 13.5px; }
.table-wrap { border: 1px solid var(--rule); background: var(--paper); overflow: hidden; }

/* ---------- code blocks ---------- */
pre {
  background: var(--paper); border: 1px solid var(--rule);
  padding: 18px 20px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.6; color: var(--ink); margin: 0 0 16px;
}
code { font-size: 0.92em; background: #1a1f2e0d; padding: 2px 5px; border-radius: 3px; }
pre code { background: transparent; padding: 0; }

/* ---------- lists ---------- */
ol, ul { padding-left: 0; list-style: none; counter-reset: step; }
ol li {
  counter-increment: step; padding-left: 50px; position: relative;
  margin-bottom: 14px; font-size: 15.5px; line-height: 1.6;
}
ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.18em; color: var(--accent);
}
ul.dotted li {
  padding-left: 28px; position: relative;
  margin-bottom: 12px; font-size: 15.5px; line-height: 1.6;
}
ul.dotted li::before {
  content: "\00B7"; position: absolute; left: 8px; color: var(--accent);
  font-weight: 700; font-size: 1.3em; line-height: 1.4;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--ink); color: var(--ink);
  background: transparent; cursor: pointer;
  transition: background .15s, color .15s, transform 0.2s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.2s cubic-bezier(0.22,1,0.36,1);
}
.btn:hover { background: var(--ink); color: var(--bg);
  transform: translateY(-1px); box-shadow: 0 3px 12px rgba(26,31,46,0.1); }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- download-basis bubble ---------- */
/* Small speech bubble anchored above the Download button. Each option is
   labeled by the exact vector columns it produces; the z column appears in
   both (it is shared between the bases). */
.dlpop { position: relative; display: inline-flex; }
.dlpop__bubble {
  position: absolute; bottom: calc(100% + 12px); left: 0; z-index: 30;
  min-width: 252px; max-width: min(320px, 86vw);
  padding: 12px; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26,31,46,0.14), 0 2px 6px rgba(26,31,46,0.08);
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; transform: translateY(6px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity .18s cubic-bezier(0.22,1,0.36,1),
              transform .18s cubic-bezier(0.22,1,0.36,1);
}
.dlpop__bubble.is-open { opacity: 1; transform: none; }
.dlpop__bubble::after {          /* caret pointing at the button */
  content: ""; position: absolute; bottom: -6px; left: 28px;
  width: 10px; height: 10px; background: var(--paper);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transform: rotate(45deg);
}
.dlpop__eyebrow {
  font: 600 10px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute);
  padding: 2px 10px 6px;
}
.dlpop__opt {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 4px;
  padding: 9px 10px; background: transparent;
  border: 1px solid transparent; border-radius: 9px;
  transition: background .15s ease, border-color .15s ease;
}
.dlpop__opt:hover { background: var(--bg); border-color: var(--rule); }
.dlpop__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dlpop__name {
  display: flex; align-items: center; gap: 8px;
  font: 600 13px/1 "Inter Tight", system-ui, sans-serif; color: var(--ink);
}
.dlpop__tag {
  font: 600 8.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 2.5px 7px;
}
.dlpop__cols { font: 500 11px/1.4 "JetBrains Mono", monospace; color: var(--mute); }
.dlpop__note {
  font: 500 10px/1.5 "JetBrains Mono", monospace; color: var(--mute);
  padding: 6px 10px 2px; border-top: 1px solid var(--rule); margin-top: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .dlpop__bubble { transition: none; }
}

/* ---------- field-variable selector (quicklook) ----------
   Segmented mono control: all variables visible, one active at a time.
   Grouped B / U / scalars like physics notation; active segment filled accent. */
.varsel { display: flex; flex-direction: column; gap: 9px; }
.varsel__eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 600 10.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute);
}
.varsel__eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.varsel__track {
  display: inline-flex; flex-wrap: wrap; align-items: stretch; gap: 4px;
  width: fit-content; max-width: 100%;
  padding: 5px; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(26,31,46,0.05);
}
.varsel__div { width: 1px; align-self: stretch; margin: 5px 6px; background: var(--rule); }
.varseg {
  appearance: none; cursor: pointer;
  font: 500 13.5px/1 "JetBrains Mono", monospace; letter-spacing: 0.02em;
  color: var(--mute); background: transparent;
  border: 1px solid transparent; border-radius: 9px;
  padding: 9px 14px; min-width: 40px; text-align: center;
  transition: background .18s ease, color .18s ease,
              transform .18s cubic-bezier(0.22,1,0.36,1), box-shadow .18s ease;
}
.varseg sub { font-size: 0.68em; font-weight: inherit; opacity: 0.82; vertical-align: -0.18em; }
.varseg:hover {
  color: var(--ink); background: var(--bg); border-color: var(--rule);
  transform: translateY(-1px);
}
.varseg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.varseg[aria-pressed="true"] {
  color: #fff; font-weight: 600;
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow), 0 1px 2px rgba(26,31,46,0.14);
}
.varseg[aria-pressed="true"]:hover { color: #fff; transform: translateY(-1px); }
.varseg[aria-pressed="true"]:active { transform: translateY(0) scale(0.97); }

/* ---------- forms ---------- */
fieldset {
  position: relative;
  border: 1px solid var(--rule); background: var(--paper);
  padding: 28px 24px 22px; margin: 0 0 18px; border-radius: 0;
}
legend {
  position: static; float: left; width: 100%;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  padding: 0 0 18px; margin: 0;
}
legend + * { clear: left; }
fieldset label {
  display: block;
  font: 500 11.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
  margin-bottom: 6px;
}
input[type="date"],
input[type="text"],
input[type="number"],
select {
  width: 100%; background: transparent; border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 6px 0;
  font: 500 16px/1.3 "Inter Tight", system-ui, sans-serif;
  color: var(--ink); outline: none;
  transition: border-bottom-color 0.25s ease;
  border-radius: 0; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus { border-bottom-color: var(--accent); }
/* flatpickr override: flatpickr swaps type=date -> type=text at init, so style
   its input to stay visually identical to the native fields above */
.flatpickr-input {
  width: 100%; background: transparent !important; border: 0 !important;
  border-bottom: 1px solid var(--ink) !important;
  padding: 6px 0 !important;
  font: 500 16px/1.3 "Inter Tight", system-ui, sans-serif !important;
  color: var(--ink) !important; outline: none !important;
  border-radius: 0 !important;
}
.flatpickr-input:focus { border-bottom-color: var(--accent) !important; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231A1F2E' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
  padding-right: 24px;
}
input[type="file"] {
  font: 500 14px/1.3 "Inter Tight", system-ui, sans-serif;
  color: var(--ink); padding: 8px 0;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 22px; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hint {
  font: 500 11px/1.5 "JetBrains Mono", monospace;
  letter-spacing: 0.06em; color: var(--mute); margin: 12px 0 0;
}
.hint strong { color: var(--ink); }

/* method-row: radio card groups */
.method-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-bottom: 0.75rem;
}
.method-row label {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 1px solid var(--rule); background: var(--bg);
  cursor: pointer; flex: 1; min-width: 200px;
  font-family: "Inter Tight", sans-serif; font-size: 14px;
  text-transform: none; letter-spacing: 0; color: var(--ink);
  transition: border-color .15s, background .15s, color .15s;
}
.method-row label:has(input:checked) {
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.method-row input[type="radio"] {
  width: 10px; height: 10px; appearance: none; -webkit-appearance: none;
  border-radius: 999px; border: 1.5px solid var(--ink);
  margin: 0; flex-shrink: 0;
}
.method-row label:has(input:checked) input[type="radio"] {
  background: #fff; border-color: #fff;
}
.method-row .method-name { font-weight: 600; }
.hint-inline { color: var(--mute); font-size: 11px; margin-left: 6px; }
.method-row label:has(input:checked) .hint-inline { color: inherit; opacity: 0.7; }

/* specs strip */
.specs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 18px;
}
.specs .card { padding: 18px 20px; }
.specs .k {
  font: 500 10.5px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px;
}
.specs .v {
  font: 500 22px/1.1 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.02em; color: var(--ink);
}

/* ---------- data-confidence tiers ---------- */
/* tier cards (top of the Data page): colored left edge per confidence level */
.specs-tiers .card { border-left: 3px solid var(--tier-final); }
.specs-tiers .tier-preliminary { border-left-color: var(--tier-preliminary); }
.specs-tiers .tier-prediction  { border-left-color: var(--tier-prediction); }
.specs-tiers .v { font-size: 18px; }                 /* date ranges are longer than "1 hour" */
.tier-note {
  font: 500 10.5px/1.4 "JetBrains Mono", monospace;
  color: var(--mute); margin-top: 10px;
}

/* tint the date fields to the tier the chosen date falls in (final = default ink) */
#start_date[data-tier="preliminary"], #end_date[data-tier="preliminary"] {
  border-bottom: 2px solid var(--tier-preliminary);
}
#start_date[data-tier="prediction"], #end_date[data-tier="prediction"] {
  border-bottom: 2px solid var(--tier-prediction);
}

/* warning beside the Fetch button - enumerates the tier(s) the request touches */
.tier-warning { font-size: 13px; line-height: 1.45; color: var(--mute); max-width: 52ch; }
.tier-warning.is-preliminary { color: var(--tier-preliminary); }
.tier-warning.is-prediction  { color: var(--tier-prediction); }
.tier-warning a { text-decoration: underline; }
.tier-warning strong { font-weight: 600; }

/* error messages */
.error-message {
  color: #c62828; background: #ffeaea;
  border: 1px solid #c62828; border-radius: 3px;
  padding: 12px 16px; margin-bottom: 14px; font-size: 14px;
}

/* submit row */
.submit-row { display: flex; align-items: center; gap: 18px; margin-top: 8px; }

/* or divider */
.or-divider {
  display: flex; align-items: center; gap: 18px;
  padding: 28px 0;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute);
}
.or-divider::before, .or-divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--rule);
}

/* results area */
.results-area {
  background: var(--paper); border: 1px solid var(--rule);
  padding: 28px 26px; margin-top: 18px;
}
.results-area h3 { margin-top: 0; }
.plot-placeholder {
  width: 100%; height: 320px;
  border: 1px dashed var(--rule); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font: 500 12px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.1em; color: var(--mute); margin-top: 14px;
}

/* ---------- citation ---------- */
.cite-toggle {
  display: inline-flex; gap: 0; border: 1px solid var(--ink);
  border-radius: 999px; overflow: hidden; margin-bottom: 18px; width: fit-content;
}
.cite-toggle button {
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 9px 18px; border: 0; background: transparent;
  color: var(--ink); cursor: pointer;
}
.cite-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
blockquote {
  margin: 0; padding: 22px 24px;
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  font-size: 14.5px; line-height: 1.6;
}
blockquote.ack {
  margin: 12px 0 0; font-size: 14px; line-height: 1.65;
}

/* contact grid */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 12px;
}
.contact-grid .card h3 { margin: 0 0 6px; }
.contact-affiliation {
  margin-top: 18px; font-size: 14px; color: var(--mute);
}

/* ---------- footer ---------- */
footer {
  padding: 32px 0 48px; border-top: 1px solid var(--rule); margin-top: 40px;
  display: flex; justify-content: space-between; align-items: center;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.45s cubic-bezier(0.22,1,0.36,1),
              transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > .card {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.22,1,0.36,1),
              transform 0.4s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.25s cubic-bezier(0.22,1,0.36,1);
}
.reveal-stagger > .card.card-visible { opacity: 1; transform: translateY(0); }

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-title-settle {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-animate .eyebrow { animation: hero-fade-up 0.5s cubic-bezier(0.22,1,0.36,1) 0.05s both; }
.hero-animate h1 { animation: hero-title-settle 0.55s cubic-bezier(0.22,1,0.36,1) 0.12s both; }
.hero-animate .hero-body { animation: hero-fade-up 0.5s cubic-bezier(0.22,1,0.36,1) 0.22s both; }
.hero-animate .hero-actions { animation: hero-fade-up 0.5s cubic-bezier(0.22,1,0.36,1) 0.3s both; }
.hero-animate .hero-visual { animation: hero-fade-up 0.55s cubic-bezier(0.22,1,0.36,1) 0.18s both; }
.page-head-animate > div { animation: hero-fade-up 0.5s cubic-bezier(0.22,1,0.36,1) 0.05s both; }
.page-head-animate .lede { animation: hero-fade-up 0.5s cubic-bezier(0.22,1,0.36,1) 0.15s both; }

/* nav underline */
.nav-right a:not(.cta) { position: relative; }
.nav-right a:not(.cta)::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}
.nav-right a:not(.cta):hover::after,
.nav-right a:not(.cta).active::after { transform: scaleX(1); }

/* view transitions */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.2s ease-out both vt-fade-out; }
::view-transition-new(root) { animation: 0.25s ease-out 0.05s both vt-fade-in; }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }
.page-transition-in { animation: page-enter 0.3s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- prediction page ---------- */
/* Inline status badge - same vocabulary as .eyebrow but tinted to read as a
   "forecast" caution rather than a section label. */
.badge {
  display: inline-block;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 7px 14px; margin-bottom: 22px;
}
/* Figures: model output / validation plots with a caption underneath. */
figure { margin: 0 0 8px; }
figure img {
  width: 100%; display: block;
  border: 1px solid var(--rule); background: #fff;
}
figcaption {
  font-size: 13.5px; line-height: 1.6; color: var(--mute);
  margin-top: 12px; margin-bottom: 24px; max-width: 70ch;
}
figcaption b { color: var(--ink); font-weight: 600; }
/* Callout: a bordered aside for "how to read this" caveats. */
.callout {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 22px 24px; margin: 8px 0 0;
}
.callout p { font-size: 14.5px; margin: 0 0 12px; }
.callout p:last-child { margin-bottom: 0; }
/* Inline curve-colour swatches referenced from the prose. */
.swatch { font-weight: 600; }
.swatch.truth { color: #3a57c0; }
.swatch.fcst  { color: #c0392b; }
/* Stat card value used in the prediction "at a glance" trio. */
.card .stat {
  font: 600 26px/1.1 "Inter Tight", system-ui, sans-serif;
  letter-spacing: -0.02em; color: var(--ink); margin-top: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { padding: 0 24px; }
  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 28px; }
  h1 { font-size: 42px; }
  .hero-actions { margin-top: 28px; }
  .hero-visual { justify-content: center; }
  .hero-movie { max-width: min(500px, 92vw); }
  .page-head { grid-template-columns: 1fr; gap: 24px; }
  .grid-3, .contact-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row-2 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
  .nav-right { gap: 16px; font-size: 13px; }
  .method-row { flex-direction: column; }
  .method-row label { min-width: unset; }
}
@media (max-width: 600px) {
  .nav-right { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
}
