/* Sunhive site styles.
   Layout concept: a night observatory. Blue-biased ink ground, the brand blue
   (#336699) for fills and its lighter tint for text, cool teal for data
   readouts, and gold reserved for the logo's sun and the one merged record.
   One wide column with full-bleed bands; content capped near 72rem.
   Dark-first: dark values on :root, light values under prefers-color-scheme. */

:root {
  --ink: #0a0f18;          /* page ground, blue-biased ink */
  --ink-2: #111826;        /* raised surface */
  --ink-3: #1a2333;        /* borders, wells */
  --text: #eaeef5;
  --muted: #9aa5b8;        /* 7.7:1 on ink */
  --brand: #336699;        /* Sunhive blue: fills only; white text on it is 6:1 */
  --brand-hi: #3d74ab;     /* hover fill */
  --on-brand: #ffffff;
  --accent: #7fb0e0;          /* text-safe tint of the brand blue: 8.4:1 on ink */
  --accent-2: #b8d4f0;
  --gold: #f4b860;         /* the sun in the logo; used sparingly */
  --data: #6fd6c9;         /* data readouts */
  --stage-rem: #a9cbee; --stage-core: #5f95cc; --stage-deep: #2f5f90;  /* sleep depth, one hue */
  --line: rgba(234, 238, 245, 0.09);
  --glow: rgba(51, 102, 153, 0.38);
  --ok: #7ad99a;
  --warn: #f2a65a;

  --font-display: "Unbounded", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.2vw, 4.4rem);

  --radius: 14px;
  --wrap: 72rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #f6f8fb; --ink-2: #ffffff; --ink-3: #e3e9f1;
    --text: #121a26; --muted: #5a6478;
    --brand: #336699; --brand-hi: #2b5a88; --on-brand: #ffffff;
    --accent: #2b5a88; --accent-2: #336699; --gold: #96620a; --data: #0f7f74;
    --stage-rem: #9dc0e6; --stage-core: #4f86bf; --stage-deep: #234a73;
    --line: rgba(18, 26, 38, 0.10); --glow: rgba(51, 102, 153, 0.16);
    --ok: #1f8a4c; --warn: #b5651d;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ink: #f6f8fb; --ink-2: #ffffff; --ink-3: #e3e9f1;
    --text: #121a26; --muted: #5a6478;
    --brand: #336699; --brand-hi: #2b5a88; --on-brand: #ffffff;
    --accent: #2b5a88; --accent-2: #336699; --gold: #96620a; --data: #0f7f74;
    --stage-rem: #9dc0e6; --stage-core: #4f86bf; --stage-deep: #234a73;
    --line: rgba(18, 26, 38, 0.10); --glow: rgba(51, 102, 153, 0.16);
    --ok: #1f8a4c; --warn: #b5651d;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-1); }
p { margin: 0; }

