/*
  Orra: smart ring product page (Screenery template)
  A dark product film: near-black warm ground, one soft key light, the ring huge on screen, thin tracked type and a
  single restrained amber accent. Tenor Sans speaks, Geologica (light weights) does the rest.

  Contents
   1. Tokens (ground, ink, accent, finish metals, sleep stage colours, type, space, shape, motion)
   2. Base and browser surfaces
   3. Components: buttons, links, fields, radios as chips, finish swatches, notices
   4. Header
   5. The film: sticky stage (WebGL mode) and stacked chapters (drawn fallback)
   6. Callouts on the sensors
   7. What it measures
   8. The app: phone and formula
   9. Battery
  10. Sizer
  11. Compare
  12. Buy box
  13. Questions and footer
  14. Motion
  15. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Ground: near-black with a little warmth, like a dark studio sweep */
  --ground: #0b0a09;
  --ground-2: #12110f;     /* raised panels */
  --ground-3: #1b1815;     /* wells, hover */
  --ink: #ede7de;          /* 16.5:1 on ground */
  --ink-2: #bdb4a8;        /* 9.6:1 */
  --ink-3: #978e83;        /* labels, 6.1:1 */
  --line: rgb(237 231 222 / 0.12);
  --line-strong: rgb(237 231 222 / 0.26);

  /* The one warm accent: the key light's colour */
  --accent: #d6a46a;
  --accent-soft: rgb(214 164 106 / 0.14);
  --on-accent: #140e07;
  --error: #f2947c;
  --ok: #9fd3a6;

  /* Finish metals for the drawn ring and swatches (the root's data-finish picks one set) */
  --f-hi: #ebe8e2;
  --f-mid: #a7a39c;
  --f-lo: #45423e;

  /* Sleep stages: three cool steps and the accent for REM */
  --st-awake: #d9d2c7;
  --st-rem: #d6a46a;
  --st-light: #6f7787;
  --st-deep: #3b4c72;

  /* Type */
  --display: "Tenor Sans", "Optima", "Gill Sans", sans-serif;
  --sans: "Geologica", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.4rem, 1.15rem + 0.9vw, 1.8rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.3vw, 3.4rem);
  --fs-h1: clamp(2.7rem, 1.5rem + 4.2vw, 5.4rem);
  --track: 0.16em;         /* the generous tracking on labels */

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: clamp(96px, 11vw, 168px);
  --gutter: clamp(16px, 4.5vw, 64px);
  --wrap: 1280px;

  /* Shape */
  --r-1: 3px;
  --r-2: 8px;
  --r-3: 16px;
  --r-pill: 999px;

  /* Motion: exponential ease-out only */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;
  --t-med: 420ms;
  --t-slow: 900ms;
}

[data-finish="graphite"] { --f-hi: #9a999d; --f-mid: #4c4b4f; --f-lo: #1c1b1e; }
[data-finish="gold"]     { --f-hi: #f6e0b0; --f-mid: #c79f63; --f-lo: #5c4323; }
[data-finish="rose"]     { --f-hi: #f5d2c2; --f-mid: #c48d78; --f-lo: #5a382d; }

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 300 var(--fs-md) / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--on-accent); }
html { scrollbar-color: #3a342d var(--ground); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #3a342d; border-radius: 10px; border: 2px solid var(--ground); }
input, select, textarea, button { font: inherit; color: inherit; caret-color: var(--accent); accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-1); }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: 0.01em; line-height: 1.08; }
h2 { font-size: var(--fs-h2); }
p { margin: 0; text-wrap: pretty; }
.num, td.num, .vitals dd, output { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.icon--big { width: 44px; height: 44px; color: var(--accent); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-pill); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s-9); border-top: 1px solid var(--line); position: relative; }
.section__head { max-width: 46rem; margin-bottom: var(--s-8); }
.section__head p { color: var(--ink-2); margin-top: var(--s-5); max-width: 62ch; }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: var(--r-pill);
  font: 500 var(--fs-sm) / 1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; position: relative;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.btn:hover { background: #e3b47c; box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.8); }
.btn--small { min-height: 44px; padding: 0 18px; font-size: var(--fs-xs); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--ground-3); border-color: var(--accent); color: var(--ink); box-shadow: none; }
.btn--wide { width: 100%; min-height: 56px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn__spin { display: none; width: 18px; height: 18px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
.is-loading .btn__spin { display: inline-block; }
@keyframes spin { to { transform: rotate(1turn); } }

.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); font-weight: 400; letter-spacing: 0.04em; }
.link:hover { text-decoration-color: var(--accent); }
.link--small { min-height: 0; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; color: var(--ink-2); }

