/* ============================================================
   Entrain · Solar Meridian.
   One instrument under a live sky. The canvas carries the light,
   panels are rare, glow belongs to the present moment only.
   Men's face: a night instrument with desert gold.
   Women's face: warm paper with terracotta rose.
   ============================================================ */

:root {
  --font-display: 'Gambarino', Georgia, 'Times New Roman', serif;
  --font-body: 'General Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-radiance: 'Fraunces', Georgia, serif;
  --text-xs: 0.7647rem;
  --text-sm: 0.8824rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.9531rem;
  --text-2xl: 2.4414rem;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 24px; --radius-full: 999px;

  --ease-light: cubic-bezier(0.33, 0, 0.2, 1);
  --dur-1: 250ms;
  --dur-2: 380ms;

  --rail-w: 232px;
  --tabbar-h: calc(86px + env(safe-area-inset-bottom, 0px));

  /* the sky, repainted every minute from real solar time (js/sky.js) */
  --skyA: #F2E0C8;
  --skyB: #F5EAD8;
  --skyC: #F6F1E8;
  --sky-opacity: 0.55;
}

/* Women's face is the base: warm paper, terracotta rose. */
:root,
html[data-mode='womens']:not([data-theme='dark']) {
  color-scheme: light;
  --color-bg: #F6F1E8;
  --color-surface: #FBF7EE;
  --color-tint: #EFE7D9;
  --color-text: #2B2620;
  --color-text-soft: #6E675D;
  --color-border: #E2D8C6;
  --color-link: #A2564B;
  --color-accent: #C4766A;
  --color-accent-ink: #A2564B;
  --color-on-accent: #FFF8F0;
  --color-accent-soft: #D6968C;
  --color-info: #46506B;
  --color-good: #5F7D55;
  --color-caution: #B0553A;
  --panel: rgba(43, 38, 32, 0.05);
  --night-arc: rgba(70, 80, 107, 0.35);
  --shadow-card: none;
  --sky-opacity: 0.55;

  /* older palette names, re-pointed so every surface migrates */
  --night-900: #262C3F;
  --night-700: #46506B;
  --dawn-700: #8F4A40;
  --dawn-500: #C4766A;
  --dawn-300: #D6968C;
  --dawn-100: #F1E3D7;
  --day-050: #F6F1E8;
  --day-200: #E2D8C6;
  --noon-500: #5A6787;
  --noon-700: #46506B;
  --leaf-500: #6F8C62;
  --leaf-700: #4E6845;
  --clay-500: #B0553A;
  --clay-700: #8E4127;
}

/* Women's evening: the paper dims to warm dusk. */
html[data-mode='womens'][data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #171310;
  --color-surface: #1E1914;
  --color-tint: #241E17;
  --color-text: #EFE5D6;
  --color-text-soft: #A2988A;
  --color-border: #2C251D;
  --color-link: #DA9C90;
  --color-accent: #CE8478;
  --color-accent-ink: #DA9C90;
  --color-on-accent: #171310;
  --color-accent-soft: #B96C60;
  --color-info: #93A0C4;
  --color-good: #9CBB8E;
  --color-caution: #D9906F;
  --panel: rgba(239, 229, 214, 0.05);
  --night-arc: rgba(120, 146, 196, 0.38);
  --shadow-card: none;
  --sky-opacity: 0.4;

  --night-900: #0F1118;
  --night-700: #3A4666;
  --dawn-700: #B96C60;
  --dawn-500: #CE8478;
  --dawn-300: #DA9C90;
  --dawn-100: #2A221B;
  --day-050: #171310;
  --day-200: #2C251D;
  --noon-500: #7C8BB4;
  --noon-700: #93A0C4;
  --leaf-500: #7E9C70;
  --leaf-700: #9CBB8E;
  --clay-500: #C97757;
  --clay-700: #D9906F;
}

/* Men's face: near-black instrument, desert gold, day and evening. */
html[data-mode='mens'],
html:not([data-mode='womens'])[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #0E0F12;
  --color-surface: #14151A;
  --color-tint: #1A1C22;
  --color-text: #F1ECE4;
  --color-text-soft: #A8A296;
  --color-border: #262830;
  --color-link: #E2B65C;
  --color-accent: #D9A441;
  --color-accent-ink: #E2B65C;
  --color-on-accent: #1C1509;
  --color-accent-soft: #B4842E;
  --color-info: #8FA5CE;
  --color-good: #9CBB8E;
  --color-caution: #C97757;
  --panel: rgba(241, 236, 228, 0.05);
  --night-arc: rgba(120, 146, 196, 0.4);
  --shadow-card: none;
  --sky-opacity: 0.85;
  --skyA: #10131C; --skyB: #0E1017; --skyC: #0E0F12;

  --night-900: #0A0B0E;
  --night-700: #33405E;
  --dawn-700: #B4842E;
  --dawn-500: #D9A441;
  --dawn-300: #E2B65C;
  --dawn-100: #241E12;
  --day-050: #0E0F12;
  --day-200: #262830;
  --noon-500: #7C93BE;
  --noon-700: #8FA5CE;
  --leaf-500: #7E9C70;
  --leaf-700: #9CBB8E;
  --clay-500: #C97757;
  --clay-700: #D9906F;
}

/* Men's evening: the instrument settles a shade deeper. */
html[data-mode='mens'][data-theme='dark'] {
  --color-bg: #0A0B0E;
  --color-surface: #101116;
  --color-tint: #15171D;
  --color-border: #21232B;
  --day-050: #0A0B0E;
  --night-900: #07080A;
  --sky-opacity: 0.7;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  scroll-padding-top: 140px;
  scroll-padding-bottom: var(--tabbar-h);
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  transition: background-color var(--dur-2) var(--ease-light), color var(--dur-2) var(--ease-light);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.16;
  text-wrap: balance;
  color: var(--color-text);
}

p { text-wrap: pretty; }
a { color: var(--color-link); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-ink); }

:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 3px; border-radius: 2px; }
h1[tabindex='-1']:focus, h2[tabindex='-1']:focus { outline: none; }
::selection { background: var(--color-accent); color: var(--color-bg); }

.num, .tnum { font-variant-numeric: tabular-nums lining-nums; }

button { font: inherit; color: inherit; min-height: 44px; }
[hidden] { display: none !important; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
input, select, textarea { min-width: 0; }
.skip-link { position: fixed; top: -100px; left: var(--space-4); z-index: 100; padding: var(--space-3) var(--space-4); background: var(--color-text); color: var(--color-bg); border-radius: var(--radius-sm); opacity: 0; pointer-events: none; }
.skip-link:focus { top: var(--space-3); color: var(--color-bg); opacity: 1; pointer-events: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ============ App frame ============ */
.app { min-height: 100dvh; }

.stage { min-height: 100dvh; min-width: 0; display: flex; flex-direction: column; }

.view {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-5) max(var(--space-4), env(safe-area-inset-left, 0px)) calc(var(--tabbar-h) + var(--space-16)) max(var(--space-4), env(safe-area-inset-right, 0px));
  outline: none;
}

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--rail-w) 1fr; }
  .stage { grid-column: 2; }
  .view { padding: var(--space-8) var(--space-8) var(--space-16); }
}

/* view enter: a slow fade and gentle rise */
.view > .tabpane { animation: pane-in 420ms var(--ease-light) both; }
@keyframes pane-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view > .tabpane { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ============ Side rail (desktop) ============ */
.rail {
  display: none;
  position: sticky; top: 0; height: 100dvh;
  flex-direction: column;
  padding: var(--space-8) var(--space-5) var(--space-6);
  border-right: 1px solid color-mix(in oklab, var(--dawn-500) 14%, var(--color-border));
  background: color-mix(in oklab, var(--color-surface) 55%, var(--color-bg));
}
@media (min-width: 900px) { .rail { display: flex; } }

.rail-logo {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--color-text); text-decoration: none;
  font-family: var(--font-display); font-size: var(--text-md);
  margin-bottom: var(--space-10);
}
.rail-logo .logo-sun, .topbar-logo .logo-sun { fill: var(--color-accent); }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a {
  min-height: 44px;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-soft);
  transition: background var(--dur-1) var(--ease-light), color var(--dur-1) var(--ease-light);
}
.rail-nav a svg { width: 20px; height: 20px; flex: none; }
.rail-nav a:hover { color: var(--color-text); background: color-mix(in oklab, var(--color-tint) 50%, transparent); }
.rail-nav a[aria-current='page'] {
  color: var(--color-text);
  background: color-mix(in oklab, var(--color-tint) 78%, transparent);
  box-shadow: inset 2.5px 0 0 var(--color-accent);
}
.rail-nav .rail-sep {
  margin: var(--space-4) var(--space-3);
  border: 0; border-top: 1px solid var(--color-border);
}

.rail-foot { margin-top: auto; }
.rail-privacy { font-size: var(--text-xs); color: var(--color-text-soft); line-height: 1.5; max-width: 20em; }

/* ============ Top bar (mobile) ============ */
.app-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-2);
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in oklab, var(--dawn-500) 18%, var(--color-border));
}
.app-topbar::after {
  content: '';
  position: absolute; left: 50%; bottom: -1px;
  transform: translateX(-50%);
  width: 30px; height: 6px;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(180deg, var(--dawn-300), var(--dawn-500));
  opacity: 0.85;
}
.topbar-logo {
  min-height: 44px;
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--color-text); text-decoration: none;
  font-family: var(--font-display); font-size: var(--text-base);
}
.topbar-date { margin-left: auto; font-size: var(--text-xs); color: var(--color-text-soft); letter-spacing: 0.02em; }
@media (min-width: 900px) {
  .app-topbar { position: sticky; background: var(--color-bg); backdrop-filter: none; border-bottom: 1px solid var(--color-border); justify-content: flex-end; padding: var(--space-3) var(--space-8) var(--space-2); }
  .app-topbar::after { display: none; }
  .topbar-logo { display: none; }
  .topbar-date { margin-left: 0; font-size: var(--text-sm); }
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  border: 1px solid var(--color-border); background: transparent;
  color: var(--color-text-soft); cursor: pointer; flex: none;
  font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.02em;
  transition: color var(--dur-1) var(--ease-light), border-color var(--dur-1) var(--ease-light);
}
.theme-toggle svg { flex: none; }
.theme-toggle:hover { color: var(--color-accent-ink); border-color: var(--color-accent-soft); }

/* Data mode and service notices share one compact, calm treatment. */
.mode-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; border-top: 1px solid var(--color-border); }
.mode-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--space-2); min-width: 0; font-size: var(--text-xs); }
.mode-caption strong { font-weight: 600; }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-info); flex: none; }
.is-demo .mode-dot { background: var(--color-accent-ink); }
.mode-detail { color: var(--color-text-soft); }
.mode-action { flex: none; background: transparent; border: 0; padding: var(--space-2) var(--space-1); color: var(--color-accent-ink); font-size: var(--text-xs); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.app-notices { width: 100%; max-width: 760px; margin-inline: auto; padding: var(--space-4) var(--space-4) 0; display: grid; gap: var(--space-2); }
.app-notice { padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-xs); line-height: 1.55; }
.app-notice p { color: var(--color-text-soft); }
.app-notice .btn { margin-top: var(--space-2); }
.notice-caution strong { color: var(--color-caution); }
.boot-state { padding-top: 14vh; }
.boot-state h1 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
@media (max-width: 480px) {
  .topbar-date { display: none; }
  .theme-toggle { margin-left: auto; }
  .mode-detail { display: none; }
}
@media (min-width: 900px) {
  .app-notices { padding-inline: var(--space-8); }
}

