/* Buds Water Co. — Home Water Check
   Brand: the Buds look from the brochures/ads/logo. Flat lime + deep green,
   thick dark outlines, chunky rounded headings, Bud as a supporting character.
   Colors sampled from the master logo and the brochure rebrand script
   (DARK #011408, LIME #ABF92E, CREAM #FDFAF5). */

:root {
  --ink: #011408;          /* Buds dark green-black: outlines + text */
  --lime: #abf92e;         /* Buds lime */
  --lime-deep: #6fc11a;    /* pressed/hover lime */
  --forest: #0d3b1f;       /* Bud's uniform green */
  --gold: #f4b01e;         /* Bud's fur */
  --water: #2f9be0;        /* the water drop */
  --cream: #fdfaf5;        /* brochure paper */

  --bg: var(--cream);
  --surface: #ffffff;
  --surface-2: #f3f7ea;
  --text: var(--ink);
  --muted: #4a5a4f;
  --line: var(--ink);
  --soft-line: #d8e2cf;
  --focus: #2f9be0;

  --good: #2e9d3a;
  --ok: #b07400;
  --bad: #d64545;

  --radius: 16px;
  --shadow: 0 4px 0 var(--line);
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #011408;
    --surface: #0b2615;
    --surface-2: #10301b;
    --text: #f2f7ec;
    --muted: #a9bba9;
    --line: #000000;
    --soft-line: #24452e;
    --shadow: 0 4px 0 #000;
  }
}
:root[data-theme="dark"] {
  --bg: #011408;
  --surface: #0b2615;
  --surface-2: #10301b;
  --text: #f2f7ec;
  --muted: #a9bba9;
  --line: #000000;
  --soft-line: #24452e;
  --shadow: 0 4px 0 #000;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff; }
.top__inner { max-width: 560px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.top__logo { flex: 1; display: flex; justify-content: center; }
.top__logo img { height: 44px; width: auto; }
.top__back, .top__call {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 12px; border: 0; background: transparent; color: var(--lime); cursor: pointer; text-decoration: none;
}
.top__back:hover, .top__call:hover { background: #0d3b1f; }
.top__back[hidden] { display: grid; visibility: hidden; }
.progress { height: 8px; background: #12301c; }
.progress[hidden] { display: none; }
.progress__bar { height: 100%; width: 0; background: var(--lime); transition: width .35s ease; border-radius: 0 8px 8px 0; }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; outline: none; }
.screen { animation: in .28s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen, .progress__bar, .gauge__arc { animation: none !important; transition: none !important; }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

.hl {
  background: var(--lime); color: var(--ink); padding: 0 .18em; border-radius: 8px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 58px; padding: 14px 20px;
  background: var(--lime); color: var(--ink);
  border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { background: #b8ff45; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn--ghost { background: var(--surface); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--dark { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 12px 4px; min-height: 44px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 15px; }

/* ---------- Landing ---------- */
.landing { display: grid; gap: 16px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.landing h1 { font-size: 34px; }
.landing h1 .hl { display: inline; }
.hero { position: relative; display: grid; grid-template-columns: 1fr 120px; gap: 4px; align-items: end; }
.hero__bud img { width: 120px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.promises li {
  display: flex; gap: 12px; align-items: center; background: var(--surface);
  border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 600;
}
.promises .tick { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; border: 2px solid var(--line); font-weight: 900; font-size: 15px; }
.trust { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); text-align: center; }
.trust img { width: 34px; }

/* ---------- Question ---------- */
.q__count { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.q__title { font-size: 26px; margin-bottom: 6px; }
.q__help { color: var(--muted); margin-bottom: 16px; }
.opts { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.opts legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px;
  padding: 12px 14px; text-align: left; background: var(--surface); color: var(--text);
  border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 0 var(--line);
  font-size: 17px; font-weight: 600; line-height: 1.3; cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.opt:hover { background: var(--surface-2); }
.opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt[aria-checked="true"], .opt[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.opt__icon { flex: 0 0 auto; font-size: 24px; width: 30px; text-align: center; }
.opt__box {
  flex: 0 0 26px; height: 26px; border: 2.5px solid currentColor; border-radius: 8px; display: grid; place-items: center;
  font-size: 16px; font-weight: 900; background: var(--surface);
}
.opt[aria-pressed="true"] .opt__box { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.opt[aria-disabled="true"] { opacity: .45; }
.q__next { margin-top: 18px; position: sticky; bottom: 12px; }
.q__hint { min-height: 22px; font-size: 14px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* ---------- Bud break ---------- */
.budbreak { text-align: center; display: grid; gap: 12px; justify-items: center; padding-top: 12px; }
.budbreak img { width: 190px; }
.bubble {
  position: relative; background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px;
  padding: 14px 18px; box-shadow: var(--shadow); max-width: 380px;
}

/* ---------- Gate (form) ---------- */
.gate__head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.gate__head img { width: 72px; flex: 0 0 72px; }
.form { display: grid; gap: 14px; margin-top: 12px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .opt-label { font-weight: 500; color: var(--muted); font-size: 14px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; min-height: 54px; padding: 12px 14px; font-size: 18px;
  background: var(--surface); color: var(--text);
  border: 2.5px solid var(--line); border-radius: 14px;
}
.field input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field__err { color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 4px; min-height: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent input { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 2px; accent-color: var(--forest); }
.consent label { cursor: pointer; }
.form__err { color: var(--bad); font-weight: 700; text-align: center; min-height: 0; }

/* ---------- Report ---------- */
.report { display: grid; gap: 20px; }
.card {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 20px;
  padding: 18px; box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; border-width: 2px; border-color: var(--soft-line); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 6px 0 2px; }
.section-title .num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: 17px; }
:root[data-theme="dark"] .section-title .num { background: var(--lime); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-title .num { background: var(--lime); color: var(--ink); } }

.scorecard { display: grid; grid-template-columns: 1fr 104px; gap: 8px; align-items: end; }
.scorecard h1 { font-size: 26px; }
.scorecard__bud img { width: 104px; }
.gauge { width: 100%; max-width: 260px; margin: 4px auto 0; display: block; }
.gauge__track { stroke: var(--soft-line); }
.gauge__arc { transition: stroke-dashoffset 1s ease .2s; }
.gauge__num { font: 700 44px var(--font-display); fill: var(--text); }
.gauge__q { font: 700 40px var(--font-display); fill: var(--muted); }
.score-label { text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0; }
.score-label.good { color: var(--good); } .score-label.ok { color: var(--ok); } .score-label.bad { color: var(--bad); } .score-label.unknown { color: var(--water); }
.disclaimer { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; }

.issue { display: grid; gap: 6px; }
.issue h3 { display: flex; gap: 8px; align-items: center; margin: 0; }
.issue .dot { flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--bad); border: 2px solid var(--line); }
.issue .dot.unknown { background: var(--water); }
.issue .why { font-size: 15px; color: var(--muted); margin: 0; }
.issue .why strong { color: var(--text); }
.localnote { font-size: 14px; background: var(--surface-2); border-left: 4px solid var(--water); border-radius: 8px; padding: 8px 12px; margin: 4px 0 0; }
.localnote small { display: block; color: var(--muted); margin-top: 2px; }

.sys { display: grid; gap: 8px; }
.sys__step { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sys h3 { margin: 0; }
.sys__row { display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 15px; align-items: start; }
.sys__row .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; border: 2px solid var(--line); }
.sys__row .ic.yes { background: var(--lime); color: var(--ink); }
.sys__row .ic.no { background: var(--surface-2); color: var(--text); }
.sys__price { font-weight: 700; font-size: 15px; }
.sys__for { font-size: 13px; color: var(--muted); }

.tips { display: grid; gap: 10px; counter-reset: tip; }
.tip { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.tip::before { counter-increment: tip; content: counter(tip); width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--ink); border: 2px solid var(--line); display: grid; place-items: center; font: 700 18px var(--font-display); }
.tip p { margin: 0; font-size: 15px; }

/* Offer block: always the dark Buds look */
.offer {
  background: var(--ink); color: #f2f7ec; border: 3px solid #000; border-radius: 22px; padding: 20px 18px; box-shadow: 0 5px 0 #000;
  display: grid; gap: 12px; scroll-margin-top: 84px;
}
.offer--hot { outline: 4px solid var(--lime); outline-offset: 3px; }
.offer h2 { color: var(--lime); font-size: 27px; margin: 0; }
.offer__top { display: grid; grid-template-columns: 1fr 86px; gap: 8px; align-items: center; }
.offer__top img { width: 86px; }
.offer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.offer li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.offer li::before { content: "✓"; color: var(--ink); background: var(--lime); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-weight: 900; font-size: 13px; margin-top: 2px; }
.offer .honest { font-family: var(--font-display); font-size: 19px; color: #fff; margin: 0; }
.offer .note { font-size: 14px; background: #0d3b1f; border-radius: 12px; padding: 10px 12px; margin: 0; }
.offer a:not(.btn) { color: var(--lime); }
.scarcity { font-weight: 700; color: var(--gold); margin: 0; }
.cal { background: #fff; border-radius: 14px; overflow: hidden; min-height: 600px; }
.cal iframe { width: 100%; min-height: 680px; border: 0; display: block; }
.cal--standin { min-height: 0; padding: 16px; color: var(--ink); display: grid; gap: 10px; }
.cal--standin p { margin: 0; }

.kits { display: grid; gap: 14px; }
.kit { display: grid; gap: 8px; }
.kit h3, .kit p { margin: 0; }
.kit--main { border-color: var(--line); background: var(--surface); }
.kit__meta { font-size: 14px; font-weight: 700; color: var(--muted); }
.prime { display: inline-block; background: #1a98ff; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .02em; padding: 1px 7px; border-radius: 4px; text-transform: lowercase; }
.kit .btn { margin-top: 4px; font-size: 18px; min-height: 52px; }
.kit__send { font-size: 15px; }
.renter { display: grid; gap: 10px; }
.renter ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.notready { text-align: center; font-size: 15px; color: var(--muted); }
.copylink { display: flex; gap: 8px; margin-top: 8px; }
.copylink input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border: 2px solid var(--soft-line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; }
.copylink button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--lime); color: var(--ink); font-weight: 700; cursor: pointer; }

/* ---------- Footer ---------- */
.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 16px 16px 28px; border-top: 2px solid var(--soft-line); }
.foot p { margin: 0 0 4px; }
.foot a { min-height: 44px; display: inline-block; padding: 0 2px; }
.foot__small { font-size: 12px; }

/* ---------- Test mode bar ---------- */
.testbar {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; max-height: 46vh; overflow: auto;
  background: #fff8d6; color: #222; border: 2px dashed #b38600; border-radius: 12px; padding: 8px 10px; font: 12px/1.4 ui-monospace, Menlo, monospace;
}
.testbar[hidden] { display: none; }
.testbar strong { font-size: 12px; }
.testbar button { font: 12px ui-monospace, Menlo, monospace; margin: 2px; padding: 6px 8px; border: 1px solid #b38600; border-radius: 6px; background: #fff; cursor: pointer; min-height: 32px; }
.testbar pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; max-height: 28vh; overflow: auto; background: #fff; padding: 6px; border-radius: 6px; }
.testbar details summary { cursor: pointer; min-height: 28px; }
body.is-test main { padding-bottom: 72px; }
