:root {
  --bg: #f7f4ef; --surface: #ffffff; --text: #1f2430; --muted: #5b6272; --line: #e3ddd3;
  --accent: #3b5bab; --accent-text: #ffffff; --soft: #ece6f7; --warn-bg: #fff4e0; --warn-line: #e0a84a;
  --radius: 14px; --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 16px rgb(0 0 0 / .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c; --surface: #1b1e29; --text: #e7e4dd; --muted: #a3a8b6; --line: #2c3040;
    --accent: #9fb4ff; --accent-text: #12141c; --soft: #242a3d; --warn-bg: #2f2616; --warn-line: #8a6a2d;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
.logo span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
nav a { padding: 6px 8px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; }
nav a[aria-current="page"] { color: var(--text); font-weight: 650; }
nav a.nav-cta { background: var(--soft); color: var(--accent); font-weight: 650; padding: 6px 12px; }
nav a.nav-cta[aria-current="page"] { background: var(--accent); color: var(--accent-text); }
@media (max-width: 400px) { nav a { padding: 6px 5px; font-size: .86rem; } nav a.nav-cta { padding: 6px 9px; } }
main { padding-bottom: 48px; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; margin: 24px 0 12px; }
h2 { font-size: 1.3rem; margin: 36px 0 10px; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 22px; }
.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 14px 24px; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-text); text-decoration: none; cursor: pointer; text-align: center;
}
.btn.secondary { background: var(--soft); color: var(--text); }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 16px 0; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.trust-strip span { background: var(--soft); border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: .82rem; }
.trust-strip span::before { content: "✓ "; color: var(--accent); font-weight: 800; }
.benefit-grid, .plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.benefit-grid .card, .plan-grid .card { margin: 0; }
.feature h3, .plan h3 { margin: 6px 0; font-size: 1.05rem; }
.feature p, .plan p { margin-top: 6px; }
.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent); font-weight: 800; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); position: relative; }
.plan-price { font-size: 1.25rem; font-weight: 750; }
.plan .btn { margin-top: auto; }
.mobile-cta { display: none; }
.steps { display: grid; gap: 12px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); text-align: center; font-weight: 700; font-size: .9rem; line-height: 24px; }
.note { font-size: .92rem; color: var(--muted); }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 14px 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: .9rem; color: var(--muted); }
footer.site p { margin: 0 0 8px; }
.feature .btn-link { display: inline-block; margin-top: 8px; font-weight: 650; }
@media (max-width: 620px) {
  body.subscription-page { padding-bottom: 76px; }
  .benefit-grid, .plan-grid { grid-template-columns: 1fr; }
  .mobile-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
  .mobile-cta .btn { display: block; max-width: 720px; margin: 0 auto; }
}

/* Assessment */
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 20px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }
.choices { display: grid; gap: 10px; margin: 16px 0; }
.choice { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.field { display: grid; gap: 6px; margin: 14px 0; }
.field input[type=email] { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.price { font-size: 2rem; font-weight: 700; }
.error { color: #c0392b; font-weight: 600; }
@media (prefers-color-scheme: dark) { .error { color: #ff8a7a; } }

/* Sound player */
.player { text-align: center; }
.kinds, .timers { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pill { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; cursor: pointer; }
.pill[aria-pressed=true] { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.big { font-size: 1.15rem; padding: 18px 34px; min-width: 200px; }
input[type=range] { width: min(320px, 100%); accent-color: var(--accent); }
.status { min-height: 1.6em; color: var(--muted); }
.stopbar { position: sticky; bottom: 12px; display: none; justify-content: center; margin-top: 16px; }
.stopbar.on { display: flex; }

/* Journal */
.log-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.log-btn { display: grid; gap: 4px; justify-items: center; padding: 16px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); color: var(--text); font: inherit; font-size: 1.5rem; cursor: pointer; min-height: 84px; }
.log-btn span { font-size: .9rem; font-weight: 600; }
.log-btn:active { transform: scale(.97); }
.log-btn.unusual { background: var(--warn-bg); border-color: var(--warn-line); }
.past { margin-top: 14px; }
.past summary { cursor: pointer; color: var(--accent); }
.past select, .past input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.toast { position: sticky; top: 8px; z-index: 2; background: var(--text); color: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.toast .pill { background: transparent; color: inherit; border-color: currentColor; }
.night h3 { margin: 0 0 4px; font-size: 1.05rem; }
.night ul { margin: 8px 0 0; padding-left: 18px; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .85rem; cursor: pointer; margin-left: 6px; }
@media print {
  header.site, footer.site, .log-grid, .past, .actions, .toast, .promo, .lead, .note:not(.meta) { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
}

/* FAQ */
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 2px; }
.recap { width: 100%; border-collapse: collapse; font-size: .95rem; }
.recap th, .recap td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.recap thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.recap td { font-variant-numeric: tabular-nums; }