.field { display: grid; gap: var(--s-2); margin: 0; border: 0; padding: 0; }
.field > label, .field legend, .order legend, .seg-control legend { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); font-weight: 400; padding: 0; }
.field input, .field select {
  min-height: 52px; width: 100%; padding: 0 16px;
  background: var(--ground); border: 1px solid var(--line-strong); border-radius: var(--r-2);
  font-weight: 300; font-size: var(--fs-md);
  transition: border-color var(--t-fast) var(--ease-out);
}
.field input::placeholder { color: var(--ink-3); }
.field input:hover, .field select:hover { border-color: rgb(237 231 222 / 0.45); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field__unit { position: relative; }
.field__unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.field__hint { font-size: var(--fs-sm); color: var(--ink-3); }
.field__error { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--error); font-weight: 400; }
.field__error[hidden] { display: none; }
.field--choice { gap: var(--s-1); }
.field--choice label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.field--choice input { width: 18px; height: 18px; margin: 0; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; padding-block: 6px; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; }

/* finish swatches: each draws its own metal regardless of the page finish */
.finish__swatch { display: inline-block; width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.4), inset 0 -2px 4px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.5); }
.finish__swatch--natural { background: linear-gradient(135deg, #f2efe9, #a7a39c 50%, #55524d); }
.finish__swatch--graphite { background: linear-gradient(135deg, #a4a3a7, #4c4b4f 50%, #19181b); }
.finish__swatch--gold { background: linear-gradient(135deg, #fbe7bb, #c79f63 50%, #5c4323); }
.finish__swatch--rose { background: linear-gradient(135deg, #f9dacb, #c48d78 50%, #5a382d); }

.finishes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); border: 0; padding: 0; margin: var(--s-5) 0 var(--s-4); }
.finish { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-2); background: rgb(18 17 15 / 0.72); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.finish input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.finish:hover { border-color: var(--line-strong); }
.finish:has(input:checked) { border-color: var(--accent); background: rgb(27 24 21 / 0.9); }
.finish:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.finish__name { font-weight: 400; letter-spacing: 0.04em; }
.finish__price { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }

.sizes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; border: 0; padding: 0; margin: var(--s-5) 0 var(--s-4); }
.sizes legend { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin-bottom: var(--s-3); }
.sizes label { position: relative; }
.sizes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sizes span { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--r-2); background: rgb(18 17 15 / 0.72); font-variant-numeric: tabular-nums; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), color var(--t-fast); }
.sizes label:hover span { border-color: var(--line-strong); }
.sizes input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 500; }
.sizes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sizes .is-soldout span { color: var(--ink-3); background: var(--ground); border-style: dashed; text-decoration: line-through; text-decoration-color: var(--ink-3); }
.sizes .is-soldout input:checked + span { background: var(--ground-3); color: var(--ink); border-color: var(--error); }

.notice { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r-2); border: 1px solid; margin-top: var(--s-4); }
.notice[hidden] { display: none; }
.notice--error { border-color: rgb(242 148 124 / 0.5); background: rgb(242 148 124 / 0.07); color: var(--ink); }
.notice--error .icon { color: var(--error); }
.notice p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.notice strong { font-weight: 500; }

/* ---------- 4. Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: var(--s-6);
  height: 68px; padding-inline: var(--gutter);
  background: linear-gradient(to bottom, rgb(11 10 9 / 0.92), rgb(11 10 9 / 0.6) 70%, transparent);
  transition: background var(--t-med) var(--ease-out);
}
.top.is-scrolled { background: rgb(11 10 9 / 0.94); box-shadow: 0 1px 0 var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.mark__ring { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.4; }
.mark__word { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.42em; text-transform: uppercase; margin-right: -0.42em; }
.nav { display: flex; gap: var(--s-5); margin-left: auto; }
.nav a { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-2); text-decoration: none; padding-block: 12px; transition: color var(--t-fast); }
.nav a:hover { color: var(--ink); }

/* ---------- 5. The film ---------- */
/* The default (no JS, no WebGL, reduced motion): each chapter is a two-column section with a drawn figure. */
.story { position: relative; }
.stage { display: none; }
.chapter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-7); align-items: center;
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  padding-block: var(--s-9);
}

