/* Covered website. Tokens mirror CoveredDesign/Tokens/Colors.swift. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-Variable.ttf") format("truetype-variations"),
       url("/fonts/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #1f1c19;
  --canvas: #161412;
  --surface: #2f2b27;
  --panel: #2a2622;
  --hairline: #3a3530;
  --text: #f3ede4;
  --text-2: #a8a097;
  --text-3: #6f6860;
  --in-hand: #a9c98a;
  --landing: #e8b85a;
  --overspent: #e2836f;
  --radius: 14px;
  --measure: 680px;
  --wide: 1080px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1e8;
    --canvas: #ece6dd;
    --surface: #ebe4d8;
    --panel: #fffcf6;
    --hairline: #d9d1c4;
    --text: #1f1c19;
    --text-2: #6f6860;
    --text-3: #a8a097;
    --in-hand: #5d8f3c;
    --landing: #b07f1a;
    --overspent: #c4573f;
    color-scheme: light;
  }
  .button { color: #fff; }
  .screen .fab { color: #fff; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 "Bricolage Grotesque", -apple-system, system-ui, sans-serif;
  font-variation-settings: "opsz" 17;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--in-hand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { color: var(--text); font-weight: 600; }
p, li { color: var(--text-2); }
h1, h2, h3 { color: var(--text); font-weight: 500; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.05; font-variation-settings: "opsz" 60, "wdth" 92; }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; font-variation-settings: "opsz" 36; }
h3 { font-size: 20px; line-height: 1.3; }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.top .row {
  max-width: var(--wide); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.wordmark {
  color: var(--text); font-weight: 600; font-size: 19px; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark img { width: 26px; height: 26px; border-radius: 7px; }
.wordmark:hover { text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.top nav a { color: var(--text-2); font-size: 15px; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav .button { margin-left: 6px; }
@media (max-width: 560px) { .top nav a:not(.button) { display: none; } }

/* Buttons: what happens, no arrows. */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  background: var(--in-hand); color: #1f1c19; font-weight: 600; font-size: 16px;
  border: 0; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.button:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.quiet { background: transparent; color: var(--text); border: 1px solid var(--hairline); }
.button.quiet:hover { border-color: var(--text-3); filter: none; }
.top nav .button { min-height: 38px; padding: 0 16px; font-size: 15px; }

/* Layout */
main { display: block; }
.section { max-width: var(--wide); margin: 0 auto; padding: 88px 20px; }
.section + .section { border-top: 1px solid var(--hairline); }
.section.tight { padding: 64px 20px; }
.lede { font-size: 20px; line-height: 1.45; max-width: 34em; margin: 18px 0 0; }
.note { font-size: 14px; color: var(--text-3); margin: 14px 0 0; }
.legal main, .prose { max-width: var(--measure); margin: 0 auto; padding: 56px 20px 112px; }
.prose h1 { font-size: 34px; margin-bottom: 8px; }
.prose h2 { font-size: 22px; margin: 36px 0 8px; }
.prose p, .prose li { margin: 8px 0; }
.prose ul { padding-left: 20px; }
.prose li { padding-left: 4px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; padding-top: 72px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; } }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* Phone mock. The app has no cards; the phone frame is the one exception on the web. */
.phone {
  margin: 0 auto; width: min(100%, 360px);
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: 40px; padding: 18px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.screen { background: var(--bg); border-radius: 28px; padding: 26px 22px 84px; min-height: 560px; display: flex; flex-direction: column; }
.screen .period { color: var(--text-2); font-size: 14px; }
.screen .headline { margin-top: 18px; }
.screen .figure {
  display: inline-flex; align-items: flex-start; line-height: .9;
  font-size: 84px; font-weight: 500; letter-spacing: -0.03em;
  font-variation-settings: "opsz" 96, "wdth" 82; font-variant-numeric: tabular-nums;
}
.screen .figure sup { font-size: .38em; margin-top: .32em; margin-right: 2px; font-weight: 500; color: var(--text-2); }
.screen .goal { margin: 8px 0 0; font-size: 17px; color: var(--text); }
.screen .hours { margin: 4px 0 0; font-size: 15px; color: var(--text-2); }
.screen .rows { margin-top: auto; }
.screen .r {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--text);
}
.screen .r small { display: block; color: var(--text-2); font-size: 13px; }
.screen .r .amt { font-variant-numeric: tabular-nums; }
.screen .r .amt.land { color: var(--landing); }
.screen .r .amt.hand { color: var(--in-hand); }
.screen .r .amt.gap { color: var(--text); }
.screen .fab {
  position: absolute; right: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--in-hand); display: grid; place-items: center; color: #1f1c19; font-size: 26px; font-weight: 500;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.5);
}
.screen { position: relative; }
.caption { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 14px; }