/* ============ Bottom tab bar (mobile) ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in oklab, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid color-mix(in oklab, var(--dawn-500) 16%, var(--color-border));
}
@media (min-width: 900px) { .tabbar { display: none; } }

.tabbar button, .tabbar a {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: var(--space-2) 0 var(--space-2);
  min-height: 52px; min-width: 44px;
  font-size: 0.7059rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--color-text-soft); text-decoration: none;
  transition: color var(--dur-1) var(--ease-light);
}
.tabbar svg { width: 23px; height: 23px; }
.tabbar .active { color: var(--color-accent-ink); }
.tabbar .active svg { color: var(--color-accent-ink); }

/* The More sheet is gone: five worlds carry everything now. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ============ Shared components ============ */
.pane-head { margin-bottom: var(--space-5); }
.pane-head h1 { font-size: var(--text-xl); }
.pane-head .pane-sub { margin-top: var(--space-1); color: var(--color-text-soft); font-size: var(--text-sm); max-width: 38em; }

.eyebrow {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent-ink);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}
.card + .card, .card-row + .card, .card + .card-row { margin-top: var(--space-4); }
.card h2 { font-size: var(--text-md); }
.card h2 + p { margin-top: var(--space-1); }
.card .card-kicker {
  display: block;
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}
.card-note { font-size: var(--text-sm); color: var(--color-text-soft); }
.card-row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .card-row-2 { grid-template-columns: 1fr 1fr; } }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.stat { text-align: center; padding: var(--space-2) var(--space-1); }
.stat .stat-num { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.1; }
.stat .stat-label { font-size: var(--text-xs); color: var(--color-text-soft); margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 600; font-size: var(--text-sm);
  text-decoration: none; cursor: pointer;
  transition: transform var(--dur-1) var(--ease-light), background var(--dur-1) var(--ease-light), border-color var(--dur-1) var(--ease-light);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--dawn-500); color: var(--night-900); }
.btn-primary:hover { background: var(--dawn-300); }
.btn-ghost { border-color: color-mix(in oklab, var(--color-text) 30%, transparent); color: var(--color-text); background: transparent; }
.btn-ghost:hover { border-color: var(--dawn-500); }
.btn-small { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn[disabled]:hover { transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
}
.chip-good { border-color: var(--leaf-500); color: var(--color-good); }
.chip-info { border-color: var(--noon-500); color: var(--color-info); }
.chip-warm { border-color: var(--dawn-300); color: var(--color-accent-ink); }
.chip-caution { border-color: var(--clay-500); color: var(--color-caution); }

/* Forms */
.field { display: block; margin-top: var(--space-4); }
.field > span { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-1); }
.field .hint { display: block; font-size: var(--text-xs); font-weight: 400; color: var(--color-text-soft); margin-top: var(--space-1); }
input[type='text'], input[type='number'], input[type='time'], input[type='date'], input[type='datetime-local'], input[type='email'], input[type='password'], input[type='search'], select, textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit; font-size: max(16px, var(--text-sm)); min-height: 44px;
  transition: border-color var(--dur-1) var(--ease-light);
}
input:focus, select:focus, textarea:focus { border-color: var(--color-accent-soft); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--dawn-300) 25%, transparent); }
.form-row { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-row > * { min-width: 0; }
.macro-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-3); }
.key-field { margin: 0; max-width: 260px; flex: 1 1 190px; }
@media (max-width: 480px) {
  .macro-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-tab='travel'] .form-row { grid-template-columns: minmax(0, 1fr); }
}
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* Segmented choice */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-full); background: color-mix(in oklab, var(--color-tint) 55%, var(--color-bg)); }
.segmented button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-soft);
  transition: background var(--dur-1) var(--ease-light), color var(--dur-1) var(--ease-light);
}
.segmented button[aria-pressed='true'] { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 4px rgba(16, 27, 51, 0.12); }

/* Rating dots 1..5 */
.rate-row { display: flex; gap: var(--space-2); }
.rate-row button {
  width: 46px; height: 46px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border); background: var(--color-surface);
  font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: all var(--dur-1) var(--ease-light);
}
.rate-row button[aria-pressed='true'] { background: var(--dawn-500); border-color: var(--dawn-500); color: var(--night-900); }

/* Lists */
.row-list { display: grid; gap: var(--space-2); }
.row-item {
  display: flex; align-items: baseline; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-tint) 30%, transparent);
  font-size: var(--text-sm);
}
.row-item .ri-time { font-variant-numeric: tabular-nums; color: var(--color-text-soft); flex: none; width: 3.2em; }
.row-item .ri-main { flex: 1; min-width: 0; }
.row-item .ri-meta { color: var(--color-text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-item .ri-x {
  min-width: 44px; flex: none;
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--color-text-soft); font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm);
}
.row-item .ri-x:hover { color: var(--color-caution); }

.empty-state {
  text-align: center; padding: var(--space-8) var(--space-4);
  color: var(--color-text-soft); font-size: var(--text-sm);
}
.empty-state .es-mark { margin: 0 auto var(--space-3); width: 42px; color: var(--color-accent-soft); }
.empty-state h3 { color: var(--color-text); margin-bottom: var(--space-1); font-size: var(--text-md); }
.empty-state .btn { margin-top: var(--space-4); }
.lab-count { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-info); min-width: 2em; text-align: center; }
.first-day-note, .location-note { font-size: var(--text-sm); color: var(--color-text-soft); max-width: 38em; margin-bottom: var(--space-4); }

/* The one-line day sentence */
.day-line {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.6vw, 1.8rem);
  line-height: 1.3;
  max-width: 21em;
}
.day-line .warm { color: var(--color-accent-ink); }

/* Today hero: kicker, state word, one serif sentence */
.today-hero { padding-block: var(--space-2) var(--space-4); }
.a-kicker {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-text-soft);
}
.a-state {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 8vw, 2.55rem);
  line-height: 1.04;
  color: var(--color-accent-ink);
  margin-top: var(--space-2);
  text-wrap: balance;
}
.a-serif {
  font-family: var(--font-display);
  font-size: var(--text-md); line-height: 1.4;
  max-width: 21em; margin-top: var(--space-3);
}
.a-serif .warm { color: var(--color-accent-ink); }
.a-secondary {
  display: flex; flex-wrap: wrap; column-gap: var(--space-5); row-gap: var(--space-1);
  margin-top: var(--space-5);
  font-size: var(--text-sm); color: var(--color-text-soft);
}
.a-secondary .as-num { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; color: var(--color-text); }

/* ============ Chart styling ============ */
svg text { font-family: var(--font-body); }
.grid-line { stroke: color-mix(in oklab, var(--color-text) 9%, transparent); stroke-width: 1; }
.axis-num { font-size: 11px; fill: var(--color-text-soft); }
.target-line { stroke: var(--color-accent-ink); stroke-width: 1.4; stroke-dasharray: 5 5; }

.dial-track { fill: none; stroke: color-mix(in oklab, var(--color-text) 10%, transparent); stroke-width: 11; stroke-linecap: round; }
.dial-fill { fill: none; stroke: var(--dawn-500); stroke-width: 11; stroke-linecap: round; }
.js .dial-fill { animation: dial-turn-in 900ms var(--ease-light) 150ms both; }
@keyframes dial-turn-in { to { stroke-dashoffset: 0; } }
.dial-num { font-family: var(--font-display); font-size: 44px; fill: var(--color-text); }
.dial-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--color-text-soft); font-weight: 600; }
.dial-sub { font-size: 11px; fill: var(--color-text-soft); }

.trend-line { fill: none; stroke: var(--dawn-500); stroke-width: 2.2; stroke-linecap: round; }
.trend-area { fill: color-mix(in oklab, var(--dawn-300) 18%, transparent); stroke: none; }
.trend-dot { fill: var(--color-surface); stroke: var(--dawn-500); stroke-width: 1.6; }
.trend-dot-last { fill: var(--dawn-500); }
.band-rect { fill: color-mix(in oklab, var(--leaf-500) 12%, transparent); }

.bar { fill: color-mix(in oklab, var(--dawn-300) 55%, var(--color-tint)); }
.bar-hot { fill: var(--dawn-500); }
.bar-dim { fill: color-mix(in oklab, var(--color-text) 12%, transparent); }

.ring-track { fill: none; stroke: color-mix(in oklab, var(--color-text) 10%, transparent); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--dawn-500); stroke-width: 9; stroke-linecap: round; }
.chart-ring.ring-protein .ring-fill { stroke: var(--dawn-500); }
.chart-ring.ring-carbs .ring-fill { stroke: var(--noon-500); }
.chart-ring.ring-fat .ring-fill { stroke: var(--leaf-500); }
.ring-num { font-family: var(--font-display); font-size: 24px; fill: var(--color-text); }
.ring-label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--color-text-soft); font-weight: 600; }

.stage-deep { fill: var(--night-700); }
.stage-rem { fill: var(--noon-500); }
.stage-light { fill: var(--dawn-300); }
.stage-awake { fill: var(--day-200); }
[data-theme='dark'] .stage-deep { fill: #4A6EA8; }
[data-theme='dark'] .stage-awake { fill: #2B3A5C; }

/* The Day Arc: the sun's meridian, drawn once */
.chart-meridian { width: 100%; height: auto; }
.arc-track { fill: none; stroke: color-mix(in oklab, var(--color-text) 15%, transparent); stroke-width: 1.5; }
.arc-night { fill: none; stroke: var(--night-arc); stroke-width: 4; stroke-linecap: round; }
.arc-lightband { fill: none; stroke: var(--color-accent); stroke-width: 7; opacity: 0.22; }
.arc-day { fill: none; stroke: var(--color-accent); stroke-width: 2.4; stroke-linecap: round; }
.js .arc-day { animation: arc-draw 800ms var(--ease-light) 200ms both; }
@keyframes arc-draw { from { stroke-dashoffset: var(--draw, 0); } to { stroke-dashoffset: 0; } }
.arc-meridian { stroke: color-mix(in oklab, var(--color-text) 34%, transparent); stroke-width: 1; }
.arc-now { fill: var(--color-accent); }
.arc-now-glow { fill: var(--color-accent); opacity: 0.16; filter: blur(3px); }
.arc-node { fill: var(--color-bg); stroke: var(--color-text-soft); stroke-width: 1.6; }
.arc-node.is-next { stroke: var(--color-accent); }
.arc-node.is-done { fill: color-mix(in oklab, var(--color-text) 30%, var(--color-bg)); stroke: none; }
.arc-label { font-size: 11px; fill: var(--color-text); font-weight: 600; }
.arc-sub { font-size: 10px; fill: var(--color-text-soft); font-variant-numeric: tabular-nums; }
.arc-nowtime { font-size: 10.5px; fill: var(--color-accent-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.arc-endtime { font-size: 10.5px; fill: var(--color-text-soft); font-variant-numeric: tabular-nums; }
.arc-noon { font-size: 9.5px; fill: var(--color-text-soft); letter-spacing: 0.14em; text-transform: uppercase; }

.sun-horizon { stroke: color-mix(in oklab, var(--color-text) 20%, transparent); stroke-width: 1.2; }
.sun-path { fill: none; stroke: var(--dawn-500); stroke-width: 2.2; }
.sun-path-dim { fill: none; stroke: color-mix(in oklab, var(--color-text) 22%, transparent); stroke-width: 1.6; stroke-dasharray: 2 5; }
.sun-glow { fill: color-mix(in oklab, var(--dawn-300) 16%, transparent); }
.sun-now { fill: var(--dawn-500); }
.sun-now-halo { fill: color-mix(in oklab, var(--dawn-300) 38%, transparent); }
.js .sun-now, .js .sun-now-halo { animation: sun-breathe 6s ease-in-out infinite alternate; transform-origin: center; transform-box: fill-box; }
@keyframes sun-breathe { from { opacity: 0.85; } to { opacity: 1; } }

.cyc-day { fill: color-mix(in oklab, var(--color-text) 8%, transparent); }
.cyc-menstrual { fill: color-mix(in oklab, var(--clay-500) 55%, var(--color-surface)); }
.cyc-follicular { fill: color-mix(in oklab, var(--dawn-300) 55%, var(--color-surface)); }
.cyc-ovulatory { fill: var(--dawn-500); }
.cyc-luteal { fill: color-mix(in oklab, var(--noon-500) 42%, var(--color-surface)); }
.cyc-today { stroke: var(--color-text); stroke-width: 2; }
.cyc-num { font-size: 10px; fill: var(--color-text-soft); }
.cyc-center-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--color-text-soft); }
.cyc-center-num { font-family: var(--font-display); font-size: 40px; fill: var(--color-text); }

.range-track { stroke: color-mix(in oklab, var(--color-text) 14%, transparent); stroke-width: 1.4; }
.range-conv { fill: color-mix(in oklab, var(--noon-500) 22%, transparent); }
.range-band { fill: color-mix(in oklab, var(--leaf-500) 26%, transparent); }
.range-band-label { fill: var(--color-good); font-weight: 600; }
.range-dot { fill: var(--dawn-500); stroke: var(--color-surface); stroke-width: 2; }
.range-you { font-weight: 600; fill: var(--color-text); }

.chart-spark .trend-line { stroke-width: 1.8; }

/* ============ Onboarding, wave 4: a cinematic arrival ============ */
.onboard { position: fixed; inset: 0; z-index: 80; overflow-y: auto; }

.onboard.ob4 {
  display: flex; flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background 600ms var(--ease-light);
}

.ob4-stage {
  position: relative; z-index: 1;
  min-height: 100dvh;
  width: min(560px, 100% - 2.5rem);
  margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-6);
  padding-block: var(--space-12) calc(var(--space-12) + 34px);
  text-align: center;
  animation: pane-in 640ms var(--ease-light) both;
}

.ob4-back {
  position: fixed; top: max(var(--space-4), env(safe-area-inset-top)); left: var(--space-4); z-index: 5;
  appearance: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--color-surface) 72%, transparent);
  color: var(--color-text-soft);
  backdrop-filter: blur(6px);
}
.ob4-back svg { width: 20px; height: 20px; }
.ob4-back:hover { color: var(--color-text); }

