:root {
  --bg: #F8F1E4;
  --surface: #FFFDF8;
  --ink: #2B1A0E;
  --muted: #6E5038;
  --hair: #E5D8C3;
  --accent: #1E8443;
  --on-accent: #FFFFFF;
  --gold: #B7791F;
  --gold-tint: #FBEFD3;
  --green-tint: #E3F3E7;
  --nav-bg: rgba(248, 241, 228, 0.82);
  --badge-bg: #1B120B;
  --badge-ink: #FFFFFF;
  --shot-bg: #EFE4CF;
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16110C;
    --surface: #221A13;
    --ink: #F6EEE2;
    --muted: #BCA58C;
    --hair: #3A2D22;
    --accent: #3DCB6C;
    --on-accent: #10210F;
    --gold: #F0B94A;
    --gold-tint: #3A2C12;
    --green-tint: #17301F;
    --nav-bg: rgba(22, 17, 12, 0.82);
    --badge-bg: #F6EEE2;
    --badge-ink: #16110C;
    --shot-bg: #2A2118;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3, .brand, .btn, .store { font-family: var(--display); }
h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; margin: 0 0 14px; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 0 0 10px; font-weight: 600; text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.25; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--hair); }
.nav .wrap { display: flex; align-items: center; gap: 8px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 21px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--hair); }
.nav-links a[aria-current] { color: var(--accent); }
@media (max-width: 640px) { .nav-links a.opt { display: none; } .nav-links a { padding: 8px 8px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent);
  text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 999px; padding: 9px 16px; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; margin-top: -2px; }
