/* Recovery Milestones — warm, hopeful, accessible, mobile-first. No web fonts (no third-party requests). */
:root {
  --root: #1f4d3a; --root-2: #2f6b52; --leaf: #6aa84f; --sun: #f2a541; --sun-soft: #fde7c4;
  --clay: #c8553d; --cream: #fbf7f0; --paper: #ffffff; --ink: #2a2a28; --muted: #5f5b53; --line: #eadfcc;
  --radius: 16px; --shadow: 0 2px 12px rgba(31, 77, 58, .08);
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.55 var(--sans); color: var(--ink); background: var(--cream); }
img, svg { max-width: 100%; }
a { color: var(--root); text-underline-offset: 2px; }
a:hover { color: var(--clay); }
h1, h2, h3 { font-family: var(--serif); color: var(--root); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); } h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 1000; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
main { padding: 24px 0 48px; min-height: 60vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { background: var(--root); color: var(--cream); position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand:hover { color: var(--sun-soft); }
.brand small { display: block; font-family: var(--sans); font-size: .72rem; opacity: .8; letter-spacing: .04em; }
.nav-toggle { background: none; border: 1px solid rgba(255,255,255,.4); color: var(--cream); border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; }
.site-nav { display: none; flex-direction: column; padding: 8px 0 16px; }
.site-nav.open { display: flex; }
.site-nav a { color: var(--cream); text-decoration: none; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-nav a[aria-current="page"] { color: var(--sun); }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; flex-direction: row; gap: 4px; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
  .site-nav a { border: 0; padding: 8px 10px; border-radius: 999px; font-size: .95rem; }
  .site-nav a:hover { background: rgba(255,255,255,.1); }
}
.demo-banner { background: var(--sun-soft); color: #5a3b00; font-size: .9rem; padding: 8px 0; border-bottom: 1px solid #f0c98a; }
.demo-banner .wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.demo-banner select { font: inherit; padding: 2px 6px; border-radius: 8px; }

/* footer */
.site-footer { background: #173a2c; color: #e9efe9; padding: 32px 0 24px; font-size: .95rem; }
.site-footer a { color: var(--sun-soft); }
.site-footer .crisis { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.site-footer .crisis strong { color: #fff; font-size: 1.05rem; }
.site-footer .cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer small { opacity: .8; }

/* building blocks */
.hero { background: radial-gradient(1200px 400px at 80% -10%, var(--sun-soft), transparent 60%), linear-gradient(180deg, #f6efe2, var(--cream)); padding: 40px 0 24px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40ch; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: #fffaf2; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; background: #eef4ef; color: var(--root); border: 1px solid #d5e5d9; }
.pill.warn { background: #fff4e0; color: #7a4b00; border-color: #f3d39c; }
.pill.gold { background: linear-gradient(90deg, #fbe3a6, #f6c86a); color: #5a3b00; border-color: #e9b54c; }
.pill.example { background: #f1ecff; color: #4b3a8a; border-color: #dcd2fb; }
.notice { border-left: 4px solid var(--sun); background: #fff8ea; padding: 12px 14px; border-radius: 8px; }
.notice.ok { border-color: var(--leaf); background: #f0f8ec; }
.notice.err { border-color: var(--clay); background: #fdeeea; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; background: var(--clay); color: #fff; }
.btn:hover { filter: brightness(1.05); color: #fff; }
.btn.secondary { background: var(--root); }
.btn.ghost { background: transparent; color: var(--root); border-color: var(--root); }
.btn.ghost:hover { background: #eef4ef; color: var(--root); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.google { background: #fff; color: #222; border-color: #dadce0; } .btn.google:hover { background: #f7f7f7; color: #222; }
.btn.facebook { background: #1877f2; } .btn.danger { background: #a3321f; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfc4b0; border-radius: 10px; background: #fff; min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--root); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--root); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }

/* dashboard */
.big-number { font: 700 clamp(3rem, 14vw, 5.5rem)/1 var(--serif); color: var(--root); }
.countdown { display: flex; gap: 10px; flex-wrap: wrap; }
.countdown div { background: var(--sun-soft); border-radius: 12px; padding: 10px 12px; min-width: 70px; text-align: center; }
.countdown b { display: block; font: 700 1.6rem var(--serif); color: #6b3d00; }
.progress { height: 14px; background: #efe6d6; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--sun)); border-radius: 999px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline li .dot { width: 14px; height: 14px; border-radius: 50%; background: #d8cfbf; flex: none; }
.timeline li.done .dot { background: var(--leaf); } .timeline li.next .dot { background: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); }
.streak { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.streak .flame { font-size: 2rem; }
.offer { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.offer.featured { border-color: #e9b54c; box-shadow: 0 0 0 2px #fbe3a6 inset; }
.code { font: 700 1.6rem/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; color: var(--root); }
.qr { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; border: 1px solid var(--line); }
.qr svg, .qr img { display: block; width: 180px; height: 180px; }

/* badges / chips */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
.chip { text-align: center; }
.chip .coin { width: 104px; height: 104px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 1.05rem/1.1 var(--serif); padding: 10px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), 0 4px 10px rgba(0,0,0,.12); border: 4px solid rgba(255,255,255,.6); }
.chip.dawn .coin { background: radial-gradient(circle at 35% 30%, #ffd59a, #e08a3c); }
.chip.sprout .coin { background: radial-gradient(circle at 35% 30%, #a6d98a, #3f8a4f); }
.chip.branch .coin { background: radial-gradient(circle at 35% 30%, #9cc9e6, #2d6c99); }
.chip.root .coin { background: radial-gradient(circle at 35% 30%, #ffe7a1, #c6922b); color: #3b2600; }
.chip.canopy .coin { background: radial-gradient(circle at 35% 30%, #e7c6ff, #7a4cb3); }
.chip.crown .coin { background: radial-gradient(circle at 35% 30%, #fff3c4, #b8860b); color: #3b2600; }
.chip.locked .coin { background: #e7e0d3; color: #8a8173; box-shadow: none; border-style: dashed; border-color: #cfc4b0; }
.chip .when { font-size: .8rem; color: var(--muted); }
.note { border-left: 4px solid var(--leaf); background: #fff; padding: 12px 14px; border-radius: 8px; }

/* celebration card */
.celebration { max-width: 560px; margin: 0 auto; text-align: center; border-radius: 24px; padding: 40px 24px; color: #fff;
  background: radial-gradient(600px 300px at 50% 0%, rgba(242,165,65,.55), transparent 70%), linear-gradient(160deg, #1f4d3a, #2f6b52 60%, #c8553d); box-shadow: 0 12px 40px rgba(31,77,58,.25); }
.celebration h1 { color: #fff; font-size: clamp(2.4rem, 10vw, 4rem); margin: 8px 0; }
.celebration .sub { font-size: 1.1rem; opacity: .95; }
.celebration blockquote { font: italic 1.15rem var(--serif); margin: 18px auto 0; max-width: 34ch; }

/* map */
#map { height: 60vh; min-height: 360px; border-radius: var(--radius); border: 1px solid var(--line); }
.map-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--root); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.map-pin.featured { background: var(--sun); width: 34px; height: 34px; }

/* tiers */
.tier { display: flex; flex-direction: column; }
.tier .price { font: 700 2rem var(--serif); color: var(--root); }
.tier ul { padding-left: 1.1em; flex: 1; }
.stat { text-align: center; } .stat b { display: block; font: 700 2.4rem var(--serif); color: var(--root); }

/* toast & modal */
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 200; max-width: 90vw; display: none; }
dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20, 30, 25, .55); }
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s; } }
@media print { .site-header, .site-footer, .demo-banner, .no-print { display: none !important; } }
