/* ==========================================================================
   Lumavik — lumavik.org
   Direction: the page is a sky. The hero occupies the atmosphere, a horizon
   line sits at the fold, and everything below it is ground: denser, quieter,
   editorial. Colour is taken from the app icon's aurora spectrum, never from
   a generic dark-mode palette — the band is the brand.
   ========================================================================== */

:root {
  /* Sky, top to bottom, exactly as the icon grades it. */
  --sky-hi: #160b44;
  --sky-mid: #0a0530;
  --sky-lo: #04020f;
  --ground: #070a1c;
  --ground-2: #0b1026;
  --limb: #0d1836;

  /* Aurora spectrum. These seven stops are the only chromatic vocabulary. */
  --a-magenta: #ff2ec0;
  --a-pink: #ff6fdc;
  --a-lime: #c9ff6e;
  --a-green: #2bff96;
  --a-jade: #12f09a;
  --a-teal: #0bd9d4;
  --a-blue: #2a86ff;
  --spectrum: linear-gradient(
    90deg,
    var(--a-magenta) 0%, var(--a-pink) 16%, var(--a-lime) 30%,
    var(--a-green) 46%, var(--a-jade) 62%, var(--a-teal) 82%, var(--a-blue) 100%
  );

  --star: #eef0ff;
  --ink: #e6e9fb;
  --ink-dim: #9ba4d0;
  --ink-faint: #737ca9;
  --rule: rgba(155, 164, 208, 0.16);
  --rule-strong: rgba(155, 164, 208, 0.32);

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1160px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: var(--a-green); color: #04020f; }

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--a-green); color: #04020f; padding: .7rem 1.1rem;
  font-weight: 700; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- type scale ---------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.05rem, 4.3vw, 3.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--a-teal);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: '';
  width: 26px; height: 2px; border-radius: 2px;
  background: var(--spectrum);
  flex: none;
}

.lede { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--ink-dim); }

.spectrum-text {
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ----------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 10, 28, .72);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; gap: 1.4rem;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.16rem;
  letter-spacing: -.02em; text-decoration: none; margin-right: auto;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links { display: flex; align-items: center; gap: 1.35rem; }
.nav-links a {
  text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink-dim);
  transition: color .18s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
/* The CTA is an .a inside .nav-links, so it loses on specificity unless it is restated. */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #04020f; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--sky-lo); border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1.25rem; transform: translateY(-12px); opacity: 0;
    pointer-events: none; transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
  .nav-links .btn { margin-top: 1rem; border-bottom: 0; text-align: center; }
  body.nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-toggle {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: transparent; border: 1px solid var(--rule-strong); color: var(--ink); cursor: pointer;
  }
}

/* ---------- buttons ------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: .72rem 1.3rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  background: transparent; appearance: none; -webkit-appearance: none;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s;
}
.btn-primary {
  background: var(--a-green); color: #04020f;
  box-shadow: 0 0 0 rgba(43, 255, 150, 0);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(43, 255, 150, .22); }
.btn-ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--a-teal); color: var(--a-teal); }

/* ---------- store badges -------------------------------------------------- */