.ob4-dots {
  position: fixed; bottom: max(var(--space-5), env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 9px; z-index: 5;
}
.ob4-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in oklab, var(--color-text) 18%, transparent);
  transition: background var(--dur-2) var(--ease-light), transform var(--dur-2) var(--ease-light);
}
.ob4-dots span.done { background: color-mix(in oklab, var(--color-accent) 70%, transparent); }
.ob4-dots span.here { background: var(--color-accent); transform: scale(1.35); }
.ob4-progress { position: absolute; top: var(--space-5); left: 50%; transform: translateX(-50%); font-size: var(--text-xs); color: var(--color-text-soft); z-index: 2; }
.ob4-arrival-note { color: rgba(247, 235, 221, 0.78); font-size: var(--text-xs); line-height: 1.6; }

.ob4-quiet {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: var(--text-sm); color: inherit; opacity: 0.62;
  padding: var(--space-2) var(--space-3);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
  transition: opacity var(--dur-1) var(--ease-light);
}
.ob4-quiet:hover { opacity: 1; }

.ob4-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.4vw, 2.3rem);
  line-height: 1.12; letter-spacing: -0.01em;
}
.ob4-lede { margin-top: var(--space-3); color: var(--color-text-soft); max-width: 30em; }
.ob4-kicker {
  font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-accent-ink); margin-bottom: var(--space-3); font-weight: 600;
}
.ob4-note { font-size: var(--text-sm); color: var(--color-text-soft); max-width: 30em; }

.ob4-card {
  width: 100%; max-width: 440px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  display: grid; gap: var(--space-5);
  text-align: center;
}
.ob4-next { min-width: 12em; }

/* ---- 1 · Arrival and 7 · First sunrise share a sky ---- */
.ob4-arrival, .ob4-sunrise {
  background:
    radial-gradient(130% 58% at 50% 112%, rgba(232, 115, 74, 0.42) 0%, rgba(232, 115, 74, 0.12) 46%, transparent 68%),
    linear-gradient(178deg, #060B1A 0%, #0E1830 44%, #22304E 76%, #4A3A48 92%, #7A4434 100%) !important;
  color: #F7EBDD !important;
}
.ob4-sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ob4-sky .ob4-glow {
  position: absolute; left: 50%; bottom: -12%;
  width: 130vmax; height: 60vmax; transform: translateX(-50%);
  background: radial-gradient(50% 62% at 50% 100%, rgba(242, 166, 107, 0.5) 0%, rgba(232, 115, 74, 0.18) 45%, transparent 72%);
  animation: ob4-dawn 5200ms var(--ease-light) both;
}
.ob4-sky .ob4-horizon {
  position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to top, rgba(251, 232, 216, 0.2), transparent);
  animation: ob4-dawn 5200ms var(--ease-light) both;
}
@keyframes ob4-dawn {
  from { opacity: 0; transform: translateX(-50%) translateY(9%); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ob4-sky .ob4-horizon { transform: none; animation-name: ob4-dawnfade; }
@keyframes ob4-dawnfade { from { opacity: 0; } to { opacity: 1; } }

.ob4-stars { position: absolute; inset: 0; }
.ob4-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #F5EAD9;
  animation: ob4-twinkle 4s ease-in-out infinite, ob4-starset 9s var(--ease-light) forwards;
}
@keyframes ob4-twinkle { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.3; } }
@keyframes ob4-starset { 0%, 55% { filter: none; } 100% { opacity: 0 !important; } }

.ob4-center { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.ob4-mark { width: 92px; height: auto; color: #F2A66B; overflow: visible; }
.ob4-mark-sun { transform: translateY(10px); opacity: 0; animation: ob4-sunup 2600ms 1100ms var(--ease-light) forwards; }
@keyframes ob4-sunup { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.ob4-mark-wave { stroke-dasharray: 46; stroke-dashoffset: 46; animation: ob4-draw 1800ms 300ms var(--ease-light) forwards; }
.ob4-mark-wave2 { animation-delay: 900ms; }
@keyframes ob4-draw { to { stroke-dashoffset: 0; } }

.ob4-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg); letter-spacing: 0.34em; text-transform: uppercase;
  text-indent: 0.34em; opacity: 0;
  animation: ob4-up 400ms 100ms var(--ease-light) forwards;
}
.ob4-wordmark-small { font-size: var(--text-sm); animation-delay: 300ms; }
.ob4-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6.4vw, 2.9rem);
  line-height: 1.1; letter-spacing: -0.01em; max-width: 13em;
  opacity: 0; animation: ob4-up 400ms 100ms var(--ease-light) forwards;
}
@keyframes ob4-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ob4-arrival-actions {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  opacity: 1;
}
.ob4-begin {
  min-width: 13em; padding-block: 0.9em;
  background: linear-gradient(160deg, var(--dawn-300), var(--dawn-500));
  border-color: transparent; color: #2A150B;
  font-size: var(--text-base);
  box-shadow: 0 8px 30px rgba(232, 115, 74, 0.35);
}
.ob4-arrival .ob4-quiet, .ob4-sunrise .ob4-quiet { color: #F7EBDD; }
.ob4-arrival .ob4-title, .ob4-sunrise .ob4-title,
.ob4-arrival h1, .ob4-arrival h2, .ob4-sunrise h1, .ob4-sunrise h2 { color: #F7EBDD; }

/* ---- 2 · Mode: two panels of light, choose by stepping in ---- */
.ob4-mode .ob4-stage { width: 100%; max-width: none; padding: 0; gap: 0; }
.ob4-mode .ob4-head {
  position: absolute; top: max(var(--space-8), 7dvh); left: 0; right: 0; z-index: 3;
  pointer-events: none; padding-inline: var(--space-5);
}
.ob4-mode .ob4-head h2 {
  color: #F6F1E8; mix-blend-mode: normal; text-shadow: none;
  background: rgba(20, 21, 26, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  width: max-content; max-width: min(92%, 20em);
  margin-inline: auto; padding: 12px 26px;
  border-radius: 26px;
}
.ob4-panels { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 100dvh; }
.ob4-panel {
  appearance: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-4); padding: var(--space-8) var(--space-6);
  transition: filter 500ms var(--ease-light), opacity 500ms var(--ease-light), transform 500ms var(--ease-light);
}
.ob4-panel-word { font-family: var(--font-display); font-size: clamp(1.7rem, 4.6vw, 2.5rem); letter-spacing: -0.01em; max-width: 12em; text-wrap: balance; }
.ob4-panel-hint { max-width: 21em; font-size: var(--text-sm); line-height: 1.55; opacity: 0.78; }
.ob4-panel-f {
  background: linear-gradient(168deg, #FDF6EC 0%, #F9E8DC 52%, #F0CFC4 100%);
  color: #7C4A42;
}
.ob4-panel-m {
  background: linear-gradient(168deg, #070D1C 0%, #0E1729 55%, #1A2440 100%);
  color: #E9EEF8;
}
.ob4-panel:hover { transform: scale(1.012); }
.ob4-panel.is-chosen { transform: scale(1.02); }
.ob4-panels.has-choice .ob4-panel:not(.is-chosen) { opacity: 0.3; filter: saturate(0.5); }
.ob4-mode .ob4-note {
  position: absolute; bottom: max(var(--space-10), 8dvh); left: 0; right: 0; z-index: 3;
  pointer-events: none; margin-inline: auto; padding-inline: var(--space-5);
  color: #DBD5C9; mix-blend-mode: exclusion; text-shadow: none;
}

/* ---- 3 · Two numbers ---- */
.ob4-field-label {
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-text-soft); font-weight: 600;
}
.ob4-weight { display: grid; gap: var(--space-4); justify-items: center; }
.ob4-weight-row { display: flex; align-items: center; gap: var(--space-5); }
.ob4-weight-val { display: flex; align-items: baseline; gap: var(--space-2); }
.ob4-weight-num {
  font-family: var(--font-radiance); font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 9vw, 3.6rem); line-height: 1; font-weight: 500;
}
.ob4-weight-unit { color: var(--color-text-soft); font-size: var(--text-base); }
.ob4-step-btn {
  appearance: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border); background: var(--color-tint);
  color: var(--color-text); font-size: 1.3rem; line-height: 1;
  transition: border-color var(--dur-1) var(--ease-light), transform var(--dur-1) var(--ease-light);
}
.ob4-step-btn:hover { border-color: var(--color-accent); transform: scale(1.05); }
.ob4-slider { width: 100%; accent-color: var(--color-accent); }
.ob4-units { display: inline-flex; border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 3px; gap: 2px; }
.ob4-units button {
  appearance: none; border: 0; cursor: pointer; background: none;
  padding: 0.32em 1.1em; border-radius: var(--radius-full);
  font-size: var(--text-sm); color: var(--color-text-soft);
}
.ob4-units button.on { background: var(--color-accent); color: var(--color-bg); font-weight: 600; }
.ob4-year { display: grid; gap: var(--space-3); justify-items: center; }
.ob4-year-pick {
  appearance: none; text-align: center; cursor: pointer;
  font-family: var(--font-radiance); font-size: 1.5rem;
  background: var(--color-tint); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-6);
}
.ob4-fold { text-align: center; }
.ob4-fold summary {
  cursor: pointer; list-style: none; font-size: var(--text-sm); color: var(--color-text-soft);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
}
.ob4-fold summary::-webkit-details-marker { display: none; }
.ob4-fold-body { margin-top: var(--space-4); display: flex; align-items: center; justify-content: center; gap: var(--space-2); }
.ob4-fold-body input {
  width: 6em; text-align: center; font-size: var(--text-lg);
  background: var(--color-tint); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-2);
}
.ob4-fold-body span { color: var(--color-text-soft); }

/* ---- 4 · Health note ---- */
.ob4-healthnote { text-align: left; gap: var(--space-3); }
.ob4-healthnote p { line-height: 1.65; }
.ob4-healthnote p:first-child { font-weight: 600; }

