/* Greinton village colours: deep green, harvest gold, olive and cream. */
:root {
  --ink: #1e3b2c;
  --text: #1f241b;
  --muted: #545a49;
  --gold: #c99a1e;
  --gold-soft: #f1dfa6;
  --olive: #6f7f3a;
  --cream: #f7f1e6;
  --paper: #fffdf8;
  --sand: #ece0cd;
  --line: #d9cbb2;
  --serif: Bitter, Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, sans-serif;
  --tabs: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--text);
  font: 400 1.125rem/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; margin-top: 1.4em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
ul { margin: 0; padding: 0; list-style: none; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--ink); color: var(--cream);
}
.top img { width: 40px; height: 40px; }
.top p { margin: 0; }
.top-k { font: 800 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.top-t { font: 700 1.2rem/1.2 var(--serif); }

main { max-width: 640px; margin: 0 auto; padding: 18px 16px 28px; outline: none; }

/* bottom tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  height: var(--tabs); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font: 800 .8rem/1 var(--sans);
}
.tabs svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--gold-soft); }

/* building blocks */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 12px; }
.big-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.fact { background: var(--ink); color: var(--cream); border-radius: 14px; padding: 12px 8px; text-align: center; }
.fact b { display: block; font: 700 1.7rem/1.1 var(--serif); color: var(--gold); }
.fact span { font-size: .85rem; line-height: 1.25; display: block; }
.when { background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; margin: 0 0 16px; }
.when p:last-child { margin: 0; }
.warn { border-left: 5px solid var(--gold); }
.muted { color: var(--muted); }
.small { font-size: .95rem; }

/* step checklists */
.stage { margin: 0 0 14px; }
.stage-h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.stage-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 700 1.05rem/1 var(--serif); }
.stage-h h2 { margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: 0; }
.check input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--olive); }
.check input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--olive); }
.check small { display: block; color: var(--muted); font-size: .92rem; }

.bullets li { position: relative; padding: 8px 0 8px 26px; border-top: 1px solid var(--line); }
.bullets li:first-child { border-top: 0; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }

/* areas */
.area-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); font-weight: 400; }
.area-badge { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 700 1.8rem/1 var(--serif); }
.area-link h3 { margin: 0; }
.area-link .go { margin-left: auto; font-size: 1.6rem; color: var(--olive); }
.bar { height: 10px; border-radius: 99px; background: var(--sand); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--olive); }
.map { border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.photos img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; margin: -6px 0 6px; }

.tubes { display: grid; gap: 8px; margin: 0 0 12px; }
.tube-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.tube-row b { font: 700 1.5rem/1 var(--serif); color: var(--ink); min-width: 2.2ch; text-align: right; }

.plant { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; margin: 0 0 10px; overflow: hidden; }
.plant.done { border-color: var(--olive); background: #f3f5e8; }
.plant-top { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; }
.plant-name { flex: 1; min-width: 0; }
.plant-name h3 { margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 800 .78rem/1 var(--sans); padding: 6px 8px; border-radius: 99px; background: var(--sand); color: var(--ink); white-space: nowrap; }
.chip.t-T { background: var(--ink); color: var(--cream); }
.chip.t-S { background: var(--gold-soft); }
.chip.t-F { background: var(--gold); color: var(--ink); }
.counter { flex: none; display: grid; grid-template-columns: 44px auto 44px; align-items: center; gap: 4px; text-align: center; }
.counter button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--sand); color: var(--ink); font: 800 1.5rem/1 var(--sans); cursor: pointer; }
.counter button.plus { background: var(--olive); color: #fff; }
.counter output { font: 700 1.05rem/1.1 var(--serif); min-width: 3.4ch; }
.counter output small { display: block; font: 700 .72rem/1 var(--sans); color: var(--muted); }
.plant details summary { padding: 0 14px 12px; color: var(--olive); font-weight: 800; font-size: .95rem; cursor: pointer; list-style: none; }
.plant details summary::-webkit-details-marker { display: none; }
.plant details summary::before { content: "+ "; }
.plant details[open] summary::before { content: "− "; }
.plant details p { padding: 0 14px 12px; margin: 0; }
.reset { width: 100%; min-height: 48px; border-radius: 14px; border: 2px solid var(--line); background: transparent; color: var(--muted); font: 800 1rem/1 var(--sans); cursor: pointer; margin-top: 8px; }

/* diagrams */
.diagram { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 0 0 12px; }
.diagram svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .9rem; margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }

.zone { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.zone:first-child { border-top: 0; }
.zone b { color: var(--ink); }

.links li { border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links a { display: flex; align-items: center; min-height: 52px; text-decoration: none; }
.links a::after { content: "↗"; margin-left: auto; color: var(--olive); }
