/* Layout: one calm column that opens into a two-part hero (promise + example report), then quiet sections on blush and plum bands. */
:root {
  --plum: #5B2A4A;
  --plum-deep: #3E1C33;
  --champagne: #B8925A;
  --champagne-light: #D9B77E;
  --rose: #C98A93;
  --rose-soft: #E8B9C0;
  --blush: #F6E6E4;

  --bg: #FCF7F6;
  --surface: #FFFFFF;
  --band: var(--blush);
  --ink: #3A1F31;
  --ink-soft: #6E5566;
  --line: #EBD9D6;
  --heading: var(--plum);
  --accent: var(--champagne);
  --button: var(--plum);
  --button-ink: #FFFFFF;
  --focus: var(--rose);
  --ok: #4F7A63;
  --err: #A33A4E;

  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 1.6rem + 2.2vw, 3rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.6vw, 4.2rem);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23121D; --surface: #2E1A27; --band: #2A1622; --ink: #F3E6E8; --ink-soft: #C9B0BC;
    --line: #48293C; --heading: #F6E6E4; --accent: var(--champagne-light); --button: var(--rose-soft);
    --button-ink: #3E1C33; --focus: var(--champagne-light); --ok: #9CC7AE; --err: #F0A3B0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #23121D; --surface: #2E1A27; --band: #2A1622; --ink: #F3E6E8; --ink-soft: #C9B0BC;
  --line: #48293C; --heading: #F6E6E4; --accent: var(--champagne-light); --button: var(--rose-soft);
  --button-ink: #3E1C33; --focus: var(--champagne-light); --ok: #9CC7AE; --err: #F0A3B0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-weight: 300; font-size: var(--step-0); line-height: 1.65;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--heading); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0; }