.stores { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0; }
.store-badge {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .6rem 1.15rem .62rem; border-radius: 12px; text-decoration: none;
  background: rgba(230, 233, 251, .06); border: 1px solid var(--rule-strong);
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.store-badge:hover { border-color: var(--a-teal); background: rgba(11, 217, 212, .08); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.sb-text { display: flex; flex-direction: column; line-height: 1.1; }
.sb-small { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.sb-big { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
/* A blanket opacity here halved the contrast of both labels and failed WCAG AA. Mute
   with explicit colours instead, so "coming soon" still reads as inactive but legible. */
.store-badge.soon { cursor: default; border-style: dashed; }
.store-badge.soon:hover { border-color: var(--rule-strong); background: rgba(230, 233, 251, .06); }
.store-badge.soon .sb-big { color: var(--ink-dim); }
.store-badge.soon .sb-small { color: var(--ink-dim); }
.store-badge.soon svg { opacity: .65; }

/* ==========================================================================
   HERO — the sky
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4rem) 0 0;
  background: linear-gradient(180deg, var(--sky-hi) 0%, var(--sky-mid) 44%, var(--sky-lo) 100%);
  isolation: isolate;
  overflow: hidden;
}

/* Starfield: a static, hand-placed set — a random scatter reads as noise. */
.stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: var(--star); opacity: .55;
  animation: twinkle 5.5s var(--ease-in-out) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .22; } 50% { opacity: .8; } }

/* The band. Three stacked arcs, blurred, drifting — the icon, made ambient. */
/* Three soft curtains rising from behind the horizon. Masked with radial gradients
   rather than clip-path: a clipped ellipse leaves a hard edge that cuts across the
   headline, which is exactly what an aurora does not look like. */
.band-stack {
  position: absolute; left: 50%; bottom: 0; width: 200%; height: min(58%, 520px);
  transform: translateX(-50%); z-index: 0; pointer-events: none;
  opacity: var(--band-boost, .75);
  transition: opacity 1.2s var(--ease-out);
}
.band {
  position: absolute; inset: 0;
  background: var(--spectrum);
  mix-blend-mode: screen;
  will-change: transform;
}
.band-1 {
  filter: blur(70px); opacity: .5;
  mask-image: radial-gradient(ellipse 46% 92% at 50% 108%, #000 12%, rgba(0,0,0,.45) 48%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 46% 92% at 50% 108%, #000 12%, rgba(0,0,0,.45) 48%, transparent 76%);
  animation: drift-a 26s var(--ease-in-out) infinite alternate;
}
.band-2 {
  filter: blur(38px); opacity: .42;
  mask-image: radial-gradient(ellipse 34% 66% at 44% 112%, #000 8%, rgba(0,0,0,.4) 44%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 34% 66% at 44% 112%, #000 8%, rgba(0,0,0,.4) 44%, transparent 72%);
  animation: drift-b 19s var(--ease-in-out) infinite alternate;
}
.band-3 {
  filter: blur(16px); opacity: .38;
  mask-image: radial-gradient(ellipse 26% 34% at 56% 116%, #000 6%, rgba(0,0,0,.35) 40%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse 26% 34% at 56% 116%, #000 6%, rgba(0,0,0,.35) 40%, transparent 68%);
  animation: drift-c 15s var(--ease-in-out) infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(-2%, 2%, 0) scaleY(1); } to { transform: translate3d(2%, -2%, 0) scaleY(1.1); } }
@keyframes drift-b { from { transform: translate3d(2%, 1%, 0) scaleX(1); } to { transform: translate3d(-3%, -2%, 0) scaleX(1.08); } }
@keyframes drift-c { from { transform: translate3d(-2%, 1%, 0); } to { transform: translate3d(3%, -1%, 0); } }

/* The horizon: the Earth's limb from the icon, closing the hero.
   Explicit pixel height — a percentage bottom offset on an aspect-ratio circle scales
   with the hero and swallows the whole section on tall viewports. */
.limb {
  position: absolute; left: 50%; bottom: -190px; width: 200%; height: 420px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, var(--limb) 0%, #070c1e 40%, var(--ground) 78%);
  box-shadow: 0 -1px 0 0 rgba(201, 255, 110, .38), 0 -18px 70px -12px rgba(43, 255, 150, .3);
  z-index: 1;
}

.hero-inner {
  position: relative; z-index: 2;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  min-height: min(64vh, 560px);
}
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

.hero h1 { margin-bottom: 1.2rem; }
.hero-sub { max-width: 34rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem;
  font-family: var(--font-mono); font-size: .74rem; color: var(--ink-faint);
}
.hero-trust span { border: 1px solid var(--rule); border-radius: 999px; padding: .28rem .7rem; }

/* ---------- the live panel: the signature element -------------------------- */

.live {
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  background: rgba(4, 2, 15, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.live-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
}
.live-title {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-dim);
}
.live-dot {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .7rem; color: var(--a-green);
}
.live-dot b {
  width: 7px; height: 7px; border-radius: 50%; background: var(--a-green);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.live-dot.stale, .live-dot.stale b { color: var(--ink-faint); background: var(--ink-faint); }

.kp-row { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: center; padding: 1.3rem 0; }
.kp-value {
  font-family: var(--font-display); font-weight: 800; font-size: 4.4rem;
  line-height: .85; letter-spacing: -.05em;
}
.kp-meta { font-size: .93rem; color: var(--ink-dim); }
.kp-meta b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }

/* Kp scale bar: nine steps, the spectrum used as data, not decoration. */
.kp-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: .2rem 0 .5rem; }
.kp-scale i {
  height: 26px; border-radius: 3px; background: rgba(230, 233, 251, .1);
  transition: background .4s var(--ease-out), transform .4s var(--ease-out);
}
.kp-scale i.on { background: var(--spectrum); background-size: 1000% 100%; }
.kp-scale i.now { transform: scaleY(1.35); }
.kp-ticks {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px;
  font-family: var(--font-mono); font-size: .62rem; color: var(--ink-faint); text-align: center;
}

.forecast { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.forecast-title {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: .7rem;
}
.forecast-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; align-items: end; height: 62px; }
.fc { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 4px; }
.fc i { display: block; border-radius: 3px 3px 0 0; background: var(--spectrum); opacity: .8; min-height: 3px; }
.fc span { font-family: var(--font-mono); font-size: .58rem; color: var(--ink-faint); text-align: center; }

.live-note {
  margin: 1rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--ink-faint);
}
.live-note a { color: var(--a-teal); }

/* ==========================================================================
   Sections below the horizon
   ========================================================================== */

section { position: relative; }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--ground-2); border-block: 1px solid var(--rule); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section-head p { color: var(--ink-dim); margin-top: 1rem; }

.grid-3 { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--rule); border-radius: 16px; padding: 1.5rem;
  background: rgba(230, 233, 251, .028);
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--rule-strong); transform: translateY(-3px); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--ink-dim); font-size: .95rem; margin: 0; }
.card-num {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em;
  color: var(--a-teal); display: block; margin-bottom: .9rem;
}

