/* Made for growers of every age: big type, strong contrast, one question at a time,
   large touch targets. No web fonts or third-party files: system fonts only. */
:root {
  --bg: #f8f4ea;
  --surface: #fffdf8;
  --fg: #1c2012;
  --muted: #4a5140;
  --line: #ddd5bf;
  --field-line: #8f8a72;
  --olive: #4b6a1c;
  --olive-strong: #36500f;
  --olive-soft: #edf1e0;
  --on-olive: #ffffff;
  --oil: #c79a1e;
  --oil-soft: #fbf1d3;
  --ok: #2f6b3a;
  --ok-soft: #e4f1e1;
  --err: #a1301f;
  --err-soft: #fbe6e1;
  --warn: #6e4b00;
  --warn-soft: #fdf3d7;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14180e; --surface: #1d2215; --fg: #eef0e6; --muted: #b5bda6; --line: #343c27; --field-line: #6f7a5c;
    --olive: #a9c860; --olive-strong: #c8e08a; --olive-soft: #232b17; --on-olive: #10140b;
    --oil: #e6c25a; --oil-soft: #2e2810; --ok: #8fd19b; --ok-soft: #1c3320; --err: #f29a88; --err-soft: #3a1d17;
    --warn: #f0c96a; --warn-soft: #33290f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 19px/1.6 var(--font); }
a { color: var(--olive-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--oil); outline-offset: 3px; }

main, header.site, footer.site, .waitlist { max-width: 860px; margin-inline: auto; padding-inline: 16px; }
main { padding-block: 4px 32px; }

/* Header */
header.site { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font: 700 26px/1 var(--serif); color: var(--fg); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
header nav { display: flex; gap: 6px; flex-wrap: wrap; }
header nav a { text-decoration: none; font-weight: 600; font-size: 18px; padding: 10px 14px; border-radius: 999px; min-height: 48px; display: inline-flex; align-items: center; }
header nav a:hover { background: var(--olive-soft); }
header nav a[aria-current="page"] { background: var(--olive-soft); }

/* Type */
h1, h2, h3 { font-family: var(--serif); color: var(--fg); text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.12; margin: 12px 0 12px; }
h2 { font-size: clamp(25px, 4vw, 30px); line-height: 1.2; margin: 40px 0 12px; }
h3 { font-size: 22px; margin: 24px 0 8px; }
.lede { font-size: 21px; color: var(--muted); max-width: 40ch; margin: 0 0 24px; }
.crumb { font-size: 17px; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
small { font-size: 0.85em; }

/* Form basics */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font: 700 21px/1.3 var(--serif); margin-bottom: 12px; padding: 0; }
legend small { font: 400 17px var(--font); color: var(--muted); }
label { display: grid; gap: 8px; font-size: 18px; font-weight: 600; }
input, select, button, textarea { font: inherit; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 58px; padding: 12px 14px; font-size: 21px;
  border: 2px solid var(--field-line); border-radius: 12px; background: var(--surface); color: var(--fg);
}
textarea { min-height: 120px; font-size: 19px; }
input::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus, textarea:focus { border-color: var(--olive); outline: 3px solid var(--oil); outline-offset: 1px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 20px; }

/* Buttons */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 12px 26px; font-size: 21px; font-weight: 700;
  background: var(--olive); color: var(--on-olive); border: 2px solid var(--olive); border-radius: 12px;
  cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--olive-strong); border-color: var(--olive-strong); }
button.secondary, .button.secondary { background: var(--surface); color: var(--olive-strong); }
button.secondary:hover, .button.secondary:hover { background: var(--olive-soft); }
button.wide { width: 100%; }

/* Calculator */
form.calc { display: grid; gap: 22px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 30px); }
.step { display: grid; gap: 10px; }
.q { display: flex; gap: 12px; align-items: flex-start; font: 700 clamp(21px, 3.4vw, 24px)/1.3 var(--serif); }
.q .n {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--olive); color: var(--on-olive); font: 700 20px/1 var(--font); margin-top: -2px;
}
.field { position: relative; display: block; }
.field input { padding-right: 76px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 64px; }
.suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 600; color: var(--muted); pointer-events: none; }
.grid .field input { font-size: 22px; min-height: 58px; }

/* kg / litri as two big buttons */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 8px 12px; text-align: center;
  border: 2px solid var(--field-line); border-radius: 12px; font-size: 19px; font-weight: 600; background: var(--surface);
}
.seg input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--on-olive); }
.seg input:focus-visible + span { outline: 3px solid var(--oil); outline-offset: 2px; }

/* Optional parts, closed by default */
details.more { border: 2px dashed var(--line); border-radius: 12px; padding: 4px 16px; }
details.more[open] { padding-bottom: 18px; }
details.more summary { cursor: pointer; min-height: 56px; padding-block: 8px; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; grid-row: span 2; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--olive-strong); color: var(--olive-strong); font-size: 22px; font-weight: 700; line-height: 1; }
details.more[open] summary::before { content: "–"; }
.sum-main { font-weight: 700; font-size: 19px; color: var(--olive-strong); line-height: 1.3; }
.sum-sub { font-size: 17px; color: var(--muted); line-height: 1.3; }
details.more .grid { margin-top: 8px; }

/* Result */
.result { background: var(--oil-soft); border: 2px solid var(--oil); border-radius: var(--radius); padding: 20px 22px; text-align: center; }
.result p { margin: 6px 0; font-size: 20px; }
.result .result-label { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 16px !important; }
.result .result-big { font: 700 clamp(56px, 14vw, 76px)/1.05 var(--font); color: var(--olive-strong); font-variant-numeric: tabular-nums; margin: 4px 0 8px !important; }
.result strong { font-size: 1.15em; }
.result .warn { text-align: left; margin-top: 14px; }