/* The three-state bar */
.bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; margin-top: 22px; gap: 2px; }
.bar > span { display: block; height: 100%; }
.bar .hand { background: var(--in-hand); }
.bar .land {
  background: repeating-linear-gradient(135deg, var(--landing) 0 3px, transparent 3px 7px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--landing) 55%, transparent);
}
.bar .gap { box-shadow: inset 0 0 0 1.5px var(--text); border-radius: 0 3px 3px 0; }
.bar.big { height: 22px; margin-top: 0; }
.legend { display: flex; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.legend b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.legend i.hand { background: var(--in-hand); }
.legend i.land { background: repeating-linear-gradient(135deg, var(--landing) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--landing); }
.legend i.gap { box-shadow: inset 0 0 0 1.5px var(--text); }

@keyframes grow { from { flex-basis: 0; } }
.bar.animate > span { animation: grow .9s cubic-bezier(.2,.7,.2,1) both; }
.bar.animate > span:nth-child(2) { animation-delay: .25s; }
.bar.animate > span:nth-child(3) { animation-delay: .5s; }
@media (prefers-reduced-motion: reduce) { .bar.animate > span { animation: none; } }

/* Three states */
.states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
@media (max-width: 720px) { .states { grid-template-columns: 1fr; gap: 24px; } }
.state .swatch { height: 22px; border-radius: 4px; margin-bottom: 16px; }
.state .swatch.hand { background: var(--in-hand); }
.state .swatch.land { background: repeating-linear-gradient(135deg, var(--landing) 0 4px, transparent 4px 9px); box-shadow: inset 0 0 0 1px var(--landing); }
.state .swatch.gap { box-shadow: inset 0 0 0 1.5px var(--text); }
.state p { margin: 6px 0 0; }

/* Feature rows: structure from hairlines, not cards. */
.features { margin-top: 40px; border-top: 1px solid var(--hairline); }
.feature {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; gap: 8px; } }
.feature p { margin: 0; max-width: 40em; }

/* Split section: widget */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.widget {
  width: 170px; height: 170px; border-radius: 34px; background: var(--panel); border: 1px solid var(--hairline);
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between; margin: 0 auto;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.6);
}
.widget .label { font-size: 12px; color: var(--text-2); }
.widget .big { font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; font-variation-settings: "opsz" 44, "wdth" 85; font-variant-numeric: tabular-nums; }
.widget .big sup { font-size: .4em; vertical-align: .55em; margin-right: 1px; color: var(--text-2); }
.widget .bar { height: 10px; margin-top: 10px; }
.lock { background: var(--canvas); border: 1px solid var(--hairline); border-radius: 28px; padding: 36px 24px; }
.lock .time { text-align: center; font-size: 56px; font-weight: 300; letter-spacing: -0.02em; font-variation-settings: "opsz" 56, "wdth" 90; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.notif { margin: 22px auto 0; max-width: 320px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 18px; padding: 12px 14px; font-size: 14px; }
.notif b { display: block; color: var(--text); font-weight: 500; }
.notif span { color: var(--text-2); }
.notif .acts { display: flex; gap: 8px; margin-top: 10px; }
.notif .acts em { font-style: normal; font-size: 13px; padding: 6px 12px; border-radius: 10px; background: var(--surface); color: var(--text); }

/* FAQ */
.faq { margin-top: 32px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-size: 19px; color: var(--text); font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 300; font-size: 24px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; max-width: 44em; }

/* Closing */
.closing { text-align: center; }
.closing .cta { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--hairline); }
footer .row {
  max-width: var(--wide); margin: 0 auto; padding: 28px 20px 48px;
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 14px; color: var(--text-3);
}
footer .row a { color: var(--text-2); }
footer .row .spacer { flex: 1; }