.btn:hover, .store:hover { filter: brightness(1.08); }
.store {
  display: inline-flex; align-items: center; gap: 12px; background: var(--badge-bg); color: var(--badge-ink);
  text-decoration: none; border-radius: 14px; padding: 10px 20px 10px 16px; line-height: 1.1;
}
.store svg { width: 30px; height: 30px; fill: currentColor; flex: none; margin-top: -3px; }
.store small { display: block; font: 500 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; opacity: 0.85; }
.store b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Hero */
.hero { display: grid; gap: 36px; align-items: center; padding: 44px 0 20px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 0.9fr; padding: 72px 0 40px; } }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--green-tint); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }
.hero .lede { margin-bottom: 24px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--muted); }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }
.shot { background: #F8F1E4; border: 1px solid var(--hair); border-radius: 28px; padding: 22px 0 0; overflow: hidden; max-width: 360px; width: 100%; justify-self: center; }
.shot img { width: 100%; }

/* Sections */
section { padding: 44px 0; }
.sec-head { max-width: 620px; margin-bottom: 26px; }
.steps { display: grid; gap: 16px; }
@media (min-width: 700px) { .steps { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 22px; padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-tint); color: var(--accent); font: 600 17px var(--display); margin-bottom: 12px; }
.row { display: grid; gap: 28px; align-items: center; padding: 22px 0; }
@media (min-width: 820px) { .row { grid-template-columns: 1fr 1fr; gap: 56px; } .row.flip .shot { order: 2; } }
.row .shot { max-width: 340px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 7px 14px; font-size: 15px; font-weight: 500; }
.tools { display: grid; gap: 14px; }
@media (min-width: 620px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .tools { grid-template-columns: 1fr 1fr 1fr; } }
.tool { display: block; text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool strong { display: block; font: 600 19px var(--display); color: var(--accent); margin-bottom: 4px; }
.tool span { color: var(--muted); font-size: 15px; display: block; }
.band { background: var(--green-tint); border-radius: 28px; padding: 36px 24px; text-align: center; }
.band p { color: var(--muted); max-width: 30em; margin: 0 auto 20px; }
.cta { display: flex; gap: 16px; align-items: flex-start; background: var(--green-tint); border-radius: 22px; padding: 22px; margin: 28px 0; }
.cta img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.cta p { margin: 4px 0 14px; }
.cta strong { font: 600 19px var(--display); }
footer { border-top: 1px solid var(--hair); margin-top: 36px; padding: 28px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
footer a { color: var(--muted); }
footer .copy { margin-right: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tool { transition: none; } }

/* Calculator pages */
.page { padding: 32px 0 0; }
.page h1 { font-size: clamp(30px, 5vw, 42px); }
.page h2 { font-size: 24px; margin-top: 34px; }
.page h3 { font-size: 18px; margin-top: 20px; }
.calc { display: grid; gap: 16px; margin-top: 22px; }
@media (min-width: 720px) { .calc { grid-template-columns: 1.15fr 1fr; align-items: start; } }
form.card { display: grid; gap: 12px; }
.f { display: grid; gap: 4px; font-size: 14px; color: var(--muted); min-width: 0; }
.in { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--hair); border-radius: 12px; padding: 0 12px; min-height: 46px; }
.in:focus-within { border-color: var(--accent); }
.pre { color: var(--muted); font-size: 17px; }
input, select { font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 0; outline: 0; width: 100%; min-width: 0; padding: 8px 4px; font-variant-numeric: tabular-nums; }
input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.lab { margin: 4px 0 -4px; font-size: 14px; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; gap: 4px; text-align: center; font-size: 13px; color: var(--muted); }
.day input, .tc input { background: var(--bg); border: 1px solid var(--hair); border-radius: 10px; text-align: center; padding: 10px 2px; }
.day input:focus, .tc input:focus { border-color: var(--accent); }
.pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.tc { display: grid; gap: 6px; }
.tc-h, .tc-r { display: grid; grid-template-columns: 38px 1fr 1fr 64px 86px; gap: 6px; align-items: center; font-size: 14px; }
.tc-h { color: var(--muted); font-size: 12px; text-align: center; }
.tc-r span { color: var(--muted); }
.tc-r b { text-align: right; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.tc input { font-size: 15px; padding: 8px 2px; }
.tc input[type="time"] { font-size: 14px; padding: 9px 0; }
@media (max-width: 420px) { .tc-h, .tc-r { grid-template-columns: 32px 1fr 1fr 48px 70px; gap: 4px; } }
.result dl { margin: 0; }
.result dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.result dl div:last-child { border-bottom: 0; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.result .total dd { font: 600 26px var(--display); color: var(--accent); }
.result .total dt { color: var(--ink); font-weight: 600; align-self: center; }
.verdict { border-radius: 14px; padding: 14px 16px; margin-top: 12px; background: var(--green-tint); }
.verdict strong { font: 600 21px var(--display); color: var(--accent); }
.verdict.short { background: var(--gold-tint); }
.verdict.short strong { color: var(--gold); }
.verdict p { margin: 4px 0 0; font-size: 15px; }
.verdict b { white-space: nowrap; }

/* Motion */
.nav { transition: box-shadow 0.25s; }
.nav.scrolled { box-shadow: 0 6px 24px -12px rgba(43, 26, 14, 0.35); }
.btn, .store { transition: transform 0.15s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.15s; }
.btn:hover, .store:hover { transform: translateY(-1px); }
.btn:active, .store:active { transform: scale(0.97); }
.card { transition: border-color 0.2s, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s; }
.tool:hover, .steps .card:hover { box-shadow: 0 14px 30px -18px rgba(43, 26, 14, 0.45); }
.steps .card:hover { transform: translateY(-3px); }

.hero { position: relative; }
.glow { position: absolute; inset: -60px -20px 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.glow i:first-child { width: 380px; height: 380px; right: 2%; top: 4%; background: var(--green-tint); animation: drift 14s ease-in-out infinite alternate; }
.glow i:last-child { width: 300px; height: 300px; right: 26%; bottom: 0; background: var(--gold-tint); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 30px) scale(1.15); } }

.hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
h1 em { background: linear-gradient(var(--green-tint), var(--green-tint)) no-repeat 0 88% / 0 0.32em; animation: mark 0.7s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; border-radius: 4px; }
@keyframes mark { to { background-size: 100% 0.32em; } }

.hero-shot { position: relative; justify-self: center; width: 100%; max-width: 360px; animation: rise 0.9s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-shot .shot { animation: float 7s ease-in-out infinite; box-shadow: 0 30px 60px -30px rgba(43, 26, 14, 0.5); }
@keyframes float { 50% { transform: translateY(-8px); } }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--hair); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 12px 28px -14px rgba(43, 26, 14, 0.55); animation: pop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both, bob 6s ease-in-out infinite;
}
.chip b { color: var(--gold); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.chip.c1 { left: -14px; top: 13%; animation-delay: 0.9s, 0.9s; }
.chip.c2 { right: -14px; bottom: 16%; animation-delay: 1.2s, 2.4s; }
@media (max-width: 480px) { .chip.c1 { left: -6px; } .chip.c2 { right: -6px; } }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } }
@keyframes bob { 50% { translate: 0 -6px; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].shown { opacity: 1; transform: none; }
.js .row[data-reveal] .shot { transform: scale(0.94); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .row[data-reveal].shown .shot { transform: none; }
.js .tool[data-reveal].shown:hover { transform: translateY(-2px); transition-delay: 0s; }

.beaver { width: 120px; height: 120px; margin: -8px auto 6px; background: url(img/beaver-wave.png) 0 0 / 2640px 120px no-repeat; animation: wave 1.6s steps(21) infinite alternate; }
@keyframes wave { to { background-position: -2520px 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .row[data-reveal] .shot { opacity: 1; transform: none; }
  h1 em { background-size: 100% 0.32em; }
}
