/* ===========================================================================
   HolmStone survey — deliberately no web fonts. On a Zanzibar mobile
   connection a font request is 100–300 ms before the first word renders.
   System stack is instant and reads fine.

   High contrast throughout: this form gets filled outdoors, in sunlight,
   on a cheap phone. No light grey on white anywhere.
   =========================================================================== */

:root {
  --ground:      #FFFFFF;
  --panel:       #F2F6F5;
  --ink:         #08211E;
  --ink-2:       #3B5551;
  --line:        #C4D3D0;
  /* HolmStone green (#4CB849) is only 2.54:1 against white — it fails WCAG AA
     both as white-on-green and as green-on-white. So it is the IDENTITY colour
     (logo, progress bar, selected borders, chips) and never carries text.
     --brand-deep is the same hue darkened to 4.91:1, used for every button,
     link and coloured word. This form gets read in direct sunlight. */
  --brand:       #4CB849;
  --brand-deep:  #348032;
  --brand-hover: #2B6A29;
  --brand-ink:   #FFFFFF;
  --brand-soft:  #E9F7E9;
  --gold:        #B5730B;
  --gold-soft:   #FBF0DC;
  --danger:      #972E1D;
  --danger-soft: #FBE6E1;
  --radius:      10px;
  --tap:         52px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.embed .wrap { padding-top: 8px; min-height: 0; }

/* ---------- header ---------- */
.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 14px;
}
body.embed .hd { padding: 6px 0 10px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
body.embed .brand img { height: 28px; }

.lang {
  display: flex; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--ground);
}
.lang button {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border: 0; background: none;
  color: var(--ink-2); cursor: pointer; min-height: 36px;
}
.lang button[aria-pressed="true"] { background: var(--brand-deep); color: var(--brand-ink); }
.lang button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

/* ---------- progress ---------- */
.prog { margin-bottom: 20px; }
.prog-bar {
  height: 6px; background: var(--line);
  border-radius: 99px; overflow: hidden;
}
.prog-fill {
  height: 100%; background: var(--brand); width: 0%;
  border-radius: 99px; transition: width .28s ease;
}
.prog-txt {
  font-size: 12.5px; color: var(--ink-2);
  margin-top: 7px; font-variant-numeric: tabular-nums;
}

/* ---------- card ---------- */
.card {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px 24px;
  flex: 1;
}
.intro {
  background: var(--brand-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 15px;
  color: var(--ink);
}
.intro strong { display: block; margin-bottom: 3px; }

h1 {
  font-size: 21px; line-height: 1.25; letter-spacing: -.015em;
  margin: 0 0 6px; text-wrap: balance;
}
.q-title {
  font-size: 20px; font-weight: 700; line-height: 1.28;
  letter-spacing: -.012em; margin: 0 0 6px; text-wrap: balance;
}
/* Focused programmatically so screen readers announce the new question.
   That is not keyboard navigation, so it must not draw a focus ring. */
.q-title:focus, .result h2:focus { outline: none; }
.q-help {
  font-size: 14.5px; color: var(--ink-2); margin: 0 0 16px;
}
.q-hint {
  font-size: 13px; font-weight: 600; color: var(--brand-deep);
  margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- options ---------- */
.opts { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; border: 0; }
.opt {
  display: flex; align-items: center; gap: 13px;
  min-height: var(--tap);
  padding: 11px 15px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--ground);
  font-size: 16.5px; line-height: 1.35;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  width: 100%;
  font-family: inherit;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--brand); }
.opt:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt[aria-pressed="true"], .opt.sel {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
.opt .box {
  width: 22px; height: 22px; flex: none;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ground);
}
.opt.multi .box { border-radius: 6px; }
.opt.sel .box { border-color: var(--brand-deep); background: var(--brand-deep); }
.opt .box svg { width: 12px; height: 12px; opacity: 0; }
.opt.sel .box svg { opacity: 1; }

/* ---------- text inputs ---------- */
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  font: inherit; font-size: 16.5px;
  padding: 13px 14px;
  min-height: var(--tap);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--ground);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus { outline: 0; border-color: var(--brand-deep); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
::placeholder { color: #7A908C; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 6px;
}
.field .opt-tag { font-weight: 400; color: var(--ink-2); font-size: 14px; }

/* ---------- consent ---------- */
.consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--gold-soft);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin: 18px 0 4px;
  font-size: 14.5px; line-height: 1.45;
  cursor: pointer;
}
.consent input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--brand-deep); }

/* ---------- nav ---------- */
.nav { display: flex; gap: 10px; margin-top: 22px; }
.btn {
  font: inherit; font-size: 17px; font-weight: 700;
  min-height: var(--tap); padding: 13px 22px;
  border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--brand-deep); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary[disabled] { opacity: .55; cursor: default; }
.btn-ghost {
  background: var(--ground); color: var(--ink-2);
  border-color: var(--line); flex: 0 0 auto; padding: 13px 18px;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.err {
  background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius); padding: 11px 14px;
  font-size: 14.5px; font-weight: 600; margin-top: 14px;
}
.err[hidden] { display: none !important; }

/* ---------- result ---------- */
.result { text-align: center; padding: 8px 0 0; }
.result .tick {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--brand-deep);
  display: grid; place-items: center;
}
.result .tick svg { width: 28px; height: 28px; }
.result h2 { font-size: 23px; margin: 0 0 6px; letter-spacing: -.015em; }
.result .lede { color: var(--ink-2); font-size: 15.5px; margin: 0 0 22px; }

.figs { display: flex; gap: 10px; margin-bottom: 16px; }
.fig {
  flex: 1; background: var(--panel);
  border-radius: var(--radius); padding: 16px 12px;
}
.fig .n {
  font-size: 23px; font-weight: 800; letter-spacing: -.03em;
  color: var(--brand-deep); font-variant-numeric: tabular-nums; line-height: 1.15;
  white-space: nowrap;
}
.fig .l { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.3; }

.assump {
  text-align: left; background: var(--gold-soft);
  border-radius: var(--radius); padding: 13px 15px;
  font-size: 13px; color: #5C4A22; line-height: 1.5;
}
.assump b { color: #3E3115; }
.assump ul { margin: 7px 0 0; padding-left: 18px; }
.assump li { margin-bottom: 3px; }

.cta {
  display: block; margin-top: 18px;
  background: var(--brand-deep); color: var(--brand-ink);
  text-decoration: none; font-weight: 700; font-size: 17px;
  padding: 15px; border-radius: var(--radius); text-align: center;
}
/* Secondary to the estimate, and it keeps the page to a single green
   rather than putting WhatsApp's green next to HolmStone's. */
.cta.wa {
  background: var(--ground); color: var(--brand-deep);
  border: 2px solid var(--brand-deep);
}

footer {
  margin-top: 20px; font-size: 12.5px; color: var(--ink-2);
  text-align: center; line-height: 1.5;
}
footer a { color: var(--ink-2); }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Small phones — 320 px wide devices are still common here. */
@media (max-width: 360px) {
  html, body { font-size: 16px; }
  .card { padding: 18px 15px 20px; }
  .figs { flex-direction: column; }
}
