/* Headroom — marketing site. Tokens mirror SpendingTracker/Shared/Theme.swift. */

:root {
  color-scheme: light dark;
  --page: #F2F4F7;
  --card: #FFFFFF;
  --hairline: #E3EAE8;
  --text: #12201D;
  --text-2: #55625F;
  --fill: rgba(120, 120, 128, .18);
  --accent: #1F4E8C;
  --soft: #E1EAF8;
  --on-soft: #173B6B;
  --on-accent: #FFFFFF;
  --hero-base: #0B1F3A;
  --hero-glow: #2E64B8;
  --on-hero: #FFFFFF;
  --seg: #8FB4F2;
  --orange: #C2570F;
  --on-orange: #FFFFFF;
  --warn-bg: #FBE7D9;
  --warn-text: #8A380A;
  --aside: #5B6B8C;
  --aside2: #8E9BB6;
  --ink: #12201D;
  --banner-teal: #5CC7B8;
  --bezel: #0B0F14;
  --c0: #0B6158; --c1: #C2570F; --c2: #2F6FB0; --c3: #8E5BB5; --c4: #B08A1E;
  --snappy: .28s cubic-bezier(.2, .7, .2, 1);
  --smooth: .5s cubic-bezier(.25, .8, .25, 1);
  --spring: .45s cubic-bezier(.2, 1.25, .4, 1);
  --radius-card: 14px;
  --radius-hero: 22px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0E1512;
    --card: #171E1C;
    --hairline: #2C3432;
    --text: #F4FBF9;
    --text-2: #A3AEAA;
    --fill: rgba(120, 120, 128, .32);
    --accent: #8FB4F2;
    --soft: #16243A;
    --on-soft: #C9DBF8;
    --on-accent: #071528;
    --hero-base: #071528;
    --hero-glow: #2A5AA8;
    --on-hero: #F4FBF9;
    --orange: #F0A060;
    --on-orange: #2C150A;
    --warn-bg: #3A2618;
    --warn-text: #FFC59E;
    --aside: #A9B6D6;
    --aside2: #7F8DAF;
    --ink: #2A3A37;
    --bezel: #1C2522;
    --c0: #5CC7B8; --c1: #F0A060; --c2: #7FB2E8; --c3: #C9A3E8; --c4: #E5C861;
  }
}