.amp { font-style: italic; color: var(--accent); }
.eyebrow { font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: var(--accent); }
.wrap {
  width: 100%; max-width: 1120px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.measure { max-width: 36rem; }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.logo { display: block; height: 44px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.header-link { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.04em; text-decoration: none; padding: 8px 2px; border-bottom: 1px solid var(--accent); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(24px, 5vw, 64px) clamp(48px, 7vw, 96px); }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 32rem; }

/* Waitlist form */
.waitlist { display: grid; gap: 12px; max-width: 30rem; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist input[type="email"], .waitlist select {
  flex: 1 1 220px; min-width: 0; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 13px 20px;
}
.waitlist select { border-radius: 12px; padding: 11px 16px; width: 100%; }
.waitlist input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.btn {
  font: inherit; font-weight: 500; letter-spacing: 0.02em; cursor: pointer;
  background: var(--button); color: var(--button-ink); border: 0; border-radius: 999px; padding: 13px 26px;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.optional { display: grid; gap: 6px; }
.optional label { font-size: var(--step--1); color: var(--ink-soft); }
.fine { font-size: var(--step--1); color: var(--ink-soft); }
.status { font-size: var(--step--1); font-weight: 500; min-height: 1.4em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Example report card */
.report {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 22px; display: grid; gap: 16px; min-width: 0;
  box-shadow: 0 24px 48px -28px rgba(91, 42, 74, .35);
}
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.report-title { font-family: var(--font-display); font-size: var(--step-2); color: var(--heading); font-weight: 500; }
.tag { font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.report-sub { font-size: var(--step--1); color: var(--ink-soft); margin-top: -8px; }
.tide { width: 100%; height: auto; display: block; }
.tide .grid { stroke: var(--line); stroke-width: 1; }
.tide .flush { fill: none; stroke: var(--rose); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tide .flush-area { fill: var(--rose); opacity: .14; }
.tide .sleep { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.tide text { fill: var(--ink-soft); font-family: var(--font-body); font-size: 11px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--step--1); color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 3px; border-radius: 2px; background: var(--rose); }
.sw.dash { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.facts b { font-weight: 500; color: var(--heading); font-variant-numeric: tabular-nums; text-align: right; }
.note { font-size: var(--step--1); color: var(--ink-soft); font-style: italic; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 40rem; }
.band { background: var(--band); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); counter-reset: step; }
.steps li { display: grid; gap: 10px; align-content: start; counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--accent); }
.steps p { color: var(--ink-soft); }

.track { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 16px; font-size: var(--step--1); font-weight: 400; }

.promise { background: var(--plum); color: #F6E6E4; }
.promise h2 { color: #F6E6E4; }
.promise .eyebrow { color: var(--champagne-light); }
.promise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.promise-grid div { display: grid; gap: 8px; align-content: start; min-width: 0; border-top: 1px solid rgba(232, 185, 192, .35); padding-top: 18px; }
.promise-grid h3 { color: var(--champagne-light); font-size: var(--step-1); font-family: var(--font-body); font-weight: 500; }
.promise-grid p { color: #E9D6DA; }

.faq { display: grid; gap: 0; max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-size: var(--step-1); color: var(--heading); font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-body); font-weight: 300; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin-top: 10px; color: var(--ink-soft); max-width: 40rem; }

.closing .wrap { display: grid; justify-items: center; text-align: center; gap: 20px; }
.closing .mark { width: 72px; height: 72px; }
.closing .waitlist { width: 100%; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; padding-block: 28px; font-size: var(--step--1); color: var(--ink-soft); }
.site-footer p { max-width: 38rem; }

@media (max-width: 860px) {
  .hero .wrap, .track { grid-template-columns: minmax(0, 1fr); }
  .steps, .promise-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .logo { height: 36px; }
  .header-link { display: none; }
  .report { padding: 20px 18px 18px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Navigation */
.site-header .wrap { flex-wrap: wrap; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.04em; text-decoration: none; padding: 8px 2px; }
.nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); }
.nav .nav-cta { background: var(--button); color: var(--button-ink); border-radius: 999px; padding: 9px 18px; }
.nav .nav-cta:hover { color: var(--button-ink); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--heading); border: 1px solid var(--line); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
a.btn { display: inline-block; text-decoration: none; text-align: center; }
a.btn:hover { color: var(--button-ink); }
a.btn.btn-ghost:hover { color: var(--heading); }

/* Guide cards on the home page and guides index */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.cards a { display: grid; gap: 6px; height: 100%; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: border-color .15s ease, transform .15s ease; }
.cards a:hover { border-color: var(--rose); transform: translateY(-1px); color: inherit; }
.cards h3 { font-size: var(--step-1); }
.cards p { font-size: var(--step--1); color: var(--ink-soft); }

/* Guides page */
.page-head { padding-block: clamp(28px, 5vw, 56px) clamp(20px, 3vw, 36px); }
.page-head .wrap { display: grid; gap: 16px; }
.page-head .lede { max-width: 42rem; }
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-block: 8px clamp(56px, 8vw, 96px); }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: grid; gap: 2px; font-size: var(--step--1); }
.toc p { font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--accent); margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--ink-soft); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--heading); border-left-color: var(--rose); }
.guides { display: grid; gap: clamp(40px, 6vw, 64px); min-width: 0; }
.guide { display: grid; gap: 16px; scroll-margin-top: 24px; border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 40px); }
.guide:first-child { border-top: 0; padding-top: 0; }
.guide > p { max-width: 42rem; }
.guide h2 { font-size: var(--step-3); }
.guide h3 { font-family: var(--font-body); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.guide-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }
.guide-cols > div { display: grid; gap: 10px; align-content: start; min-width: 0; }
.tips { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.tips li::marker { color: var(--rose); }
.doctor { background: var(--band); border-radius: var(--radius); padding: 18px 22px; display: grid; gap: 8px; }
.doctor h3 { color: var(--heading); }
.doctor ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.urgent { border: 1px solid var(--err); color: var(--ink); border-radius: var(--radius); padding: 14px 18px; font-size: var(--step--1); }
.urgent b { color: var(--err); font-weight: 500; }
.track-note { font-size: var(--step--1); color: var(--ink-soft); }
.track-note b { color: var(--heading); font-weight: 500; }
.back-top { font-size: var(--step--1); }

/* Sign-in and journal */
.auth-wrap { display: grid; justify-items: center; padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.auth-card { width: 100%; max-width: 27rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; box-shadow: 0 24px 48px -32px rgba(91, 42, 74, .35); }
.auth-card .mark { width: 52px; height: 52px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--band); border-radius: 999px; padding: 4px; }
.tabs button { font: inherit; font-size: var(--step--1); font-weight: 500; border: 0; background: transparent; color: var(--ink-soft); border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgba(91, 42, 74, .15); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--step--1); font-weight: 500; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-width: 0;
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.form .btn { width: 100%; }
.linkish { font: inherit; font-size: var(--step--1); background: none; border: 0; padding: 0; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; cursor: pointer; justify-self: start; }
.linkish:hover { color: var(--heading); }

.journal { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: 8px clamp(56px, 8vw, 96px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); display: grid; gap: 18px; min-width: 0; }
.panel h2 { font-size: var(--step-2); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
legend { font-size: var(--step--1); font-weight: 500; margin-bottom: 8px; padding: 0; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick span { display: inline-block; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: var(--step--1); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.pick input:checked + span { background: var(--rose); border-color: var(--rose); color: #3E1C33; font-weight: 500; }
.pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.scale .pick span { min-width: 44px; text-align: center; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.entries li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.entry-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.entry-day { font-family: var(--font-display); font-size: var(--step-1); color: var(--heading); }
.entry-meta { font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tags span { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-soft); }
.entry-note { font-size: var(--step--1); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { color: var(--ink-soft); font-size: var(--step--1); }
.hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hello p { color: var(--ink-soft); font-size: var(--step--1); }

@media (max-width: 860px) {
  .guide-layout, .journal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .toc p { grid-column: 1 / -1; }
  .guide-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .nav { gap: 14px; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
}

[hidden] { display: none !important; }
.nav .nav-cta[aria-current="page"] { border-bottom: 0; }

/* Sign-in page: story panel beside the form */
.auth-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; width: 100%; max-width: 1040px; margin-inline: auto; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: 0 40px 80px -48px rgba(62, 28, 51, .55); border: 1px solid var(--line); }
.auth-story { position: relative; background: radial-gradient(120% 90% at 0% 0%, #7A3B63 0%, #5B2A4A 45%, #3E1C33 100%); color: #F6E6E4; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 44px) 84px; display: grid; gap: 18px; align-content: start; overflow: hidden; }
.auth-story .mark { width: 56px; height: 56px; }
.auth-story .eyebrow { color: var(--champagne-light); }
.auth-story h2 { color: #FFF7F4; font-size: clamp(2rem, 1.5rem + 1.8vw, 2.8rem); }
.story-lede { color: #E9D6DA; max-width: 34rem; }
.story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.story-list li { position: relative; padding-left: 26px; color: #E9D6DA; font-size: var(--step--1); }
.story-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F3D9A8, #D9B77E 60%, #B8925A); }
.story-list b { color: #FFF7F4; font-weight: 500; }
.plans { display: grid; border: 1px solid rgba(232, 185, 192, .3); border-radius: 12px; overflow: hidden; font-size: var(--step--1); background: rgba(255, 255, 255, .04); }
.plan-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 8px; padding: 9px 14px; border-top: 1px solid rgba(232, 185, 192, .18); color: #E9D6DA; }
.plan-row span:not(:first-child) { text-align: center; }
.plan-head { border-top: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne-light); font-weight: 500; }
.plan-row span:last-child { color: #FFF7F4; font-weight: 500; }
.story-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60px; }
.story-waves path { fill: none; stroke-linecap: round; }
.story-waves .w1 { stroke: rgba(232, 185, 192, .55); stroke-width: 3; animation: drift 9s linear infinite; }
.story-waves .w2 { stroke: rgba(232, 185, 192, .28); stroke-width: 2; animation: drift 13s linear infinite reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-100px); } }
@media (prefers-reduced-motion: reduce) { .story-waves path { animation: none; } }
.auth-split .auth-card { max-width: none; border: 0; border-radius: 0; box-shadow: none; align-content: center; }

/* Journal extras */
.stack { display: grid; gap: clamp(20px, 3vw, 28px); min-width: 0; }
.badge-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: var(--step--1); }
.badge { display: inline-block; border-radius: 999px; padding: 4px 12px; background: var(--band); color: var(--heading); font-weight: 500; font-size: .8rem; letter-spacing: .02em; border: 1px solid var(--line); }
.premium-lock { background: linear-gradient(160deg, var(--band), var(--surface)); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; font-size: var(--step--1); }
.bars b { font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--band); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--rose); }

/* Guides: locked previews */
.guide-lock { border: 1px dashed var(--rose); border-radius: var(--radius); padding: 18px 22px; display: flex; gap: 14px 22px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); }
.guide-lock p { font-size: var(--step--1); color: var(--ink-soft); max-width: 30rem; }
.guide-lock b { color: var(--heading); font-weight: 500; }
.guide-full { display: grid; gap: 16px; }

/* Owner dashboard */
.owner { display: grid; gap: clamp(20px, 3vw, 28px); padding-block: 8px clamp(56px, 8vw, 96px); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; }
.stat-num { font-family: var(--font-display); font-size: var(--step-3); color: var(--heading); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--step--1); color: var(--ink-soft); }
.fam-add { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.fam-add .btn { width: auto; }
.fam-email { font-weight: 500; color: var(--heading); overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-story { order: 2; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fam-add { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Polish: sharper, more modern layer (Nov 2026) ===== */
:root { --shadow-sm: 0 1px 2px rgba(62, 28, 51, .06), 0 2px 8px -2px rgba(62, 28, 51, .08); --shadow-md: 0 2px 4px rgba(62, 28, 51, .05), 0 18px 40px -22px rgba(62, 28, 51, .35); --radius-lg: 20px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.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; }
.muted { color: var(--ink-soft); }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.btn { transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; box-shadow: var(--shadow-sm); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-ghost { box-shadow: none; }
.btn-sm { padding: 9px 18px; font-size: var(--step--1); }

/* Sticky, frosted header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(62, 28, 51, .45); }
.site-header .wrap { padding-block: 14px; flex-wrap: nowrap; }
.nav { gap: 6px; flex-wrap: nowrap; }
.nav a { padding: 8px 12px; border-radius: 999px; transition: background .15s ease, color .15s ease; white-space: nowrap; }
.nav a:hover { background: var(--band); color: var(--heading); }
.nav a[aria-current="page"] { border-bottom: 0; background: var(--band); color: var(--heading); }
.nav .nav-cta, .nav .nav-cta[aria-current="page"] { background: var(--button); color: var(--button-ink); margin-left: 6px; padding: 9px 18px; }
.nav .nav-cta:hover { background: var(--button); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0; place-items: center; }
.menu-icon { display: grid; gap: 4px; width: 18px; }
.menu-icon i { display: block; height: 2px; border-radius: 2px; background: var(--heading); transition: transform .2s ease, opacity .2s ease; }
.nav-open .menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-icon i:nth-child(2) { opacity: 0; }
.nav-open .menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1060px) {
  .menu-btn { display: grid; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 0 6px; }
  .nav-open .nav { display: flex; }
  .nav a { padding: 13px 14px; font-size: var(--step-0); }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .logo { height: 38px; }
}

/* Cards: crisper edges and lift */
.cards a, .panel, .auth-card { box-shadow: var(--shadow-sm); }
.cards a { border-radius: var(--radius-lg); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.panel { border-radius: var(--radius-lg); }

/* Words for today */
.today-band { padding-block: 0 clamp(40px, 6vw, 72px); }
.today { position: relative; overflow: hidden; display: grid; gap: 14px; background: linear-gradient(135deg, var(--plum-deep), var(--plum) 60%, #7a3d63); color: #F6E6E4; border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow-md); }
.today::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(217, 183, 126, .38), rgba(217, 183, 126, 0) 65%); pointer-events: none; }
.today .eyebrow { color: var(--champagne-light); }
.today-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.today-when { display: grid; gap: 2px; }
.today-date { font-family: var(--font-display); font-size: var(--step-2); color: #fff; line-height: 1.1; }
.today-clock { font-variant-numeric: tabular-nums; letter-spacing: .06em; font-size: var(--step--1); color: #E8B9C0; }
.today-moon { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne-light); border: 1px solid rgba(217, 183, 126, .45); border-radius: 999px; padding: 5px 12px; }
.today-stage { display: grid; position: relative; z-index: 1; }
.today-card { grid-area: 1 / 1; display: grid; gap: 14px; transition: opacity .8s ease, transform .8s ease; }
.today-card.is-entering { opacity: 0; transform: translateY(10px); }
.today-card.is-leaving { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.today-quote { margin: 0; border-left: 2px solid var(--champagne-light); padding-left: 18px; }
.today-quote p { font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); line-height: 1.3; color: #fff; max-width: 44rem; }
.today-try { font-size: var(--step--1); color: #F3E6E8; max-width: 44rem; }
.today-try b { color: var(--champagne-light); font-weight: 500; }
.today-special { font-size: var(--step--1); color: #3E1C33; background: var(--champagne-light); border-radius: 10px; padding: 8px 14px; justify-self: start; }
.today-slim { margin-top: 8px; }
.today-slim .today-date { font-size: var(--step-1); }
.today-slim .today-quote p { font-size: var(--step-1); }

/* Stats */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow-sm); }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem); line-height: 1; color: var(--heading); }
.stat span { color: var(--ink); }
.stat a { font-size: .78rem; color: var(--ink-soft); text-decoration-color: var(--accent); }
.stats-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Article layouts */
.hero-soft { background: radial-gradient(ellipse at 85% 0%, var(--band), transparent 60%); }
.hero-soft .lede { max-width: 44rem; }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.split .section-head { margin-bottom: 0; }
.prose { display: grid; gap: 14px; max-width: 42rem; }
.prose h3 { font-size: var(--step-1); }
.notice-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.notice-grid li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--rose); border-radius: 12px; padding: 14px 18px; font-size: var(--step--1); }
.notice-grid b { color: var(--heading); font-weight: 500; }
.sources { display: grid; gap: 14px; }
.sources h2 { font-size: var(--step-2); }
.sources ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: var(--step--1); color: var(--ink-soft); }
.sources li:target { background: var(--band); border-radius: 6px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }

/* Resources */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.jump a { text-decoration: none; font-size: var(--step--1); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; transition: border-color .15s ease, background .15s ease; }
.jump a:hover { border-color: var(--rose); background: var(--band); }
.res { display: grid; gap: clamp(48px, 7vw, 80px); padding-block: 16px clamp(56px, 8vw, 96px); }
.res-block { display: grid; gap: 24px; scroll-margin-top: 90px; }
.res-head { display: grid; gap: 10px; max-width: 42rem; }
.res-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(24px, 4vw, 48px); align-items: start; }
.panel-soft { background: var(--band); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; }
.panel-soft h3, .help-box h3, .treat-grid h3 { font-size: var(--step-1); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--rose); }
.treat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.treat-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow-sm); }
.treat-grid p { font-size: var(--step--1); color: var(--ink-soft); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.link-list.cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.link-list a { display: grid; gap: 4px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; transition: border-color .15s ease, transform .15s ease; height: 100%; }
.link-list a:hover { border-color: var(--rose); transform: translateY(-1px); }
.link-list b { color: var(--heading); font-weight: 500; }
.link-list span { font-size: var(--step--1); color: var(--ink-soft); }
.help-box { border: 1px solid var(--err); border-radius: var(--radius-lg); padding: 20px 22px; display: grid; gap: 10px; background: var(--surface); }
.help-box ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: var(--step--1); }

/* Weekly tracker */
.week-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.week-top > div:first-child { display: grid; gap: 4px; }
.week-nav { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--heading); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.icon-btn:hover:not(:disabled) { border-color: var(--rose); background: var(--band); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.week-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk-day { width: 100%; height: 100%; min-height: 104px; font: inherit; display: grid; align-content: start; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: center; transition: border-color .15s ease, background .15s ease; }
.wk-day:hover:not(:disabled) { border-color: var(--rose); }
.wk-day:disabled { cursor: default; opacity: .55; }
.wk-day.has-entry { background: var(--band); border-color: var(--rose-soft); }
.wk-day.is-today { outline: 2px solid var(--accent); outline-offset: -2px; }
.wk-name { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.wk-num { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--heading); }
.wk-info { font-size: .7rem; line-height: 1.3; color: var(--ink-soft); display: grid; justify-items: center; gap: 3px; }
.wk-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--rose); }
.wk-dot.mood-1 { opacity: .25; } .wk-dot.mood-2 { opacity: .45; } .wk-dot.mood-3 { opacity: .65; } .wk-dot.mood-4 { opacity: .85; } .wk-dot.mood-5 { background: var(--plum); }
.wk-period { display: block; width: 8px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--err); }
.week-facts { margin-top: 2px; }
@media (max-width: 520px) {
  .week-grid { gap: 4px; }
  .wk-day { min-height: 84px; padding: 8px 2px; border-radius: 10px; }
  .wk-info { font-size: .62rem; }
}

@media (max-width: 860px) {
  .split, .res-cols { grid-template-columns: minmax(0, 1fr); }
}

/* Printing: a clean page for the doctor */
@media print {
  .site-header, .site-footer, .today, .btn, .btn-row, .week-nav, .menu-btn, .jump, .closing { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .stat, .treat-grid li, .link-list a { box-shadow: none; }
  .print-week .page-head, .print-week #checkin, .print-week .month-area, .print-week .stack { display: none !important; }
  .print-month .page-head, .print-month #checkin, .print-month #week, .print-month #month-lock, .print-month .stack { display: none !important; }
  .print-month .journal { display: block; }
  .print-month .month { border: 0; padding: 0; }
  .member-bar, .icon-btn, .week-actions { display: none !important; }
  .chart, .compare, .wk-day { break-inside: avoid; }
  .compare tr.clickable { cursor: default; }
  .print-week .journal { display: block; }
  .print-week .week { border: 0; padding: 0; }
  .print-week .wk-day { opacity: 1; border-color: #999; }
}
.journal > .week { grid-column: 1 / -1; }
@media (min-width: 861px) { .wk-day { min-height: 118px; } .wk-info { font-size: .78rem; } }
.stats-warm { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat-mean { font-size: var(--step--1); color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; }

/* Member bar: Back + quick links for signed-in members */
.member-bar { border-top: 1px solid var(--line); }
.member-bar .wrap { display: flex; align-items: center; gap: 10px 16px; padding-block: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.member-bar .wrap::-webkit-scrollbar { display: none; }
.mb-back { flex: none; font: inherit; font-size: var(--step--1); font-weight: 500; color: var(--heading); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.mb-back span { font-size: 1.2rem; line-height: 1; }
.mb-back:hover { border-color: var(--rose); }
.mb-links { display: flex; gap: 4px; flex: none; }
.mb-links a { font-size: var(--step--1); text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mb-links a:hover { background: var(--band); color: var(--heading); }
.mb-links a[aria-current="page"] { background: var(--band); color: var(--heading); font-weight: 500; }
.mb-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: .7rem; font-weight: 500; }

/* Community */
.com { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: 8px clamp(56px, 8vw, 96px); }
.com-main { display: grid; gap: 24px; min-width: 0; }
.com-side { display: grid; gap: 16px; position: sticky; top: 140px; }
.com-gate { justify-items: start; }
.composer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.feed-head { display: grid; gap: 12px; margin-bottom: 14px; }
.feed-head h2 { font-size: var(--step-2); }
.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn { font: inherit; font-size: var(--step--1); border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.filter-btn[aria-pressed="true"] { background: var(--button); border-color: var(--button); color: var(--button-ink); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 24px); display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.post.is-hidden { opacity: .7; border-style: dashed; }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; border-radius: 999px; padding: 3px 10px; background: var(--band); color: var(--heading); }
.topic-win { background: #E7F0EA; color: #2F5A43; } .topic-question { background: #F3EAD9; color: #6B4E1E; } .topic-vent { background: #F5E1E5; color: #7A2E40; } .topic-tip { background: #EAE6F3; color: #463A6B; }
.post-meta { font-size: .8rem; color: var(--ink-soft); }
.post-title { font-size: var(--step-1); }
.post-body, .reply-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body.clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.hidden-note { font-size: .8rem; color: var(--err); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.act { font: inherit; font-size: var(--step--1); border: 1px solid var(--line); background: var(--bg); color: var(--heading); border-radius: 999px; padding: 6px 14px; cursor: pointer; text-decoration: none; }
.act:hover { border-color: var(--rose); color: var(--heading); }
.act.hug.on { background: var(--rose-soft); border-color: var(--rose); color: #3E1C33; }
.post-tools { display: flex; gap: 14px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.post-tools .linkish { font-size: .8rem; }
.report-box { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.report-box select { font: inherit; font-size: .8rem; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--surface); color: var(--ink); }
.replies { display: grid; gap: 12px; background: var(--bg); border-radius: 14px; padding: 14px; }
.reply-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.reply { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.reply.is-hidden { opacity: .6; }
.reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.reply-form textarea, .dm-send textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 44px; width: 100%; }
.reply-form .status { grid-column: 1 / -1; }

/* Messages */
.dm { padding-block: 8px clamp(56px, 8vw, 96px); display: grid; gap: 20px; }
.dm-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.dm-list { align-content: start; }
.convos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.convo { width: 100%; font: inherit; text-align: left; display: grid; gap: 2px; position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: var(--ink); }
.convo:hover { border-color: var(--rose); }
.convo.on { background: var(--band); border-color: var(--rose); }
.convo-top { display: flex; justify-content: space-between; gap: 8px; }
.convo-top b { color: var(--heading); font-weight: 500; }
.convo-prev { font-size: .82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.convo .mb-badge { position: absolute; right: 12px; bottom: 12px; }
.dm-thread { grid-template-rows: auto minmax(0, 1fr) auto auto; min-height: 520px; }
.dm-thread-head { display: flex; align-items: center; gap: 12px; }
.dm-thread-head h2 { font-size: var(--step-1); flex: 1; }
.dm-back { display: none; }
.bubbles { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 56vh; }
.bubble { max-width: 78%; display: grid; gap: 4px; padding: 10px 14px; border-radius: 18px; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--button); color: var(--button-ink); border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; background: var(--band); border-bottom-left-radius: 6px; }
.bubble-meta { font-size: .7rem; opacity: .75; }
.bubble .linkish, .bubble .report-box { font-size: .7rem; }
.dm-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.report-excerpt { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--band); border-radius: 10px; padding: 10px 12px; font-size: var(--step--1); }

@media (max-width: 900px) {
  .com { grid-template-columns: minmax(0, 1fr); }
  .com-side { position: static; }
  .dm-grid { grid-template-columns: minmax(0, 1fr); }
  .dm-thread { display: none; min-height: 0; }
  .dm-open .dm-thread { display: grid; }
  .dm-open .dm-list { display: none; }
  .dm-back { display: inline-block; }
}
.owner .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Live charts */
.journal > .month-area { grid-column: 1 / -1; display: grid; gap: clamp(20px, 3vw, 28px); }
.journal > .week, .journal > .month-area, #checkin, #recent { scroll-margin-top: 130px; }
.chart-box { display: grid; gap: 8px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-axis { fill: var(--ink-soft); font-family: var(--font-body); font-size: 11px; }
.c-today { fill: var(--heading); font-weight: 600; }
.c-bar { fill: var(--rose); opacity: .55; }
.c-bar:hover { opacity: .9; }
.c-sleep { fill: none; stroke: var(--plum); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.c-sleep-dot { fill: var(--plum); }
.c-mood { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.c-mood-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.c-period { fill: var(--err); }
:root[data-theme="dark"] .c-sleep { stroke: var(--rose-soft); } :root[data-theme="dark"] .c-sleep-dot { fill: var(--rose-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-sleep { stroke: var(--rose-soft); } :root:not([data-theme="light"]) .c-sleep-dot { fill: var(--rose-soft); } }
.chart-legend { font-size: .78rem; gap: 8px 18px; }
.lg { display: inline-block; flex: none; }
.lg-bar { width: 10px; height: 12px; border-radius: 3px; background: var(--rose); opacity: .7; }
.lg-sleep { width: 18px; height: 3px; border-radius: 2px; background: var(--plum); }
.lg-mood { width: 18px; height: 3px; background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 7px); }
.lg-period { width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.compare th, .compare td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.compare thead th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.compare tbody th { font-weight: 500; color: var(--heading); }
.compare .up-good { color: var(--ok); font-weight: 500; }
.compare .up-bad { color: var(--err); font-weight: 500; }
.compare tr.clickable { cursor: pointer; }
.compare tr.clickable:hover { background: var(--band); }
.month-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px 32px; align-items: start; }
.month-cols > div { display: grid; gap: 12px; min-width: 0; }
@media (max-width: 860px) { .month-cols { grid-template-columns: minmax(0, 1fr); } }
.panel > *, .chart-box, #week-compare, #month-weeks { min-width: 0; }
.panel { grid-template-columns: minmax(0, 1fr); }
.page-head .jump { margin-top: 0; }
.chart-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 28px 20px; text-align: center; color: var(--ink-soft); font-size: var(--step--1); background: var(--bg); }
/* Comfortable tap targets */
.site-footer a, .foot-nav a { display: inline-block; padding-block: 6px; }
.toc a { padding-block: 8px; }
.linkish { min-height: 28px; }
.post-tools .linkish, .bubble .linkish { min-height: 24px; }

/* Premium page */
.pricing { display: grid; gap: 16px; }
.plan-cards { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; max-width: 900px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; box-shadow: var(--shadow-sm); }
.plan-card h2 { font-size: var(--step-2); }
.plan-featured { border: 2px solid var(--rose); box-shadow: var(--shadow-md); }
.plan-tag { font-family: var(--font-display); font-size: var(--step-2); color: var(--heading); }
.price b { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--heading); }
.billing { display: grid; gap: 10px; }
.billing label { position: relative; display: block; cursor: pointer; }
.billing input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.billing span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg); }
.billing b { color: var(--heading); font-weight: 500; }
.billing small { margin-left: auto; font-size: .75rem; background: var(--champagne-light); color: #3E1C33; border-radius: 999px; padding: 2px 10px; }
.billing input:checked + span { border-color: var(--plum); background: var(--band); box-shadow: inset 0 0 0 1px var(--plum); }
.billing input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.pay-box { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--plum); flex: none; }
.disclosure b { color: var(--heading); }
.legal h3 { margin-top: 8px; }
@media (max-width: 760px) { .plan-cards { grid-template-columns: minmax(0, 1fr); } .plan-featured { order: -1; } }
.plan-card .checklist li::before { content: "✓"; border: 0; width: auto; height: auto; top: 0; color: var(--rose); font-weight: 600; }

/* Membership: one plan card with the free trial */
.plan-cards.plan-single{grid-template-columns:minmax(0,560px);justify-content:center}
.trial-when{margin:.6rem 0 0;padding:.7rem .9rem;border-radius:12px;background:color-mix(in srgb,var(--rose,#d8a7b1) 18%,transparent);font-size:.95rem;line-height:1.45}
.trial-when:empty{display:none}

/* Floating back-to-top button */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--champagne-light); background: var(--button); color: var(--button-ink, #fff);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(62,28,51,.25);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s ease, transform .25s ease, background .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--plum-deep); }
.to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .to-top:hover { background: var(--champagne-light); } }
:root[data-theme="dark"] .to-top:hover { background: var(--champagne-light); }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none !important; } }

/* Pricing: center the single membership card */
.plan-cards.plan-single { margin-inline: auto; }
/* Sign-in page: simple "everything included" box */
.plan-simple { padding: 16px 18px; gap: 10px; color: #E9D6DA; }
.plan-simple-head { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne-light); font-weight: 500; margin: 0; }
.plan-simple ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-simple li { padding-left: 22px; position: relative; }
.plan-simple li::before { content: "\2713"; position: absolute; left: 0; color: var(--champagne-light); }
.plan-simple-price { margin: 0; color: #FFF7F4; }
/* Home: members-only cards */
.members-cards .lock { display: inline-block; vertical-align: -2px; margin-right: 8px; color: var(--accent); }
.foot-contact a { white-space: nowrap; }
@media (min-width: 900px) { .members-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Support chat and owner inbox */
.support .support-thread { max-width: 760px; }
.support-thread .dm-thread-head img { flex: none; }
.support-thread .bubbles { min-height: 160px; }
.inbox-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.inbox-thread { display: grid; gap: 12px; border-left: 1px solid var(--line); padding-left: 18px; }
.inbox-thread .dm-thread-head h3 { margin: 0; }
.inbox-thread .dm-thread-head .fine { margin: 0; }
#inbox-title .mb-badge { vertical-align: middle; }
@media (min-width: 761px) { .inbox-thread .dm-back { display: none; } }
@media (max-width: 760px) {
  .inbox-grid { grid-template-columns: minmax(0, 1fr); }
  .inbox-thread { border-left: 0; padding-left: 0; }
  .inbox-open #inbox-list { display: none; }
}

/* Owner: case review */
.inbox-filter { margin: 4px 0 6px; }
.inbox-filter button { font: inherit; font-size: var(--step--1); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.inbox-filter button[aria-pressed="true"] { background: var(--button); color: var(--button-ink); border-color: var(--button); }
.convo-tags { display: flex; gap: 6px; align-items: center; }
.case-tag { font-size: .7rem; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--band); color: var(--ink-soft); }
.case-tag.case-open { background: var(--rose-soft); color: var(--plum-deep); }
.case-tag.case-resolved { background: transparent; border: 1px solid var(--line); }
.case-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 10px; }
.case-box summary { cursor: pointer; font-weight: 500; color: var(--heading); display: flex; gap: 8px; align-items: center; }
.case-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 8px 16px; margin: 4px 0 0; }
.case-facts div { display: grid; gap: 1px; }
.case-facts dt { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.case-facts dd { margin: 0; font-size: var(--step--1); }
.case-grid { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 12px; align-items: start; }
.case-grid textarea, .case-grid select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.case-label { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 4px 0 -4px; }
@media (max-width: 760px) { .case-grid { grid-template-columns: minmax(0, 1fr); } }
.support .support-thread:not([hidden]) { display: grid; min-height: 0; grid-template-rows: none; gap: 14px; }

/* Members-only lock box on public pages */
.members-lock { max-width: 760px; }
.members-lock h2 { margin: 2px 0 10px; }
.lock-list { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); }
.res-locked { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .res-locked { grid-template-columns: minmax(0, 1fr); } }
.res-jump .jump { margin-top: 8px; }

/* Footer credit: small, quiet, at the very bottom */
.made-by { border-top: 1px solid var(--line); }
.made-by .wrap { padding-block: 10px 14px !important; display: block !important; }
.made-by a { display: inline-flex !important; align-items: center; gap: 7px; padding-block: 2px !important; font-size: .72rem; letter-spacing: .01em; color: var(--ink-soft); opacity: .8; text-decoration: none; }
.made-by a:hover { opacity: 1; text-decoration: underline; }
.fw-chip { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: #FBF7F1; flex: none; }
.fw-chip img { display: block; width: 12px; height: 14px; }
@media (max-width: 520px) { .made-by-ask { display: none; } }

/* Visitors see an advertising menu; signed-in members see the member areas */
:root:not(.signed-in) .nav-member { display: none !important; }
.signed-in .nav-visitor { display: none !important; }
.guide-chips { margin: 4px 0 16px; }

/* Small For Ward credit tucked under the logo, and clearer at the bottom */
.brand-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.fw-byline { display: inline-flex; align-items: center; gap: 5px; margin-left: 46px; font-size: .62rem; letter-spacing: .03em; color: var(--ink-soft); opacity: .85; text-decoration: none; line-height: 1; white-space: nowrap; }
.fw-byline:hover { opacity: 1; text-decoration: underline; }
.fw-byline .fw-chip { width: 15px; height: 15px; }
.made-by a { opacity: 1; }
@media (max-width: 520px) { .fw-byline { margin-left: 40px; font-size: .58rem; } }
.owner-note { display: grid; gap: 10px; margin-bottom: 18px; }

/* Your tides: personal pattern insights */
.journal > .tides, .journal > .visit { grid-column: 1 / -1; }
.tides-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.tides-head > div { max-width: 60ch; display: grid; gap: 6px; }
.moon-meter { margin: 0; display: flex; align-items: center; gap: 12px; background: var(--band); border-radius: 999px; padding: 8px 18px 8px 8px; }
.moon-meter svg { width: 56px; height: 56px; flex: none; }
.moon-dark { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.moon-lit { fill: var(--champagne-light); }
.moon-meter figcaption { display: grid; font-size: var(--step--1); line-height: 1.3; }
.moon-meter figcaption b { font-family: var(--font-display); font-size: 1.25rem; color: var(--heading); font-weight: 600; }
.moon-meter figcaption span { color: var(--ink-soft); font-size: .78rem; }
.tide-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tide { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 20px; display: grid; gap: 6px; align-content: start; position: relative; overflow: hidden; background: var(--surface); }
.tide::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--rose); }
.tide-easing::before, .tide-sun::before { background: var(--ok); }
.tide-rising::before { background: var(--champagne); }
.tide-moon::before, .tide-pair::before { background: var(--plum); }
.tide h3 { font-size: var(--step-1); line-height: 1.2; }
.tide p { margin: 0; font-size: var(--step--1); }
.tide-tag { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem !important; color: var(--accent); font-weight: 500; }
.tide-progress { grid-column: 1 / -1; background: var(--band); }
.tide-bar { height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; margin-top: 6px; }
.tide-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--champagne)); border-radius: 99px; }
/* Doctor visit summary */
.visit-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.visit-intro > div:first-child { max-width: 62ch; display: grid; gap: 6px; }
.visit-report { display: grid; gap: 22px; border-top: 1px solid var(--line); padding-top: 22px; }
.vr-head { display: grid; gap: 4px; }
.vr-head h3 { font-size: var(--step-2); }
.vr-table { overflow-x: auto; }
.vr-table table { width: 100%; }
.vr-table caption { text-align: left; font-family: var(--font-display); font-size: var(--step-1); color: var(--heading); padding-bottom: 8px; }
.vr-block { display: grid; gap: 8px; }
.vr-block h4 { font-family: var(--font-display); font-size: var(--step-1); color: var(--heading); font-weight: 600; margin: 0; }
.vr-block p, .vr-block li { font-size: var(--step--1); margin: 0; }
.vr-block ul, .vr-questions { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.vr-blank { border-bottom: 1px solid var(--line); min-height: 1.6em; }
@media print {
  .print-visit .page-head, .print-visit .journal > *:not(.visit), .print-visit .visit-intro, .print-visit .vr-actions, .print-visit .made-by { display: none !important; }
  .print-visit .journal { display: block; }
  .print-visit .visit { border: 0; padding: 0; }
  .print-visit .visit-report { border: 0; padding: 0; }
  .vr-table, .vr-block { break-inside: avoid; }
  .vr-blank { border-color: #999; }
}
@media (max-width: 560px) { .moon-meter { border-radius: var(--radius); width: 100%; } }

/* ---------- Grace & strength touches ---------- */
::selection { background: var(--rose-soft); color: var(--plum-deep); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 70% at 88% 18%, rgba(232, 185, 192, .38), transparent 70%), radial-gradient(ellipse 50% 60% at 4% 92%, rgba(217, 183, 126, .16), transparent 70%); }
.hero .report { position: relative; z-index: 1; transition: transform .4s ease, box-shadow .4s ease; }
.hero .report:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 24px 60px rgba(91, 42, 74, .16); }
.hero-waves { position: absolute; left: 0; bottom: 0; width: 100%; height: 70px; pointer-events: none; }
.hero-waves path { fill: none; stroke-linecap: round; }
.hero-waves .hw1 { stroke: rgba(201, 138, 147, .45); stroke-width: 2.2; animation: gt-drift 16s linear infinite; }
.hero-waves .hw2 { stroke: rgba(184, 146, 90, .32); stroke-width: 1.6; animation: gt-drift 22s linear infinite reverse; }
@keyframes gt-drift { from { transform: translateX(0); } to { transform: translateX(-450px); } }
.trust-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--step--1); color: var(--ink-soft); }
.trust-strip li { display: inline-flex; align-items: center; gap: 7px; }
.trust-strip svg { width: 17px; height: 17px; fill: none; stroke: var(--rose); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:not(.btn-ghost):hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(91, 42, 74, .22); }

/* Strength band */
.strength { text-align: center; background: linear-gradient(180deg, var(--band), var(--bg) 85%); position: relative; }
.strength .wrap { display: grid; justify-items: center; gap: 14px; }
.strength-quote { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); line-height: 1.12; max-width: 26ch; font-weight: 500; text-wrap: balance; }
.strength-quote em { color: var(--champagne); font-style: italic; }
.strength-swash { width: 200px; height: 18px; margin-top: -2px; }
.strength-swash path { fill: none; stroke: var(--rose); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: gt-draw 2.4s .3s ease forwards; }
@keyframes gt-draw { to { stroke-dashoffset: 0; } }
.strength-grid { list-style: none; margin: clamp(20px, 3vw, 36px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); text-align: left; width: 100%; }
.strength-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg, 18px); padding: 26px 24px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.strength-grid li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rose-soft); }
.strength-grid h3 { font-size: var(--step-1); }
.strength-grid p { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.strength-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--blush), #F3D9DC); margin-bottom: 4px; }
.strength-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--plum); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) { .strength-grid { grid-template-columns: minmax(0, 1fr); } }