/* Screens — the app, on the ground. */
.screens { display: flex; gap: 1.2rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; }
.screens img {
  width: 236px; flex: none; scroll-snap-align: center; border-radius: 18px;
}
@media (min-width: 1020px) { .screens { justify-content: center; overflow: visible; } }

/* Tools index cards */
.tool-card { display: grid; grid-template-rows: auto 1fr auto; gap: .8rem; }
.tool-card .go { font-family: var(--font-mono); font-size: .75rem; color: var(--a-green); }

/* Pricing */
.price-grid { display: grid; gap: 1.2rem; max-width: 780px; }
@media (min-width: 720px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price {
  border: 1px solid var(--rule); border-radius: 18px; padding: 1.7rem;
  background: rgba(230, 233, 251, .03);
}
.price.featured { border-color: var(--a-green); background: rgba(43, 255, 150, .05); }
.price h3 { margin-bottom: .3rem; }
.price .amount { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; }
.price .per { color: var(--ink-faint); font-size: .9rem; }
.price ul { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.price li { padding: .38rem 0 .38rem 1.5rem; position: relative; font-size: .94rem; color: var(--ink-dim); }
.price li::before { content: ''; position: absolute; left: 0; top: .95em; width: 8px; height: 2px; background: var(--a-green); }

/* FAQ */
.faq-list { max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.015em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: .4rem; top: 1.6rem; width: 11px; height: 11px;
  border-right: 2px solid var(--a-teal); border-bottom: 2px solid var(--a-teal);
  transform: rotate(45deg); transition: transform .22s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { color: var(--ink-dim); margin: 0 0 1.2rem; max-width: 62ch; }

/* Footer */
footer {
  padding: 3rem 0 2.5rem; border-top: 1px solid var(--rule);
  background: var(--sky-lo); font-size: .88rem; color: var(--ink-faint);
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.foot-links a { color: var(--ink-dim); text-decoration: none; }
.foot-links a:hover { color: var(--a-teal); }
.foot-note { margin: 1.6rem 0 0; max-width: 62rem; font-size: .8rem; line-height: 1.6; }

/* Entrance choreography */
[data-anim] { opacity: 0; transform: translateY(18px); }
body.ready [data-anim] {
  animation: rise .75s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }
body.no-js [data-anim] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-anim] { opacity: 1; transform: none; }
}


/* ==========================================================================
   Review fixes — 2026-07-31
   ========================================================================== */

/* 1. Dark sections lost their text colour: `.card p` and `.section-head p` are
   declared later at equal specificity, so they overrode the section override and
   painted dark ink on a dark ground. Restate them with more specificity. */
/* Lumavik is dark throughout; no light-on-light inversion to correct. */

/* 2. A two-line label ("Target concentration (mg/mL)") pushed its own input below its
   neighbours'. Reserving two lines was the wrong fix: `em` resolves against the label's
   own 0.68rem size, so 2.5em fell short of two lines, and it wasted space on every
   single-line label anyway.

   Instead make each field a grid whose first row absorbs the slack. Grid items already
   stretch to the tallest field in the row, so pinning the label to the bottom of a 1fr
   row lines up every control — and costs nothing when all the labels are short. */
.field label {
  /* Two lines, measured against the label's own size. The first attempt used
     `min-height: 2.5em` while line-height was still inherited at 1.62, so two lines
     needed ~3.2em and the reserve fell short — which is why the input still dropped.
     Pinning line-height here makes 2.6em exactly two lines at any of the three sites'
     label sizes. A nested grid cannot do this: sibling fields are separate grids and
     cannot share a row height, so the second row of a wrapping field set broke. */
  line-height: 1.3;
  min-height: 2.6em;
  display: flex;
  align-items: flex-end;
}

/* 3. Readouts must never wrap: "5.00 mg/mL" breaking across two lines made one cell
   taller than the rest and broke the row. Shrink the type instead of wrapping. */
.rig-cell .v, .readout .cell .v {
  white-space: nowrap;
  font-size: clamp(1.15rem, 3.4vw, 1.55rem);
}

/* 4. Mobile install bar. The store badges sit at the top of the page only, so on a
   phone the fastest route to an install disappears the moment someone scrolls. */
.install-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(4, 2, 15, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule-strong);
}
.install-bar span { color: var(--ink-dim); font-size: 13px; line-height: 1.35; min-width: 0; }
.install-bar a {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  white-space: nowrap; background: var(--a-green); color: #04020f;
}
@media (max-width: 860px) {
  .install-bar { display: flex; }
  body { padding-bottom: 76px; }
}
@media print { .install-bar { display: none !important; } }

.price-note { margin: 1.3rem 0 0; font-size: .95rem; color: var(--ink-3, var(--ink-faint)); }

/* Store badges must not inherit their section's text colour: the badge keeps its own
   light background everywhere, so inheriting a dark section's near-white ink made the
   wordmark disappear. */
.store-badge, .store-badge:hover { color: var(--ink); }
.store-badge .sb-big { color: var(--ink); }
.store-badge .sb-small { color: var(--ink-dim); }

/* tabular-nums belongs on numbers, not on the whole document: inherited globally it also
   swaps the comma and full stop for their tabular variants, which are digit-width, and
   every heading ends up with a visible gap before its punctuation. Scope it. */
.num, table, .schedule, .readout, .rig-out, .rig-cell, .kp-value, .kp-scale, .kp-ticks,
.forecast-strip, .month-grid, .bp-entry, .bp-entry input, .verdict-pair, .reading-note,
.logsheet, .reading-row, .field input, .field select, .cmp-table {
  font-variant-numeric: tabular-nums;
}

/* ---------- /get/ flow: desktop modal + QR ---------- */
.get-modal {
  border: 1px solid var(--rule-strong); border-radius: 18px; padding: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 420px; width: calc(100% - 2.5rem); background: var(--ground-2); color: var(--ink);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .55); text-align: center;
}
.get-modal::backdrop { background: rgba(4, 8, 16, .62); backdrop-filter: blur(3px); }
.get-modal h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.get-modal p { color: var(--ink-dim); font-size: .95rem; }
.get-modal .stores { justify-content: center; }
/* A modal <dialog> is placed in the top layer by the UA. Giving it position:relative
   drops it back into normal flow at the end of the document, so opening it yanked the
   page instead of centring the dialog. The close button therefore sits in a flex row
   rather than being absolutely positioned. */