.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(4rem, 3rem + 4vw, 7rem); border-top: 1px solid var(--line); }
.stack { display: grid; gap: 1rem; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40rem; }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--ink-2); padding: 0.5rem 1rem; border-radius: 8px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.8rem); font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a.btn-sun { color: var(--on-brand); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
@media (max-width: 480px) { .nav .hide-xs { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 var(--step--1) / 1 var(--font-body); letter-spacing: 0.02em;
  padding: 0.85rem 1.3rem; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn-sun { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.btn-sun:hover { background: var(--brand-hi); border-color: transparent; box-shadow: 0 8px 30px var(--glow); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 3rem + 6vw, 8rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero canvas.hive { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; width: 60rem; height: 60rem; right: -22rem; top: -30rem; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 1.5rem; }
.hero h1 .sun-word {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-split { display: grid; gap: clamp(2rem, 4vw, 4rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 900px) { .hero-split { grid-template-columns: minmax(0, 1fr); } }

/* Products */
.products { display: grid; gap: 1.25rem; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: 2.5rem; }
.product { grid-column: span 6; display: grid; gap: 0.9rem; align-content: start; padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); }
.product.flagship {
  grid-column: span 12; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; padding: clamp(1.75rem, 3vw, 2.75rem);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: radial-gradient(120% 140% at 100% 0%, var(--glow), transparent 55%), var(--ink-2);
}
.product.flagship > div { display: grid; gap: 1rem; align-content: start; min-width: 0; }
@media (max-width: 820px) { .product, .product.flagship { grid-column: span 12; grid-template-columns: minmax(0, 1fr); } }
.status { display: inline-flex; align-items: center; gap: 0.45rem; font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.building { color: var(--accent); }
.status.planned { color: var(--data); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.ticks li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.6rem; }
.ticks li::before { content: ""; width: 9px; height: 9px; margin-top: 0.55em; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--accent); }

/* Merge visual: several sources, one record */
.merge { display: grid; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.8rem; min-width: 0; }
.merge-row {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center;
  padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.merge-row .src { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merge-row .tag { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.merge-row.dup .tag { color: var(--warn); }
.merge-row.dup .val { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--warn) 70%, transparent); }
.merge-arrow { justify-self: center; color: var(--gold); font-size: 1rem; line-height: 1; }
.merge-out {
  padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 9%, var(--ink-2)), var(--ink-2));
  display: grid; gap: 0.7rem;
}
.merge-out .head { display: flex; justify-content: space-between; gap: 1rem; color: var(--text); font-size: 0.85rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.metric { display: grid; gap: 0.15rem; }
.metric b { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--text); }
.metric span { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; }
.metric small { color: var(--data); font-size: 0.68rem; }
@media (max-width: 460px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .merge-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.25rem; } .merge-row .val { grid-column: 1 / -1; grid-row: 2; } }
.merge-note { color: var(--muted); font-size: 0.72rem; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem 2.5rem; margin-top: 2.5rem; }
.principle { display: grid; gap: 0.5rem; align-content: start; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.principle .k { font-family: var(--font-mono); font-size: 0.75rem; color: var(--data); letter-spacing: 0.08em; text-transform: uppercase; }
.principle p { color: var(--muted); }

/* Two column text */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Sources strip */
.sources { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chip { font: 500 0.85rem/1 var(--font-body); padding: 0.6rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); }
.chip.soon { color: var(--muted); border-style: dashed; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.feature { display: grid; gap: 0.6rem; align-content: start; padding: 1.5rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); }
.feature p { color: var(--muted); }
.feature .glyph { width: 36px; height: 36px; color: var(--accent); }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 860px) { .tiers { grid-template-columns: minmax(0, 1fr); } }
.tier { display: grid; gap: 1rem; align-content: start; padding: 1.75rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-2); }
.tier.pick { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: radial-gradient(120% 90% at 50% 0%, var(--glow), transparent 60%), var(--ink-2); }
.tier .price { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; }
.tier .price small { font-family: var(--font-body); font-size: var(--step--1); color: var(--muted); font-weight: 500; }

/* FAQ */
.faq { display: grid; gap: 0; margin-top: 2rem; max-width: 50rem; }
.faq details { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 0.75rem; max-width: 44rem; }

/* Waitlist */
.signup { display: grid; gap: 1.25rem; padding: clamp(1.75rem, 4vw, 3rem); border-radius: calc(var(--radius) + 6px); border: 1px solid var(--line);
  background: radial-gradient(80% 120% at 0% 100%, var(--glow), transparent 60%), var(--ink-2); }
.form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 0.75rem; }
@media (max-width: 720px) { .form { grid-template-columns: minmax(0, 1fr); } }
.form label { display: grid; gap: 0.35rem; font-size: var(--step--1); color: var(--muted); }
.form input, .form select {
  font: inherit; font-size: var(--step-0); color: var(--text); background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.8rem 0.9rem; min-width: 0; width: 100%;
}
.form .btn { align-self: end; padding-block: 0.95rem; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: var(--step--1); min-height: 1.4em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--warn); }
.fine { font-size: var(--step--1); color: var(--muted); }

/* Legal pages */
.legal { padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.legal .doc { max-width: 46rem; display: grid; gap: 1.1rem; }
.legal h1 { font-size: var(--step-3); }
.legal h2 { font-size: var(--step-1); margin-top: 1.6rem; font-weight: 600; }
.legal h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; margin-top: 0.4rem; }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.legal p, .legal li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.legal .ph { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); padding: 0 0.3em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.draft-banner {
  display: grid; gap: 0.3rem; padding: 1rem 1.2rem; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--ink-2));
}
.draft-banner strong { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warn); }
.toc { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: var(--step--1); }
.toc a { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .about { grid-column: 1 / -1; } }
.site-footer h4 { margin: 0 0 0.7rem; font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .legalline { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* Small utilities (no inline styles: the CSP forbids them) */
.mt { margin-top: 1rem; }
.hero-copy { gap: 1.5rem; }
.h-flag { font-size: var(--step-2); }

/* Gold marks the one merged record: the only place the sun colour carries meaning. */
.merge-out .head .muted { color: var(--gold); }

/* Hero merge panel sits on a surface so it reads as one instrument, not loose rows. */
.hero .merge { padding: 1.25rem; border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink-2) 82%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Headings beside body copy are one step smaller so they do not run to four lines. */
.split h2 { font-size: var(--step-2); line-height: 1.18; }
.split .faq { margin-top: 0; }

/* Steps: a real sequence, so the numbers carry information. */
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { display: grid; gap: 0.6rem; align-content: start; padding: 1.5rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); }
.steps .n { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 0.85rem; }
.steps p { color: var(--muted); }
.sources-title { margin-top: 3rem; font-family: var(--font-mono); font-weight: 500; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sources-note { margin-top: 1rem; max-width: 52rem; }

/* App screen previews. Drawn in HTML so they stay sharp, themeable and honest
   (labelled as a design preview). Charts are inline SVG. */
.phones { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(17rem, 1fr); gap: 1.5rem; margin-top: 2.5rem; overflow-x: auto; padding-bottom: 0.75rem; scroll-snap-type: x proximity; }
.phone { margin: 0; display: grid; gap: 1rem; justify-items: center; scroll-snap-align: center; }
.phone figcaption { font-size: var(--step--1); color: var(--muted); text-align: center; max-width: 17rem; }
.screen {
  width: 17rem; min-height: 36.5rem; padding: 1.1rem 0.9rem 0.8rem; border-radius: 2.4rem; display: flex; flex-direction: column; gap: 0.7rem;
  background: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 0 0 6px var(--ink-3), 0 30px 60px -30px var(--glow); font-size: 0.78rem; line-height: 1.4;
}
.s-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.7rem; }
.s-dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brand); }
.s-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.s-card, .s-tile, .s-brief, .s-merge { border-radius: 0.9rem; background: var(--ink-2); border: 1px solid var(--line); padding: 0.75rem; }
.s-brief { display: grid; gap: 0.4rem; border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.s-brief-k { display: inline-flex; align-items: center; gap: 0.35rem; font: 500 0.62rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.s-brief-k svg { width: 0.7rem; height: 0.7rem; }
.s-src, .s-note { color: var(--muted); font-size: 0.66rem; }
.s-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.s-tile { display: grid; gap: 0.1rem; }
.s-tile span, .s-row span:first-child { color: var(--muted); font-size: 0.66rem; }
.s-tile b, .s-hero b { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.s-tile small, .s-hero small { color: var(--muted); font-size: 0.62rem; }
.s-hero { display: grid; gap: 0.1rem; }
.s-hero b { font-size: 2.2rem; line-height: 1.1; }
.s-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; color: var(--muted); font-size: 0.62rem; }
.s-card { display: grid; gap: 0.55rem; }
/* 7-day bars: SVG, scale 40..65 ms over the plot height. No inline styles (CSP). */
.s-bars { width: 100%; height: 3.2rem; border-bottom: 1px solid var(--line); display: block; }
.s-bars .b { fill: color-mix(in srgb, var(--accent) 45%, var(--ink-2)); }
.s-bars .now { fill: var(--accent); }
.s-axis { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted); font-size: 0.58rem; }
/* Sleep stages: one hue from light to dark for depth of sleep; awake is neutral. */
.s-stages { width: 100%; height: 1.6rem; display: block; }
.s-stages .awake { fill: var(--muted); } .s-stages .rem { fill: var(--stage-rem); } .s-stages .core { fill: var(--stage-core); } .s-stages .deep { fill: var(--stage-deep); }
.s-legend .awake { background: var(--muted); } .s-legend .rem { background: var(--stage-rem); } .s-legend .core { background: var(--stage-core); } .s-legend .deep { background: var(--stage-deep); }
.s-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 0.8rem; font-size: 0.66rem; color: var(--muted); }
.s-legend li { display: grid; grid-template-columns: 0.6rem 1fr auto; gap: 0.4rem; align-items: center; }
.s-legend i { width: 0.6rem; height: 0.6rem; border-radius: 2px; }
.s-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.s-merge { display: grid; gap: 0.2rem; border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.s-merge span { font-weight: 600; }
.s-merge small { color: var(--muted); font-size: 0.66rem; }
.s-merge u { color: var(--gold); text-underline-offset: 2px; }
.s-list ul { list-style: none; margin: 0; padding: 0; display: grid; }
.s-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding-block: 0.42rem; border-top: 1px solid var(--line); }
.s-list li span { color: var(--muted); }
.s-list li b { font-weight: 600; }
.s-tabs { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding-top: 0.6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.62rem; }
.s-tabs .on { color: var(--accent); font-weight: 700; }