/* ---- 5 · Light ---- */
.ob4-option {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; gap: 2px;
  background: var(--color-tint); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5);
  color: var(--color-text);
  transition: border-color var(--dur-1) var(--ease-light);
}
.ob4-option:hover { border-color: var(--color-accent); }
.ob4-option.is-waiting { border-color: var(--color-accent); }
.ob4-option-title { font-weight: 600; }
.ob4-option-sub { font-size: var(--text-sm); color: var(--color-text-soft); }
.ob4-citypick { display: grid; gap: var(--space-1); }
.ob4-citypick input {
  width: 100%; background: var(--color-tint); color: var(--color-text);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5); font-size: var(--text-base);
}
.ob4-citypick input:focus { outline: none; border-color: var(--color-accent); }
.ob4-citylist { display: grid; gap: 2px; max-height: 176px; overflow-y: auto; text-align: left; }
.ob4-citylist button {
  appearance: none; border: 0; cursor: pointer; text-align: left;
  background: transparent; color: var(--color-text);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  display: flex; justify-content: space-between; gap: var(--space-3);
}
.ob4-citylist button span { color: var(--color-text-soft); }
.ob4-citylist button:hover { background: color-mix(in oklab, var(--color-tint) 70%, transparent); }

/* ---- 6 · Ring: one door, Oura's own sign-in ---- */
.ob4-alts { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }

/* ---- 7 · First sunrise ---- */
.ob4-arcbox { width: min(430px, 92vw); opacity: 0; animation: ob4-up 900ms 200ms var(--ease-light) forwards; }
.ob4-arcbox svg { width: 100%; height: auto; overflow: visible; }
.ob4-arc-horizon { stroke: rgba(247, 235, 221, 0.35); stroke-width: 1; stroke-dasharray: 3 5; }
.ob4-arc-path { stroke: #F2A66B; stroke-width: 2.4; stroke-linecap: round; }
.ob4-arc-sun { fill: #FBE8D8; filter: drop-shadow(0 0 10px rgba(242, 166, 107, 0.85)); }
.ob4-arc-label { fill: #F7EBDD; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ob4-arc-cap { fill: rgba(247, 235, 221, 0.55); font-size: 9px; letter-spacing: 0.08em; }
.ob4-final-copy .ob4-title { animation-delay: 100ms; }
.ob4-final-copy .ob4-lede { color: rgba(247, 235, 221, 0.8); opacity: 0; animation: ob4-up 400ms 100ms var(--ease-light) forwards; }
.ob4-enter-now { opacity: 1; }

/* ---- 8 · The Sunday Letter ---- */
.ob4-letter-form { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ob4-letter-form input {
  flex: 1 1 200px; background: var(--color-tint); color: var(--color-text);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5); font-size: var(--text-base);
}
.ob4-letter-form input:focus { outline: none; border-color: var(--color-accent); }
.ob4-letter-status { font-size: var(--text-sm); color: var(--color-caution); min-height: 1.4em; }
.ob4-letter-status.is-good { color: var(--color-good); }

.onboard.ob4-leaving { opacity: 0; transition: opacity 480ms var(--ease-light); }

@media (max-width: 640px) {
  .ob4-panels { grid-template-columns: 1fr; }
  .ob4-panel { min-height: 44dvh; justify-content: center; padding-top: var(--space-10); }
  .ob4-panel-f { padding-top: calc(var(--space-10) + 9dvh); }
  .ob4-mode .ob4-note { bottom: var(--space-4); }
}

.city-results { margin-top: var(--space-2); display: grid; gap: 2px; max-height: 210px; overflow-y: auto; }
.city-results button {
  text-align: left; appearance: none; cursor: pointer;
  border: 0; background: transparent; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--color-text);
}
.city-results button:hover { background: color-mix(in oklab, var(--color-tint) 60%, transparent); }
.city-results .cr-country { color: var(--color-text-soft); }

/* ============ Light tab specifics ============ */
.light-plan { display: grid; gap: 0; }
.light-step { display: flex; gap: var(--space-4); padding: var(--space-4) 0; position: relative; }
.light-step + .light-step { border-top: 1px solid color-mix(in oklab, var(--color-border) 70%, transparent); }
.light-step .ls-time { flex: none; width: 5em; font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-sm); color: var(--color-accent-ink); }
.light-step .ls-body h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 600; }
.light-step .ls-body p { margin-top: 2px; font-size: var(--text-sm); color: var(--color-text-soft); max-width: 34em; }
.light-step.past { opacity: 0.55; }
.light-step.now .ls-time { color: var(--color-accent); }
.light-step.now::before {
  content: '';
  position: absolute; left: -14px; top: calc(var(--space-4) + 5px);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dawn-500);
}

/* ============ Labs ============ */
.marker-search { position: relative; }
.marker-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  max-height: 250px; overflow-y: auto;
}
.marker-results button {
  display: flex; justify-content: space-between; gap: var(--space-3); width: 100%;
  text-align: left; appearance: none; cursor: pointer;
  border: 0; background: transparent; padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.marker-results button:hover { background: color-mix(in oklab, var(--color-tint) 60%, transparent); }
.marker-results .mr-units { color: var(--color-text-soft); font-size: var(--text-xs); }
.marker-card + .marker-card { margin-top: var(--space-4); }
.marker-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.marker-head h3 { font-size: var(--text-md); }
.marker-head .mh-units { color: var(--color-text-soft); font-size: var(--text-xs); }
.marker-head .chart-spark { margin-left: auto; width: 120px; }
.marker-story { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-soft); max-width: 40em; }
.labs-summary { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.labs-summary .chart-dial { width: 150px; flex: none; }

/* ============ Radiance: a Radiance Report inset ============ */
.radiance-scope {
  --rr-ivory: #FBF7F1;
  --rr-ivory-deep: #F6EFE5;
  --rr-blush: #F3E5DA;
  --rr-ink: #241C13;
  --rr-gold: #C08040;
  --rr-gold-deep: #A2682F;
  --rr-gold-wash: rgba(192, 128, 64, 0.10);
  background: var(--rr-ivory);
  color: var(--rr-ink);
  border-radius: var(--radius-xl);
  border: 1px solid #EADDCE;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
[data-theme='dark'] .radiance-scope { border-color: #3A3020; }
.radiance-scope ::selection { background: var(--rr-blush); color: var(--rr-ink); }
.radiance-inner { padding: clamp(var(--space-5), 4vw, var(--space-10)); }
.radiance-scope h1, .radiance-scope h2, .radiance-scope h3 {
  font-family: var(--font-radiance);
  color: var(--rr-ink);
  font-weight: 500;
}
.radiance-scope p { color: #5C4E3C; }
.rr-kicker {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rr-gold-deep);
}
.rr-kicker .rr-burst { color: var(--rr-gold); width: 26px; height: 26px; flex: none; }
.rr-masthead { text-align: center; padding-bottom: var(--space-6); border-bottom: 1px solid var(--rr-gold); }
.rr-masthead .rr-kicker { justify-content: center; margin-bottom: var(--space-4); }
.rr-masthead h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); letter-spacing: 0.01em; }
.rr-masthead .rr-lede { margin-top: var(--space-3); max-width: 34em; margin-inline: auto; font-size: var(--text-sm); }
.rr-section { margin-top: var(--space-8); }
.rr-section-head { display: flex; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-4); }
.rr-section-head h2 { font-size: var(--text-lg); white-space: nowrap; }
.rr-section-head .rr-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--rr-gold), transparent); }
.rr-cards { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .rr-cards { grid-template-columns: 1fr 1fr; } }
.rr-card {
  background: #FFFDF9;
  border: 1px solid #EADDCE;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}
.rr-card .rr-num {
  font-family: var(--font-radiance);
  color: var(--rr-gold); font-size: var(--text-lg); line-height: 1;
}
.rr-card h3 { margin-top: var(--space-2); font-size: var(--text-base); }
.rr-card .rr-role { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--rr-gold-deep); font-weight: 600; margin-top: 2px; }
.rr-card p { margin-top: var(--space-2); font-size: var(--text-sm); line-height: 1.5; }
.rr-routine { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .rr-routine { grid-template-columns: 1fr 1fr; } }
.rr-routine-col { background: var(--rr-gold-wash); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.rr-routine-col h3 { font-size: var(--text-base); display: flex; align-items: center; gap: var(--space-2); }
.rr-routine-col h3 svg { width: 18px; height: 18px; color: var(--rr-gold-deep); }
.rr-check { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; cursor: pointer; }
.rr-check + .rr-check { border-top: 1px solid rgba(192, 128, 64, 0.18); }
.rr-check input {
  appearance: none; width: 20px; height: 20px; flex: none;
  border: 1.5px solid var(--rr-gold); border-radius: 50%;
  cursor: pointer; position: relative;
  transition: background var(--dur-1) var(--ease-light);
}
.rr-check input:checked { background: var(--rr-gold); }
.rr-check input:checked::after {
  content: ''; position: absolute; inset: 5px 4px 6px;
  border: solid #FFFDF9; border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}
.rr-check span { font-size: var(--text-sm); color: var(--rr-ink); }
.rr-check input:checked + span { opacity: 0.55; text-decoration: line-through; text-decoration-color: var(--rr-gold); }
.rr-note { background: var(--rr-ivory-deep); border-left: 2px solid var(--rr-gold); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); color: #5C4E3C; }
.rr-note strong { color: var(--rr-ink); }
.rr-foot { margin-top: var(--space-8); text-align: center; font-size: var(--text-sm); }
.rr-foot a { color: var(--rr-gold-deep); font-weight: 600; text-decoration-color: var(--rr-gold); }

/* ============ Settings ============ */
.settings-group + .settings-group { margin-top: var(--space-6); }
.settings-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); padding: var(--space-3) 0; }
.settings-row > div:first-child { flex: 1 1 11em; min-width: 0; }
.settings-row > :last-child { min-width: 0; max-width: 100%; }
.settings-row + .settings-row { border-top: 1px solid color-mix(in oklab, var(--color-border) 70%, transparent); }
.settings-row .sr-label { font-weight: 500; font-size: var(--text-sm); }
.settings-row .sr-sub { font-size: var(--text-xs); color: var(--color-text-soft); }
.settings-row .segmented { min-width: 190px; }
.btn-danger { border-color: var(--color-caution); color: var(--color-caution); }
@media (max-width: 599px) {
  .settings-row { align-items: stretch; flex-direction: column; padding-block: var(--space-4); gap: var(--space-3); }
  .settings-row > div:first-child { flex: none; }
  .settings-row > :last-child { width: 100%; max-width: 100% !important; }
  .settings-row .segmented { min-width: 0; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius-md); }
}
.oura-status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.oura-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); }
.oura-status.on .dot { background: var(--leaf-500); }
.oura-scopes { overflow-wrap: anywhere; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--space-4)); z-index: 90;
  transform: translateX(-50%);
  background: var(--night-900); color: var(--dawn-100);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  box-shadow: 0 10px 30px rgba(16, 27, 51, 0.35);
  animation: toast-in 300ms var(--ease-light) both;
  max-width: min(92vw, 30em);
  text-align: center;
}
[data-theme='dark'] .toast { background: var(--color-text); color: var(--color-bg); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 900px) { .toast { bottom: var(--space-8); } }

.footnote { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--color-text-soft); max-width: 40em; }

/* ============================================================
   Wave 2: mode-driven theming.
   Women's mode keeps the warm paper day and navy evening.
   Men's mode is a near-black instrument, day and night.
   ============================================================ */

/* Women's day: warm white, beige structure, the softest blush,
   actions in a muted rose. */