/* WhatsApp: dark green so white text stays readable */
.button.whatsapp { background: #11703a; border-color: #11703a; color: #fff; margin-top: 12px; }
.button.whatsapp:hover { background: #0b5a2d; border-color: #0b5a2d; }
.button.whatsapp::before { content: ""; width: 24px; height: 24px; flex: none; background: currentColor; -webkit-mask: var(--wa-icon) center / contain no-repeat; mask: var(--wa-icon) center / contain no-repeat; }
:root { --wa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.2-.4.2-.4.7-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.8 11.8 0 0 0 4.5 4c1.7.7 2.3.8 3.2.6a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .2-1.3c-.1-.1-.3-.2-.6-.3z'/%3E%3C/svg%3E"); }

/* Province with too few reports */
.progress-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; display: grid; gap: 10px; }
.progress-card p { margin: 0; }
.progress-title { font-size: 20px; }
.progress-card progress { width: 100%; height: 22px; accent-color: var(--olive); }
.progress-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.progress-actions .button.whatsapp { margin-top: 0; }
.ok.thanks { display: grid; gap: 10px; font-weight: 600; }
.ok.thanks p { margin: 0; }
.ok.thanks .plain { font-weight: 400; color: var(--fg); }
.ok.thanks .button { justify-self: start; margin-top: 0; }
.small-note { font-size: 17px; }

/* Share */
.share { display: grid; gap: 16px; border-top: 2px solid var(--line); padding-top: 22px; }
.share h2 { margin: 0; }
.share > p { margin: 0; color: var(--muted); }

/* Messages */
.ok, .error, .warn { padding: 14px 16px; border-radius: 12px; margin: 0; font-size: 19px; }
.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; border: 2px solid var(--ok); }
.error { background: var(--err-soft); color: var(--err); font-weight: 600; border: 2px solid var(--err); }
.warn { background: var(--warn-soft); color: var(--warn); border: 2px solid var(--oil); }
.warn p { margin: 0; font-size: 18px !important; }
.warn p + p { margin-top: 8px; }
.check, .check.confirm { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.check input, .check.confirm input { width: 26px; height: 26px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--olive); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
main > .ok { margin-bottom: 18px; }

/* Stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.kpis > div { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 2px; }
.big { font-size: 34px; font-weight: 700; color: var(--olive-strong); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpis span:not(.big) { font-size: 17px; color: var(--muted); }
.snapshot, .card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 6px 22px 10px; margin-top: 28px; }
.snapshot h2, .card h2 { margin-top: 18px; }
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.prov { width: 100%; border-collapse: collapse; font-size: 18px; }
table.prov th, table.prov td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.prov tr:last-child td { border-bottom: 0; }
table.prov th { font-size: 16px; color: var(--muted); }
table.prov .n { text-align: right; font-variant-numeric: tabular-nums; }
ol.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ol.bars li { display: grid; grid-template-columns: 130px 1fr 80px; gap: 12px; align-items: center; font-size: 18px; }
ol.bars meter { width: 100%; height: 18px; }
ol.bars .val { font-variant-numeric: tabular-nums; font-weight: 600; }
ul.neigh { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.neigh li { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; }
ul.neigh li span { color: var(--muted); margin-left: 4px; }

/* Waitlist */
.waitlist { display: grid; gap: 14px; margin-block: 36px; }
.waitlist > div, .waitlist-form, .waitlist > .ok { background: var(--olive-soft); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0; }
.waitlist-form { background: var(--surface); display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; }
.waitlist h2 { margin-top: 0; }
.waitlist-form .check { grid-column: 1 / -1; font-weight: 400; font-size: 18px; }
.waitlist-form button { grid-column: 1 / -1; }

/* Blog, articles */
.prose { max-width: 66ch; }
.prose p, .prose li { font-size: 20px; line-height: 1.65; }
.prose li + li { margin-top: 6px; }
ul.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
ul.posts li { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
ul.posts li a { font-size: 21px; }
ul.posts li p { margin: 6px 0; color: var(--muted); font-size: 18px; }
ul.posts time, .post .meta { font-size: 16px; color: var(--muted); }
ul.posts.compact li { padding: 12px 18px; }
ul.posts.compact li a { font-size: 19px; font-weight: 600; }
.post h2 { margin-top: 1.5em; }
.post table { border-collapse: collapse; width: 100%; font-size: 18px; display: block; overflow-x: auto; }
.post th, .post td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.post img { max-width: 100%; }
.cta { background: var(--oil-soft); border: 2px solid var(--oil); border-radius: var(--radius); padding: 18px 22px; margin-block: 28px; max-width: 66ch; }
.cta p { margin: 8px 0; }

/* Survey */
.survey { display: grid; gap: 22px; max-width: 66ch; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 28px); }
.survey fieldset { display: grid; gap: 8px; }
.survey .opt { display: flex; gap: 14px; align-items: center; font-weight: 400; font-size: 19px; min-height: 52px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.survey .opt:has(input:checked) { border-color: var(--olive); background: var(--olive-soft); }
.survey .opt input { width: 24px; height: 24px; min-height: 0; flex: none; margin: 0; accent-color: var(--olive); }

footer.site { border-top: 2px solid var(--line); padding-block: 18px 40px; font-size: 17px; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  header.site { padding-block: 10px; }
  header nav { width: 100%; justify-content: space-between; }
  header nav a { padding: 10px 12px; font-size: 17px; }
  ol.bars li { grid-template-columns: 96px 1fr 64px; font-size: 16px; }
  button, .button { width: 100%; }
}
