/* ==========================================================================
   AirOps v2 — "After Hours"
   An alternate frontend to the industrial/blueprint v1 in /public.
   Direction: warm dark canvas, editorial serif display, one amber accent.
   No inline styles or <style> blocks anywhere: the CSP forbids them.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Surfaces climb from near-black to a raised card. */
  --ink: #0b0d10;
  --ink-2: #0f1216;
  --surface: #14181f;
  --surface-2: #1b212a;
  --surface-3: #222933;

  --line: rgb(255 255 255 / 9%);
  --line-2: rgb(255 255 255 / 16%);
  --line-3: rgb(255 255 255 / 26%);

  --text: #edeae3;
  --muted: #9aa2ae;
  --muted-2: #7c8592;

  /* The lit window at 9:47 PM. Single accent, used sparingly. */
  --amber: #ffb45c;
  --amber-deep: #e08e35;
  --amber-soft: rgb(255 180 92 / 14%);
  --mint: #58d9b0;
  --mint-soft: rgb(88 217 176 / 13%);
  --rose: #ff6b5e;
  --rose-soft: rgb(255 107 94 / 13%);

  --display: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --bar: 68px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow: 0 18px 44px -22px rgb(0 0 0 / 80%);
  --shadow-lg: 0 40px 90px -40px rgb(0 0 0 / 90%);

  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

/* --- 2. Base ------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 28px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

p,
h1,
h2,
h3,
h4,
dl,
dd,
figure,
fieldset {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Icons inherit their colour from text and are stroked, not filled. */
svg:not(.sprite):not(.logo-mark) {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Ambient warm light behind the page. Fixed so it never scrolls with content. */
.aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70ch 60ch at 78% -8%, rgb(255 180 92 / 11%), transparent 70%),
    radial-gradient(60ch 50ch at 4% 6%, rgb(88 217 176 / 6%), transparent 68%),
    radial-gradient(80ch 60ch at 50% 108%, rgb(255 180 92 / 6%), transparent 72%);
}

/* --- 3. Typography ------------------------------------------------------- */

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
}

h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
}

/* The italic clause is the one flourish this design allows itself. */
h1 em,
h2 em {
  display: block;
  font-style: italic;
  color: var(--amber);
}

h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.017em;
  line-height: 1.25;
}

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.lead,
.head-lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.19rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.footnote {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--muted-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.footnote svg {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  margin-top: 0.28em;
  color: var(--muted-2);
}

.footnote a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgb(255 180 92 / 40%);
  text-underline-offset: 3px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  color: var(--amber);
  font-size: 0.94rem;
  font-weight: 500;
}

