/*
 * migrener.pl — one stylesheet.
 *
 * Same palette and type as the app (../webapp/src/styles.scss): a dim dusk
 * palette by default (people with migraine are often light-sensitive), light
 * when the system is light. Strength is one ordered ramp, lavender → mauve →
 * rose, and one shape: the aura line. Motion is slow and never flashes; all of
 * it stops under prefers-reduced-motion.
 */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/atkinson-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/atkinson-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark light;
  --bg: #1b2130;
  --bg-deep: #141926;
  --surface: #242b3b;
  --surface-2: #2c3446;
  --line: #3a4357;
  --text: #e7e3dc;
  --muted: #a0a6b3;
  --low: #906597;
  --medium: #e074b0;
  --high: #ffa6b4;
  --bar: #8b93a7;
  --accent: #ffa6b4;
  --accent-ink: #1b2130;
  --glow-a: rgba(224, 116, 176, 0.22);
  --glow-b: rgba(144, 101, 151, 0.3);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --font: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --wrap: 1160px;
  --r-lg: 28px;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eceef3;
    --bg-deep: #e2e5ec;
    --surface: #f8f8fa;
    --surface-2: #e2e5ec;
    --line: #cfd4df;
    --text: #1e2433;
    --muted: #586070;
    --low: #cb95ce;
    --medium: #bc4385;
    --high: #8c0633;
    --bar: #6b7385;
    --accent: #8c0633;
    --accent-ink: #fff;
    --glow-a: rgba(188, 67, 133, 0.13);
    --glow-b: rgba(203, 149, 206, 0.3);
    --shadow: 0 30px 70px -30px rgba(30, 36, 51, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; font-size: 1.0625rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 10px 30px -12px var(--medium);
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--medium); }
.btn:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
.btn-small { padding: 9px 16px; font-size: 0.9375rem; box-shadow: none; }