html[data-mode='womens']:not([data-theme='dark']) {
  --color-bg: #FDFBF6;
  --color-surface: #FFFEFB;
  --color-tint: #F6EFE5;
  --color-text: #3A2E24;
  --color-text-soft: #71604F;
  --color-border: #EADDCE;
  --color-link: #8E4B47;
  --color-accent: #C97B7B;
  --color-accent-ink: #A05050;
  --color-accent-soft: #D98E8E;
  --shadow-card: 0 1px 2px rgba(138, 100, 70, 0.05), 0 10px 30px rgba(176, 120, 100, 0.09);
}
html[data-mode='womens']:not([data-theme='dark']) ::selection { background: #F3E5DA; color: #3A2E24; }
html[data-mode='womens']:not([data-theme='dark']) .card-kicker { color: #C08040; }

/* Men's day: near-black, hairline borders, warm off-white type,
   ember and first-light glow for what matters. */
html[data-mode='mens'] {
  color-scheme: dark;
  --color-bg: #0B1120;
  --color-surface: #131B2E;
  --color-tint: #18243F;
  --color-text: #F4EFE7;
  --color-text-soft: #A9B2C8;
  --color-border: #202C49;
  --color-link: var(--dawn-300);
  --color-accent: var(--dawn-500);
  --color-accent-ink: var(--dawn-300);
  --color-accent-soft: var(--dawn-300);
  --color-info: #6FA8DC;
  --color-good: #9DC3A0;
  --color-caution: #E0A28C;
  --shadow-card: 0 1px 2px rgba(2, 5, 12, 0.5), 0 10px 30px rgba(2, 5, 12, 0.42);
}
html[data-mode='mens'] ::selection { background: rgba(232, 115, 74, 0.35); color: #F4EFE7; }

/* Men's evening: the instrument dims further after sunset. */
html[data-mode='mens'][data-theme='dark'] {
  --color-bg: #070D1C;
  --color-surface: #0E1729;
  --color-tint: #14203A;
  --color-text: #EFE7DA;
  --color-text-soft: #9AA4BC;
  --color-border: #1B2742;
}

/* Chart and surface details that assume a light page. */
html[data-mode='mens'] .stage-deep { fill: #4A6EA8; }
html[data-mode='mens'] .stage-awake { fill: #2B3A5C; }
html[data-mode='mens'] .arc-ev-sleep { stroke: #7C9CD1; }
html[data-mode='mens'] .toast { background: var(--color-text); color: var(--color-bg); }
html[data-mode='mens'] .radiance-scope { border-color: #3A3020; }

/* ============================================================
   Wave 2 components: Train, Ask, Protocols, Travel, Supplements
   ============================================================ */

/* ---- freshness ---- */
.fresh-row { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.fresh-cell { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); flex: 1 1 auto; }
.fresh-track { width: 100%; max-width: 34px; height: 52px; border-radius: 6px; background: var(--color-tint); position: relative; overflow: hidden; }
.fresh-fill { position: absolute; inset-inline: 0; bottom: 0; height: var(--fresh, 0%); background: color-mix(in oklab, var(--color-text) 34%, var(--color-surface)); border-radius: 6px 6px 0 0; transition: height var(--dur-2) var(--ease-light), width var(--dur-2) var(--ease-light); }
.fresh-fill.low { background: var(--color-accent); }
.fresh-label { font-size: var(--text-xs); letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-text-soft); white-space: nowrap; }

/* Narrow screens: each muscle group becomes a labelled row, so every name stays whole and readable. */
@media (max-width: 639px) {
  .fresh-row { flex-direction: column; gap: var(--space-2); }
  .fresh-cell { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: var(--space-3); }
  .fresh-label { grid-column: 1; grid-row: 1; }
  .fresh-track { grid-column: 2; grid-row: 1; max-width: none; height: 10px; border-radius: var(--radius-full); }
  .fresh-fill { inset-inline: auto; left: 0; top: 0; bottom: 0; height: auto; width: var(--fresh, 0%); min-width: 2px; border-radius: 0 var(--radius-full) var(--radius-full) 0; }
}

/* ---- start grid ---- */
.start-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.start-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; font: inherit; transition: border-color var(--dur-1) var(--ease-light), transform var(--dur-1) var(--ease-light); }
.start-tile:hover { border-color: var(--color-accent); transform: translateY(-1px); }
.start-tile strong { font-weight: 600; }
.start-tile span { font-size: var(--text-xs); color: var(--color-text-soft); }
.start-tile.start-primary { border-color: var(--color-accent); background: color-mix(in oklab, var(--color-accent) 8%, var(--color-surface)); }
.start-tile.start-bjj { border-style: dashed; }
.start-tile.start-heat { border-style: dashed; }

/* ---- weekly group rows ---- */
.group-rows { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.group-row { display: grid; grid-template-columns: 84px 1fr 34px; align-items: center; gap: var(--space-3); }
.gr-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-soft); }
.gr-track { position: relative; height: 10px; border-radius: 999px; background: var(--color-tint); overflow: hidden; }
.gr-range { position: absolute; top: 0; bottom: 0; background: color-mix(in oklab, var(--color-good) 22%, transparent); }
.gr-fill { position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 999px; background: var(--color-accent-soft); min-width: 2px; }
.gr-fill.in-range { background: var(--color-good); }
.gr-num { font-size: var(--text-sm); text-align: right; color: var(--color-text-soft); }

/* ---- training calendar ---- */
.train-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: var(--space-4) 0; max-width: 340px; }
.cal-head { font-size: 0.62rem; text-align: center; color: var(--color-text-soft); text-transform: uppercase; }
.cal-cell { aspect-ratio: 1; border-radius: 6px; background: var(--color-tint); display: grid; place-items: center; }
.cal-cell.cal-today { outline: 1.5px solid var(--color-accent); outline-offset: 1px; }
.cal-cell.cal-future { opacity: 0.35; }
.cal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); display: inline-block; }
.cal-dot.bjj { background: var(--color-info); }
.cal-dot.both { background: linear-gradient(90deg, var(--color-accent) 50%, var(--color-info) 50%); }
.cal-dot.heat { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-accent); }
.cal-legend { grid-column: 1 / -1; display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-xs); color: var(--color-text-soft); margin-top: var(--space-1); }

.row-btn { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--color-border); cursor: pointer; }
.row-btn:first-child { border-top: 0; }
.session-detail { padding: var(--space-3) var(--space-2) var(--space-4); border-top: 1px dashed var(--color-border); font-size: var(--text-sm); display: flex; flex-direction: column; gap: var(--space-2); }
.session-detail .num { color: var(--color-text-soft); }
.sd-note { color: var(--color-text-soft); font-style: italic; }

/* ---- active session ---- */
.session-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--color-border); background: color-mix(in srgb, var(--color-surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-card); margin-bottom: var(--space-4); }
.sb-left { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-left strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-meta { font-size: var(--text-xs); color: var(--color-text-soft); }
.sb-rest { display: inline-flex; align-items: baseline; gap: var(--space-1); font-size: var(--text-sm); color: var(--color-accent-ink); white-space: nowrap; }
.sb-rest strong { font-size: var(--text-md); }

.entry-card { padding-top: var(--space-4); }
.entry-card.superset { border-left: 3px solid var(--color-info); }
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.entry-head h3 { font-size: var(--text-md); }
.entry-tools { display: flex; gap: var(--space-1); }
.tool-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: none; color: var(--color-text-soft); font-size: 0.9rem; cursor: pointer; }
.tool-btn:hover { border-color: var(--color-accent); color: var(--color-accent-ink); }
.tool-btn.on { background: var(--color-tint); color: var(--color-accent-ink); border-color: var(--color-accent); }
.ss-tag { font-size: var(--text-xs); color: var(--color-info); margin-top: var(--space-1); }

.set-head, .set-row { display: grid; grid-template-columns: 26px 1fr 1fr 0.8fr 40px 36px; gap: var(--space-2); align-items: center; }
.set-head { margin-top: var(--space-3); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-soft); }
.set-row { margin-top: var(--space-2); }
.set-row input { width: 100%; min-width: 0; padding: 0.55em 0.5em; font-size: 1rem; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-variant-numeric: tabular-nums; }
.set-row input:focus { border-color: var(--color-accent); outline: none; }
.set-row.done input { opacity: 0.75; }
.set-idx { font-size: var(--text-sm); color: var(--color-text-soft); text-align: center; }
.set-done { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); background: none; color: transparent; font-size: 1rem; cursor: pointer; transition: all var(--dur-1) var(--ease-light); }
.set-done.on { background: var(--color-good); border-color: var(--color-good); color: #fff; }
.entry-actions { margin-top: var(--space-3); }
.entry-note { margin-top: var(--space-3); }
.add-exercise { width: 100%; padding: var(--space-4); border-style: dashed; margin-bottom: var(--space-5); }

/* ---- picker ---- */
.picker-card .picker-search { width: 100%; margin-top: var(--space-3); padding: 0.6em 0.9em; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font: inherit; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.picker-list { margin-top: var(--space-3); max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.picker-list button { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); width: 100%; padding: var(--space-2) var(--space-2); border: 0; border-top: 1px solid var(--color-border); background: none; color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.picker-list button:first-child { border-top: 0; }
.picker-list button:hover { color: var(--color-accent-ink); }
.picker-list .mr-units { font-size: var(--text-xs); color: var(--color-text-soft); }

/* ---- plates ---- */
.plate-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.plate-chip { padding: 0.45em 0.8em; border-radius: var(--radius-sm); background: var(--color-tint); border: 1px solid var(--color-border); font-weight: 600; }

/* ---- Ask: sharing choice, conversation and composer ---- */
.sharing-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); margin-bottom: var(--space-5); }
.sharing-head { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.sharing-head h2 { font-size: var(--text-md); margin-top: var(--space-1); }
.sharing-card p { font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-soft); }
.sharing-details { margin-top: var(--space-2); }
.sharing-details summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--color-accent-ink); font-size: var(--text-sm); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.sharing-details p + p { margin-top: var(--space-2); }
.sharing-details pre { max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--space-3); font-size: var(--text-xs); background: var(--color-tint); border-radius: var(--radius-sm); }
.sharing-check { display: flex; align-items: flex-start; gap: var(--space-3); min-height: 44px; margin-block: var(--space-3); padding-block: var(--space-2); font-size: var(--text-sm); cursor: pointer; }
.sharing-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--color-accent-ink); }
.sharing-card .sharing-note { font-size: var(--text-xs); margin-top: var(--space-3); }
.chat-card { display: flex; flex-direction: column; }
.chat-scroll { display: flex; flex-direction: column; gap: var(--space-3); max-height: 50dvh; min-height: 120px; overflow-y: auto; overscroll-behavior-y: contain; padding: var(--space-2) 0; }
.chat-hello h2 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.chat-hello p { color: var(--color-text-soft); font-size: var(--text-sm); max-width: 36em; }
.chat-msg { max-width: 92%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; flex: none; }
.chat-msg p + p { margin-top: 0.6em; }
.chat-msg.from-user { align-self: flex-end; background: var(--color-text); color: var(--color-bg); border-bottom-right-radius: 4px; }
.chat-msg.from-app { align-self: flex-start; background: var(--color-tint); color: var(--color-text); border-bottom-left-radius: 4px; }
.chat-msg.notice { border: 1px dashed var(--color-border); background: none; color: var(--color-text-soft); }
.chat-msg.thinking p { color: var(--color-text-soft); }
@keyframes pulse-soft { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.chat-form { display: flex; align-items: flex-end; gap: var(--space-2); margin-block: var(--space-4) var(--space-3); }
.chat-form .field { flex: 1; min-width: 0; margin: 0; font-size: var(--text-sm); }
.chat-form input { margin-top: var(--space-2); }
.chat-form .btn { flex: none; }
.chat-form input { flex: 1; min-width: 0; padding: 0.65em 0.9em; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font: inherit; }
.chat-form input:focus { border-color: var(--color-accent); outline: none; }

/* ---- protocols ---- */
.proto-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.proto-head h3 { font-size: var(--text-md); margin-top: 2px; }
.proto-why { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--color-text-soft); max-width: 44em; }
.proto-steps { margin: var(--space-3) 0 0 1.1em; font-size: var(--text-sm); display: flex; flex-direction: column; gap: var(--space-1); }
.proto-card.proto-active { border-color: color-mix(in oklab, var(--color-accent) 45%, var(--color-border)); }
.week-strip { display: flex; gap: var(--space-1); margin-top: var(--space-2); overflow-x: auto; padding-block: var(--space-1); }
.ws-day { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1.5px solid var(--color-border); background: none; color: var(--color-text-soft); font-size: var(--text-xs); cursor: pointer; display: grid; place-items: center; transition: all var(--dur-1) var(--ease-light); }
.ws-day.on { background: var(--color-good); border-color: var(--color-good); color: #fff; }
.ws-day.today { border-style: dashed; border-color: var(--color-accent); }
.ws-day.today.on { border-style: solid; border-color: var(--color-good); }

/* ---- travel ---- */
.trip-ribbon { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid color-mix(in oklab, var(--color-info) 45%, var(--color-border)); background: color-mix(in oklab, var(--color-info) 9%, var(--color-surface)); text-decoration: none; margin-bottom: var(--space-4); }
.tr-kicker { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-info); font-weight: 600; }
.tr-line { font-size: var(--text-sm); color: var(--color-text); }
.trip-days { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); }
.trip-day { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.trip-day.trip-today { border-color: var(--color-accent); background: color-mix(in oklab, var(--color-accent) 6%, var(--color-surface)); }
.td-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.td-head span { font-size: var(--text-xs); color: var(--color-text-soft); }
.td-sleep { margin-top: var(--space-1); font-weight: 600; }
.td-line { font-size: var(--text-sm); color: var(--color-text-soft); margin-top: 2px; }
.city-list { max-height: 220px; position: relative; }

/* ---- supplements ---- */
.supp-slot { margin-top: var(--space-4); }
.supp-slot h4 { font-family: var(--font-body); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-soft); font-weight: 600; }
.supp-row { border: 0; background: none; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.supp-tick { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--color-border); display: inline-grid; place-items: center; font-size: 0.8rem; color: transparent; flex-shrink: 0; }
.supp-row.on .supp-tick { background: var(--color-good); border-color: var(--color-good); color: #fff; }
.supp-row.on .ri-main { color: var(--color-text-soft); }
.supp-cat { align-items: center; gap: var(--space-3); }
.sc-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sc-note { font-size: var(--text-xs); color: var(--color-text-soft); }
.supp-strip { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.supp-chip.chip-on { background: var(--color-good); border-color: var(--color-good); color: #fff; }
@media (max-width: 599px) {
  .supp-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-3) 0; gap: var(--space-2) var(--space-3); }
  .supp-cat .sc-main { grid-column: 1 / -1; }
  .supp-cat .btn { justify-self: end; }
  .supp-row { flex-wrap: wrap; }
  .supp-row .ri-main { flex-basis: calc(100% - 44px); }
  .supp-row .ri-meta { margin-left: 39px; white-space: normal; }
}

@media (max-width: 420px) {
  .set-head, .set-row { grid-template-columns: 20px 1fr 1fr 0.7fr 38px 32px; gap: var(--space-1); }
  .start-grid { grid-template-columns: 1fr 1fr; }
}

button.chip { cursor: pointer; font-family: inherit; background: var(--color-surface); color: var(--color-text); }
button.chip:hover { border-color: var(--color-accent); color: var(--color-accent-ink); }
.chip.chip-on { background: var(--color-tint); border-color: var(--color-accent); color: var(--color-accent-ink); }
.today-dial-row .chart-ring { width: 132px; flex: none; }
.row-list { grid-template-columns: minmax(0, 1fr); }
.row-item.row-btn { min-width: 0; }

/* ============================================================
   Wave 4: Entrain Mind, a quieter space, and The Sunday Letter
   ============================================================ */

/* The whole atmosphere shifts at the door: deep twilight indigo in every mode. */
html[data-mind][data-mind][data-mind] {
  --color-bg: #0C0E24;
  --color-surface: #141733;
  --color-tint: #1C2042;
  --color-text: #EAE7F8;
  --color-text-soft: #A5A1CE;
  --color-border: #2B2F58;
  --color-accent: #A99BE8;
  --color-accent-ink: #C4B9F2;
  --color-accent-soft: #232048;
  --color-link: #C4B9F2;
  --color-good: #8FBF9F;
  --color-caution: #D99A9A;
  --color-info: #8FA6D9;
  --shadow-card: 0 1px 2px rgba(3, 4, 14, 0.5), 0 12px 34px rgba(3, 4, 14, 0.45);
}
html[data-mind][data-mind][data-mind]:not([data-theme='dark']) {
  --color-bg: #12142E;
  --color-surface: #1A1D3D;
  --color-tint: #22264C;
  --color-border: #323665;
}
html[data-mind] body { background: var(--color-bg); }

/* Slower motion, more air. */
.mind-scope { animation: mind-in 720ms var(--ease-light) both; }
@keyframes mind-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.mind-scope .card { margin-bottom: var(--space-5); }

.mind-head { text-align: center; padding: var(--space-6) 0 var(--space-8); }
.mind-head-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: var(--space-4); color: var(--color-accent-ink); }
.mind-head-mark svg { width: 30px; height: 30px; }
.mind-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.2vw, 2.2rem);
  letter-spacing: 0.02em;
}
.mind-lede { margin: var(--space-4) auto 0; max-width: 34em; color: var(--color-text-soft); line-height: 1.65; }