/* Soft wave edges on colored bands */
.band, .promise { position: relative; }
.band::before, .promise::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 23px; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V14C150 2 300 22 450 14S750 2 900 12 1100 22 1200 10V24Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V14C150 2 300 22 450 14S750 2 900 12 1100 22 1200 10V24Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.band::before { background: var(--band); }
.promise::before { background: var(--plum); }
.members-cards .lock { transition: transform .25s ease, color .25s ease; }
.members-cards a:hover .lock { transform: rotate(-10deg) scale(1.1); color: var(--rose); }
.chips li { transition: border-color .2s ease, background-color .2s ease; }
.chips li:hover { border-color: var(--rose-soft); background: var(--blush); }

/* Footer heart */
.foot-heart { font-size: var(--step--1); color: var(--ink-soft); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0; }
.foot-heart svg { fill: var(--rose); stroke: none; animation: gt-beat 2.8s ease-in-out infinite; }
@keyframes gt-beat { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.22); } 86% { transform: scale(1); } 92% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .hero-waves path, .foot-heart svg { animation: none; } .strength-swash path { animation: none; stroke-dashoffset: 0; } .hero .report:hover, .strength-grid li:hover { transform: none; } }
@media print { .hero-waves, .foot-heart { display: none !important; } }

/* ---------- Easy, app-like flow ---------- */
.tabbar { display: none; }
@media (max-width: 700px) {
  .tabbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -24px rgba(62, 28, 51, .5); }
  .tabbar .mb-links { display: flex; justify-content: space-around; gap: 0; }
  .tabbar .mb-links a { flex: 1 1 0; flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 14px; font-size: .7rem; letter-spacing: .01em; position: relative; color: var(--ink-soft); }
  .tabbar .mb-links a[hidden] { display: none; }
  .tabbar .mb-links a[aria-current="page"] { background: var(--band); color: var(--heading); }
  .tabbar .mb-ic { width: 22px; height: 22px; }
  .tabbar .mb-long { display: none; }
  .tabbar .mb-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: .62rem; padding: 0 4px; }
  body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.has-tabbar .to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .hello .btn { width: auto; }
}
.mb-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mb-links a[aria-current="page"] .mb-ic { stroke: var(--rose); }
@media print { .tabbar { display: none !important; } }
/* Journal jump links scroll sideways on phones instead of wrapping */
.page-head .jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.page-head .jump::-webkit-scrollbar { display: none; }
.page-head .jump a { white-space: nowrap; flex: none; }
/* Check-in conveniences */
.same-btn { font-size: var(--step--1); margin-left: 10px; font-weight: 500; color: var(--plum); }
.scale-word { font-size: var(--step--1); color: var(--ink-soft); font-weight: 400; margin-left: 6px; transition: color .2s ease; }
.scale-word.on { color: var(--plum); font-weight: 500; }
.stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: stretch; }
.stepper input { text-align: center; }
.step-btn { font: inherit; font-size: 1.25rem; line-height: 1; border: 1px solid var(--line); background: var(--surface); color: var(--heading); border-radius: 12px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.step-btn:hover { border-color: var(--rose); background: var(--band); }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input[type=number] { -moz-appearance: textfield; }
html { scroll-padding-top: 130px; }

/* Email my doctor dialog */
.doc-mail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 26px 26px 18px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(62,28,51,.25); }
.doc-mail::backdrop { background: rgba(62,28,51,.45); backdrop-filter: blur(2px); }
.doc-mail h2 { margin: 2px 0 8px; }
.doc-mail .field input { width: 100%; }
.doc-mail .doc-remember { display: flex; gap: 8px; align-items: center; margin: 10px 0 6px; font-size: .95rem; }
.doc-mail .btn-row { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.doc-mail .doc-tip { margin-top: 12px; }
.linklike { background: none; border: 0; padding: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 520px) { .doc-mail { padding: 22px 18px 14px; } .doc-mail .btn-row .btn { width: 100%; } }
@media print { .doc-mail { display: none !important; } }

/* Android app (Google Play) vs website (Stripe) wording */
html:not(.in-app) [data-app], html.in-app [data-web] { display: none !important; }

/* Signed in: never offer "Sign in" (header shows My journal; sign-in links on lock cards hidden; sign-in page waits while it forwards to the journal) */
.signed-in #nav-auth .auth-out, :root:not(.signed-in) #nav-auth .auth-in { display: none; }
.signed-in .btn-row a[href^="/login"] { display: none !important; }
.signed-in body[data-page="login"] #auth { visibility: hidden; }

/* Tide gauge + ideas that may help */
.gauge { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; background: var(--surface); margin: 6px 0 14px; }
.gauge h3 { font-size: var(--step-1); line-height: 1.2; margin: 4px 0 0; }
.gauge p { margin: 0; }
.gauge-meter { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 30px; margin: 6px 0 4px; }
.gz { border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.gz i { font-style: normal; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #3b2236; opacity: .85; }
.gz-calm { background: #cfe5dc; } .gz-rising { background: #efe0b9; } .gz-high { background: #f1c6b8; } .gz-storm { background: #d98a9a; }
.gauge-mark { position: absolute; top: -6px; bottom: -6px; width: 6px; margin-left: -3px; border-radius: 4px; background: var(--plum, #5a2a4f); box-shadow: 0 0 0 2px var(--surface); transition: left .6s ease; }
.gauge-storm { border-color: #d98a9a; background: color-mix(in srgb, #d98a9a 12%, var(--surface)); }
.gauge-high { border-color: #f1c6b8; }
.gauge-note { background: var(--band); border-radius: 10px; padding: 10px 12px; font-size: var(--step--1); }
.gauge-urgent summary { cursor: pointer; font-weight: 500; color: var(--heading); }
.gauge-urgent ul { margin: 8px 0 0; padding-left: 1.2em; font-size: var(--step--1); display: grid; gap: 4px; }
.tips { border-radius: var(--radius); background: var(--band); padding: 18px 20px; display: grid; gap: 8px; margin-bottom: 14px; }
.tips h3 { font-size: var(--step-1); margin: 0; }
.tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips li { display: grid; gap: 2px; background: var(--surface); border-radius: 10px; padding: 10px 14px; }
.tips li b { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 500; }
.tips-src { opacity: .8; }
@media (prefers-reduced-motion: reduce) { .gauge-mark { transition: none; } }