/* ---------- Landing page v2 ---------- */
body::before {
  /* Paper grain. Barely there, keeps the charcoal from reading flat. */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: light) { body::before { opacity: .035; } }
header, main, footer { position: relative; z-index: 1; }

/* Hero v2 */
.hero { position: relative; align-items: start; padding-top: 56px; padding-bottom: 56px; }
.hero > div:first-child { padding-top: 40px; }
.hero::after {
  content: ""; position: absolute; right: 8%; top: 18%; width: 520px; height: 520px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--in-hand) 16%, transparent), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
h1 { font-size: clamp(38px, 5.6vw, 68px); }
.hero h1 em { font-style: normal; color: var(--in-hand); }
.kicker { color: var(--text-2); font-size: 15px; margin: 0 0 18px; }
.kicker b { color: var(--text); font-weight: 500; }
.kicker .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--in-hand); margin: 0 10px 2px 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; } .reveal[data-delay="2"] { transition-delay: .2s; } .reveal[data-delay="3"] { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Phone v2: Home above, the Log-a-shift sheet below, both live. */
.phone { width: min(100%, 380px); }
.screen { padding: 24px 20px 0; min-height: 0; overflow: hidden; }
.screen .figure { font-size: 68px; transition: color .3s ease; }
.screen .figure.covered { font-size: 56px; color: var(--in-hand); letter-spacing: -0.02em; font-variation-settings: "opsz" 60, "wdth" 90; line-height: 1; }
.screen .goal, .screen .hours { transition: opacity .2s ease; }
.bar > span { transition: flex-basis .45s cubic-bezier(.2,.7,.2,1); }
.bar .gap { transition: flex-basis .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease; }
.screen .rows { margin-top: 12px; }
.screen .r { padding: 9px 0; font-size: 14px; }
.screen .r .amt.ok { color: var(--in-hand); }
.sheet {
  margin: 14px -20px 0; background: var(--panel); border-radius: 22px 22px 0 0; padding: 8px 20px 14px;
  box-shadow: 0 -12px 40px -20px rgba(0,0,0,.7); border-top: 1px solid var(--hairline);
}
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--hairline); margin: 0 auto 8px; }
.sheet h4 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--text); text-align: center; }
.sheet .hint { text-align: center; color: var(--text-3); font-size: 12.5px; margin: 0 0 4px; }
.field { padding: 7px 0 4px; border-top: 1px solid var(--hairline); }
.field .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field label { color: var(--text); font-size: 15px; }
.field label small { display: block; color: var(--text-2); font-size: 12.5px; }
.field output { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 500; color: var(--text); font-variation-settings: "opsz" 24, "wdth" 90; }
.field output.land { color: var(--landing); }
.field output.hand { color: var(--in-hand); }
.field input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer;
}
.field input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--hairline); }
.field input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--hairline); }
.field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; margin-top: -10px;
  background: var(--text); border: 4px solid var(--panel); box-shadow: 0 0 0 1px var(--hairline), 0 6px 14px -6px rgba(0,0,0,.6);
}
.field input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 4px solid var(--panel); box-shadow: 0 0 0 1px var(--hairline);
}
.field input[type=range]:focus-visible { outline: 2px solid var(--in-hand); outline-offset: 4px; border-radius: 4px; }
.sheet .save { margin-top: 12px; width: 100%; }
.try { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; margin-top: 14px; }
.try i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--landing); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .7 } 50% { transform: scale(1.5); opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .try i { animation: none; } }