.mind-section { margin-top: var(--space-10); }
.mind-section h2 { font-family: var(--font-display); font-size: var(--text-xl); }
.mind-sub { margin: var(--space-2) 0 var(--space-5); color: var(--color-text-soft); font-size: var(--text-sm); max-width: 36em; line-height: 1.6; }

/* Mood check-in */
.mind-mood { text-align: center; }
.mind-mood-lead { font-size: var(--text-base); }
.mind-mood-lead strong { color: var(--color-accent-ink); font-weight: 600; }
.mind-mood-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-4); }
.mind-chip {
  appearance: none; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: var(--color-tint); color: var(--color-text);
  padding: 0.5em 1.15em; font-size: var(--text-sm);
  display: inline-flex; align-items: center; gap: 0.55em;
  transition: border-color var(--dur-2) var(--ease-light), transform var(--dur-2) var(--ease-light), box-shadow var(--dur-2) var(--ease-light);
}
.mind-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mood, var(--color-text-soft)); }
.mind-chip:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--mood, var(--color-accent)) 60%, var(--color-border)); }
.mind-chip.on {
  border-color: var(--mood, var(--color-accent));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--mood, var(--color-accent)) 22%, transparent);
}
.mind-mood-note { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--color-text-soft); }

.mood-calm { --mood: #8FBF9F; }
.mood-bright { --mood: #E5C878; }
.mood-wired { --mood: #B78BE8; }
.mood-low { --mood: #7D9BC9; }
.mood-heavy { --mood: #666A92; }

/* Thirty days of words */
.mind-strip-head { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-soft); font-weight: 600; margin-bottom: var(--space-4); }
.mind-strip-row { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.mind-cell {
  aspect-ratio: 1; border-radius: 3px;
  background: var(--mood, transparent);
  border: 1px solid color-mix(in oklab, var(--color-border) 80%, transparent);
}
.mind-cell[class*='mood-'] { border-color: transparent; }
.mind-strip-legend { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); margin-top: var(--space-4); font-size: var(--text-xs); color: var(--color-text-soft); }
.mind-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.mind-legend-item .mind-cell { width: 10px; height: 10px; aspect-ratio: auto; }
.mind-strip-empty { text-align: center; padding: var(--space-2) 0 var(--space-4); }

/* Practices */
.mind-practices { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mind-practice {
  appearance: none; cursor: pointer; text-align: left;
  display: flex; gap: var(--space-4); align-items: flex-start;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  color: var(--color-text); box-shadow: var(--shadow-card);
  transition: border-color var(--dur-2) var(--ease-light), transform var(--dur-2) var(--ease-light);
}
.mind-practice:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--color-accent) 55%, var(--color-border)); }
.mp-glowdot {
  flex: none; width: 34px; height: 34px; border-radius: 50%; margin-top: 2px;
  background: radial-gradient(circle at 50% 45%, color-mix(in oklab, var(--color-accent) 85%, white) 0%, var(--color-accent) 38%, transparent 72%);
  animation: mind-breathe 6s ease-in-out infinite;
  opacity: 0.9;
}
@keyframes mind-breathe { 0%, 100% { transform: scale(0.82); } 50% { transform: scale(1.08); } }
.mp-kicker { display: block; font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-ink); font-weight: 600; }
.mp-name { display: block; margin-top: var(--space-1); font-weight: 600; font-size: var(--text-base); }
.mp-blurb { display: block; margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-soft); line-height: 1.55; }

/* Questions */
.mind-questions { display: grid; gap: var(--space-2); }
.mind-q { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.mind-q.is-open { border-color: color-mix(in oklab, var(--color-accent) 45%, var(--color-border)); }
.mind-q-btn {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  background: none; color: var(--color-text); text-align: left;
  padding: var(--space-4) var(--space-5); font-size: var(--text-base); font-weight: 500;
}
.mind-q-btn svg { flex: none; width: 18px; height: 18px; color: var(--color-text-soft); transition: transform var(--dur-2) var(--ease-light); }
.mind-q.is-open .mind-q-btn svg { transform: rotate(180deg); }
.mind-q-a { padding: 0 var(--space-5) var(--space-5); }
.mind-q-a p { color: var(--color-text-soft); line-height: 1.7; font-size: var(--text-sm); }
.mind-ask-link {
  appearance: none; border: 0; cursor: pointer; background: none;
  margin-top: var(--space-3); padding: 0;
  color: var(--color-accent-ink); font-size: var(--text-sm); font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, var(--color-accent-ink) 40%, transparent);
}
.mind-ask-link:hover { text-decoration-color: var(--color-accent-ink); }

/* Deep dives */
.mind-dives { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mind-dive-card {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; gap: var(--space-1); align-content: start;
  background: linear-gradient(165deg, var(--color-surface), color-mix(in oklab, var(--color-accent-soft) 55%, var(--color-surface)));
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-5); color: var(--color-text); box-shadow: var(--shadow-card);
  transition: border-color var(--dur-2) var(--ease-light), transform var(--dur-2) var(--ease-light);
}
.mind-dive-card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--color-accent) 55%, var(--color-border)); }
.md-kicker { font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-ink); font-weight: 600; }
.md-title { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; margin-top: 2px; }
.md-meta { font-size: var(--text-xs); color: var(--color-text-soft); margin-top: var(--space-2); }

/* Deep dive reading view */
.mind-back {
  appearance: none; border: 0; cursor: pointer; background: none;
  display: inline-flex; align-items: center; gap: var(--space-1);
  color: var(--color-text-soft); font-size: var(--text-sm);
  padding: var(--space-2) 0; margin-bottom: var(--space-4);
}
.mind-back svg { width: 16px; height: 16px; }
.mind-back:hover { color: var(--color-text); }
.mind-article { max-width: 42em; margin-inline: auto; }
.mind-article h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.15; margin-top: var(--space-1); }
.mind-article > .md-meta { margin-bottom: var(--space-6); }
.mind-para { color: var(--color-text); line-height: 1.75; margin-bottom: var(--space-5); font-size: var(--text-base); }
.mind-para + .mind-para { text-indent: 0; }
.mind-signpost {
  border-left: 3px solid var(--color-accent);
  background: var(--color-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm); color: var(--color-text-soft); line-height: 1.65;
  margin: var(--space-6) 0;
}
.mind-supportnote {
  background: var(--color-tint); border: 1px solid color-mix(in oklab, var(--color-accent) 40%, var(--color-border));
  border-radius: var(--radius-lg); padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.mind-supportnote > p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; margin-bottom: var(--space-4); }

/* The safety layer, always in reach */
.mind-footer {
  margin-top: var(--space-10); padding: var(--space-6) 0 var(--space-4);
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.mind-companion { font-size: var(--text-sm); color: var(--color-text-soft); font-style: italic; }
.mind-support-toggle {
  appearance: none; border: 0; cursor: pointer; background: none;
  margin-top: var(--space-3); padding: var(--space-2);
  color: var(--color-accent-ink); font-size: var(--text-sm); font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in oklab, var(--color-accent-ink) 40%, transparent);
}
.mind-crisis { margin-top: var(--space-4); text-align: left; }
.mind-crisis-lede { font-size: var(--text-sm); color: var(--color-text-soft); line-height: 1.65; margin-bottom: var(--space-4); max-width: 40em; margin-inline: auto; text-align: center; }
.mind-crisis-lines { display: grid; gap: var(--space-2); max-width: 30em; margin-inline: auto; }
.mind-crisis-line {
  display: grid; gap: 1px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  text-decoration: none; color: var(--color-text);
  transition: border-color var(--dur-1) var(--ease-light);
}
.mind-crisis-line:hover { border-color: var(--color-accent); }
.mcl-name { font-weight: 600; font-size: var(--text-sm); }
.mcl-detail { font-size: var(--text-sm); color: var(--color-accent-ink); }
.mcl-region { font-size: var(--text-xs); color: var(--color-text-soft); }