.get-top { display: flex; justify-content: flex-end; margin: -.4rem -.4rem .2rem 0; }
.get-close {
  width: 34px; height: 34px;
  border: 0; background: transparent; color: var(--ink-dim); font-size: 1.6rem; line-height: 1;
  cursor: pointer; border-radius: 8px;
}
.get-close:hover { color: var(--ink); }
.get-qr { display: flex; justify-content: center; margin: 1.2rem 0 .6rem; }
.get-qr svg { width: 170px; height: 170px; }
.get-qr-note { font-size: .84rem; color: var(--ink-dim); }

/* ---------- single CTA ---------- */
.cta-row { display: flex; align-items: center; gap: 1rem 1.2rem; flex-wrap: wrap; margin-top: 1.7rem; }
.cta-center { justify-content: center; }
.btn-lg { padding: .95rem 2rem; font-size: 1.04rem; }
.cta-note { font-size: .88rem; color: var(--ink-dim); }

/* ---------- QR needs a light plate ----------
   A dark-on-dark QR is invisible, and inverting the modules breaks a lot of scanners.
   Always render the code dark on white, whatever the surrounding surface. */
.get-qr { background: #fff; border-radius: 14px; padding: 14px; width: max-content; margin: 1.2rem auto .7rem; }
.get-qr svg { width: 160px; height: 160px; display: block; }

/* ---------- footer ---------- */
.foot-note { max-width: none; }

/* ---------- footer: the band, not a flat slab ----------
   A plain dark strip under a site about the aurora reads as a template default. The
   spectrum edge and a low glow tie it back to the icon. */
footer {
  position: relative;
  overflow: hidden;
  border-top: 0;
  background:
    radial-gradient(ellipse 120% 150% at 50% 140%, rgba(43, 255, 150, .13) 0%, transparent 60%),
    var(--sky-lo);
}
footer::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--spectrum);
  opacity: .85;
}
footer::after {
  content: '';
  position: absolute; left: 50%; bottom: -190px; width: 150%; height: 300px;
  transform: translateX(-50%);
  background: var(--spectrum);
  filter: blur(70px);
  opacity: .16;
  mix-blend-mode: screen;
  pointer-events: none;
}
footer .wrap { position: relative; z-index: 1; }
.store-soon { margin: .7rem 0 0; font-size: .85rem; color: var(--ink-faint); }

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--rule); padding: clamp(2.2rem, 5vw, 3.2rem) 0; background: var(--ground-2); }
.trust-h {
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim);
  margin: 0 0 1.6rem;
}
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem 2rem; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: grid; grid-template-columns: 22px 1fr; gap: .8rem; align-items: start; }
.trust-item svg { width: 22px; height: 22px; color: var(--a-teal); margin-top: .15rem; }
.trust-item a {
  font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  letter-spacing: -.01em; color: var(--ink); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.trust-item a:hover { color: var(--a-teal); }
.trust-item p { margin: .35rem 0 0; font-size: .87rem; line-height: 1.5; color: var(--ink-dim); }

/* Four short fields should sit on one row: without min-width:0 a <select> with long
   option text sets a huge min-content and forces the track wider than its 180px floor. */
.field-grid > .field, .rig-inputs > .field { min-width: 0; }
.field input, .field select { min-width: 0; max-width: 100%; }

/* The locate button has no label of its own, so it needs the same reserved label box to
   line up with the inputs beside it. */
.field-locate { display: flex; flex-direction: column; }
.field-locate::before {
  content: ''; display: block; font-size: .7rem; line-height: 1.3;
  min-height: 2.6em; margin-bottom: .45rem;
}
.field-locate .btn { width: 100%; }

/* Readout values: a unit belongs under the number, not trailing it inline, and a text
   verdict ("Beyond Kp 9") must be allowed to wrap rather than overflow into the next cell. */
.readout .cell .v, .rig-cell .v {
  display: block;
  white-space: normal;
  overflow-wrap: break-word;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
}
.readout .cell .u { display: block; margin-top: .25rem; }