.link-arrow svg {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* --- 4. Layout ----------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

/* Bands break the vertical rhythm without needing a new colour. */
.section-band {
  background: linear-gradient(180deg, var(--ink-2), rgb(15 18 22 / 20%));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.head {
  display: grid;
  gap: 1.15rem;
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.head-lead {
  max-width: 54ch;
}

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.split-copy {
  display: grid;
  gap: 1.3rem;
}

@media (min-width: 1000px) {
  .split {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .split-copy {
    position: sticky;
    top: calc(var(--bar) + 3rem);
  }
}

/* --- 5. Buttons and pills ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.22s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 10px 30px -14px rgb(255 180 92 / 60%);
}

.btn-accent:hover {
  background: #ffc178;
}

.btn-accent[disabled] {
  background: var(--surface-3);
  color: var(--muted-2);
  box-shadow: none;
  cursor: progress;
}

.btn-accent[disabled] svg {
  display: none;
}

.btn-ghost {
  border-color: var(--line-2);
  background: rgb(255 255 255 / 3%);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--line-3);
  background: rgb(255 255 255 / 7%);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.34rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 4%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.pill-amber {
  border-color: rgb(255 180 92 / 34%);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill-mint {
  border-color: rgb(88 217 176 / 32%);
  background: var(--mint-soft);
  color: var(--mint);
}

/* --- 6. Top bar and mobile sheet ----------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-top: 0.85rem;
  transition: padding-top 0.3s var(--ease);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: min(var(--shell), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 0.5rem 0.5rem 0.5rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

/* The bar only earns its chrome once you've left the hero. */
.topbar.is-stuck {
  padding-top: 0.5rem;
}

.topbar.is-stuck .topbar-inner {
  border-color: var(--line);
  background: rgb(11 13 16 / 82%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(140%);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.logo-mark {
  width: 27px;
  height: 27px;
  border-radius: 9px;
}

.logo-word {
  font-family: var(--display);
  font-size: 1.42rem;
  letter-spacing: -0.01em;
}

.nav {
  display: none;
  margin-inline: auto;
  gap: 0.25rem;
}

.nav a {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: rgb(255 255 255 / 5%);
}

/* Scroll-spy state, driven by IntersectionObserver in app.js. */
.nav a[aria-current="true"] {
  color: var(--text);
  background: rgb(255 255 255 / 7%);
}

.topbar-cta {
  display: none;
}

.sheet-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 4%);
}

.sheet-bars {
  display: grid;
  gap: 5px;
}

.sheet-bars i {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease);
}

.is-sheet-open .sheet-bars i:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.is-sheet-open .sheet-bars i:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding: 6rem var(--gutter) 3rem;
  background: rgb(11 13 16 / 97%);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.sheet.is-open {
  opacity: 1;
  visibility: visible;
}

.sheet-nav {
  display: grid;
  gap: 0.35rem;
}

.sheet-nav a {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 2rem;
}

.sheet-note {
  color: var(--muted-2);
  font-size: 0.9rem;
  text-align: center;
}

@media (min-width: 900px) {
  .nav,
  .topbar-cta {
    display: flex;
  }

  .sheet-toggle,
  .sheet {
    display: none;
  }
}

/* --- 7. Hero ------------------------------------------------------------- */

.hero {
  padding-top: calc(var(--bar) + clamp(2.5rem, 7vw, 5.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.75rem, 6vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
  max-width: 34ch;
}

.hero-copy .lead {
  max-width: 46ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 3%);
  color: var(--muted);
  font-size: 0.815rem;
  font-weight: 500;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgb(88 217 176 / 18%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0.4rem;
  color: var(--muted-2);
  font-size: 0.87rem;
  line-height: 1.45;
}

.proof-chips {
  display: flex;
  flex: none;
}

.proof-chips i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.proof-chips i + i {
  margin-left: -9px;
}

@media (min-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- 8. Live console (hero panel) --------------------------------------- */

.console {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 4%), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow-lg);
}

.console-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.console-title {
  color: var(--muted);
}

.console-clock {
  margin-left: auto;
  letter-spacing: 0.08em;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.22rem 0.6rem 0.22rem 0.5rem;
  border: 1px solid rgb(88 217 176 / 30%);
  border-radius: var(--r-pill);
  background: var(--mint-soft);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentcolor;
}

.console-call {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}

.call-ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
}

.call-ring svg {
  width: 18px;
  height: 18px;
}

.call-body {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.call-body b {
  font-size: 0.95rem;
  font-weight: 600;
}

.call-body span {
  color: var(--muted-2);
  font-size: 0.81rem;
}

.call-timer {
  margin-left: auto;
  flex: none;
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.console-steps {
  display: grid;
  gap: 2px;
}

.console-steps li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  border-radius: var(--r-sm);
  color: var(--muted-2);
  font-size: 0.9rem;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.step-dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--line-3);
  border-radius: 50%;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.step-name {
  min-width: 0;
}

.step-value {
  margin-left: auto;
  flex: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.console-steps li.is-done {
  color: var(--text);
}

.console-steps li.is-done .step-dot {
  border-color: var(--mint);
  background: var(--mint);
}

.console-steps li.is-done .step-value {
  opacity: 1;
  color: var(--muted-2);
}

.console-steps li.is-active {
  background: var(--amber-soft);
  color: var(--amber);
}

.console-steps li.is-active .step-dot {
  border-color: var(--amber);
  background: transparent;
}

.console-steps li.is-active .step-value {
  opacity: 1;
  color: var(--amber);
}

.console-outcome {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid rgb(88 217 176 / 22%);
  border-radius: var(--r);
  background: var(--mint-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.console.is-resolved .console-outcome {
  opacity: 1;
  transform: none;
}

.outcome-tick {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
  color: var(--mint);
}

.console-outcome > span {
  display: grid;
  gap: 0.12rem;
}

.console-outcome b {
  font-size: 0.94rem;
  font-weight: 600;
}

.console-outcome > span > span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* --- 9. Facts strip ----------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
  overflow: hidden;
}

.facts > div {
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem 1.3rem;
  background: var(--ink);
}

.facts dt {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.facts dd {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.1;
}

.facts-bordered {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--line);
}

.facts-bordered > div {
  background: var(--ink-2);
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- 10. Leak list ------------------------------------------------------ */

.leaks {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.leaks li {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) 0 clamp(1.6rem, 3vw, 2.2rem);
  background: var(--ink);
}

.leak-index {
  color: var(--muted-2);
}

.leak-figure {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.5vw, 3.9rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--amber);
}

.leaks h3 {
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--text);
}

.leaks p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.93rem;
}

@media (min-width: 900px) {
  .leaks {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }

  .leaks li {
    padding-inline: clamp(1.4rem, 2.5vw, 2rem);
  }

  .leaks li:first-child {
    padding-left: 0;
  }
}

.banner {
  display: grid;
  gap: 0.7rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  border: 1px solid rgb(255 107 94 / 22%);
  border-radius: var(--r-lg);
  background:
    radial-gradient(50ch 30ch at 8% 0%, var(--rose-soft), transparent 70%),
    var(--surface);
}

.banner .tag {
  color: var(--rose);
}

.banner-line {
  max-width: 30ch;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.1;
}

/* --- 11. Bento grid (systems) ------------------------------------------- */

.bento {
  display: grid;
  gap: 14px;
}

.tile {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition:
    border-color 0.28s var(--ease),
    transform 0.28s var(--ease),
    background-color 0.28s var(--ease);
}

.tile:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.3rem;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgb(255 255 255 / 4%);
  color: var(--muted);
}

.tile-icon svg {
  width: 18px;
  height: 18px;
}

.tile-code {
  color: var(--muted-2);
}

.tile p:not(.tile-code) {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.945rem;
}

.tile .pill {
  margin-top: 0.5rem;
}

/* The lead system gets the accent treatment and the widest cell. */
.tile-hero {
  border-color: rgb(255 180 92 / 26%);
  background:
    radial-gradient(46ch 34ch at 88% 6%, var(--amber-soft), transparent 72%),
    var(--surface);
}

.tile-hero:hover {
  border-color: rgb(255 180 92 / 40%);
}

.tile-hero .tile-icon {
  border-color: rgb(255 180 92 / 30%);
  background: var(--amber-soft);
  color: var(--amber);
}

.tile-hero h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
  }

  .tile {
    grid-column: span 2;
  }

  .tile-hero,
  .tile-wide {
    grid-column: span 4;
  }
}

.marquee {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(2.2rem, 4vw, 3rem);
  padding-top: clamp(1.6rem, 3vw, 2.2rem);
  border-top: 1px solid var(--line);
}

.marquee-window {
  overflow: hidden;
  /* Fade the ends so the loop has no visible seam. */
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
}

/* Spacing lives on the items, not as a container gap: with N items and N-1
   gaps, translateX(-50%) would land half a gap short of a seamless loop. */
.marquee-track span {
  flex: none;
  margin-right: clamp(1.75rem, 4vw, 3.25rem);
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  white-space: nowrap;
}

.motion-ready .marquee-track {
  animation: drift 34s linear infinite;
}

.marquee-window:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}