/* The practice player: one glow, breathing */
.mind-player {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(169, 155, 232, 0.14) 0%, transparent 60%),
    linear-gradient(178deg, #0A0C20 0%, #12142E 60%, #1A1636 100%);
  color: #EAE7F8;
  animation: mind-in 700ms var(--ease-light) both;
}
.mind-player-leave {
  position: absolute; top: max(var(--space-4), env(safe-area-inset-top)); right: var(--space-5);
  appearance: none; border: 0; cursor: pointer; background: none;
  color: rgba(234, 231, 248, 0.6); font-size: var(--text-sm);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(234, 231, 248, 0.3);
  padding: var(--space-2);
}
.mind-player-leave:hover { color: #EAE7F8; }
.mind-player-inner {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  text-align: center; padding: var(--space-6); max-width: 34em;
}
.mpl-kicker { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: #C4B9F2; font-weight: 600; }
.mpl-name { font-family: var(--font-display); font-size: clamp(1.4rem, 4.5vw, 1.8rem); }
.mpl-stagewrap { position: relative; width: min(240px, 52vw); aspect-ratio: 1; display: grid; place-items: center; margin-block: var(--space-4); }
.mpl-halo {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(169, 155, 232, 0.25);
}
.mpl-glow {
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, rgba(244, 240, 255, 0.95) 0%, rgba(169, 155, 232, 0.75) 34%, rgba(169, 155, 232, 0.18) 66%, transparent 78%);
  filter: drop-shadow(0 0 34px rgba(169, 155, 232, 0.5));
  transform: scale(0.8);
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.42, 0, 0.4, 1);
}
.mpl-phase { font-size: var(--text-lg); font-weight: 500; min-height: 1.5em; }
.mpl-prompt {
  min-height: 3.2em; max-width: 30em;
  font-size: var(--text-sm); color: rgba(234, 231, 248, 0.72); line-height: 1.65;
  opacity: 0; transition: opacity 900ms var(--ease-light);
}
.mpl-prompt.is-in { opacity: 1; }
.mpl-meta { display: flex; align-items: center; gap: var(--space-4); width: min(300px, 70vw); }
.mpl-left { flex: none; font-size: var(--text-xs); color: rgba(234, 231, 248, 0.55); font-variant-numeric: tabular-nums; }
.mpl-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(169, 155, 232, 0.18); overflow: hidden; }
.mpl-bar i { display: block; height: 100%; width: 0; background: #A99BE8; border-radius: 2px; transition: width 400ms linear; }
.mind-player.is-done .mpl-glow { animation: mind-breathe 6s ease-in-out infinite; }
.mpl-return { margin-top: var(--space-2); }

/* The Mind door on Today: a sliver of twilight in any mode */
.mind-door {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: var(--space-4);
  background: linear-gradient(140deg, #14173A 0%, #1C1F48 55%, #2A2356 100%);
  border-color: #2B2F58;
  color: #EAE7F8; text-decoration: none;
}
.mind-door .card-kicker { color: #C4B9F2; }
.mind-door-body { display: grid; gap: var(--space-1); position: relative; z-index: 1; }
.mind-door-line { font-size: var(--text-sm); color: rgba(234, 231, 248, 0.78); line-height: 1.55; }
.mind-door-arrow { flex: none; width: 18px; height: 18px; margin-left: auto; color: #C4B9F2; position: relative; z-index: 1; }
.mind-door-stars { position: absolute; inset: 0; pointer-events: none; }
.mind-door-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #EAE7F8;
  animation: ob4-twinkle 5s ease-in-out infinite;
}
.mind-door-stars i:nth-child(1) { top: 18%; left: 8%; animation-delay: 0s; }
.mind-door-stars i:nth-child(2) { top: 62%; left: 22%; animation-delay: 1.2s; }
.mind-door-stars i:nth-child(3) { top: 26%; left: 56%; animation-delay: 2.1s; }
.mind-door-stars i:nth-child(4) { top: 70%; left: 78%; animation-delay: 0.7s; }
.mind-door-stars i:nth-child(5) { top: 14%; left: 90%; animation-delay: 2.8s; }
.mind-door:hover { border-color: #A99BE8; }

/* The Sunday Letter */
.letter-form { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.letter-form input {
  flex: 1 1 190px; background: var(--color-tint); color: var(--color-text);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); font-size: var(--text-sm);
}
.letter-form input:focus { outline: none; border-color: var(--color-accent); }
.letter-status { min-height: 1.3em; margin-top: var(--space-2); }
.letter-invite { border-color: color-mix(in oklab, var(--dawn-500) 35%, var(--color-border)); }
.letter-invite-line { margin: var(--space-2) 0 var(--space-4); font-size: var(--text-sm); color: var(--color-text-soft); line-height: 1.6; }
.letter-dismiss {
  appearance: none; border: 0; cursor: pointer; background: none;
  margin-top: var(--space-3); padding: 0;
  color: var(--color-text-soft); font-size: var(--text-xs);
  text-decoration: underline; text-underline-offset: 3px;
}
.letter-dismiss:hover { color: var(--color-text); }

/* Twilight accents follow the space, even on buttons. */
html[data-mind][data-mind] .btn-primary, .mind-player .btn-primary {
  background: var(--color-accent, #A99BE8); color: #14173A;
}
html[data-mind][data-mind] .btn-primary:hover, .mind-player .btn-primary:hover { background: #C4B9F2; }
.mind-player.is-done .mpl-prompt { opacity: 1; }

/* ============================================================
   Solar Meridian composition layer:
   the live sky, one floating pill, scores as rails.
   ============================================================ */

/* ---- the sky: a live gradient tied to real solar time ---- */
.app { position: relative; z-index: 1; }

.sky-field {
  position: fixed; left: 0; right: 0; top: 0;
  height: 44vh; min-height: 300px; max-height: 460px;
  z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--skyA) 0%, var(--skyB) 50%, var(--skyC) 100%);
  opacity: var(--sky-opacity);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
  transition: opacity 700ms var(--ease-light);
}

/* women's daytime carries a faint watercolour wash in the sky */
html[data-mode='womens']:not([data-theme='dark']) .sky-field::after {
  content: '';
  position: absolute; inset: -8%;
  background:
    radial-gradient(42% 55% at 18% 12%, rgba(196, 118, 106, 0.16), transparent 70%),
    radial-gradient(38% 50% at 82% 8%, rgba(217, 164, 65, 0.13), transparent 70%);
  filter: blur(22px);
}

/* ---- type discipline ---- */
.num, .stat-num, .dial-num, .axis-num, .sr-num { font-variant-numeric: tabular-nums; }
.card .card-kicker { letter-spacing: 0.15em; }
.eyebrow { letter-spacing: 0.16em; }

/* ---- scores are rails, never rings ---- */
.sleep-hero { padding-block: 0 var(--space-5); }
.score-rail { max-width: 380px; }
.score-rail .sr-top { display: flex; align-items: baseline; gap: var(--space-3); }
.score-rail .sr-num {
  font-family: var(--font-display);
  font-size: 56px; line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.score-rail .sr-state { font-family: var(--font-display); font-size: var(--text-md); color: var(--color-accent-ink); }
.score-rail .sr-sub { font-size: var(--text-sm); color: var(--color-text-soft); margin-top: var(--space-1); }
.score-rail svg { margin-top: var(--space-3); width: 100%; height: auto; }
.srail-track { stroke: color-mix(in oklab, var(--color-text) 12%, transparent); stroke-width: 4; stroke-linecap: round; }
.srail-fill { stroke: var(--color-accent); stroke-width: 4; stroke-linecap: round; }
.js .srail-fill { animation: arc-draw 700ms var(--ease-light) 150ms both; }
.srail-dot { fill: var(--color-accent); }

/* ---- charts: glow belongs to the present moment only ---- */
.stage-floor { stroke: color-mix(in oklab, var(--color-text) 12%, transparent); stroke-width: 1; }
.stage-key { stroke: none; }
.chart-stages rect { transition: opacity var(--dur-1) var(--ease-light); }

/* ---- motion: staggered card entrances, nothing bouncy ---- */
.view > .tabpane { animation: pane-in 360ms var(--ease-light) both; }
.view > .tabpane > * { animation: card-in 480ms var(--ease-light) both; }
.view > .tabpane > *:nth-child(2) { animation-delay: 40ms; }
.view > .tabpane > *:nth-child(3) { animation-delay: 80ms; }
.view > .tabpane > *:nth-child(4) { animation-delay: 120ms; }
.view > .tabpane > *:nth-child(5) { animation-delay: 160ms; }
.view > .tabpane > *:nth-child(6) { animation-delay: 200ms; }
.view > .tabpane > *:nth-child(7) { animation-delay: 240ms; }
.view > .tabpane > *:nth-child(8) { animation-delay: 280ms; }
.view > .tabpane > *:nth-child(n+9) { animation-delay: 320ms; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view > .tabpane > * { animation: none; }
}

/* ---- nav: the floating dark pill, both faces ---- */
.tabbar {
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(241, 236, 228, 0.08);
  background: rgba(20, 21, 26, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(5, 6, 10, 0.35);
}
html[data-mode='womens']:not([data-theme='dark']) .tabbar {
  background: rgba(43, 38, 32, 0.82);
  border-color: rgba(246, 241, 232, 0.1);
}
.tabbar button, .tabbar a {
  position: relative;
  border-radius: 18px;
  padding: var(--space-2) 0 6px;
  color: rgba(241, 236, 228, 0.8);
}
.tabbar button:hover, .tabbar a:hover { color: rgba(241, 236, 228, 0.8); }
.tabbar .active { color: #F1ECE4; background: rgba(241, 236, 228, 0.1); }
.tabbar .active svg { color: #F1ECE4; }

/* ---- nav: the refined rail on desktop ---- */
.rail {
  border-right: 1px solid color-mix(in oklab, var(--color-border) 70%, transparent);
  background: color-mix(in oklab, var(--color-surface) 32%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.rail-nav a { position: relative; }
.rail-nav a[aria-current='page'] {
  box-shadow: none;
  background: color-mix(in oklab, var(--color-tint) 72%, transparent);
  color: var(--color-text);
}
.rail-nav a[aria-current='page']::after {
  content: '';
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 9px 1px var(--color-accent);
}

/* ---- gradient inks for the trend charts ---- */
.chart-trend .trend-area { fill: url(#eg-area) color-mix(in oklab, var(--dawn-300) 18%, transparent); }
.chart-trend .trend-line { stroke: url(#eg-line) var(--dawn-500); }

/* ============================================================
   Design V2: restraint, pacing, personal interpretation.
   Five worlds, three surfaces, light that means something.
   ============================================================ */

/* tokens live at the head of the file: one set, two faces */

/* ---- three surfaces only ---- */
/* 1 · open canvas: sections that simply sit on the page */
.today-hero, .arc-block, .world-head { background: none; border: 0; box-shadow: none; }

/* 2 · quiet panel: supporting detail on a barely-there tint */
.card, .panel {
  background: color-mix(in oklab, var(--color-surface) 72%, var(--color-bg));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid color-mix(in oklab, var(--color-border) 85%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: var(--space-5);
}
.panel + .panel, .card + .panel, .panel + .card { margin-top: var(--space-4); }

/* kickers step down: sentence case, quiet, rare */
.card .card-kicker, .panel .card-kicker, .card-kicker {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.01em; text-transform: none;
  color: var(--color-text-soft);
}

/* ---- world shells ---- */
.world-head { margin-bottom: var(--space-6); }
.world-head h1 { font-size: var(--text-xl); }
.world-line {
  font-family: var(--font-display);
  font-size: var(--text-md); line-height: 1.35;
  color: var(--color-text-soft);
  margin-top: var(--space-2); max-width: 26em;
}
.subnav {
  display: flex; gap: var(--space-1); flex-wrap: nowrap;
  margin-top: var(--space-5);
  overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--color-border) transparent;
  -webkit-overflow-scrolling: touch;
  padding: 4px var(--space-4) 6px;
}
.subnav::-webkit-scrollbar { height: 3px; }
.subnav::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
@media (max-width: 899px) {
  .subnav { margin-inline: calc(var(--space-4) * -1); padding-inline-start: var(--space-4); }
}
.subnav a {
  min-height: 44px; display: inline-flex; align-items: center;
  flex: none; white-space: nowrap;
  text-decoration: none;
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-soft);
  padding: 6px 12px; border-radius: var(--radius-full);
  transition: color var(--dur-1) var(--ease-light), background var(--dur-1) var(--ease-light);
}
.subnav a:hover { color: var(--color-text); }
.subnav a[aria-current='page'] {
  color: var(--color-text);
  background: color-mix(in oklab, var(--color-tint) 90%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-border) 90%, transparent);
}
.sub-line { color: var(--color-text-soft); font-size: var(--text-sm); max-width: 38em; margin-bottom: var(--space-5); }
.world-content > .tabpane { animation: none; }

/* ---- overview lists: rows, not card grids ---- */
.ov-lead {
  font-family: var(--font-display);
  font-size: var(--text-lg); line-height: 1.3;
  max-width: 22em; margin-bottom: var(--space-6);
}
.ov-list { border-top: 1px solid var(--color-border); }
.ov-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: baseline; column-gap: var(--space-4);
  padding: var(--space-4) var(--space-1);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none; color: var(--color-text);
  transition: background var(--dur-1) var(--ease-light);
}
.ov-row:hover { background: color-mix(in oklab, var(--color-tint) 45%, transparent); }
.ov-label { grid-column: 1; grid-row: 1; font-weight: 500; font-size: var(--text-base); }
.ov-value { grid-column: 2; grid-row: 1; font-size: var(--text-md); font-weight: 500; }
.ov-note { grid-column: 1 / 3; grid-row: 2; font-size: var(--text-sm); color: var(--color-text-soft); margin-top: 2px; }
.ov-arrow { grid-column: 3; grid-row: 1 / span 2; color: var(--color-text-soft); align-self: center; }
svg.ov-arrow, .ov-arrow svg { width: 16px; height: 16px; flex: none; }
.ov-foot, .ov-note-line { font-size: var(--text-sm); color: var(--color-text-soft); margin-top: var(--space-4); max-width: 38em; }

/* ---- Today V2: one idea per viewport ---- */
.today-hero { padding-block: var(--space-4) var(--space-8); }
.hero-stack .day-line {
  font-family: var(--font-display);
  font-size: var(--text-md); line-height: 1.4;
  max-width: 21em; color: var(--color-text);
}

.arc-block { padding-block: var(--space-2) var(--space-6); border-bottom: 1px solid var(--color-border); }
.arc-agenda { margin-top: var(--space-4); max-width: 30em; }
.agenda-row {
  display: flex; gap: var(--space-4); align-items: baseline;
  padding: var(--space-2) 0;
}
.agenda-time { flex: none; width: 3.4em; font-size: var(--text-sm); color: var(--color-text-soft); }
.agenda-label { font-size: var(--text-base); }
.agenda-row.is-now .agenda-time { color: var(--color-accent-ink); font-weight: 600; }
.agenda-row.is-now .agenda-label { font-family: var(--font-display); font-size: var(--text-md); }
.agenda-row.is-past { opacity: 0.45; }
.arc-seeday {
  margin-top: var(--space-3);
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-accent-ink);
  padding: var(--space-1) 0;
}
.arc-seeday:hover { text-decoration: underline; text-underline-offset: 3px; }
.arc-note { font-size: var(--text-sm); color: var(--color-text-soft); margin-top: var(--space-3); max-width: 34em; }

/* 3 · feature inversion: the one action that matters now */
.next-action {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: var(--space-4); row-gap: 2px;
  width: 100%; text-align: left; cursor: pointer;
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 0; border-radius: var(--radius-lg);
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  transition: transform var(--dur-1) var(--ease-light), opacity var(--dur-1) var(--ease-light);
}
.next-action:hover { transform: translateY(-1px); color: var(--color-bg); opacity: 0.96; }
.na-label { font-family: var(--font-display); font-size: var(--text-md); grid-column: 1; }
.na-sub { grid-column: 1; font-size: var(--text-sm); opacity: 0.75; }
.na-arrow { grid-column: 2; grid-row: 1 / span 2; width: 20px; height: 20px; opacity: 0.8; }
.today-checkin { margin-top: var(--space-4); }
.today-checkin > .card { margin-top: 0; }

/* the later-today rail: doors, not stacks */
.later-rail { margin-top: var(--space-8); }
.later-head { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.01em; color: var(--color-text-soft); margin-bottom: var(--space-3); }
.later-scroll {
  display: flex; gap: var(--space-3);
  overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--space-1) * -1); padding: var(--space-1);
  padding-inline-end: var(--space-10);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
}
.later-scroll::-webkit-scrollbar { display: none; }
.later-item {
  flex: none; min-width: 138px;
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-surface) 60%, var(--color-bg));
  text-decoration: none; color: var(--color-text);
  transition: border-color var(--dur-1) var(--ease-light);
}
.later-item:hover { border-color: color-mix(in oklab, var(--color-accent) 40%, var(--color-border)); color: var(--color-text); }
.li-label { font-weight: 500; font-size: var(--text-sm); }
.li-sub { font-size: var(--text-xs); color: var(--color-text-soft); }

.letter-invite { margin-top: var(--space-8); }
.letter-dismiss {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: var(--text-xs); color: var(--color-text-soft);
  margin-top: var(--space-2); padding: var(--space-1) 0;
}
.letter-dismiss:hover { color: var(--color-text); }

/* ---- navigation: five worlds, one floating question ---- */
.rail-nav a.rail-quiet { color: var(--color-text-soft); font-weight: 400; }
.rail-nav a.rail-quiet:hover { color: var(--color-text); }

.profile-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft); text-decoration: none;
  transition: color var(--dur-1) var(--ease-light), border-color var(--dur-1) var(--ease-light);
}
.profile-btn:hover { color: var(--color-accent-ink); border-color: var(--color-accent-soft); }
.profile-btn[aria-current='page'] { color: var(--color-accent-ink); border-color: currentColor; background: var(--color-tint); }
.profile-btn svg { width: 18px; height: 18px; }

/* Mobile: Ask lives inside the pill; the corner circle is a desktop-only door */
.ask-fab { display: none; }
@media (min-width: 1200px) {
  .ask-fab {
    position: fixed; z-index: 46;
    right: 28px; bottom: 28px;
    width: 54px; height: 54px; border-radius: 50%; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-text); color: var(--color-bg);
    box-shadow: 0 10px 30px color-mix(in oklab, var(--color-text) 22%, transparent);
    text-decoration: none;
    transition: transform var(--dur-1) var(--ease-light);
  }
  .ask-fab svg { width: 24px; height: 24px; }
  .ask-fab:hover { transform: translateY(-2px); color: var(--color-bg); }
  .ask-fab.is-open { visibility: hidden; }
}

/* the pill keeps its shape; the rail dot alone marks the here */
.rail-nav a[aria-current='page']::after { box-shadow: none; }

/* ---- Ask: the four lights under an answer ---- */
.ask-synth { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border); display: grid; gap: var(--space-4); }
.ask-sec-label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-soft); margin-bottom: var(--space-1); }
.ask-sec-body { font-size: var(--text-sm); line-height: 1.55; max-width: 40em; }
.ask-sec-body.quiet, .ask-sec-src.quiet { color: var(--color-text-soft); }
.ask-steps { margin: var(--space-1) 0 0 1.2em; font-size: var(--text-sm); display: grid; gap: var(--space-1); }
.ask-sec-src { font-size: var(--text-xs); color: var(--color-text-soft); }