/* ---------------- nav ---------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; }
.brand-mark { width: 32px; height: 32px; }
.brand-mark rect { fill: #1b2130; }
.brand-mark path { fill: none; stroke: #ffa6b4; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.9688rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-app { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; margin-right: -8px; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 900px) {
  .nav-row { gap: 12px; }
  .nav .btn-small { margin-left: auto; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 20px 18px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line), 0 20px 40px -20px rgba(0,0,0,.5);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav-links a { padding: 13px 0; font-size: 1.0625rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav.open .nav-links { visibility: visible; opacity: 1; transform: none; }
  .nav.open { background: var(--bg); }
}
@media (max-width: 420px) {
  .nav .btn-small { display: none; }
  .nav-toggle { margin-left: auto; }
  .nav-links a.nav-app { display: block; color: var(--accent); font-weight: 700; }
}

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 150px 0 0; overflow: hidden; isolation: isolate; }
.sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg-deep), var(--bg) 70%); }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.glow-a { width: 620px; height: 620px; right: -120px; top: -160px; background: radial-gradient(circle, var(--glow-a), transparent 65%); }
.glow-b { width: 760px; height: 520px; left: -260px; top: 180px; background: radial-gradient(circle, var(--glow-b), transparent 65%); }
.stars {
  position: absolute; inset: 0; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 42%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 12%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 30%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 77% 9%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 46%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 60%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 58%, var(--muted) 50%, transparent 51%);
}
@media (prefers-color-scheme: light) { .stars { display: none; } }

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted); font-size: 0.9063rem; margin-bottom: 26px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--medium); box-shadow: 0 0 0 4px color-mix(in srgb, var(--medium) 25%, transparent); }
.hero h1 { font-size: clamp(2.5rem, 5.3vw, 4.375rem); letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em {
  font-style: normal; display: inline-block;
  background: linear-gradient(100deg, var(--high), var(--medium) 55%, var(--low));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;
}
.lead { margin-top: 24px; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); color: var(--muted); max-width: 33em; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fine { margin-top: 18px; font-size: 0.9063rem; color: var(--muted); }

/* phone */
.hero-phone { position: relative; justify-self: center; padding: 10px 30px 40px; }
.phone {
  position: relative; width: 300px; padding: 11px; border-radius: 46px;
  background: linear-gradient(160deg, #3b4357, #1a1f2b 45%, #2b3242);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.08);
  transform: rotate(-3deg);
  animation: float 9s ease-in-out infinite;
}
.phone-notch { position: absolute; top: 20px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 20px; background: #0c0f16; z-index: 2; }
.screen {
  /* The phone always shows the app's dark (default) palette. */
  --bg: #1b2130; --surface: #242b3b; --surface-2: #2c3446; --line: #3a4357;
  --text: #e7e3dc; --muted: #a0a6b3; --low: #906597; --medium: #e074b0; --high: #ffa6b4;
  color-scheme: dark;
  border-radius: 36px; background: var(--bg); color: var(--text);
  padding: 54px 16px 20px; min-height: 590px; overflow: hidden; font-size: 13px;
}
.app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.app-title { font-weight: 700; font-size: 18px; }
.app-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.chips { display: flex; gap: 6px; }
.chip { padding: 6px 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12px; }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; font-weight: 700; }
.app-day { margin: 12px 2px 14px; color: var(--muted); font-size: 12.5px; }
.bands { display: grid; gap: 10px; }
.band {
  position: relative; display: grid; gap: 8px; padding: 14px 14px 12px; border-radius: 18px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700; font-size: 15px; overflow: hidden;
}
.band svg { width: 100%; height: 26px; }
.band path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.band[data-s="low"] path { stroke: var(--low); }
.band[data-s="medium"] path { stroke: var(--medium); }
.band[data-s="high"] path { stroke: var(--high); stroke-width: 2.8; }
.band.saved { box-shadow: inset 0 0 0 2px var(--medium); background: color-mix(in srgb, var(--medium) 12%, var(--surface)); }
.tick {
  position: absolute; top: 13px; right: 12px; font-style: normal; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; background: var(--medium); color: var(--bg);
}
.app-check { display: flex; align-items: center; gap: 9px; margin: 16px 4px 0; color: var(--muted); font-size: 12.5px; }
.app-check .box { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line); }
.app-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.app-summary p { padding: 11px 12px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.app-summary strong { display: block; color: var(--text); font-size: 16px; }

.float-card {
  position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  padding: 11px 16px 11px 12px; border-radius: 16px; font-size: 0.875rem; font-weight: 700;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.float-card small { grid-column: 2; font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.float-card .sw { grid-row: span 2; }
.fc-a { left: -34px; top: -4px; animation: float 11s ease-in-out -3s infinite; }
.fc-b { right: -14px; bottom: 4px; animation: float 10s ease-in-out -6s infinite; }

.sw { display: inline-block; width: 12px; height: 34px; border-radius: 6px; }
[data-s="low"].sw, .legend i[data-s="low"] { background: var(--low); }
[data-s="medium"].sw, .legend i[data-s="medium"] { background: var(--medium); }
[data-s="high"].sw, .legend i[data-s="high"] { background: var(--high); }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* horizon: the aura line calming from zigzag to wave */
.horizon { width: 100%; height: 140px; margin-top: 70px; overflow: visible; }
.horizon path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hz-base { stroke-width: 2.2; opacity: 0.9; }
.hz-pulse {
  stroke: var(--text); stroke-width: 3; opacity: 0.85;
  stroke-dasharray: 34 966; stroke-dashoffset: 1000;
  filter: drop-shadow(0 0 6px var(--medium));
  animation: pulse 12s cubic-bezier(0.45, 0, 0.3, 1) infinite;
}
@keyframes pulse {
  0% { stroke-dashoffset: 1000; opacity: 0; }
  6% { opacity: 0.85; }
  85% { opacity: 0.6; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.horizon-note { display: flex; justify-content: space-between; margin-top: 6px; padding-bottom: 36px; color: var(--muted); font-size: 0.8438rem; letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 960px) {
  .hero { padding-top: 116px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .horizon { margin-top: 20px; height: 100px; }
}
@media (max-width: 520px) {
  .phone { width: 268px; }
  .screen { min-height: 540px; padding-inline: 13px; }
  .fc-a { left: -6px; top: -6px; }
  .fc-b { right: -4px; bottom: 6px; }
  .float-card { font-size: 0.8125rem; padding: 9px 13px 9px 10px; }
  .float-card small { font-size: 0.75rem; }
  .horizon-note { font-size: 0.75rem; }
  /* Show the middle of the line on phones, so the zigzag isn't squeezed. */
  .horizon { width: 230%; margin-left: -65%; }
}

/* ---------------- sections ---------------- */
.sec { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.sec-tint { background: var(--bg-deep); }
@media (prefers-color-scheme: light) { .sec-tint { background: #e4e7ee; } }
.sec-head { max-width: 760px; margin-bottom: 56px; }
.kicker { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--medium); margin-bottom: 14px; }
.sec h2, .final h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -0.03em; }
.sec-head > p:not(.kicker), .split-copy > p:not(.kicker) { margin-top: 18px; color: var(--muted); font-size: 1.1875rem; }
.split-copy > p + p { margin-top: 14px; }

/* strengths */
.strengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.strength {
  padding: 30px 28px 32px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.strength:hover { transform: translateY(-4px); }
.strength svg { width: 100%; height: 56px; margin-bottom: 26px; overflow: visible; }
.strength path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.strength[data-s="low"] path { stroke: var(--low); }
.strength[data-s="medium"] path { stroke: var(--medium); }
.strength[data-s="high"] path { stroke: var(--high); stroke-width: 3.6; }
.strength[data-s="low"]:hover { box-shadow: inset 0 0 0 1.5px var(--low); }
.strength[data-s="medium"]:hover { box-shadow: inset 0 0 0 1.5px var(--medium); }
.strength[data-s="high"]:hover { box-shadow: inset 0 0 0 1.5px var(--high); }
.strength h3 { font-size: 1.625rem; margin-bottom: 8px; }
.strength p { color: var(--muted); }
.aside-note { margin-top: 36px; max-width: 760px; color: var(--muted); font-size: 1.0625rem; padding-left: 18px; border-left: 3px solid var(--medium); }
.aside-note strong { color: var(--text); }
@media (max-width: 820px) { .strengths { grid-template-columns: 1fr; } }

/* split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.split-rev .split-copy { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-rev .split-copy { order: 0; } }
.ticks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 16px; }
.ticks li { position: relative; padding-left: 34px; color: var(--muted); }
.ticks li strong { color: var(--text); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--medium) 18%, transparent);
}
.ticks li::after {
  content: ''; position: absolute; left: 7px; top: 8px; width: 8px; height: 5px;
  border-left: 2px solid var(--medium); border-bottom: 2px solid var(--medium); transform: rotate(-45deg);
}

/* editor sheet */
.sheet {
  display: grid; gap: 10px; padding: 14px 24px 28px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  max-width: 440px; justify-self: center; width: 100%;
}
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; margin-bottom: 8px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head .sw { height: 26px; width: 10px; }
.sheet-head strong { font-size: 1.25rem; }
.sheet-head .muted { margin-left: auto; font-size: 0.875rem; }
.lbl { font-size: 0.8438rem; color: var(--muted); margin-top: 6px; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; }
.sheet-row .lbl { margin: 0; color: var(--text); font-size: 0.9688rem; }
.toggle { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.3s; }
.toggle.on { background: var(--medium); }
.toggle.on::after { transform: translateX(18px); background: #fff; }
.sheet-input { padding: 11px 14px; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9688rem; }
.sheet-input.tall { min-height: 62px; }
.caret { display: inline-block; width: 1.5px; height: 1.05em; background: var(--text); vertical-align: -0.15em; margin-left: 2px; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sheet-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-suggest span, .foods span {
  padding: 5px 11px; border-radius: 999px; font-size: 0.8438rem;
  background: var(--surface-2); color: var(--muted);
}
.seg { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg span { text-align: center; padding: 7px 2px; border-radius: 9px; font-size: 0.7813rem; color: var(--muted); }
.seg span.on { background: var(--surface-2); color: var(--text); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.seg-sm { grid-template-columns: repeat(3, auto); }
.seg-sm span { padding: 5px 10px; }

/* calendar */
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 0.9375rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.legend-sm { margin-top: 16px; font-size: 0.8438rem; gap: 14px; }
.legend-sm i { width: 11px; height: 11px; }
.cal {
  padding: 22px 22px 18px; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); max-width: 460px; width: 100%; justify-self: center;
}
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 1.125rem; }
.cal-head .arr { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal-grid .wd { font-size: 0.75rem; color: var(--muted); padding-bottom: 4px; }
.cal-grid .d {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 11px; font-size: 0.875rem;
  background: var(--bg); color: var(--muted);
}
.cal-grid .d.future { opacity: 0.4; }
.cal-grid .d[data-s="low"] { background: color-mix(in srgb, var(--low) 55%, var(--bg)); color: var(--text); font-weight: 700; }
.cal-grid .d[data-s="medium"] { background: var(--medium); color: var(--bg); font-weight: 700; }
.cal-grid .d[data-s="high"] { background: var(--high); color: var(--bg); font-weight: 700; }
@media (prefers-color-scheme: light) {
  .cal-grid .d[data-s="low"] { background: var(--low); color: var(--text); }
  .cal-grid .d[data-s="medium"], .cal-grid .d[data-s="high"] { color: #fff; }
}
.cal-grid .d.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.cal-grid .d.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--medium); }
.cal-day { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.875rem; }
.entry { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--bg); }
.entry .sw { height: 30px; width: 9px; }
.entry strong { display: block; font-size: 1rem; }
.entry small { color: var(--muted); font-size: 0.8438rem; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { padding: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.card h3 { font-size: 1.125rem; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.card-head h3 { margin: 0; }
.stat-wide { grid-column: 1 / -1; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(6px, 1.4vw, 16px); height: 220px; align-items: end; }
.bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 8px; }
.bar-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; align-self: end; height: 100%; }
.bar-stack i { display: block; border-radius: 5px; transform-origin: bottom; }
.bar-stack i[data-s="low"] { background: var(--low); }
.bar-stack i[data-s="medium"] { background: var(--medium); }
.bar-stack i[data-s="high"] { background: var(--high); }
.bar-n { font-size: 0.75rem; color: var(--muted); text-align: center; }
.bar-lbl { font-size: 0.75rem; color: var(--muted); text-align: center; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 7.2em 1fr 2em; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--muted); }
.hbar .track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hbar .fill { display: block; height: 100%; border-radius: 6px; background: var(--bar); transform-origin: left; }
.hbar.top .fill { background: var(--medium); }
.hbar.top { color: var(--text); font-weight: 700; }
.hbar b { font-weight: 700; color: var(--text); text-align: right; }
.insight { margin-top: 18px; color: var(--muted); font-size: 0.9375rem; }
.insight strong { color: var(--text); }
.ring-row { display: flex; align-items: center; gap: 26px; }
.ring { width: 132px; height: 132px; flex: none; transform: rotate(-90deg); }
.ring text { transform: rotate(90deg); transform-origin: 60px 60px; fill: var(--text); font-size: 22px; font-weight: 700; font-family: var(--font); }
.ring .ring-sub { font-size: 11px; font-weight: 400; fill: var(--muted); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--medium); stroke-linecap: round; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.mini-list li:last-child { border: 0; padding: 0; }
.mini-list b { color: var(--text); }
.foods { display: flex; flex-wrap: wrap; gap: 8px; }
.foods span { font-size: 0.9375rem; padding: 8px 14px; color: var(--text); }
.foods span:nth-child(1) { font-size: 1.125rem; }
.foods b { color: var(--medium); margin-left: 4px; }
.sample-note { margin-top: 18px; color: var(--muted); font-size: 0.8438rem; text-align: right; }
@media (max-width: 820px) { .stats { grid-template-columns: 1fr; } .bars { height: 180px; } }
@media (max-width: 520px) { .card { padding: 22px 18px; } .bars { gap: 4px; } .bar-lbl { font-size: 0.625rem; } .ring { width: 108px; height: 108px; } .ring-row { gap: 18px; } }

/* features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 28px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.f-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px;
  background: color-mix(in srgb, var(--medium) 15%, transparent); color: var(--medium);
}
.f-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.1875rem; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 0.9688rem; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* export + privacy */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card.big { padding: clamp(26px, 4vw, 44px); }
.card.big h2 { font-size: clamp(1.75rem, 3vw, 2.375rem); }
.card.big > p:not(.kicker) { margin-top: 16px; color: var(--muted); }
.csv { margin-top: 28px; border-radius: var(--r-sm); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.csv-row { display: grid; grid-template-columns: 1.15fr 1.25fr 0.85fr 1.1fr; }
.csv-row span { padding: 9px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csv-row span:last-child { border-right: 0; }
.csv-row:last-child span { border-bottom: 0; }
.csv-h { background: var(--surface-2); font-weight: 700; }
.file-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 16px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 0.9375rem;
}
.file-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shield-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; }
.shield-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.shield-list strong { font-size: 1.0938rem; }
.shield-list p { color: var(--muted); margin-top: 4px; font-size: 0.9688rem; }
.ok { width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--medium) 15%, transparent); position: relative; }
.ok::after { content: ''; position: absolute; left: 12px; top: 12px; width: 12px; height: 7px; border-left: 2.2px solid var(--medium); border-bottom: 2.2px solid var(--medium); transform: rotate(-45deg); }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .csv-row { grid-template-columns: 1.15fr 0.95fr 1fr; } .csv-row span:nth-child(2) { display: none; } }

/* faq */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s; }
.faq details[open] { box-shadow: inset 0 0 0 1.5px var(--medium); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 60px 22px 24px; font-weight: 700; font-size: 1.125rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 26px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 24px; color: var(--muted); }

/* final cta */
.final { position: relative; overflow: hidden; padding: clamp(90px, 12vw, 150px) 0; text-align: center; background: radial-gradient(ellipse 70% 90% at 50% 100%, var(--glow-b), transparent 70%), var(--bg-deep); }
@media (prefers-color-scheme: light) { .final { background: radial-gradient(ellipse 70% 90% at 50% 100%, var(--glow-b), transparent 70%), #e4e7ee; } }
.final-line { position: absolute; left: -5%; width: 110%; bottom: 40px; height: 90px; opacity: 0.3; }
.final-line path { fill: none; stroke: var(--low); stroke-width: 2; vector-effect: non-scaling-stroke; }
.final-inner { position: relative; }
.final h2 { max-width: 14em; margin-inline: auto; }
.final-inner > p:not(.fine) { margin: 18px 0 34px; color: var(--muted); font-size: 1.1875rem; }

/* footer */
.footer { padding: 56px 0 34px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-claim { margin-top: 12px; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.9688rem; }
.footer-nav a:hover { color: var(--text); }
.footer-legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.legal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 10px; }
.legal-row a { color: var(--muted); }
.legal-row a:hover { color: var(--text); }
.credit {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 6px 14px 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s;
}
.credit b { color: var(--text); font-weight: 700; }
.credit i { font-style: normal; color: var(--medium); }
.credit:hover { box-shadow: inset 0 0 0 1px var(--medium); }
@media (max-width: 620px) { .credit { margin-left: 0; } }

/* ---------------- privacy policy / 404 ---------------- */
.doc { padding: 130px 0 90px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); letter-spacing: -0.03em; }
.doc .updated { margin-top: 12px; color: var(--muted); }
.doc h2 { font-size: 1.375rem; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 6px; }
.doc strong { color: var(--text); }
.doc a { color: var(--text); text-decoration-color: var(--medium); text-underline-offset: 3px; }
.doc .intro { margin-top: 28px; font-size: 1.1875rem; color: var(--text); }
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px 20px 60px; }
.lost svg.lost-line { width: min(420px, 80vw); height: 60px; margin: 0 auto 34px; }
.lost-line path { fill: none; stroke: var(--medium); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lost h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); letter-spacing: -0.03em; }
.lost p { margin: 16px auto 30px; color: var(--muted); max-width: 30em; font-size: 1.125rem; }

/* ---------------- reveal + motion ---------------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }
.js .bar-stack i { transform: scaleY(0); transition: transform 1s var(--ease); }
.js .in .bar-stack i { transform: none; }
.js .hbar .fill { transform: scaleX(0); transition: transform 1.1s var(--ease) 0.15s; }
.js .in .hbar .fill { transform: none; }
.js .ring-fg { stroke-dasharray: 0 100; transition: stroke-dasharray 1.4s var(--ease) 0.2s; }
.js .in .ring-fg { stroke-dasharray: 62 100; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .bar-stack i, .js .hbar .fill { transform: none; }
  .js .ring-fg { stroke-dasharray: 62 100; }
  .hz-pulse { display: none; }
}
.doc .kicker, .lost .kicker { color: var(--medium); }
.doc ul + p { margin-top: 14px; }