/* Pro themes: the accent family follows the choice, as Appearance does in the app. */
.themed[data-theme="teal"]     { --accent: #0B6158; --soft: #DDEEEA; --on-soft: #0B4A43; --hero-base: #0A3A35; --hero-glow: #1E8F80; --seg: #5CC7B8; }
.themed[data-theme="indigo"]   { --accent: #3B3FB6; --soft: #E3E4F8; --on-soft: #2A2D8A; --hero-base: #1E2152; --hero-glow: #5C61D8; --seg: #8E92F0; }
.themed[data-theme="plum"]     { --accent: #8E3B8A; --soft: #F3E2F2; --on-soft: #6E2A6B; --hero-base: #4A1E48; --hero-glow: #B455AE; --seg: #D98BD4; }
.themed[data-theme="forest"]   { --accent: #2E6B3A; --soft: #E0EFE3; --on-soft: #235229; --hero-base: #1B3F23; --hero-glow: #3F8F4F; --seg: #7FCB8F; }
.themed[data-theme="graphite"] { --accent: #3E4E4A; --soft: #E6EAE9; --on-soft: #2A3633; --hero-base: #24302D; --hero-glow: #56706A; --seg: #A9B8B4; }
@media (prefers-color-scheme: dark) {
  .themed[data-theme="teal"]     { --accent: #5CC7B8; --soft: #1D3633; --on-soft: #BFE8E0; --hero-base: #06201D; --hero-glow: #1A7A6D; --on-accent: #06201D; }
  .themed[data-theme="indigo"]   { --accent: #8E92F0; --soft: #1F2140; --on-soft: #C8CAFA; --hero-base: #101233; --hero-glow: #4A4FC2; --on-accent: #101233; }
  .themed[data-theme="plum"]     { --accent: #D98BD4; --soft: #3A1E39; --on-soft: #F0C4EC; --hero-base: #2A102A; --hero-glow: #9A4595; --on-accent: #2A102A; }
  .themed[data-theme="forest"]   { --accent: #7FCB8F; --soft: #1E3324; --on-soft: #C3E8CB; --hero-base: #0E2414; --hero-glow: #357A43; --on-accent: #0E2414; }
  .themed[data-theme="graphite"] { --accent: #A9B8B4; --soft: #2A302E; --on-soft: #D6DEDC; --hero-base: #151B19; --hero-glow: #46605A; --on-accent: #151B19; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
h1 { font-size: clamp(34px, 5.2vw, 58px); letter-spacing: -.025em; }
h2 { font-size: clamp(27px, 3.4vw, 40px); max-width: 22ch; text-wrap: balance; }
#features-title { max-width: 30ch; }
h3 { font-size: 17px; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
svg { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.eyebrow.on-hero { color: var(--on-hero); opacity: .72; }
.lede { font-size: 18px; color: var(--text-2); max-width: 58ch; margin-top: 14px; }
.small-note { font-size: 14px; color: var(--text-2); margin-top: 16px; max-width: 70ch; }
.section > .wrap > .eyebrow + h2 { margin-top: 8px; }
.section { padding: 48px 0; }
@media (min-width: 900px) { .section { padding: 64px 0; } }
.money { white-space: nowrap; }
.pressable { transition: transform var(--snappy), opacity var(--snappy); }
.pressable:active { transform: scale(.97); opacity: .8; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; min-height: 44px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em; min-height: 44px; }
.app-icon { width: 34px; height: 34px; border-radius: 9px; stroke: none; box-shadow: 0 4px 12px rgba(46, 100, 184, .28); }
.store-badge { display: inline-flex; align-items: center; gap: 9px; background: #000; color: #fff; border: 1px solid #000; border-radius: 11px; padding: 6px 14px 6px 11px; min-height: 44px; cursor: pointer; text-align: left; }
.store-badge svg { width: 22px; height: 22px; stroke-width: 1.7; flex: none; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.store-badge-text small { font-size: 10px; font-weight: 500; letter-spacing: .02em; opacity: .85; }
@media (prefers-color-scheme: dark) { .store-badge { border-color: #4A5553; } }
@media (max-width: 420px) { .store-badge-text { font-size: 13px; } .brand span { font-size: 16px; } }

/* Hero */
.hero { padding: 48px 0 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 48px 0 80px; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero-copy h1 { margin-top: 10px; max-width: 14ch; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); font-size: 15px; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-device { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.device-hint { font-size: 14px; color: var(--text-2); text-align: center; max-width: 36ch; }
.device-hint em { font-style: normal; font-weight: 600; color: var(--text); }

/* Phone mockup */
.phone { width: 336px; max-width: 100%; padding: 10px; border-radius: 50px; background: var(--bezel); box-shadow: 0 30px 60px -20px rgba(11, 31, 58, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); position: relative; }
.screen { position: relative; height: 722px; border-radius: 40px; background: var(--page); overflow: hidden; font-size: 13px; line-height: 1.35; color: var(--text); display: flex; flex-direction: column; }
.island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 28px; border-radius: 16px; background: #000; z-index: 3; }
.status { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 0; height: 48px; font-size: 14px; font-weight: 600; flex: none; }
.status-icons { display: flex; gap: 5px; align-items: center; }
.status-icons i { display: block; background: currentColor; }
.status-icons .sig { width: 16px; height: 10px; clip-path: polygon(0 70%, 25% 70%, 25% 100%, 0 100%, 0 70%, 30% 50%, 55% 50%, 55% 100%, 30% 100%, 30% 50%, 60% 25%, 80% 25%, 80% 100%, 60% 100%, 60% 25%, 85% 0, 100% 0, 100% 100%, 85% 100%); }
.status-icons .wifi { width: 14px; height: 10px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.status-icons .bat { width: 24px; height: 11px; border-radius: 3px; opacity: .9; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; height: 40px; flex: none; }
.nav-title { font-weight: 600; font-size: 15px; }
.nav-right { display: flex; }
.nav-btn { width: 38px; height: 38px; border: 0; background: none; color: var(--accent); display: grid; place-items: center; border-radius: 10px; cursor: pointer; }
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn .ic-eye-slash { display: none; }
.is-masked .nav-btn .ic-eye { display: none; }
.is-masked .nav-btn .ic-eye-slash { display: block; }
.content { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.content::-webkit-scrollbar { display: none; }
.greeting { color: var(--text-2); font-size: 12px; margin-bottom: -6px; }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.hero-card { position: relative; color: var(--on-hero); padding: 18px; border-radius: var(--radius-hero); background: radial-gradient(260px 220px at 18% 22%, color-mix(in srgb, var(--hero-glow) 75%, transparent), transparent 100%), var(--hero-base); box-shadow: 0 12px 22px -4px color-mix(in srgb, var(--hero-glow) 35%, transparent); display: flex; flex-direction: column; gap: 14px; transition: background-color var(--smooth), box-shadow var(--smooth); }
.hero-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(to bottom, rgba(255, 255, 255, .28), rgba(255, 255, 255, .02)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stamp { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18); }
.money-hero { display: flex; align-items: baseline; gap: 1px; margin: 0; line-height: 1; transform-origin: left center; }
.money-hero .whole { font-size: 44px; font-weight: 600; letter-spacing: -.035em; }
.money-hero .cents { font-size: 18.5px; font-weight: 500; opacity: .72; }
.money-hero.swell { animation: swell .5s cubic-bezier(.25, .8, .25, 1); }
@keyframes swell { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.until { opacity: .8; font-size: 12.5px; margin-top: -8px; }
.hero-link { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; min-height: 32px; color: inherit; opacity: .85; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.hero-link .chev { width: 14px; height: 14px; stroke-width: 2.4; transition: transform var(--snappy); }
.hero-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.fold { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--smooth), opacity var(--smooth); margin-top: -16px; }
.fold.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.fold-inner { min-height: 0; overflow: hidden; }
.split { padding: 14px; }
.split-title { font-weight: 600; font-size: 13px; }
.split-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; background: var(--page); overflow: hidden; margin: 10px 0; }
.seg { display: block; height: 100%; width: 0; border-radius: 999px; transition: width var(--smooth) .2s; }
.seg.bills { background: var(--orange); } .seg.aside { background: var(--aside); } .seg.aside2 { background: var(--aside2); } .seg.safe { background: var(--accent); }
.fold.is-open .seg { width: var(--w); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li b { margin-left: auto; color: var(--text); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.bills { background: var(--orange); } .dot.aside { background: var(--aside); } .dot.aside2 { background: var(--aside2); } .dot.safe { background: var(--accent); }
.dot.c0 { background: var(--c0); } .dot.c1 { background: var(--c1); } .dot.c2 { background: var(--c2); } .dot.c3 { background: var(--c3); } .dot.c4 { background: var(--c4); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { padding: 12px; display: flex; gap: 10px; align-items: center; }
.tile-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tile-figure { font-size: 15px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; }
.tile-sub { font-size: 10.5px; color: var(--text-2); }
.tile-icon { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--aside) 18%, transparent); color: var(--aside); display: grid; place-items: center; flex: none; }
.tile-icon svg { width: 20px; height: 20px; }
.ring { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.ring svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--fill); }
.ring .fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; transition: stroke-dashoffset var(--smooth) .2s; }
.ring.is-in .fill { stroke-dashoffset: calc(150.8 * (1 - var(--f))); }
.ring-glyph { width: 12px; height: 12px; stroke-width: 3; color: var(--accent); }

.coming-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.coming-head h3 { font-size: 16px; }
.coming-head span { font-size: 11px; color: var(--text-2); }
.bill-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--smooth) .22s; }
.bill { min-height: 0; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hairline); transition: transform .4s cubic-bezier(.4, 0, .6, 1), opacity .4s; }
.bill-wrap.is-paid { grid-template-rows: 0fr; }
.bill-wrap.is-paid .bill { transform: translateX(110%); opacity: 0; }
.date { width: 40px; height: 40px; border-radius: 10px; background: var(--page); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.date small { font-size: 9px; font-weight: 700; } .date b { font-size: 15px; }
.date.soon { background: var(--warn-bg); color: var(--warn-text); }
.bill-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.bill-text b { font-weight: 600; font-size: 13px; }
.bill-text span { font-size: 10.5px; color: var(--text-2); }
.bill-amt { font-weight: 600; font-size: 12.5px; }
.bill-amt.muted { color: var(--text-2); }
.paid { border: 0; background: var(--soft); color: var(--on-soft); font-weight: 600; font-size: 12px; padding: 0 11px; height: 30px; border-radius: 999px; cursor: pointer; }
.more { font-size: 11px; color: var(--text-2); padding-top: 8px; }
.add-bill { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 13px; padding: 10px 0 0; }
.add-bill svg { width: 16px; height: 16px; stroke-width: 2.4; background: var(--accent); color: var(--on-accent); border-radius: 50%; padding: 3px; }
.foot-note { font-size: 10.5px; color: var(--text-2); }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 20px; border-top: 1px solid var(--hairline); background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(12px); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; color: var(--text-2); font-weight: 500; }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--accent); }

/* Banner: springs up from the bottom, dark in both modes. */
.banner { position: absolute; left: 12px; right: 12px; bottom: 74px; z-index: 5; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.35; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); transform: translateY(140%) scale(.96); transform-origin: bottom; opacity: 0; transition: transform var(--spring), opacity .3s; pointer-events: none; }
.banner::before { content: "i"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--banner-teal); color: var(--ink); font: 700 11px/16px Georgia, serif; text-align: center; margin-top: 1px; }
.banner.is-shown { transform: none; opacity: 1; pointer-events: auto; cursor: pointer; }
.page-banner { position: fixed; left: 50%; right: auto; bottom: 24px; width: min(520px, 100% - 32px); translate: -50% 0; font-size: 14px; padding: 12px 16px; z-index: 60; }
.page-banner::before { margin-top: 2px; }

/* Section 3: formula */
.formula { margin-top: 36px; padding: 24px; display: grid; gap: 28px; }
@media (min-width: 820px) { .formula { grid-template-columns: 1fr 1fr; gap: 40px; padding: 32px; } }
.formula-rows { list-style: none; margin: 0; padding: 0; }
.formula-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 16px; }
.formula-rows li:last-child { border-bottom: 0; }
.f-label { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.f-fig { font-weight: 600; font-size: 17px; }
.f-result { border-top: 2px solid var(--text); margin-top: 4px; padding-top: 14px; }
.f-result .f-label { color: var(--text); font-weight: 600; }
.f-result .f-fig { font-size: 22px; color: var(--accent); }
.stack { display: flex; gap: 3px; height: 28px; border-radius: 999px; background: var(--page); overflow: hidden; }
.formula.is-in .stack .seg { width: var(--w); }
.stack .seg:nth-child(1) { transition-delay: .2s; } .stack .seg:nth-child(2) { transition-delay: .5s; } .stack .seg:nth-child(3) { transition-delay: .75s; } .stack .seg:nth-child(4) { transition-delay: .95s; }
.legend-row { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.daily { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.daily-label { font-size: 15px; color: var(--text-2); }
.daily-figure { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.daily-figure b { font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; color: var(--accent); }
.daily-figure span { font-size: 18px; color: var(--text-2); }
.daily-note { font-size: 13px; color: var(--text-2); margin-top: 10px; max-width: 36ch; }

/* Section 4: calculator */
.ask-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .ask-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.ask-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; align-items: center; gap: 8px; background: var(--page); border-radius: 12px; padding: 0 14px; border: 1px solid transparent; transition: border-color var(--snappy); }
.field:focus-within { border-color: var(--accent); }
.field-symbol { font-size: 22px; color: var(--text-2); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 24px; font-weight: 600; min-height: 52px; color: var(--text); font-variant-numeric: tabular-nums; }
.field input::placeholder { color: var(--text-2); opacity: .7; font-weight: 500; }
.answer { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--soft); color: var(--on-soft); font-size: 16px; transition: background-color var(--snappy), color var(--snappy); }
.answer.is-no { background: var(--warn-bg); color: var(--warn-text); }
.answer.is-empty { background: var(--page); color: var(--text-2); }
.answer-icon { width: 22px; height: 22px; flex: none; stroke-width: 2.4; margin-top: 2px; border-radius: 50%; padding: 3px; background: currentColor; }
.answer-icon use { stroke: var(--soft); }
.answer.is-no .answer-icon use { stroke: var(--warn-bg); }
.answer.is-empty .answer-icon { display: none; }
.answer .verdict { font-weight: 700; }

/* Section 5: insights */
@media (min-width: 820px) { .insight-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.dots { display: flex; gap: 6px; }
.day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); }
.day.today small { color: var(--text); font-weight: 700; }

.bars { --h: 128px; position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: calc(var(--h) + 20px); padding-bottom: 20px; align-items: end; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bar i { display: block; height: calc(var(--v) / var(--max) * 100%); min-height: 2px; background: var(--accent); border-radius: 4px; transform: scaleY(0); transform-origin: bottom; transition: transform var(--smooth) .15s; }
.bar.over i { background: var(--orange); }
.bar.today i { background: var(--text); }
.bar small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 10px; color: var(--text-2); }
.is-in .bar i { transform: scaleY(1); }

.arc.c0 { stroke: var(--c0); transition-delay: .15s; } .arc.c1 { stroke: var(--c1); transition-delay: .3s; } .arc.c2 { stroke: var(--c2); transition-delay: .42s; } .arc.c3 { stroke: var(--c3); transition-delay: .52s; } .arc.c4 { stroke: var(--c4); transition-delay: .6s; }


/* Section 6: Add sheet */
@media (min-width: 900px) { .log-grid { grid-template-columns: 1fr 1fr; gap: 56px; } .log-grid .hero-device { order: -1; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 60px; z-index: 4; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transition: transform var(--smooth), opacity var(--smooth); box-shadow: 0 -2px 20px rgba(0, 0, 0, .12); }
.pick { flex: none; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 12px 5px 9px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--card); color: var(--text); cursor: pointer; text-align: left; }
.pick svg { width: 20px; height: 20px; color: var(--accent); }
.pick span { display: flex; flex-direction: column; line-height: 1.15; font-size: 12.5px; font-weight: 600; }
.pick small { font-size: 11px; font-weight: 500; color: var(--text-2); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }
.amount { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.placeholder { color: var(--text-2); opacity: .55; }
.preview { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--on-soft); margin-top: 8px; }
.preview svg { width: 15px; height: 15px; flex: none; margin-top: 1px; stroke-width: 2; }
.preview b { font-weight: 600; }
.save { margin: 8px 16px 22px; min-height: 46px; border: 0; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; cursor: pointer; transition: opacity var(--snappy), transform var(--snappy); }
.save:disabled { opacity: .45; cursor: default; }

/* Section 7: privacy */
.privacy-grid { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 640px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .privacy-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.p-item { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.p-item > svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--soft); color: var(--accent); stroke-width: 1.8; }
.p-item p { color: var(--text-2); font-size: 15px; }
@media (min-width: 640px) {
}
.widget { margin-top: 6px; align-self: flex-start; width: 160px; height: 160px; padding: 16px; border-radius: 26px; color: var(--on-hero); background: radial-gradient(160px 140px at 18% 22%, color-mix(in srgb, var(--hero-glow) 75%, transparent), transparent 100%), var(--hero-base); box-shadow: 0 10px 22px -6px color-mix(in srgb, var(--hero-glow) 35%, transparent); display: flex; flex-direction: column; justify-content: space-between; }

/* Section 8: table */
.lede.pro-rule { color: var(--text); }
.lede.pro-rule b { font-weight: 600; }
#features .privacy-grid { margin-top: 28px; }
@media (min-width: 980px) { #features .privacy-grid { grid-template-columns: repeat(4, 1fr); } }
.plans { display: grid; gap: 14px; margin-top: 28px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 18px; } }
.plan { padding: 24px; }
.plan h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan h3 span { font-size: 14px; font-weight: 600; color: var(--accent); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 15px; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan-pro { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); }
#video .video-frame { max-width: 860px; }
@media (max-width: 699px) {
}

/* Section 9: themes */
@media (min-width: 900px) { .themes-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }

/* Section 10: video */
.video-frame { margin: 32px 0 0; }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--hero-base); border-radius: var(--radius-hero); object-fit: cover; box-shadow: 0 12px 22px -4px color-mix(in srgb, var(--hero-glow) 35%, transparent); }
.video-fallback { display: block; position: relative; border-radius: var(--radius-hero); overflow: hidden; }
.video-fallback img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-fallback span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .72); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.video-frame figcaption { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.video-frame figcaption a { font-weight: 600; }

/* Footer */
.footer { border-top: 1px solid var(--hairline); padding: 40px 0 56px; color: var(--text-2); font-size: 14px; }
.disclaimer { max-width: 64ch; }
.footer-links { display: flex; gap: 20px; margin-top: 18px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.made { margin-top: 12px; }

/* Reduce Motion: end states at once, fades only. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --snappy: 0s; --smooth: 0s; --spring: 0s; }
  .fold, .banner, .sheet, .bill, .bar i, .seg, .ring .fill { transition: opacity .3s ease !important; transition-delay: 0s !important; transform: none !important; }
  /* The ring chart's arcs are placed by rotation, so keep their transform and drop only the motion. */
  .money-hero.swell { animation: none !important; }
  .pressable:active { transform: none; }
}

/* Shortfall variant of the hero (warm and orange, state also in words). */
.hero-card.is-short { --hero-base: #4A2410; --hero-glow: #D3651A; }
@media (prefers-color-scheme: dark) { .hero-card.is-short { --hero-base: #2C150A; --hero-glow: #B4551A; } }
.short-reason { font-size: 12px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); }

/* Grid items never widen past their track (inputs and long words otherwise push the page). */
.hero-grid > *, .ask-grid > *, .privacy-grid > *, .formula > * { min-width: 0; }
.field input { width: 100%; }
.p-item p, .lede { overflow-wrap: anywhere; }

/* Questions */
.faq { display: grid; gap: 10px; margin-top: 28px; max-width: 760px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; font-size: 17px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-2); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 20px 18px; color: var(--text-2); max-width: 62ch; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-card); }

/* Closing call to action */
.closing .wrap { text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing h2 { max-width: 20ch; }
.closing .lede { margin-bottom: 24px; }

/* Launch list */
.notify { width: 100%; max-width: 520px; }
.notify-row { display: flex; gap: 10px; }
.notify-input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--card); color: var(--text); font: inherit; font-size: 17px; }
.notify-input::placeholder { color: var(--text-2); opacity: .7; }
.notify-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.notify-input[aria-invalid="true"] { border-color: var(--orange); }
.notify .btn { flex: none; }
.notify .btn[disabled] { opacity: .6; cursor: progress; }
.notify-status { min-height: 1.5em; margin-top: 10px; font-size: 15px; font-weight: 500; }
.notify-status.is-error { color: var(--orange); }
.notify-status.is-done { color: var(--text); }
.notify-note { font-size: 13px; color: var(--text-2); }
.notify.is-done .notify-row, .notify.is-done .notify-note { display: none; }
@media (max-width: 520px) { .notify-row { flex-direction: column; } .notify .btn { width: 100%; } }
.notify-hero { margin-top: 26px; }
.notify-phone { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.closing .notify-phone { justify-content: center; }
.notify-phone legend { float: left; padding: 0; margin-right: 4px; }
.notify-phone label { position: relative; cursor: pointer; }
.notify-phone input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.notify-phone span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--card); color: var(--text); font-weight: 600; transition: background-color var(--snappy), color var(--snappy), border-color var(--snappy); }
.notify-phone input:checked + span { background: var(--soft); color: var(--on-soft); border-color: var(--accent); }
.notify-phone input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify.is-done .notify-phone { display: none; }
.hero-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 14px; font-size: 15px; font-weight: 600; }
.hero-links a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }

/* Try it */
.try-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .try-fields { grid-template-columns: 1fr; } }
.try-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.try-field .field input { font-size: 20px; min-height: 48px; }
.try-answer p { margin: 0; }
.try-answer .verdict { display: block; font-size: 20px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* Text pages (privacy, support) */
.doc { max-width: 44em; margin-inline: auto; padding: 28px var(--gutter) 72px; }
.doc nav { display: flex; gap: 20px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--hairline); font-weight: 600; }
.doc nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.doc nav a:first-child { color: var(--text); margin-right: auto; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 12px; }
.doc h2 { font-size: 22px; max-width: none; margin: 36px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text-2); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc li { margin-bottom: 10px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc code { font-size: .92em; background: var(--fill); padding: 1px 6px; border-radius: 6px; }