/* ---- the synthesis shelf in Mind · Explore ---- */
.intel-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.intel-list { display: grid; gap: var(--space-3); }
.intel-card {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-surface) 60%, var(--color-bg));
}
.ic-kicker { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-soft); margin-bottom: var(--space-1); }
.ic-summary { font-size: var(--text-sm); line-height: 1.5; }
.ic-meta { font-size: var(--text-xs); color: var(--color-text-soft); margin-top: var(--space-2); }
.ic-safety { font-size: var(--text-xs); color: var(--color-caution); margin-top: var(--space-1); }
.mind-patterns-note { margin-top: var(--space-4); max-width: 36em; }

/* ---- motion V2: everything draws once, nothing pulses ---- */
.js .sun-now, .js .sun-now-halo { animation: none; }
.mp-glowdot { animation: none; transform: scale(0.95); }
.view > .tabpane > *:nth-child(n+4) { animation-delay: 120ms; }

/* the topbar loses its ember jewel; the date is enough */
.app-topbar::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  .js .arc-day, .js .srail-fill { animation: none; }
  .next-action, .later-item, .ask-fab { transition: none; }
}

/* ============================================================
   Solar Meridian details: rails, sessions, faces of the accent.
   ============================================================ */

/* primary actions carry the sun's metal */
.btn-primary { background: var(--color-accent-ink); color: var(--color-on-accent); }
.btn-primary:hover { background: color-mix(in oklab, var(--color-accent-ink) 90%, var(--color-text)); }
html[data-mode='mens'] .btn-primary,
html:not([data-mode='womens'])[data-theme='dark'] .btn-primary { color: #1C1509; }
.rate-row button[aria-pressed='true'] { background: var(--color-accent-ink); border-color: var(--color-accent-ink); color: var(--color-on-accent); }
html[data-mode='mens'] .rate-row button[aria-pressed='true'] { color: #1C1509; }

/* quiet panels: one tint, hairline edge */
.card, .panel {
  background: var(--panel);
  border-color: color-mix(in oklab, var(--color-text) 9%, transparent);
}

/* contributor rows: a 2px rail under each line */
.a-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0 var(--space-3);
  position: relative;
}
.a-row::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px;
  background: color-mix(in oklab, var(--color-text) 13%, transparent);
}
.a-row::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  height: 2px; border-radius: 2px;
  width: calc(var(--v, 0) * 100%);
  background: var(--color-accent);
}
.a-row .ar-label { font-size: var(--text-sm); font-weight: 500; }
.a-row .ar-value { font-size: var(--text-sm); color: var(--color-text-soft); font-variant-numeric: tabular-nums; }
.a-row.is-attn::after { background: var(--color-caution); }
.a-row.is-attn .ar-value { color: var(--color-caution); }
.a-row.is-calibrating { opacity: 0.45; }

/* the session panel: train's one inversion */
.a-session {
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}
.a-session .as-kicker {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.6;
}
.a-session .as-name { font-family: var(--font-display); font-size: var(--text-lg); margin-top: var(--space-2); }
.a-session .as-meta { font-size: var(--text-sm); opacity: 0.7; margin-top: var(--space-1); }
.a-session .btn-primary { margin-top: var(--space-4); }

/* the solar line: where the sun stands right now */
.solar-line {
  display: flex; align-items: baseline; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}
.solar-line .sl-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-accent); align-self: center; flex: none;
}

/* the primary start tile: train's session inversion */
.start-tile.start-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: 0;
  border-radius: var(--radius-lg);
}
.start-tile.start-primary strong { font-family: var(--font-display); font-size: var(--text-md); font-weight: 400; }
.start-tile.start-primary span { color: inherit; opacity: 0.7; }
.start-tile.start-primary:hover { border: 0; opacity: 0.94; }

/* the arc keeps a hand-sized width on desktop */
.arc-block svg.chart-meridian { max-width: 520px; }
.chart-srail { max-width: 380px; }