.chapter--hero { padding-top: calc(68px + var(--s-8)); min-height: 92vh; }
.chapter__text { max-width: 34rem; position: relative; z-index: 2; }
.chapter__text > p { color: var(--ink-2); margin-top: var(--s-5); max-width: 60ch; }
.chapter__text h2 + p { margin-top: var(--s-5); }
.chapter__note { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ink-3) !important; }
.chapter__figure { margin: 0; position: relative; }
.ring-drawn, .inside-drawn, .size-drawn { display: block; width: 100%; height: auto; }
.chapter__figure::before { /* the key light pooled on the sweep behind the drawn ring */
  content: ""; position: absolute; inset: -10% 0; z-index: -1;
  background: radial-gradient(closest-side, rgb(214 164 106 / 0.14), transparent 70%), radial-gradient(60% 40% at 50% 88%, rgb(237 231 222 / 0.05), transparent);
}

.hero__title { font-size: var(--fs-h1); letter-spacing: 0; line-height: 1.02; }
.hero__lede { font-size: var(--fs-lg); color: var(--ink-2); margin-top: var(--s-5); max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-6); }
.hero__facts { display: grid; grid-template-columns: repeat(4, auto); gap: var(--s-5); margin: var(--s-7) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.hero__facts dt { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.hero__facts dd { margin: 4px 0 0; font-weight: 400; }

.finish__desc { font-size: var(--fs-sm); min-height: 3.2em; }
.size-readout { font-size: var(--fs-md); color: var(--ink-2); }
.size-readout strong { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums; }
.size-drawn__ring { transform-origin: 200px 200px; transform: scale(var(--ring-scale, 1)); transition: transform var(--t-slow) var(--ease-out); }
.size-drawn__dim { fill: none; stroke: var(--accent); stroke-width: 1.2; transform-origin: 200px 200px; transform: scaleX(var(--ring-scale, 1)); transition: transform var(--t-slow) var(--ease-out); }
.size-drawn__label { position: absolute; left: 0; right: 0; top: 54%; text-align: center; font-family: var(--display); font-size: var(--fs-xl); color: var(--accent); font-variant-numeric: tabular-nums; }

/* WebGL mode: one sticky stage, chapters scroll over it as text panels. */
.gl .stage {
  display: block; position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh;
  overflow: hidden; background: var(--ground);
}
.stage__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__grab { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
.stage__grab.is-dragging { cursor: grabbing; }
/* depth-of-field: soft out-of-focus discs of warm light far behind the ring */
.stage__bokeh { position: absolute; inset: -10%; transform: translate3d(var(--bx, 0px), var(--by, 0px), 0); }
.stage__bokeh span { position: absolute; border-radius: 50%; filter: blur(42px); opacity: 0.5; }
.stage__bokeh span:nth-child(1) { width: 44vmax; height: 44vmax; left: 44%; top: 6%; background: radial-gradient(closest-side, rgb(214 164 106 / 0.28), transparent); }
.stage__bokeh span:nth-child(2) { width: 18vmax; height: 18vmax; left: 78%; top: 58%; background: radial-gradient(closest-side, rgb(214 164 106 / 0.22), transparent); }
.stage__bokeh span:nth-child(3) { width: 12vmax; height: 12vmax; left: 30%; top: 70%; background: radial-gradient(closest-side, rgb(237 231 222 / 0.1), transparent); }
.stage__bokeh span:nth-child(4) { width: 60vmax; height: 30vmax; left: 20%; top: 80%; background: radial-gradient(closest-side, rgb(237 231 222 / 0.05), transparent); }

.gl .chapter { display: flex; align-items: center; min-height: 115vh; min-height: 115svh; padding-block: var(--s-8); position: relative; z-index: 1; pointer-events: none; }

.gl .chapter--hero { min-height: 100vh; min-height: 100svh; padding-top: 68px; }
.gl .chapter--inside { min-height: 170vh; min-height: 170svh; }
.gl .chapter__text { pointer-events: auto; width: min(100%, 31rem); }
.gl .chapter:not(.chapter--hero) .chapter__text { padding: var(--s-6); background: rgb(11 10 9 / 0.78); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.9); }
.gl .chapter__figure { display: none; }
.gl .chapter__figure--inside { display: contents; }
.gl .chapter__figure--inside .inside-drawn { display: none; }
.gl .hero__title { text-shadow: 0 2px 30px rgb(11 10 9 / 0.8); }

/* ---------- 6. Callouts ---------- */
.callouts { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
.callout__dot {
  position: absolute; left: calc(var(--x) * 100cqw); top: calc(var(--y) * 100cqw); width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 0; background: transparent; cursor: pointer; padding: 0; border-radius: 50%;
}
.callout__dot::before { content: ""; position: absolute; inset: 15px; border-radius: 50%; border: 1.5px solid var(--ink); box-shadow: 0 0 0 4px rgb(11 10 9 / 0.5); transition: transform var(--t-med) var(--ease-out); }
.callout__dot::after { content: ""; position: absolute; inset: 19px; border-radius: 50%; background: var(--c, var(--ink)); }
.callout__dot--green { --c: #4fd174; }
.callout__dot--red { --c: #ef5a40; }
.callout__dot--temp { --c: var(--accent); }
.callout__dot--accel { --c: #c9c2b8; }
.callout__dot:hover::before, .callout.is-on .callout__dot::before { transform: scale(1.35); border-color: var(--accent); }
.callout__text { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--ink-2); padding-left: 22px; position: relative; }
.callout__text::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.callout[data-sensor="green"] { --c: #4fd174; }
.callout[data-sensor="red"] { --c: #ef5a40; }
.callout[data-sensor="temp"] { --c: var(--accent); }
.callout[data-sensor="accel"] { --c: #c9c2b8; }
.callout__text strong { color: var(--ink); font-weight: 400; letter-spacing: 0.02em; }
.callout.is-on .callout__text strong { color: var(--accent); }

/* WebGL mode: callouts float over the stage at the projected sensor positions */
.gl .callouts { position: fixed; inset: 0; z-index: 2; margin: 0; display: block; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity var(--t-med) var(--ease-out), visibility 0s linear var(--t-med); }
.gl .callouts.is-shown { opacity: 1; visibility: visible; transition: opacity var(--t-slow) var(--ease-out), visibility 0s; }
.gl .callout { position: absolute; left: 0; top: 0; transform: translate3d(var(--px, -999px), var(--py, -999px), 0); transition: opacity var(--t-med) var(--ease-out); }
.gl .callout__dot { left: 0; top: 0; pointer-events: auto; }
/* the label sits in a column beside the sensor window; JS sets --lx/--ly relative to the dot and the leader line */
.gl .callout__text { position: absolute; left: var(--lx, 0px); top: var(--ly, 0px); width: var(--lw, 15rem); transform: translateY(-50%); padding: 10px 14px; background: rgb(11 10 9 / 0.82); border: 1px solid var(--line); border-radius: var(--r-2); }
.gl .callout__text::before { display: none; }
.gl .callout[data-side="left"] .callout__text { text-align: right; }
.gl .callout__line { position: absolute; left: 0; top: 0; width: var(--len, 0px); height: 1px; background: linear-gradient(to right, rgb(237 231 222 / 0.7), rgb(237 231 222 / 0.25)); transform: rotate(var(--ang, 0rad)); transform-origin: 0 0; }
.gl .callout__text span { text-shadow: 0 1px 12px var(--ground), 0 0 2px var(--ground); color: var(--ink-2); }
.gl .callout__text strong { text-shadow: 0 1px 12px var(--ground); }
.callout__line { display: none; }
.gl .callout__line { display: block; }

/* ---------- 7. What it measures ---------- */
.night { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s-7); }
.night__chart, .night__heart { background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-6); }
.night__h { font-size: var(--fs-xl); margin-bottom: var(--s-5); }
.hypno { position: relative; }
.hypno__svg, .hr__svg { display: block; width: 100%; height: auto; overflow: visible; }
.hypno__row, .hypno__hour, .hr__axis { fill: var(--ink-3); font: 300 12px var(--sans); letter-spacing: 0.04em; }
.hypno__guide { stroke: var(--line); stroke-dasharray: 2 4; }
.hypno__tick { stroke: var(--line); }
.hypno__step { fill: none; stroke: rgb(237 231 222 / 0.28); stroke-width: 1; }
.seg { transition: opacity var(--t-med) var(--ease-out); cursor: crosshair; }
.seg--awake { fill: var(--st-awake); background: var(--st-awake); }
.seg--rem { fill: var(--st-rem); background: var(--st-rem); }
.seg--light { fill: var(--st-light); background: var(--st-light); }
.seg--deep { fill: var(--st-deep); background: var(--st-deep); }
.hypno.is-focus .seg { opacity: 0.18; }
.hypno.is-focus .seg.is-hit { opacity: 1; }
.hypno__tip { position: absolute; top: -6px; right: 0; background: var(--ground-3); border: 1px solid var(--line-strong); border-radius: var(--r-1); padding: 6px 10px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; pointer-events: none; }
.stage-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-5); }
.stage-key { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; min-height: 64px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-2); cursor: pointer; transition: border-color var(--t-fast); }
.stage-key:hover { border-color: var(--line-strong); }
.stage-key[aria-pressed="true"] { border-color: var(--accent); background: var(--ground-3); }
.stage-key__sw { width: 10px; height: 10px; border-radius: 2px; grid-row: 1; }
.stage-key__name { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.stage-key__val { grid-column: 1 / -1; font-family: var(--display); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stage-key__pct { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.night__sum { margin-top: var(--s-5); color: var(--ink-2); font-size: var(--fs-sm); max-width: 70ch; }
.night__sum strong { color: var(--ink); font-weight: 400; }

.hr__guide { stroke: var(--line); stroke-dasharray: 2 4; }
.hr__line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.hr__low { fill: var(--ground-2); stroke: var(--accent); stroke-width: 1.6; }
.hr__lowlabel { fill: var(--ink); font: 400 12px var(--sans); }
.vitals { display: grid; gap: var(--s-4); margin: var(--s-5) 0 0; }
.vitals > div { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.vitals dt { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); align-self: center; }
.vitals dd { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.vitals .num { font-family: var(--display); font-size: var(--fs-xl); color: var(--ink); }
.vitals p { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--ink-3); }
.hrv { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.hrv__h { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.hrv__bars { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; height: 132px; margin: var(--s-4) 0 0; padding: 0; }
.hrv__bars li { display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; height: 100%; }
.hrv__bar { width: 100%; height: calc(var(--v) / 60 * 84px); background: linear-gradient(to top, rgb(214 164 106 / 0.25), rgb(214 164 106 / 0.75)); border-radius: 2px 2px 0 0; }
.hrv__val { font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hrv__hr { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 8. The app ---------- */
.app__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(48px, 8vw, 128px); align-items: center; }
.phone { width: 312px; padding: 9px; border-radius: 52px; background: linear-gradient(140deg, #5d5a55, #232120 30%, #121110 60%, #4a4743); box-shadow: 0 50px 90px -40px rgb(0 0 0 / 0.95), 0 0 0 1px rgb(255 255 255 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.phone__body { position: relative; height: 640px; border-radius: 44px; background: #0e0d0c; overflow: hidden; display: flex; flex-direction: column; padding: 54px 24px 0; }
.phone__notch { position: absolute; top: 12px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; }
.phone__status { position: absolute; top: 17px; left: 30px; right: 30px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 400; color: var(--ink); }
.phone__sig { display: flex; gap: 2px; align-items: flex-end; }
.phone__sig i { width: 3px; background: var(--ink); border-radius: 1px; }
.phone__sig i:nth-child(1) { height: 5px; } .phone__sig i:nth-child(2) { height: 8px; } .phone__sig i:nth-child(3) { height: 11px; }
.screen { flex: 1; display: flex; flex-direction: column; animation: screen-in var(--t-med) var(--ease-out); }
.screen[hidden] { display: none; }
@keyframes screen-in { from { opacity: 0.4; transform: translateY(6px); } }
.screen__date { font-size: 13px; color: var(--ink-3); }
.screen__label { margin-top: 22px; font-size: 11px; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.score { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.score__n { font-family: var(--display); font-size: 4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.score__of { color: var(--ink-3); font-size: 14px; }
.screen__verdict { color: var(--accent); font-size: 15px; margin-top: 6px; }
.parts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.parts li { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 13px; }
.parts__name { color: var(--ink-2); }
.parts__pts { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.parts__pts b { color: var(--ink); font-weight: 400; }
.parts__bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgb(237 231 222 / 0.1); overflow: hidden; }
.parts__bar i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 2px; transition: width var(--t-slow) var(--ease-out); }
.screen__fine { margin-top: auto; padding-bottom: 14px; font-size: 12px; color: var(--ink-3); }
.mini-hypno { width: 100%; height: auto; margin-top: 22px; }
.mini-stages { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; font-size: 13px; color: var(--ink-2); }
.mini-stages li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.mini-stages b { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-stages .dot { width: 9px; height: 9px; border-radius: 2px; }
.screen__pairs { margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.screen__pairs div { background: var(--ground-3); border-radius: 14px; padding: 12px; }
.screen__pairs dt { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.screen__pairs dd { margin: 4px 0 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.screen__pairs small { display: block; font-size: 11px; color: var(--ink-3); }
.phone__tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -24px; border-top: 1px solid var(--line); background: #12110f; padding: 6px 8px 18px; }
.phone__tabs button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 0; background: none; border: 0; color: var(--ink-3); font-size: 11px; letter-spacing: 0.06em; cursor: pointer; border-radius: 12px; }
.phone__tabs button[aria-selected="true"] { color: var(--accent); }
.phone__tabs button:hover { color: var(--ink); }

.formula h2 { max-width: 18ch; }
.formula > p { color: var(--ink-2); margin-top: var(--s-5); max-width: 60ch; }
.formula__eq { margin-top: var(--s-6); padding: var(--s-4) var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-2); font-family: var(--display); font-size: var(--fs-lg); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); margin-top: var(--s-6); }
.slider { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); align-content: start; }
.slider label { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.slider output { font-family: var(--display); color: var(--ink); }
.slider input { grid-column: 1 / -1; width: 100%; height: 32px; margin: 0; background: transparent; appearance: none; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); border-radius: 2px; }
.slider input::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }
.slider input::-moz-range-track { height: 2px; background: var(--line-strong); }
.slider input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }
.slider__rule { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--ink-3); }
.slider__rule b { color: var(--ink); font-weight: 400; font-variant-numeric: tabular-nums; }
.formula__total { grid-column: 1 / -1; padding-top: var(--s-4); border-top: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.formula__total b { color: var(--accent); font-weight: 400; font-size: var(--fs-lg); }
.sliders .btn { justify-self: start; }

/* ---------- 9. Battery ---------- */
.battery__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-8); align-items: center; }
.battery__text > p { color: var(--ink-2); margin-top: var(--s-5); max-width: 60ch; }
.seg-control { border: 0; padding: 0; margin: var(--s-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.seg-control legend { margin-bottom: var(--s-3); }
.seg-control label { position: relative; }
.seg-control input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-control span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: var(--fs-sm); transition: all var(--t-fast) var(--ease-out); }
.seg-control input:checked + span { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.seg-control input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.battery__facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: var(--s-6); margin: var(--s-6) 0 0; }
.battery__facts dt { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.battery__facts dd { margin: 4px 0 0; font-family: var(--display); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.week { margin: 0; padding: var(--s-6); background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-3); }
.week__days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 280px; align-items: end; }
.week__days li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; position: relative; }
.week__bar { width: 100%; max-width: 46px; height: calc(var(--l) * 1.9px); min-height: 2px; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, #8c6a44, var(--accent)); transition: height var(--t-slow) var(--ease-out), background var(--t-med); }
.week__days li.is-empty .week__bar { background: rgb(242 148 124 / 0.5); }
.week__days li.is-low .week__bar { background: linear-gradient(to top, #8a4b3a, var(--error)); }
.week__pct { order: -1; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.week__day { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }
.week figcaption { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- 10. Sizer ---------- */
.sizer__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.sizer__text > p { color: var(--ink-2); margin-top: var(--s-5); max-width: 60ch; }
.sizer__tips { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.sizer__tips li { display: flex; gap: 14px; color: var(--ink-2); font-size: var(--fs-sm); align-items: flex-start; }
.sizer__tips .icon { color: var(--accent); margin-top: 1px; }
.tool { background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-6); }
.tool__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--ground); border-radius: var(--r-pill); border: 1px solid var(--line); margin-bottom: var(--s-6); }
.tool__tabs button { min-height: 44px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink-2); font-size: var(--fs-sm); cursor: pointer; padding: 0 10px; }
.tool__tabs button[aria-selected="true"] { background: var(--ground-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tool__panel { display: grid; gap: var(--s-5); }
.tool__panel[hidden] { display: none; }
.tool__panel .btn { justify-self: start; }
.tool__result { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); display: grid; gap: var(--s-3); justify-items: start; }
.tool__result[hidden] { display: none; }
.tool__size { font-size: var(--fs-lg); }
.tool__size strong { font-family: var(--display); font-weight: 400; font-size: 3rem; color: var(--accent); margin-left: 6px; vertical-align: -0.1em; }
.tool__why { color: var(--ink-2); font-size: var(--fs-sm); max-width: 52ch; }

/* ---------- 11. Compare ---------- */
.compare__table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--ground-2); }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 18px 22px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th { font-size: var(--fs-xs); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); font-weight: 400; width: 22%; }
.compare td { color: var(--ink-2); width: 39%; }
.compare td.num { font-family: var(--display); color: var(--ink); font-size: var(--fs-lg); }
.compare thead th { padding-block: 16px; }
.select { position: relative; display: inline-flex; align-items: center; }
.select select { appearance: none; min-height: 48px; padding: 0 44px 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--ground); font-family: var(--display); font-size: var(--fs-lg); cursor: pointer; }
.select select:hover { border-color: var(--accent); }
.select .icon { position: absolute; right: 14px; pointer-events: none; color: var(--ink-2); }
.compare .finish__swatch { width: 44px; height: 44px; }
.compare__diff { margin-top: var(--s-5); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- 12. Buy box ---------- */
.buy { background: radial-gradient(70% 60% at 25% 40%, rgb(214 164 106 / 0.07), transparent 70%), var(--ground); }
.buy__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.buy__figure { margin: 0; text-align: center; }
.buy__figure .ring-drawn { max-width: 560px; margin-inline: auto; }
.buy__figure figcaption { margin-top: var(--s-4); color: var(--ink-3); font-size: var(--fs-sm); letter-spacing: 0.06em; }
.order { display: grid; gap: var(--s-2); }
.order h2 { font-size: var(--fs-h2); }
.order__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: var(--s-2); }
.order__price .num { font-family: var(--display); font-size: var(--fs-xl); color: var(--accent); }
.order__inc { color: var(--ink-3); font-size: var(--fs-sm); }
.order legend { margin-bottom: var(--s-3); }
.finishes--buy { margin: var(--s-4) 0 var(--s-2); }
.sizes--buy { margin: var(--s-4) 0 0; }
.order__stock { font-size: var(--fs-sm); color: var(--ink-3); }
.order__stock.is-warn { color: var(--error); }
.order .field { margin-top: var(--s-4); }
.order .btn--wide { margin-top: var(--s-5); }
.order__note { display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s-2); }
.order.is-kit .sizes--buy { opacity: 0.45; }
.done { display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-7); border: 1px solid var(--accent); border-radius: var(--r-3); background: var(--ground-2); }
.done[hidden] { display: none; }
.done h2 { font-size: var(--fs-h2); }
.done p { color: var(--ink-2); max-width: 52ch; }
.done:focus { outline: none; }

/* ---------- 13. Questions and footer ---------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: var(--s-8); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; min-height: 72px; padding-block: 18px; cursor: pointer; list-style: none; font-family: var(--display); font-size: var(--fs-lg); letter-spacing: 0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent); transition: transform var(--t-med) var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding-bottom: var(--s-5); color: var(--ink-2); max-width: 66ch; }

.foot { border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-7); background: #080706; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.foot__brand p { margin-top: var(--s-4); color: var(--ink-3); font-size: var(--fs-sm); max-width: 40ch; }
.foot__nav, .foot__contact { display: grid; gap: 2px; align-content: start; font-size: var(--fs-sm); }
.foot__nav a, .foot__contact a { color: var(--ink-2); text-decoration: none; min-height: 36px; display: flex; align-items: center; }
.foot__nav a:hover, .foot__contact a:hover { color: var(--accent); }
.foot__contact p { color: var(--ink-3); }
.foot__fine { grid-column: 1 / -1; padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); letter-spacing: 0.04em; }

/* ---------- 14. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .night__chart, .night__heart, .week, .tool, .phone {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%;
    }
    @keyframes rise { from { transform: translateY(28px); filter: blur(3px); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .btn__spin { animation-duration: 1.6s !important; }
}

/* ---------- 15. Narrow screens ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .night { grid-template-columns: 1fr; }
  .app__grid { grid-template-columns: 1fr; justify-items: center; }
  .formula { width: 100%; }
  .battery__grid, .sizer__grid, .buy__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .faq__grid { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 820px) {
  .chapter { grid-template-columns: 1fr; gap: var(--s-6); padding-block: var(--s-8); }
  .chapter__figure { order: -1; }
  .chapter--hero { min-height: 0; }
  .hero__facts { grid-template-columns: repeat(2, auto); justify-content: start; gap: var(--s-4) var(--s-6); }
  .callouts { grid-template-columns: 1fr; }
  .sliders { grid-template-columns: 1fr; }
  .stage-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .battery__facts { grid-template-columns: repeat(2, auto); gap: var(--s-4) var(--s-6); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }

  /* WebGL on a phone: the ring holds the upper part of the screen, text panels rise from the bottom */
  .gl .chapter { align-items: flex-end; padding-bottom: var(--s-6); }
  .gl .chapter--hero { align-items: flex-end; padding-top: 46vh; padding-top: 46svh; padding-bottom: var(--s-7); }
  .gl .chapter:not(.chapter--hero) .chapter__text { padding: var(--s-5); background: rgb(11 10 9 / 0.88); }
  .gl .callout__text { font-size: var(--fs-xs); padding: 6px 10px; }
  .gl .callout__text span { display: none; }
}
@media (max-width: 560px) {
  .sizes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .finishes { grid-template-columns: 1fr 1fr; }
  .finish { grid-template-columns: auto 1fr; padding: 10px 12px; }
  .finish__price { grid-column: 2; margin-top: -10px; }
  .night__chart, .night__heart, .week, .tool { padding: var(--s-5) var(--s-4); }
  .phone { width: 296px; }
  .phone__body { height: 610px; }
  .formula__eq { font-size: var(--fs-md); }
  .week__days { height: 220px; gap: 6px; }
  .week__bar { height: calc(var(--l) * 1.5px); }
  .done { padding: var(--s-5); }
  .hero__lede { font-size: var(--fs-md); }
}

/* ---------- Layout refinements ---------- */
.gl .story { overflow: clip; }  /* the sticky stage never spills into the sections below */
.night { grid-template-columns: 1fr; }
.night__heart { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "h v" "c v" "x v"; column-gap: var(--s-7); align-items: start; }
.night__heart > .night__h { grid-area: h; }
.night__heart > .hr__svg { grid-area: c; }
.night__heart > .vitals { grid-area: v; margin-top: 0; }
.night__heart > .hrv { grid-area: x; }
.week__days { height: 250px; }
.week__bar { height: calc(var(--l) * 2px); }
@media (max-width: 820px) {
  .night__heart { grid-template-columns: 1fr; grid-template-areas: "h" "c" "v" "x"; }
  .night__heart > .vitals { margin-top: var(--s-5); }
}
@media (max-width: 560px) {
  .week__days { height: 210px; }
  .week__bar { height: calc(var(--l) * 1.55px); }
}
.chapter__figure--inside { container-type: inline-size; } /* callout dots are placed in units of the square drawing's width */
.gl .chapter__figure--inside { container-type: normal; }
.order[hidden] { display: none; }
[data-order-no] { white-space: nowrap; }