/* Week scrubber */
.week { margin-top: 44px; }
.week .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week .day { border-top: 1px solid var(--hairline); padding-top: 12px; min-height: 190px; position: relative; transition: border-color .3s ease; }
.week .day.today { border-top-color: var(--text); }
.week .day.past { border-top-color: var(--text-3); }
.week .day .name { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.week .day.today .name { color: var(--text); font-weight: 600; }
.week .item { margin-top: 8px; padding: 8px 8px 9px; border-radius: 8px; font-size: 13px; color: var(--text); line-height: 1.25; transition: background .3s ease, box-shadow .3s ease, color .3s ease; }
.week .item b { display: block; font-weight: 500; font-variant-numeric: tabular-nums; font-size: 15px; }
.week .item small { display: block; color: var(--text-2); font-size: 11.5px; margin-top: 2px; }
.week .item { position: relative; background: var(--panel); padding-top: 14px; overflow: hidden; }
.week .item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; transition: background .3s ease; }
.week .item.land { box-shadow: inset 0 0 0 1px var(--landing); }
.week .item.land::before { background: repeating-linear-gradient(135deg, var(--landing) 0 3px, transparent 3px 7px); }
.week .item.hand { box-shadow: inset 0 0 0 1px var(--in-hand); }
.week .item.hand::before { background: var(--in-hand); }
.week .item.due::before { box-shadow: inset 0 -1.5px 0 var(--text); height: 7px; }
.week .item.due.ok::before { box-shadow: none; background: var(--in-hand); }

.week .item.due { box-shadow: inset 0 0 0 1.5px var(--text); }
.week .item.due.ok { box-shadow: inset 0 0 0 1.5px var(--in-hand); color: var(--in-hand); }
.week .scrub { margin-top: 26px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.week .scrub label { font-size: 15px; color: var(--text-2); white-space: nowrap; }
.week .scrub label b { color: var(--text); font-weight: 500; }
.week .scrub input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; }
.week .scrub input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--hairline); }
.week .scrub input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--hairline); }
.week .scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -11px; background: var(--in-hand); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--hairline); }
.week .scrub input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--in-hand); border: 4px solid var(--bg); }
.week .scrub input[type=range]:focus-visible { outline: 2px solid var(--in-hand); outline-offset: 4px; border-radius: 4px; }
.week .totals { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; margin-top: 22px; justify-content: start; }
.week .totals div { font-size: 14px; color: var(--text-2); }
.week .totals b { display: block; font-size: 30px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 32, "wdth" 88; letter-spacing: -0.01em; }
.week .totals b.hand { color: var(--in-hand); } .week .totals b.land { color: var(--landing); }
@media (max-width: 720px) {
  .week .days { gap: 4px; }
  .week .day { min-height: 150px; }
  .week .item { padding: 6px 5px 7px; font-size: 11px; border-radius: 6px; }
  .week .item b { font-size: 13px; } .week .item small { display: none; }
  .week .scrub { grid-template-columns: 1fr; gap: 6px; }
}

/* Envelopes */
.envelopes { margin-top: 36px; border-top: 1px solid var(--hairline); max-width: 720px; }
.env { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; padding: 18px 0; border-bottom: 1px solid var(--hairline); align-items: baseline; }
.env .n { color: var(--text); font-size: 18px; }
.env .a { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }
.env .s { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; }
.env .s.ok { color: var(--in-hand); } .env .s.short { color: var(--landing); } .env .s.over { color: var(--overspent); }
.env .bar { grid-column: 1 / -1; height: 8px; margin-top: 6px; }
.env .bar .full { background: var(--in-hand); }
.env .bar .rest { background: var(--hairline); }
.env .bar .over { background: var(--overspent); }

/* Numbers section */
.big-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
@media (max-width: 720px) { .big-numbers { grid-template-columns: 1fr; gap: 24px; } }
.big-numbers b { display: block; font-size: clamp(44px, 6vw, 72px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--text); font-variation-settings: "opsz" 72, "wdth" 82; font-variant-numeric: tabular-nums; }
.big-numbers p { margin: 10px 0 0; max-width: 24em; }