/* --- 12. Ownership paths ------------------------------------------------ */

.paths {
  display: grid;
  gap: 14px;
}

.path {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1.1rem;
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.path h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.path dl {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.path dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  background: var(--surface);
}

.path dt {
  color: var(--muted-2);
  font-size: 0.85rem;
}

.path dd {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.93rem;
  font-weight: 500;
  text-align: right;
}

.path dd svg {
  width: 0.95em;
  height: 0.95em;
  opacity: 0.9;
}

.path .is-bad dd {
  color: var(--rose);
}

.path .is-warn dd {
  color: #d8b46a;
}

.path .is-good dd {
  color: var(--mint);
}

.path-best {
  border-color: rgb(255 180 92 / 34%);
  background:
    radial-gradient(50ch 40ch at 50% -10%, var(--amber-soft), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.path-best dl > div,
.path-best dl {
  background: transparent;
}

.path-best dl {
  background: var(--line);
}

.path-best dl > div {
  background: #171b22;
}

.path-best h3 {
  color: var(--amber);
}

/* Tab that hangs off the top edge of the recommended card. */
.path-flag {
  position: absolute;
  top: 0;
  left: clamp(1.4rem, 2.6vw, 1.9rem);
  padding: 0.3rem 0.7rem;
  border-radius: 0 0 var(--r-xs) var(--r-xs);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.6rem;
}

.path-best h3 {
  margin-top: 0.85rem;
}

@media (min-width: 900px) {
  .paths {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- 13. Process steps -------------------------------------------------- */

.steps {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.steps li {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.step-week {
  color: var(--amber);
}

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0.35rem 0 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.steps p {
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.93rem;
}

@media (min-width: 1000px) {
  .steps {
    position: relative;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 2.5vw, 2.25rem);
  }

  /* The rail sits behind the numbered nodes. */
  .steps::before {
    content: "";
    position: absolute;
    top: 62px;
    left: 19px;
    right: 19px;
    height: 1px;
    background: linear-gradient(
      90deg,
      var(--line-2),
      var(--line-2) 78%,
      transparent
    );
  }

  .steps li {
    position: relative;
  }
}

/* --- 14. Estimator ------------------------------------------------------ */

.estimator {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.estimator-readout {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.estimator-readout strong {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 4.6rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.estimator-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.35rem;
  color: var(--muted-2);
  font-size: 0.88rem;
}

.estimator-sub i {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.slider {
  display: grid;
  gap: 0.6rem;
}

.slider label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.925rem;
  color: var(--muted);
}

.slider output {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

/* Range inputs need per-engine track/thumb rules; --fill is set in app.js. */
input[type="range"] {
  --fill: 30%;

  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: grab;
}

input[type="range"]:active {
  cursor: grabbing;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    90deg,
    var(--amber) var(--fill),
    var(--surface-3) var(--fill)
  );
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 2px 10px -2px rgb(255 180 92 / 70%);
  transition: transform 0.15s var(--ease);
}

input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--amber);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--amber);
}

input[type="range"]:focus-visible {
  outline-offset: 6px;
}

/* --- 15. Pricing -------------------------------------------------------- */

.plans {
  display: grid;
  gap: 14px;
}

.plan {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.plan-code {
  color: var(--amber);
}

.plan h3 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 400;
}

.plan dl {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.plan dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  background: var(--surface);
}

.plan dt {
  color: var(--muted-2);
  font-size: 0.87rem;
}

.plan dd {
  font-family: var(--mono);
  font-size: 0.93rem;
  font-weight: 500;
}

.plan > p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.945rem;
}

.plan-featured {
  border-color: rgb(255 180 92 / 30%);
  background:
    radial-gradient(50ch 36ch at 92% 0%, var(--amber-soft), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.plan-featured dl > div {
  background: #171b22;
}

.plan-featured dd {
  color: var(--amber);
}

@media (min-width: 820px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 16. Team ----------------------------------------------------------- */

.people {
  display: grid;
  gap: 14px;
}

.person {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.person-mono {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: rgb(255 255 255 / 4%);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.person-role {
  color: var(--muted-2);
}

.person h3 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 400;
}

.person ul {
  display: grid;
  gap: 0.55rem;
  margin: 0.2rem 0 0.4rem;
}

.person li,
.ticks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.945rem;
  line-height: 1.5;
}

.person li svg,
.ticks li svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.28em;
  color: var(--mint);
}

@media (min-width: 820px) {
  .people {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 17. Check-up form -------------------------------------------------- */

.ticks {
  display: grid;
  gap: 0.6rem;
}

.form-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

/* display:grid above would otherwise beat the UA sheet's [hidden] rule. */
.form[hidden] {
  display: none;
}

.form-top {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.form-top strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.field > label,
.segmented legend {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field > label small {
  font-size: inherit;
  opacity: 0.65;
  text-transform: none;
  letter-spacing: 0.08em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.98rem;
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
  opacity: 0.75;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--line-2);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

/* Chevron drawn with a rotated border so no external asset is needed. */
.select {
  position: relative;
}

.select select {
  appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
}

.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.05rem;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-soft);
}

.err {
  color: var(--rose);
  font-size: 0.83rem;
}

.err:empty {
  display: none;
}

.err-consent {
  margin-top: -0.75rem;
}

/* Segmented radio group replaces v1's plain radio row. */
.seg-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.seg span {
  display: grid;
  place-items: center;
  padding: 0.62rem 0.4rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.seg:hover span {
  background: rgb(255 255 255 / 5%);
  color: var(--text);
}

.seg input:checked + span {
  background: var(--amber);
  color: var(--ink);
}

.seg input:focus-visible + span {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
}

.consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.consent-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 21px;
  height: 21px;
  margin-top: 0.12rem;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface-2);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.consent-box svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.consent input:checked + .consent-box {
  border-color: var(--amber);
  background: var(--amber);
}

.consent input:checked + .consent-box svg {
  opacity: 1;
  transform: none;
}

.consent input:focus-visible + .consent-box {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.consent-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  color: var(--rose);
  font-size: 0.9rem;
}

.form-status:empty {
  display: none;
}

@media (min-width: 620px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-wide {
    grid-column: 1 / -1;
  }
}

/* Success replaces the form outright rather than appending a status line. */
.receipt {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background:
    radial-gradient(48ch 34ch at 50% -6%, var(--mint-soft), transparent 72%),
    var(--surface);
}

.receipt[hidden] {
  display: none;
}

.receipt-tick {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(88 217 176 / 30%);
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
}

.receipt-tick svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.receipt h3 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 400;
}

.receipt dl {
  display: grid;
  gap: 1px;
  margin: 0.4rem 0 0.6rem;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.receipt dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  background: var(--surface);
}

.receipt dt {
  color: var(--muted-2);
  font-size: 0.87rem;
}

.receipt dd {
  font-weight: 500;
}

.receipt dd.mono {
  font-size: 0.85rem;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.receipt .btn {
  width: fit-content;
}

/* --- 18. Footer and version switch -------------------------------------- */

.footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(4.5rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-grid > div {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.footer p {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer p.mono {
  color: var(--muted-2);
}

.footer a:not(.logo) {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.footer a:not(.logo):hover {
  color: var(--amber);
}

.footer-brand .logo {
  margin-bottom: 0.35rem;
}

.footer-meta {
  gap: 0.4rem;
  color: var(--muted-2);
  font-size: 0.87rem;
}

@media (min-width: 780px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 0.9fr;
    gap: 2.5rem;
  }

  .footer-meta {
    text-align: right;
    justify-items: end;
  }
}

/* Quick A/B switch between the two frontends. */
.version-switch {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.4rem 0.3rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgb(11 13 16 / 88%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
}

.version-switch .mono {
  margin-right: 0.1rem;
}

.version-switch a,
.version-switch .is-current {
  padding: 0.24rem 0.6rem;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-weight: 500;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.version-switch a:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--text);
}

.version-switch .is-current {
  background: var(--amber);
  color: var(--ink);
}

/* --- 19. Motion --------------------------------------------------------- */

/* Reveals only engage once JS confirms motion is welcome, so a no-JS or
   reduced-motion visitor never gets stuck with invisible content. */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .marquee-track {
    animation: none !important;
  }
}

@media print {
  .topbar,
  .sheet,
  .version-switch,
  .aura,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
