@font-face {
  font-family: "Baloo 2";
  src: url("assets/Baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* Palette from the app (lib/ui/theme.dart) */
:root {
  --bark: #5a3a1f;
  --bark2: #7b5030;
  --plank: #b67c45;
  --straw: #fff3cc;
  --straw2: #fbe8b0;
  --straw3: #ead08e;
  --paper: #fffaf0;
  --ink: #3d2914;
  --ink2: #7a5a39;
  --leaf: #4bb02e;
  --leaf-d: #2f7f1b;
  --gold: #ffc52e;
  --gold-d: #d48f0a;
  --sky: #2f9fd0;
  --sky-light: #8fd3f4;
  --grass: #7ccf4a;

  --radius: 22px;
  --shadow: 0 5px 0 rgba(90, 58, 31, .25);
  --shadow-lg: 0 24px 50px -18px rgba(61, 41, 20, .45);
  --wrap: 1160px;
  --gutter: 20px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  font-family: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--gold); padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold-d); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px 10px;
  border-radius: 16px;
  border: 3px solid var(--bark);
  font: inherit; font-weight: 800; font-size: 18px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--bark);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 5px 0 var(--bark); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark); }
.btn-gold { background: linear-gradient(#ffdb63, var(--gold)); color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-sm { padding: 6px 16px 4px; font-size: 16px; border-width: 2.5px; box-shadow: 0 3px 0 var(--bark); }
.btn-lg { padding: 16px 30px 14px; font-size: 20px; }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 190px;
  padding: 9px 18px 7px 14px;
  border-radius: 14px;
  border: 3px solid var(--bark);
  background: #1d140b; color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--bark);
  transition: transform .12s ease, box-shadow .12s ease;
}
.store:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--bark); }
.store:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark); }
.store svg { flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 800; font-size: 19px; line-height: 1.05; }
.store small { font-weight: 600; font-size: 12px; opacity: .85; letter-spacing: .02em; }
.store-web { background: linear-gradient(#ffdb63, var(--gold)); color: var(--ink); }
.download .stores { justify-content: center; margin-top: 4px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(47, 159, 208, .0);
  transition: background .25s ease, box-shadow .25s ease;
}
.nav.scrolled {
  background: rgba(255, 250, 240, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 0 rgba(90, 58, 31, .12);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 24px; }
.brand img { border-radius: 11px; border: 2.5px solid var(--bark); }
.nav:not(.scrolled) .brand { color: #fff; text-shadow: 0 2px 0 rgba(20, 70, 100, .35); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 700; color: var(--ink); opacity: .85; }
.nav-links a:not(.btn):hover { opacity: 1; }
.nav:not(.scrolled) .nav-links a:not(.btn) { color: #fff; opacity: .95; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--nav-h));
  padding: calc(var(--nav-h) + 48px) 0 140px;
  background: linear-gradient(180deg, var(--sky) 0%, #57b8e4 55%, var(--sky-light) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  text-shadow: 0 4px 0 rgba(20, 70, 100, .35);
  margin: 18px 0 18px;
}
.lead { font-size: 20px; max-width: 34em; opacity: .97; }
.pill {
  display: inline-block;
  background: var(--straw); color: var(--ink);
  border: 2.5px solid var(--bark);
  border-radius: 999px;
  padding: 4px 16px 2px;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 3px 0 rgba(90, 58, 31, .35);
}
.hero-stats { list-style: none; padding: 0; margin: 34px 0 0; display: flex; gap: 30px; flex-wrap: wrap; font-weight: 700; }
.hero-stats strong { display: block; font-size: 38px; line-height: 1; color: #fff; text-shadow: 0 3px 0 rgba(20, 70, 100, .3); }

.hero-art { position: relative; height: 600px; }
.shot {
  position: absolute;
  width: 270px;
  border-radius: 34px;
  border: 5px solid var(--bark);
  box-shadow: var(--shadow-lg);
  background: var(--sky);
}
.shot-front { left: 8%; top: 10px; transform: rotate(-5deg); z-index: 2; animation: bob 6s ease-in-out infinite; }
.shot-back { right: 4%; top: 60px; transform: rotate(6deg); animation: bob 6s ease-in-out -3s infinite; }
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
.chip {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--bark); border-radius: 999px;
  padding: 6px 16px 4px 8px;
  font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 0 rgba(90, 58, 31, .35);
  animation: pop 5s ease-in-out infinite;
}
.chip-a { left: -4%; top: 38%; }
.chip-b { right: -2%; top: 18%; animation-delay: -1.6s; }
.chip-c { right: 10%; bottom: 8%; animation-delay: -3.2s; }
@keyframes pop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

.sun {
  position: absolute; top: -70px; right: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, #fff6b0 0 45%, #ffd84a 46% 60%, rgba(255, 216, 74, .25) 61% 100%);
  z-index: 1;
}
.cloud {
  position: absolute; z-index: 1;
  width: 180px; height: 56px; border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  animation: drift 60s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 80px; height: 80px; left: 26px; top: -38px; }
.cloud::after { width: 60px; height: 60px; left: 90px; top: -26px; }
.c1 { top: 130px; left: -200px; }
.c2 { top: 300px; left: -200px; transform: scale(.7); animation-duration: 85s; animation-delay: -40s; opacity: .7; }
@keyframes drift { to { translate: calc(100vw + 400px) 0; } }

.hills {
  position: absolute; left: -5%; right: -5%; bottom: -2px; height: 120px; z-index: 1;
  background:
    radial-gradient(60% 120% at 25% 100%, var(--grass) 0 70%, transparent 71%),
    radial-gradient(55% 110% at 80% 100%, #69c23a 0 70%, transparent 71%);
}
.hills::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background: var(--paper);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Sections */
.section { padding: 96px 0; }
.section-sky { background: linear-gradient(180deg, #e8f6fd, #cfeefc); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 10px; }
.section-head p:not(.eyebrow) { color: var(--ink2); font-size: 19px; }
.eyebrow {
  display: inline-block; margin-bottom: 8px;
  font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--leaf-d);
}

.card {
  background: var(--straw);
  border: 3px solid var(--bark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; padding: 34px 28px 30px; text-align: center; }
.step img { margin: 0 auto 14px; }
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { color: var(--ink2); }
.step-num {
  position: absolute; top: -18px; left: 50%; translate: -50% 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-weight: 800; font-size: 20px; padding-top: 2px;
  border: 3px solid var(--bark);
}

/* Band */
.band {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, var(--bark2), var(--bark));
  color: var(--straw);
  padding: 90px 0;
}
.band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.band .eyebrow { color: var(--gold); }
.band h2 { font-size: clamp(32px, 4.2vw, 46px); color: #fff; margin-bottom: 16px; }
.band-copy > p { font-size: 19px; opacity: .92; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 36px; font-weight: 700; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; font-size: 15px;
  background: var(--leaf); color: #fff; border: 2px solid var(--straw);
}
.band-art { margin: 0; }
.band-art img {
  border-radius: 26px; border: 5px solid var(--straw3);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 90%;
  width: 100%;
}

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { padding: 24px 22px 22px; transition: transform .2s ease; }
.feature:hover { transform: translateY(-4px) rotate(-.5deg); }
.feature img { margin-bottom: 12px; }
.feature h3 { font-size: 22px; margin-bottom: 6px; }
.feature p { color: var(--ink2); font-size: 17px; }

/* Leaderboard */
.section-meadow { background: linear-gradient(180deg, #f1fae6, #dcf2c6); }
.social-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.social-copy h2 { font-size: clamp(32px, 4.2vw, 46px); margin-bottom: 16px; }
.social-copy > p { font-size: 19px; color: var(--ink2); }
.ticks-ink li::before { border-color: var(--bark); }

.board { margin: 0; max-width: 470px; width: 100%; justify-self: center; }
.board figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--ink2); }
.board-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 5px; margin-bottom: 14px;
  background: var(--straw2); border-radius: 16px;
}
.board-tabs button {
  font: inherit; font-weight: 800; font-size: 17px; color: var(--ink2);
  padding: 8px 0 6px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.board-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--straw3); }
.board-panel {
  padding: 14px 16px 16px;
  background: var(--straw); border: 3px solid var(--bark); border-radius: 20px;
  box-shadow: 0 4px 0 var(--bark), var(--shadow-lg);
}
.board-title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.board-sub { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 12px; }
.board [data-weekly] { transition: opacity .18s ease; }
.board.swapping [data-weekly] { opacity: 0; }

.podium { list-style: none; padding: 4px 0 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pod-1 { order: 2; }
.pod-2 { order: 1; }
.pod-3 { order: 3; }
.pod-crown { font-size: 24px; line-height: 1.1; }
.pod-ava {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--pod-edge);
}
.pod-1 .pod-ava { width: 68px; height: 68px; }
.pod-name { margin-top: 4px; font-weight: 800; font-size: 15px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-xp { font-weight: 800; font-size: 13px; color: var(--leaf-d); }
.pod-bar {
  width: 100%; height: var(--pod-h); margin-top: 6px; padding-top: 4px;
  background: var(--pod-fill); border: 3px solid var(--bark); border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 6px 0 -3px var(--pod-edge);
  display: flex; justify-content: center;
}
.pod-bar b { font-size: 26px; font-weight: 800; line-height: 1.3; }
.pod-1 .pod-bar b { font-size: 32px; }
.pod-1 { --pod-fill: var(--gold); --pod-edge: var(--gold-d); --pod-h: 104px; }
.pod-2 { --pod-fill: #c9d1d9; --pod-edge: #8a96a3; --pod-h: 78px; }
.pod-3 { --pod-fill: #e0a06a; --pod-edge: #a8683a; --pod-h: 58px; }

.board-rows { list-style: none; padding: 0; margin: 0; border-top: 3px solid var(--bark); }
.board-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.board-row + .board-row { border-top: 2px solid var(--straw3); }
.board-row.board-me { margin-top: 10px; padding: 8px 10px; border: 0; border-radius: 14px; background: #e3f5d3; }
.row-rank { width: 28px; flex: none; text-align: center; font-weight: 800; font-size: 17px; color: var(--ink2); }
.row-ava {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--bark);
}
.board-me .row-ava { border: 3px solid var(--leaf); }
.row-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.row-who strong, .row-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-who strong { font-size: 16px; }
.row-who small { font-size: 13px; font-weight: 600; color: var(--ink2); }
.row-xp { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.row-xp strong { font-size: 17px; color: var(--leaf-d); }
.row-xp small { font-size: 12px; font-weight: 700; color: var(--ink2); }
.row-visit {
  flex: none; padding: 4px 10px 2px; border-radius: 10px;
  font-size: 13px; font-weight: 800; white-space: nowrap;
  background: var(--leaf); color: #fff; border: 2px solid var(--bark); box-shadow: 0 2px 0 var(--bark);
}
.row-visit.row-lock { background: var(--paper); color: inherit; }

@media (max-width: 860px) {
  .social-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 400px) {
  .row-visit { display: none; }
  .pod-name { font-size: 14px; }
}

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; max-width: 1180px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px 24px 24px; }
.plan-tag { position: absolute; top: -13px; left: 24px; margin: 0; padding: 3px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
@media (max-width: 1100px) and (min-width: 861px) { .plans { grid-template-columns: repeat(2, 1fr); max-width: 760px; } }
.plan h3 { font-size: 24px; margin-bottom: 4px; }
.plan-price { color: var(--ink2); font-weight: 700; }
.plan-price span { font-size: 44px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.plan-desc { color: var(--ink2); margin: 4px 0 16px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan-list li { position: relative; padding-left: 30px; margin-bottom: 8px; font-size: 17px; }
.plan-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-size: 13px; font-weight: 800;
}
.plan-pick { background: #eaf7dc; transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.plan-pick.reveal.in { transform: translateY(-8px); }
.plan-note { text-align: center; color: var(--ink2); font-size: 15px; max-width: 640px; margin: 30px auto 0; }

/* Carousel */
.carousel { position: relative; }
.car-track {
  list-style: none; margin: 0; padding: 8px 4px 24px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 22px) / 4.4);
  gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track li { scroll-snap-align: start; }
.car-item {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 26px;
}
.car-item img {
  width: 100%; height: auto; border-radius: 26px;
  border: 4px solid var(--bark);
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.car-item:hover img { transform: translateY(-4px); }
.car-btn {
  position: absolute; top: 45%; z-index: 2; translate: 0 -50%;
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--bark); background: var(--gold); color: var(--ink);
  font-size: 34px; line-height: 1; padding-bottom: 4px; cursor: pointer;
  box-shadow: 0 4px 0 var(--bark);
}
.car-btn:disabled { opacity: .35; cursor: default; }
.prev { left: -18px; }
.next { right: -18px; }
.car-dots { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.car-dots button {
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 2px solid var(--bark); background: transparent; cursor: pointer;
}
.car-dots button[aria-selected="true"] { background: var(--bark); }

/* FAQ */
.faq { display: grid; gap: 14px; }
.faq details { padding: 0; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 60px 16px 24px; position: relative;
  font-weight: 800; font-size: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 14px 3px no-repeat,
    linear-gradient(#fff, #fff) center / 3px 14px no-repeat,
    var(--leaf);
  transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 24px 20px; color: var(--ink2); }

/* Download */
.download {
  position: relative;
  padding: 100px 0 170px;
  text-align: center;
  background: linear-gradient(180deg, var(--paper), var(--sky-light) 30%, var(--sky));
  color: #fff;
  overflow: hidden;
}
.download-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dl-icon { border-radius: 28px; border: 4px solid var(--bark); box-shadow: var(--shadow-lg); margin-bottom: 8px; }
.download h2 { font-size: clamp(34px, 5vw, 54px); text-shadow: 0 4px 0 rgba(20, 70, 100, .35); }
.download p { font-size: 20px; margin-bottom: 14px; }
.hills-bottom::after { display: none; }

/* Footer */
.footer { background: var(--leaf-d); color: #e9f7df; padding: 64px 0 0; }
.footer a { text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; }
.footer-logo img { width: 88px; height: 88px; border-radius: 22px; border: 3px solid #1f5a12; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.footer-name { margin-top: 18px; font-size: 40px; font-weight: 800; line-height: 1; color: #fff; }
.footer-tag { margin-top: 6px; font-size: 22px; font-weight: 600; color: #fff; }
.footer-dl { margin-top: 26px; font-size: 17px; opacity: .8; }
.footer-stores { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 12px; }
.footer-stores .store { min-width: 210px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h2 { font-size: 22px; color: #fff; margin: 0 0 12px; }
.footer-col ul + h2 { margin-top: 34px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { font-size: 17px; font-weight: 600; color: #e9f7df; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 52px; padding-top: 20px; padding-bottom: 24px; position: relative; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgba(233, 247, 223, .25); }
.copy { opacity: .8; font-size: 15px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 24px;
  background: rgba(24, 44, 18, .85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lb-img { max-height: 90vh; max-width: min(440px, 80vw); border-radius: 28px; border: 4px solid var(--bark); }
.lb-close, .lb-nav {
  border: 3px solid var(--bark); background: var(--gold); color: var(--ink);
  border-radius: 50%; width: 52px; height: 52px; font-size: 32px; line-height: 1; cursor: pointer;
  padding-bottom: 4px; box-shadow: 0 4px 0 var(--bark); flex: none;
}
.lb-close { position: absolute; top: 18px; right: 18px; }

/* Research charts */
.section-science { background: linear-gradient(180deg, var(--paper), var(--straw) 60%, var(--paper)); }
.viz { margin: 0; padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 14px; }
.viz figcaption h3 { font-size: 24px; margin-bottom: 4px; }
.viz figcaption p, .viz p { color: var(--ink2); font-size: 17px; }
.viz strong { color: var(--ink); }
.viz-src { font-size: 14px !important; margin-top: auto; }
.viz-src a { color: var(--leaf-d); font-weight: 700; }
.viz-src cite { font-style: normal; }

/* Habit curve */
.curve-wrap { position: relative; padding: 8px 0 30px 26px; }
.curve-y {
  position: absolute; left: 0; top: 50%; translate: 0 -50%; rotate: -90deg; transform-origin: center;
  font-size: 13px; font-weight: 700; color: var(--ink2); white-space: nowrap; width: 0; display: flex; justify-content: center;
}
.curve { position: relative; height: clamp(180px, 24vw, 260px); }
.curve svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.curve-grid { stroke: var(--straw3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.curve-area { fill: var(--leaf); opacity: .12; }
.curve-line { fill: none; stroke: var(--leaf-d); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.curve-dot, .curve-hover-dot {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; translate: -50% -50%;
  background: var(--leaf-d); box-shadow: 0 0 0 3px var(--straw); pointer-events: none;
}
.pin {
  position: absolute; translate: -50% -50%; z-index: 1;
  display: flex; align-items: center; cursor: pointer; outline: none; transition: opacity .15s ease;
}
.pin b {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); border: 2.5px solid var(--bark); color: var(--ink);
  font-size: 14px; font-weight: 800; line-height: 1; padding-top: 2px; box-shadow: 0 2px 0 rgba(90, 58, 31, .25);
  transition: transform .15s ease;
}
.pin-skip b { background: var(--paper); border-style: dashed; }
.pin-label {
  position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; white-space: nowrap;
  background: var(--paper); border: 2px solid var(--bark); border-radius: 10px; padding: 2px 8px 0;
  font-size: 14px; font-weight: 800; color: var(--ink);
}
.pin-l .pin-label { left: 0; translate: -13px 0; }

/* Fact card: opens on hover, keyboard focus or tap */
.pin-card {
  position: absolute; top: calc(100% + 12px); width: min(300px, 78vw);
  display: flex; flex-direction: column; gap: 6px; cursor: auto;
  background: var(--paper); border: 2.5px solid var(--bark); border-radius: 14px; padding: 14px 16px 12px;
  box-shadow: var(--shadow), var(--shadow-lg);
  opacity: 0; visibility: hidden; translate: 0 -4px; transition: opacity .15s ease, translate .15s ease, visibility .15s;
}
.pin-card::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; } /* hover bridge */
.pin-l .pin-card { left: -14px; }
.pin-r .pin-card { right: -14px; }
.pin-up .pin-card { top: auto; bottom: calc(100% + 12px); translate: 0 4px; }
.pin-up .pin-card::before { bottom: auto; top: 100%; }
.pin-card p { font-size: 15px; line-height: 1.45; }
.viz .fact-stat { font-size: 26px; font-weight: 800; line-height: 1; color: var(--leaf-d); padding-top: 3px; }
.pin:hover, .pin:focus-within { z-index: 3; }
.pin:hover b, .pin:focus-visible b { transform: scale(1.15); }
.pin:focus-visible b { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--leaf-d); }
.pin:hover .pin-card, .pin:focus-within .pin-card { opacity: 1; visibility: visible; translate: 0 0; }
.pin:hover .pin-label, .pin:focus-within .pin-label { opacity: 0; }
.curve.hovering .pin { opacity: .25; }
.curve-hover { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--bark2); opacity: 0; pointer-events: none; }
.curve-hover-dot { left: 0; }
.curve.hovering .curve-hover { opacity: 1; }
.curve-x { position: absolute; left: 26px; right: 0; bottom: 0; height: 22px; }
.curve-x span { position: absolute; translate: -50% 0; font-size: 13px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.curve-x span:first-child { translate: 0 0; }
.curve-x span:last-child { translate: -100% 0; }

/* Shared chart tooltip */
.viz-tip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--ink); color: var(--paper); border-radius: 10px; padding: 6px 10px 4px;
  font-size: 14px; font-weight: 700; line-height: 1.25; max-width: 240px;
  box-shadow: 0 8px 20px -6px rgba(61, 41, 20, .5);
}
.viz-tip[hidden] { display: none; }

/* "Coming soon" toast for store buttons without a link yet */
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: 24px; translate: -50% 12px;
  max-width: calc(100vw - 32px); padding: 10px 18px 8px; border-radius: 14px;
  background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(61, 41, 20, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* Legal pages */
.page-legal { background: var(--paper); }
.page-legal .nav { background: rgba(255, 250, 240, .92); box-shadow: 0 2px 0 rgba(90, 58, 31, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.page-legal .nav .brand { color: var(--ink); text-shadow: none; }
.page-legal .nav-links a:not(.btn) { color: var(--ink); }
.legal-hero { background: linear-gradient(180deg, var(--straw), var(--paper)); padding: 56px 0 36px; text-align: center; }
.legal-hero h1 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 8px; }
.legal-hero p { color: var(--ink2); }
.legal { padding: 20px 0 90px; }
.legal .summary { padding: 22px 26px; margin-bottom: 36px; }
.legal .summary h2 { font-size: 22px; margin: 0 0 8px; }
.legal .summary ul { margin: 0; padding-left: 22px; }
.legal h2 { font-size: 26px; margin: 38px 0 10px; }
.legal h3 { font-size: 20px; margin: 22px 0 6px; }
.legal p, .legal li { color: #4a331b; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 4px 0; }
.legal a { color: var(--leaf-d); font-weight: 700; }
.legal .toc { columns: 2; gap: 30px; padding-left: 20px; margin: 0 0 10px; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--straw3); vertical-align: top; }
.legal th { background: var(--straw); }
.table-wrap { overflow-x: auto; }

/* Compare pages */
.crumbs { font-size: 15px; color: var(--ink2); margin-bottom: 12px; }
.crumbs a { color: var(--leaf-d); font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.legal-hero .lead-sm { max-width: 36em; margin: 10px auto 0; font-size: 19px; }
.legal-hero .stores { justify-content: center; margin-top: 22px; }
.tldr { padding: 22px 26px; margin-bottom: 30px; }
.tldr h2 { font-size: 22px !important; margin: 0 0 8px !important; }
.legal .cmp { font-size: 16px; margin: 6px 0 0; }
.legal .cmp th:first-child, .legal .cmp td:first-child { font-weight: 800; color: var(--ink); width: 30%; }
.legal .cmp thead th { background: var(--straw2); font-size: 17px; }
.legal .cmp thead th:nth-child(2), .legal .cmp td:nth-child(2) { background: rgba(124, 207, 74, .14); }
.legal .cmp .yes { color: var(--leaf-d); font-weight: 800; }
.legal .cmp .no { color: #a0522d; font-weight: 700; }
.cmp-note { font-size: 14px !important; color: var(--ink2) !important; margin-top: 6px !important; }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0 8px; }
.choose .card { padding: 20px 22px; }
.choose .card.pick { background: #eaf7dc; }
.legal .choose h3 { margin: 0 0 6px; }
.legal .choose ul { margin: 0; }
.legal .faq { margin-top: 14px; }
.legal .faq details p { color: var(--ink2); }
.cmp-grid { list-style: none; padding: 0 !important; margin: 14px 0 0 !important; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.legal .cmp-grid li { margin: 0; }
.cmp-grid a { display: block; height: 100%; padding: 16px 20px; text-decoration: none; color: var(--ink) !important; transition: transform .15s ease; }
.cmp-grid a:hover { transform: translateY(-2px); }
.cmp-grid strong { display: block; font-size: 20px; }
.cmp-grid span { display: block; font-size: 16px; font-weight: 500; color: var(--ink2); }
.more-cmp { margin-top: 44px; }

.science-more { margin-top: 26px; text-align: center; font-size: 17px; color: var(--ink2); }
.science-more a { color: var(--leaf-d); font-weight: 700; }

/* Blog */
.post-meta { font-size: 15px; }
.legal ol { padding-left: 24px; margin: 10px 0; }
.legal blockquote { margin: 18px 0; padding: 14px 20px; border-left: 5px solid var(--leaf-d); background: var(--straw); border-radius: 0 14px 14px 0; }
.legal blockquote p { color: var(--ink); font-weight: 600; }
.callout { padding: 20px 24px; margin: 26px 0; background: #eaf7dc; }
.legal .callout h2, .legal .callout h3 { margin: 0 0 6px; font-size: 21px; }
.legal .callout p { color: var(--ink); }
.post-fig { margin: 30px auto; text-align: center; }
.post-fig img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 24px; box-shadow: var(--shadow-lg); }
.post-fig.wide img { max-width: 480px; }
.post-fig figcaption { margin-top: 12px; font-size: 15px; color: var(--ink2); }
.sources { font-size: 15px; }
.legal .sources li { color: var(--ink2); }
.post-grid strong { font-size: 19px; }
.post-grid em { display: block; margin-bottom: 4px; font-size: 13px; font-style: normal; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--leaf-d); }
@media (max-width: 560px) {
  .choose, .cmp-grid { grid-template-columns: 1fr; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .car-track { grid-auto-columns: calc((100% - 2 * 22px) / 2.6); }
}

@media (max-width: 860px) {
  :root { --nav-h: 62px; }
  .nav-toggle {
    display: grid; gap: 5px; align-content: center; justify-items: center;
    width: 46px; height: 46px; border-radius: 12px;
    border: 2.5px solid var(--bark); background: var(--paper); cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 3px; border-radius: 2px; background: var(--bark); transition: .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: calc(var(--nav-h) - 4px); left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    background: var(--paper); border: 3px solid var(--bark); border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn), .nav:not(.scrolled) .nav-links a:not(.btn) { color: var(--ink); padding: 10px 12px; border-radius: 10px; }
  .nav-links a:not(.btn):hover { background: var(--straw); }
  .nav-links .btn { margin-top: 6px; }

  .hero { padding-bottom: 120px; }
  .cloud { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lead { margin: 0 auto; }
  .stores, .hero-stats { justify-content: center; }
  .hero-art { height: 520px; max-width: 460px; width: 100%; margin: 10px auto 0; }
  .shot { width: 230px; }

  .steps { grid-template-columns: 1fr; gap: 34px; max-width: 520px; margin: 0 auto; }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .plan-pick, .plan-pick.reveal.in { transform: none; }
  .band-inner { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .prev { left: -6px; }
  .next { right: -6px; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .features { grid-template-columns: 1fr; }
  .car-track { grid-auto-columns: 74%; }
  .car-btn { display: none; }
  .hero-art { height: 440px; }
  .shot { width: 190px; border-radius: 26px; border-width: 4px; }
  .shot-front { left: 2%; }
  .shot-back { right: 0; }
  .chip { font-size: 15px; }
  .chip-a { left: 0; }
  .chip-b { right: 0; }
  .btn { white-space: normal; }
  .stores { flex-direction: column; align-items: stretch; }
  .store { justify-content: center; }
  .legal .toc { columns: 1; }
  .hero-stats { gap: 22px; }
  .footer-cols { grid-template-columns: 1fr; gap: 0; }
  .footer-col + .footer-col { margin-top: 34px; }
  .lb-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
.legal mark { background: var(--gold); color: var(--ink); padding: 0 4px; border-radius: 4px; }

@media (max-width: 560px) {
  .viz { padding: 20px 16px 16px; }
  .pin-label { display: none; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 1000px) and (min-width: 561px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
