/* Free Plant Identifier: one stylesheet for the identifier and the plant pages.
   Palette from a gum leaf (pale underside, eucalypt green) with wattle yellow as the one bright accent. */
:root {
  color-scheme: light;
  --bg: #e9eee7;
  --surface: #f8faf6;
  --sunk: #dde4db;
  --ink: #17291f;
  --ink-2: #47594e;
  --muted: #6d7d73;
  --line: rgba(23, 41, 31, 0.13);
  --leaf: #2f5d46;
  --leaf-soft: #cfdccf;
  --land: #d6dfd3;
  --on-leaf: #ffffff;
  --wattle: #efb321;
  --wattle-ink: #8a6200;
  --danger: #b0402c;
  --scrim: rgba(7, 12, 9, 0.94);
  --shadow: 0 1px 2px rgba(23, 41, 31, .06), 0 8px 28px -12px rgba(23, 41, 31, .22);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: 24px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1612; --surface: #16211b; --sunk: #1d2a23;
  --ink: #e5ede7; --ink-2: #a8b9ae; --muted: #7d8f84; --line: rgba(229, 237, 231, 0.12);
  --leaf: #78b092; --leaf-soft: #243a2e; --land: #2b3b32; --on-leaf: #0e1612; --wattle: #f4c043; --wattle-ink: #f4c043; --danger: #e6735e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
img { display: block; }
a { color: var(--leaf); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; padding: 8px 14px; background: var(--surface); border-radius: 10px; }

/* ---------- header and footer ---------- */
.site-bar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.mark svg { width: 26px; height: 26px; color: var(--leaf); flex: none; }
.bar-cta { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; background: var(--leaf); color: var(--on-leaf); font-weight: 600; font-size: 15px; text-decoration: none; }
.bar-cta svg { width: 18px; height: 18px; }
.bar-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; border-radius: 10px; }
.bar-link:hover { color: var(--ink); background: var(--sunk); }
.bar-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--leaf); border-radius: 0; }
.bar-end { display: flex; align-items: center; gap: 10px; }
.foot { border-top: 1px solid var(--line); margin-top: 88px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; padding-top: 36px; padding-bottom: 48px; font-size: 14px; color: var(--ink-2); }
.foot p { margin: 0 0 10px; max-width: 46em; }
.foot .mark { margin-bottom: 10px; }

/* ---------- buttons, chips, links ---------- */
.btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 18px; border-radius: 14px; border: 0; cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform .12s ease, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--leaf); color: var(--on-leaf); }
.btn.primary:hover { box-shadow: 0 6px 18px -8px var(--leaf); }
.btn.secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn.ghost { flex: none; min-height: 44px; background: var(--sunk); color: var(--ink); font-size: 15px; }
.btn.ghost:hover { background: var(--line); }
.link { padding: 4px 2px; border: 0; background: none; color: var(--leaf); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; font-weight: 500; }
.only-touch { display: none; }
@media (pointer: coarse) { .only-touch { display: inline-flex; } .only-fine { display: none; } }

/* ---------- photo tiles and skeletons ---------- */
.tile { position: relative; overflow: hidden; background: var(--sunk); }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.tile img.in { opacity: 1; }
.sk::after, .bone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .45) 50%, transparent 80%); transform: translateX(-100%); animation: shimmer 1.3s ease-in-out infinite; }
:root[data-theme="dark"] .sk::after, :root[data-theme="dark"] .bone::after { background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .06) 50%, transparent 80%); }
:root[data-theme="dark"] .sk::after, :root[data-theme="dark"] .bone::after { background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .06) 50%, transparent 80%); }
@keyframes shimmer { to { transform: translateX(100%); } }
.bone { position: relative; overflow: hidden; display: block; background: var(--sunk); border-radius: 8px; }
.au { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(9, 16, 12, .6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 20; background: var(--scrim); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; grid-template-rows: minmax(0, 1fr) auto; color: #fff; visibility: hidden; opacity: 0; transition: opacity .2s, visibility 0s linear .2s; }
.lightbox.show { visibility: visible; opacity: 1; transition: opacity .2s, visibility 0s; }
.stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 24px 80px 0; }
.stage img { position: absolute; inset: 24px 80px 0; width: calc(100% - 160px); height: calc(100% - 24px); object-fit: contain; transition: opacity .25s; }
.lightbox.loading .stage img { opacity: .25; }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--wattle); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.stage .spin { position: absolute; width: 32px; height: 32px; border-width: 3px; opacity: 0; transition: opacity .2s; }
.lightbox.loading .stage .spin { opacity: 1; }
.cap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 16px 16px 22px; font-size: 14px; color: rgba(255, 255, 255, .72); }
.cap b { color: #fff; font-weight: 600; }
.cap a { color: #fff; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 16px; right: 16px; }

/* ================================================================
   Identifier (home page)
   ================================================================ */
.model { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; row-gap: 5px; padding: 7px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 34px; }
.model .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wattle); }
.model.loading .dot { animation: pulse 1.2s ease-in-out infinite; }
.model.ready .dot { background: var(--leaf); }
.model.error .dot { background: var(--danger); }
.model.error { color: var(--danger); }
.model .track { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.model .track i { display: block; height: 100%; width: 0; background: var(--wattle); transition: width .2s linear; }
.model .track.indet i { width: 35%; animation: indet 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

.app { max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: start; }
.capture { position: sticky; top: 80px; }

.vf { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; isolation: isolate; cursor: pointer; }
.vf-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }
.vf-empty svg { width: 64px; height: 64px; color: var(--leaf); opacity: .55; margin-bottom: 6px; }
.vf-empty strong { color: var(--ink); font-size: 16px; font-weight: 600; }
.vf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .35s ease, transform .6s ease, filter .4s ease; }
.vf.has-photo { cursor: default; }
.vf.has-photo .vf-photo { opacity: 1; transform: none; }
.vf.has-photo .vf-empty { display: none; }
.corner { position: absolute; width: 30px; height: 30px; border: 0 solid var(--wattle); z-index: 3; transition: inset .35s cubic-bezier(.3, .7, .2, 1), opacity .3s; pointer-events: none; }
.corner.tl { top: 18px; left: 18px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 10px; }
.corner.tr { top: 18px; right: 18px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 10px; }
.corner.bl { bottom: 18px; left: 18px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 10px; }
.corner.br { bottom: 18px; right: 18px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 10px; }
.vf.over .corner.tl { top: 30px; left: 30px; } .vf.over .corner.tr { top: 30px; right: 30px; }
.vf.over .corner.bl { bottom: 30px; left: 30px; } .vf.over .corner.br { bottom: 30px; right: 30px; }
.vf.over { outline: 2px solid var(--wattle); outline-offset: -2px; }
.vf.done .corner { opacity: 0; }
.scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s; background: linear-gradient(180deg, rgba(9, 16, 12, .28), rgba(9, 16, 12, .05) 40%, rgba(9, 16, 12, .45)); }
.vf.scanning .scan { opacity: 1; }
.vf.scanning .vf-photo { filter: saturate(.75); }
.sweep { position: absolute; left: 0; right: 0; top: 0; height: 120px; transform: translateY(-120px); background: linear-gradient(180deg, rgba(239, 179, 33, 0), rgba(239, 179, 33, .28)); border-bottom: 2px solid var(--wattle); box-shadow: 0 6px 18px rgba(239, 179, 33, .55); }
.vf.scanning .sweep { animation: sweep 1.6s cubic-bezier(.45, .05, .55, .95) infinite alternate; }
@keyframes sweep { from { transform: translateY(-110px); } to { transform: translateY(calc(var(--h, 560px) - 10px)); } }
.vf.scanning .corner { animation: breathe 1.6s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .55; } }
.step { position: absolute; left: 50%; bottom: 22px; z-index: 4; transform: translate(-50%, 8px); opacity: 0; transition: opacity .25s, transform .25s; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px; background: rgba(9, 16, 12, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; max-width: calc(100% - 32px); }
.step span { overflow: hidden; text-overflow: ellipsis; }
.vf.scanning .step { opacity: 1; transform: translate(-50%, 0); }

.actions { display: flex; gap: 10px; margin-top: 16px; }
.locline { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--ink-2); min-height: 32px; }
.locline svg { width: 16px; height: 16px; color: var(--leaf); flex: none; }

.panel { min-width: 0; padding-top: 8px; }
.intro h1 { font-family: var(--serif); font-weight: 450; font-size: clamp(42px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.025em; margin: 14px 0 22px; font-variation-settings: "opsz" 72; text-wrap: balance; }
.intro p { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 30em; }
.tips li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: center; color: var(--ink-2); font-size: 15px; }
.tips svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface); color: var(--leaf); box-shadow: var(--shadow); }
.target { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; max-width: 30em; margin: 0 0 26px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; color: var(--ink-2); }
.target .tile { width: 48px; height: 48px; border-radius: 10px; }
.target b { color: var(--ink); font-weight: 600; }
.alert { margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border-left: 3px solid var(--danger); color: var(--ink); font-size: 15px; }
.alert b { color: var(--danger); }

.top { background: var(--surface); border-radius: 22px; padding: 26px 28px 24px; box-shadow: var(--shadow); }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.top-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; }
.top-h { margin: 0; min-width: 0; font-weight: inherit; }
.top-name { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; font-variation-settings: "opsz" 60; }
.top-sci { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; color: var(--ink-2); margin: 6px 0 0; overflow-wrap: anywhere; }
.sci-only { font-style: italic; }
@keyframes grow { from { transform: scaleX(0); } }
.strip { width: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.strip .tile { aspect-ratio: 1; border-radius: 12px; }
.top-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.others-title { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 30px 0 8px 4px; }
.others { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 24px 56px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 16px; background: none; cursor: pointer; transition: background .15s; }
.row:hover { background: var(--surface); }
.row .tile { grid-row: span 2; width: 56px; height: 56px; border-radius: 12px; }
.conf-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf); color: var(--on-leaf); font-family: var(--serif); font-size: 16px; font-weight: 500; font-variant-numeric: lining-nums; }
.row-rank { grid-row: span 2; font-family: var(--serif); font-size: 19px; color: var(--ink-2); text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.row-text { grid-row: span 2; align-self: center; min-width: 0; display: grid; }
.row-name { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.row-sci { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.row-pct { grid-row: span 2; font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: right; }
.fine { font-size: 13px; color: var(--muted); margin: 18px 4px 0; }
.results.reveal .top { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.results.reveal .others li { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.18s + var(--i) * .06s); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.skel-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 48px; gap: 16px; align-items: center; padding: 10px; }

/* species sheet: compare your photo with a match */
.sheet { position: fixed; inset: 0; z-index: 10; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; visibility: hidden; opacity: 0; transform: translateY(18px); transition: opacity .28s ease, transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s; }
.sheet.show { visibility: visible; opacity: 1; transform: none; transition: opacity .28s ease, transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.sheet-bar { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.sheet-bar .in { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 14px; }
.back { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-weight: 600; font-size: 15px; }
.back svg { width: 20px; height: 20px; }
.cands { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; }
.cands::-webkit-scrollbar { display: none; }
.cand { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cand b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.cand:hover { background: var(--surface); }
.cand[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cand[aria-current="true"] b { color: var(--bg); opacity: .7; }
.sheet-body { max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 72px; }
.sp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare figure { margin: 0; }
.compare .tile { aspect-ratio: 4 / 5; border-radius: 18px; }
.compare .tile.yours { outline: 3px solid var(--wattle); outline-offset: -3px; }
.compare button.tile { width: 100%; padding: 0; border: 0; cursor: zoom-in; display: block; }
.compare figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.matches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.match { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; color: var(--ink-2); }
.match::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.match.strong::before { background: var(--leaf); }
.match.likely::before { background: var(--wattle); }
.match b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-name { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.025em; margin: 0; overflow-wrap: anywhere; font-variation-settings: "opsz" 72; }
.sp-sci { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); margin: 8px 0 0; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 36px; margin: 28px 0 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--serif); font-size: 28px; font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; }
.sp-more { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.gal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 52px 0 16px; }
.gal-head h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; margin: 0; }
.gal-head p { margin: 0; font-size: 14px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gallery .tile { aspect-ratio: 1; border-radius: 14px; padding: 0; border: 0; cursor: zoom-in; }
.gallery .tile img { transition: opacity .35s ease, transform .4s ease; }
.gallery .tile:hover img.in { transform: scale(1.04); }
.empty { color: var(--ink-2); font-size: 15px; grid-column: 1 / -1; }

/* below the identifier: what it is, how it works, how accurate it is */
.notes { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.note { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; padding: 56px 0; border-top: 1px solid var(--line); }
.note h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 60; }
.note-body { max-width: 40em; font-family: var(--serif); font-size: 19px; line-height: 1.65; color: var(--ink); }
.note-body p { margin: 0 0 1em; }
.note-body p:last-child { margin-bottom: 0; }
.howto { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 22px; }
.howto li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.howto li::before { content: counter(step); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--leaf); color: var(--leaf); font-family: var(--serif); font-size: 22px; line-height: 1; }
.howto b { display: block; font-family: var(--sans); font-size: 16px; font-weight: 600; margin: 2px 0 4px; }
.howto span { color: var(--ink-2); font-size: 18px; }
.tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin: 8px 0 28px; }
.tally figure { margin: 0; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 230px; margin-bottom: 14px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--sunk); }
.dots i.on { background: var(--leaf); }
.dots i.loc { background: var(--wattle); }
.tally figcaption { min-height: 2.9em; margin-bottom: 12px; font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink); max-width: 22em; }
.tally-key { margin: 0; max-width: 230px; font-family: var(--sans); }
.tally-key div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; }
.tally-key div + div { border-top: 1px solid var(--line); }
.tally-key dt { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tally-key dt i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.tally-key dt i.on { background: var(--leaf); }
.tally-key dt i.loc { background: var(--wattle); }
.tally-key dd { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.lookups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 24px; }
.lookups a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.lookups a:hover { background: var(--surface); }
.lookups .tile { width: 52px; height: 52px; border-radius: 10px; }
.lookups b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; }
.lookups i { font-family: var(--serif); font-size: 15px; color: var(--ink-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-family: var(--sans); font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 26px; line-height: .8; color: var(--leaf); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--ink-2); }

/* ================================================================
   Plant pages: an encyclopedia entry drawn like a herbarium plate
   ================================================================ */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 4px var(--gutter) 0; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.entry { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px 64px; }
.entry-head { grid-column: 1 / -1; padding: 22px 0 8px; max-width: 900px; }
.entry-head h1 { font-family: var(--serif); font-weight: 450; font-size: clamp(40px, 5.4vw, 70px); line-height: 1.02; letter-spacing: -0.025em; margin: 0; font-variation-settings: "opsz" 72; text-wrap: balance; }
.entry-head .binomial { margin: 14px 0 0; font-family: var(--serif); font-size: 22px; color: var(--ink-2); }
.entry-head .binomial i { color: var(--ink); }
.article { min-width: 0; font-family: var(--serif); font-size: 19px; line-height: 1.68; }
.article > p, .article section > p, .article li { max-width: 38em; }
.article p { margin: 0 0 1.05em; }
.lede { font-size: 22px; line-height: 1.55; }
.article h2 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.1; letter-spacing: -0.015em; margin: 64px 0 18px; padding-top: 18px; border-top: 1px solid var(--line); font-variation-settings: "opsz" 60; }
.article h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin: 30px 0 8px; }
.article ul { padding-left: 1.1em; margin: 0 0 1.1em; }
.article li { margin: 0 0 .45em; }
.article li::marker { color: var(--leaf); }
.ref { font-family: var(--sans); font-size: 12px; font-weight: 600; vertical-align: super; line-height: 0; margin-left: 1px; text-decoration: none; }
.strip-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 30px 0 4px; }
.strip-photos .tile { aspect-ratio: 1; border-radius: 12px; padding: 0; border: 0; cursor: zoom-in; width: 100%; }
.strip-note { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0; }

/* figures: Claude's botanical plates, the map, the family tree */
.fig { margin: 30px 0 34px; }
.fig .plate { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; overflow: hidden; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 12px 4px 0; max-width: 48em; }
.fig figcaption b { color: var(--ink); font-weight: 600; }
.plate-ink { color: var(--ink); }
.plate-ink .lbl { font-family: var(--serif); font-style: italic; font-size: 16px; fill: var(--ink-2); }
.plate-ink .lbl-b { font-family: var(--sans); font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.plate-ink .panel-no { font-family: var(--serif); font-size: 18px; fill: var(--muted); }
.plate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; align-items: start; }
.plate-col { display: grid; gap: 8px; }
.plate-col svg + svg { border-top: 1px solid var(--line); padding-top: 8px; }
.fig .plate { container-type: inline-size; }
@container (max-width: 640px) { .plate-grid { grid-template-columns: minmax(0, 1fr); max-width: 440px; margin: 0 auto; } .plate-col { border-top: 1px solid var(--line); padding-top: 8px; } }
.plate-ink .lead { stroke: var(--muted); stroke-width: .8; fill: none; }
.plate-ink .scale { stroke: var(--ink-2); stroke-width: 1.2; fill: none; }
.mapfig .cell { fill: var(--land); }
.mapfig .cell.on { fill: var(--leaf); }
.mapfig .city circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.mapfig .city text { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin: 12px 4px 0; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 2px; background: var(--land); }
.legend i.on { background: var(--leaf); }
.tree .node text { font-family: var(--serif); font-size: 16px; fill: var(--ink); }
.tree .node text.rank { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.tree .node text.common { font-family: var(--sans); font-size: 13px; fill: var(--ink-2); }
.tree .node circle { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.4; }
.tree .node.here circle { fill: var(--wattle); stroke: var(--ink); }
.tree .node.here text { font-weight: 600; }
.tree .edge { stroke: var(--ink-2); stroke-width: 1.4; fill: none; }
.tree .edge.cross { stroke-dasharray: 4 4; stroke: var(--wattle-ink); }
.tree a text { fill: var(--leaf); text-decoration: underline; }

.alikes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.alike { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: start; }
.alike .tile { width: 112px; aspect-ratio: 1; border-radius: 14px; }
.alike h3 { margin: 4px 0 2px; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.alike h3 i { font-size: 16px; color: var(--ink-2); font-weight: 400; margin-left: 6px; }
.alike p { font-size: 17px; line-height: 1.55; margin: 0; color: var(--ink-2); }

.gallery-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; }
.gallery-full .tile { aspect-ratio: 1; border-radius: 12px; padding: 0; border: 0; cursor: zoom-in; width: 100%; }
.refs { font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink-2); padding-left: 1.4em; }
.refs li { margin-bottom: .7em; max-width: 46em; }
.refs li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.refs li:target { background: color-mix(in srgb, var(--wattle) 22%, transparent); border-radius: 6px; }
.credits { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 14px; }

/* the infobox: classification and quick facts, beside the article */
.infobox { min-width: 0; }
.infobox-in { position: sticky; top: 80px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; font-size: 14.5px; }
.infobox .hero { width: 100%; aspect-ratio: 4 / 5; border-radius: 0; border: 0; padding: 0; cursor: zoom-in; display: block; }
.infobox .hero-cap { padding: 8px 16px 0; font-size: 12px; color: var(--muted); }
.infobox section { padding: 14px 18px; }
.infobox section + section { border-top: 1px solid var(--line); }
.infobox h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.classify { width: 100%; border-collapse: collapse; }
.classify th { text-align: left; font-weight: 500; color: var(--muted); padding: 3px 12px 3px 0; white-space: nowrap; vertical-align: top; }
.classify td { padding: 3px 0; font-family: var(--serif); font-size: 16px; }
.classify tr.here td { font-weight: 600; }
.qfacts { margin: 0; display: grid; gap: 10px; }
.qfacts div { display: grid; gap: 1px; }
.qfacts dt { color: var(--muted); font-size: 13px; }
.qfacts dd { margin: 0; font-size: 15px; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.status.weed::before { background: var(--danger); }
.check { display: grid; gap: 10px; }
.check p { margin: 0; color: var(--ink-2); }
.check .btn { flex: none; width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-head { order: -2; }
  .infobox { order: -1; }
  .infobox-in { position: static; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .infobox-in > .hero, .infobox-in > .hero-cap { grid-column: 1; }
  .infobox-in > .hero { grid-row: 1 / span 3; height: 100%; aspect-ratio: auto; min-height: 260px; }
  .infobox-in > .hero-cap { display: none; }
  .infobox section + section { border-top: 1px solid var(--line); }
  .infobox-in > section:first-of-type { border-top: 0; }
  .note { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 44px 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .capture { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .panel { padding-top: 0; }
  .intro h1 { margin-top: 4px; }
  .sp-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sp-top .sp-text { order: 2; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .bar { padding: 14px var(--gutter); }
  .mark span.long { display: none; }
  .vf { aspect-ratio: 1; border-radius: 20px; }
  .intro h1 { font-size: 42px; }
  .intro p { font-size: 17px; }
  .top { padding: 22px 20px 20px; border-radius: 20px; }
  .pct { font-size: 50px; }
  .strip { gap: 6px; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px; }
  .row .tile { width: 52px; height: 52px; }
  .row-name { font-size: 19px; }
  .sheet-body { padding: 20px var(--gutter) 56px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .gallery .tile { border-radius: 10px; }
  .gal-head { margin-top: 40px; }
  .stage img { inset: 64px 8px 0; width: calc(100% - 16px); height: calc(100% - 64px); }
  .lb-prev, .lb-next { top: auto; bottom: 74px; transform: none; }
  .tally { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .note-body { font-size: 18px; }
  .article { font-size: 18px; }
  .lede { font-size: 20px; }
  .article h2 { font-size: 29px; margin-top: 48px; }
  .fig .plate { padding: 12px; border-radius: 14px; }
  .infobox-in { grid-template-columns: minmax(0, 1fr); }
  .infobox-in > .hero { grid-row: auto; aspect-ratio: 4 / 3; min-height: 0; }
  .alike { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .alike .tile { width: 84px; }
  .gallery-full { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .strip-photos { gap: 6px; }
}
@media (max-width: 400px) {
  .mark { font-size: 15px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .vf.scanning .sweep { display: none; }
}
.note-title { font-family: var(--serif); font-weight: 450; font-size: clamp(40px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.025em; margin: 0; font-variation-settings: "opsz" 72; }
.note .note-body + .lookups { margin-top: 28px; }
.tile.none { display: grid; place-items: center; color: var(--muted); }
.tile.none svg { width: 40%; height: 40%; opacity: .6; }

/* badges: status and hazards, up front on every plant guide */
.badges { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-family: var(--sans); line-height: 1.25; }
.badge .ico { width: 26px; height: 26px; flex: none; }
.badge b { display: block; font-size: 15px; font-weight: 700; }
.badge small { display: block; font-size: 12.5px; color: var(--ink-2); max-width: 26em; }
.badge.tone-danger { background: var(--danger); color: #fff; }
.badge.tone-danger small { color: rgba(255, 255, 255, .85); }
.badge.tone-caution { background: var(--wattle); color: #1b1606; box-shadow: inset 0 0 0 2px #1b1606; }
.badge.tone-caution small { color: #3b3210; }
.badge.irritant .ico, .badge.introduced .ico { color: var(--wattle-ink); }
.badge.native .ico { color: var(--leaf); }
.origin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 0; font-family: var(--sans); font-size: 15px; color: var(--ink-2); }
.origin-label { font-weight: 600; color: var(--ink); }
.flags { display: inline-flex; align-items: center; gap: 4px; }
.flags img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.flags .more { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.worldfig .country { fill: var(--land); stroke: var(--surface); stroke-width: .5; }
.worldfig .country.native { fill: var(--wattle); }
.worldfig .country.seen.l1 { fill: color-mix(in srgb, var(--leaf) 25%, var(--land)); }
.worldfig .country.seen.l2 { fill: color-mix(in srgb, var(--leaf) 42%, var(--land)); }
.worldfig .country.seen.l3 { fill: color-mix(in srgb, var(--leaf) 60%, var(--land)); }
.worldfig .country.seen.l4 { fill: color-mix(in srgb, var(--leaf) 80%, var(--land)); }
.worldfig .country.seen.l5 { fill: var(--leaf); }
.legend i.native { background: var(--wattle); }
.legend i.seen { background: var(--leaf); }

/* ---------- identifier as three steps: photo, matches, confirm ---------- */
.flow { max-width: 800px; margin: 0 auto; padding: 24px var(--gutter) 24px; }
.flow-head h1 { font-family: var(--serif); font-weight: 450; font-size: clamp(40px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.025em; margin: 10px 0 18px; font-variation-settings: "opsz" 72; text-wrap: balance; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.step-card { margin-top: 16px; padding: 22px 24px 24px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.step-h { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; font-variation-settings: "opsz" 40; }
.step-h span { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--leaf); color: var(--on-leaf); font-size: 20px; }
.match-step:not(:has(#results:not([hidden]))) .step-h, .confirm-step .step-h { color: var(--ink-2); }
.match-step:not(:has(#results:not([hidden]))) .step-h span, .confirm-step .step-h span { background: none; border: 1.5px solid var(--leaf); color: var(--leaf); }
body:has(#results:not([hidden])) .confirm-step .step-h span { background: var(--leaf); color: var(--on-leaf); }
.photo-step .vf { aspect-ratio: 4 / 3; border-radius: 16px; background: var(--sunk); box-shadow: none; }
body:has(#results:not([hidden])) .photo-step .vf { aspect-ratio: auto; height: 220px; }
.photo-step .locline { margin-top: 14px; }
.match-step .tips { max-width: none; }
.match-step .intro { padding: 0; }
.confirm-step p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.mini-guides { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mini-guides a { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--sunk); color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 17px; }
.mini-guides a:hover { background: var(--leaf-soft); }
.mini-guides .tile { width: 34px; height: 34px; border-radius: 50%; }
.mini-guides b { font-weight: 500; }
.mini-guides i { color: var(--muted); font-size: 15px; }
.flow .notes { max-width: none; padding: 0; margin-top: 48px; }
.flow .note { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 18px; padding: 40px 0; }
.flow .note h2 { font-size: clamp(28px, 3.4vw, 36px); }
.notes-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; border-top: 1px solid var(--line); }
.notes-two .note { border-top: 0; }
.notes-two .note-body { font-size: 17px; }
.notes-two .tally { gap: 16px; }
.notes-two .tally-key dt { font-size: 13px; gap: 6px; }
.notes-two .tally-key dd { font-size: 22px; }
@media (max-width: 720px) {
  .notes-two { grid-template-columns: minmax(0, 1fr); }
  .notes-two .note + .note { border-top: 1px solid var(--line); }
  .step-card { padding: 16px; border-radius: 18px; }
  .step-h { font-size: 22px; gap: 10px; }
  .step-h span { width: 32px; height: 32px; font-size: 17px; }
  .photo-step .vf { aspect-ratio: 1; }
}

/* ---------- plant guide: the answers first ---------- */
.verdicts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 26px; }
.verdict { border-radius: 20px; padding: 18px 20px 20px; color: var(--ink); }
.verdict.danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); box-shadow: inset 0 0 0 2px var(--danger); }
.verdict.weed { background: color-mix(in srgb, var(--wattle) 16%, var(--surface)); box-shadow: inset 0 0 0 2px var(--wattle); }
.verdict-q { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.verdict-q svg { width: 20px; height: 20px; }
.verdict.danger .verdict-q svg { color: var(--danger); }
.verdict.weed .verdict-q svg { color: var(--wattle-ink); }
.verdict-a { margin: 4px 0 6px; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4vw, 44px); line-height: 1.04; letter-spacing: -0.02em; }
.verdict.danger .verdict-a { color: var(--danger); }
.verdict.weed .verdict-a { color: var(--wattle-ink); }
.verdict-s { margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.who, .listings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.who li, .listings li { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.who-l { font-weight: 700; grid-row: span 2; }
.listings .who-l { grid-row: auto; }
.who-v { grid-column: 2; justify-self: start; align-self: start; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.who-t { grid-column: 2; color: var(--ink-2); }
.listings .who-t { grid-row: 1; }
.lvl-high .who-v { background: var(--danger); color: #fff; }
.lvl-toxic .who-v { background: color-mix(in srgb, var(--danger) 75%, var(--wattle)); color: #fff; }
.lvl-low .who-v, .lvl-irritant .who-v { background: color-mix(in srgb, var(--wattle) 55%, var(--surface)); color: var(--ink); }
.answers { margin-top: 26px; }
.answers h2 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.answers dl { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.ans { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ans dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 700; font-size: 17px; }
.ans-short { padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--sunk); color: var(--ink-2); }
.tone-danger .ans-short { background: var(--danger); color: #fff; }
.tone-caution .ans-short { background: color-mix(in srgb, var(--wattle) 55%, var(--surface)); color: var(--ink); }
.tone-info .ans-short { background: var(--leaf-soft); color: var(--leaf); }
.ans dd { margin: 4px 0 0; font-family: var(--serif); font-size: 17.5px; line-height: 1.6; max-width: 46em; }
.refs-in { font-family: var(--sans); font-size: 11px; line-height: 1; margin-inline-start: 2px; white-space: nowrap; }
.refs-in a.cite { display: inline-block; min-width: 1.6em; padding: 1px 4px; margin-inline-start: 2px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); text-align: center; text-decoration: none; font-weight: 700; }
.refs-in a.cite:hover { background: var(--leaf-soft); color: var(--leaf); }
.img-fig { margin: 22px 0 30px; }
.img-fig img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: var(--shadow); background: #fff; }
.img-fig figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 10px; max-width: 46em; }
.img-list { padding-inline-start: 1.2em; font-family: var(--sans); font-size: 14px; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0; }
.flags img { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.flags .more { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-inline-start: 4px; }
.keys { padding-inline-start: 1.1em; }
.keys b { font-family: var(--sans); font-size: 16px; }
@media (max-width: 760px) {
  .verdicts { grid-template-columns: minmax(0, 1fr); }
  .who li, .listings li { grid-template-columns: minmax(0, 1fr); }
  .who-v, .who-t, .listings .who-t { grid-column: 1; grid-row: auto; }
}

/* ---------- light / dark ---------- */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow, none); cursor: pointer; }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun, :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }

/* ---------- embed an image ---------- */
.embed { margin-top: 10px; font-family: var(--sans); font-size: 14px; }
.embed summary { cursor: pointer; font-weight: 700; color: var(--ink-2); width: max-content; }
.embed p { margin: 8px 0; color: var(--ink-2); }
.embed textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); color: var(--ink); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.embed-copy { margin-top: 8px; min-height: 38px; }

/* ---------- badges as links, and the answer tables ---------- */
a.badge { color: inherit; text-decoration: none; transition: transform .15s; }
a.badge:hover { transform: translateY(-1px); }
a.badge:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; }
.article h2[id] { scroll-margin-top: 20px; }
.who-t { width: 100%; max-width: 38em; border-collapse: collapse; font-family: var(--sans); font-size: 15.5px; line-height: 1.45; margin: 4px 0 1.2em; }
.who-t th, .who-t td { text-align: start; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--line); }
.who-t th { width: 34%; padding-inline-end: 16px; font-weight: 600; }
.who-t td { color: var(--ink-2); }
.who-t .who-v { display: inline-block; margin-inline-end: 6px; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- the poison and weed sections ---------- */
.verdict-sec { margin: 34px 0 10px; padding: 26px 28px 22px; border-radius: 22px; border-top: 0 !important; }
.verdict-sec.danger { --v: var(--wattle); --v-ink: #1b1606; background: color-mix(in srgb, var(--wattle) 13%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--wattle) 70%, transparent); }
.verdict-sec.weed { --v: var(--danger); --v-ink: #fff; background: color-mix(in srgb, var(--danger) 9%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 55%, transparent); }
.article .verdict-sec h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 0; padding-top: 0; border-top: 0; }
.v-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--v); color: var(--v-ink); flex: none; }
.v-ico .ico { width: 26px; height: 26px; }
.verdict-sec.danger .v-ico { box-shadow: inset 0 0 0 2px #1b1606; }
.v-tag { padding: 3px 12px; border-radius: 999px; background: var(--v); color: var(--v-ink); font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.v-tag.sm { padding: 1px 9px; font-size: 12.5px; vertical-align: 2px; }
.tone-caution .v-tag.sm { background: color-mix(in srgb, var(--wattle) 55%, var(--surface)); color: var(--ink); }
.tone-info .v-tag.sm { background: var(--leaf-soft); color: var(--leaf); }
.tone-danger .v-tag.sm { background: var(--danger); color: #fff; }
.who-list { list-style: none; margin: 18px 0 8px; padding: 0 !important; display: grid; gap: 10px; max-width: none !important; }
.who-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); max-width: none; font-family: var(--sans); font-size: 15.5px; line-height: 1.45; }
.who-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--sunk); color: var(--ink-2); }
.who-ico .ico { width: 24px; height: 24px; }
.lvl-high .who-ico { background: var(--danger); color: #fff; }
.lvl-toxic .who-ico { background: color-mix(in srgb, var(--danger) 80%, var(--wattle)); color: #fff; }
.lvl-low .who-ico, .lvl-irritant .who-ico { background: var(--wattle); color: #1b1606; }
.flag-ico { background: none; }
.flag-ico img { width: 36px; height: 27px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.listings .flag-ico .ico { color: var(--danger); width: 30px; height: 30px; }
.who-body { display: grid; gap: 2px; min-width: 0; }
.who-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.who-head b { font-size: 16px; }
.who-tag { padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.who-desc { color: var(--ink-2); }
.lvl-high .who-tag { background: var(--danger); color: #fff; }
.lvl-toxic .who-tag { background: color-mix(in srgb, var(--danger) 75%, var(--wattle)); color: #fff; }
.lvl-low .who-tag, .lvl-irritant .who-tag { background: color-mix(in srgb, var(--wattle) 55%, var(--surface)); color: var(--ink); }
.mini-q { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.mq-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); color: var(--wattle-ink); margin-top: 2px; }
.tone-danger .mq-ico { color: var(--danger); }
.tone-info .mq-ico { color: var(--leaf); }
.mq-ico .ico { width: 19px; height: 19px; }
.mini-q h3 { margin: 4px 0 4px; }
.mini-q p { margin: 0; }
@media (max-width: 600px) {
  .verdict-sec { padding: 20px 16px 16px; margin-inline: calc(-1 * var(--gutter) + 8px); }
  .who-list li { grid-template-columns: 38px minmax(0, 1fr); padding: 10px 12px; }
  .who-ico { width: 38px; height: 38px; }
}

/* the infobox keeps its photo and check button in view; its other sections scroll inside it */
.infobox-in { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.infobox-in > * { flex: none; }
.infobox .hero { aspect-ratio: 4 / 3; }
.infobox-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); scrollbar-width: thin; }
.infobox-scroll > section:first-child { border-top: 0; }
@media (max-width: 960px) {
  .infobox-in { display: grid; max-height: none; }
  .infobox-scroll { display: contents; }
}
.listings li.yours { box-shadow: inset 0 0 0 2px var(--danger), var(--shadow); }
.yours-tag { padding: 1px 9px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12.5px; font-weight: 700; }

/* ---------- every listing, in a searchable popup ---------- */
.see-all { margin-top: 12px; min-height: 40px; }
.listing-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 760px); padding: 0; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.listing-dialog::backdrop { background: rgba(10, 14, 12, .55); }
.listing-dialog[open] { display: flex; flex-direction: column; }
.ld-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.ld-head h3 { margin: 0; font-size: 22px; }
.ld-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--sunk); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.ld-search { margin: 0 20px 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.ld-list { list-style: none; margin: 0; padding: 0 20px 20px; overflow-y: auto; display: grid; gap: 8px; }
.ld-list li { margin: 0; }
.ld-empty { margin: 0 20px 20px; color: var(--ink-2); }
.who-list { border-top: 0; }
.who-list li { border-bottom: 0; }
.embed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.embed > details { flex: 1 1 100%; }
.embed .embed-copy { order: -1; margin-top: 0; display: inline-flex; align-items: center; gap: 8px; }
.embed .embed-copy svg { width: 18px; height: 18px; }
.embed .embed-copy.done { background: var(--leaf); color: var(--on-leaf, #fff); }
.embed details summary { font-weight: 600; }

/* ---------- the side card runs from the top of the page, photos first ---------- */
.entry-head { grid-column: 1; }
.article { grid-column: 1; }
.infobox { grid-column: 2; grid-row: 1 / span 2; padding-top: 22px; }
.card-photos { display: grid; gap: 6px; padding: 0 0 4px; }
.card-photos .hero { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; border: 0; padding: 0; cursor: zoom-in; display: block; }
.card-photos .head-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 6px; }
.card-photos .head-thumbs .tile { aspect-ratio: 1; border-radius: 10px; border: 0; padding: 0; cursor: zoom-in; width: 100%; }
.card-photos .head-thumbs .tile:nth-child(n + 4) { display: none; }
.card-photos .hero-cap { margin: 0; padding: 4px 16px 0; font-size: 12px; color: var(--muted); }
@media (max-width: 960px) {
  .entry-head, .article, .infobox { grid-column: 1; grid-row: auto; }
  .infobox { padding-top: 0; }
  .infobox-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .bar { gap: 8px; }
  .bar-end { gap: 6px; }
  .bar .mark span { font-size: 15px; }
  .bar-cta { padding: 0 12px; font-size: 14px; }
  .bar-cta .long { display: none; }
}
/* on short screens the photos leave too little room for the facts, so the whole card scrolls instead */
@media (min-width: 961px) and (max-height: 820px) {
  .infobox-in { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .infobox-scroll { flex: none; overflow: visible; }
}
/* panel colours for the other verdicts: caution yellow, safe green, neutral grey */
.verdict-sec.caution { --v: var(--wattle); --v-ink: #1b1606; background: color-mix(in srgb, var(--wattle) 10%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--wattle) 50%, transparent); }
.verdict-sec.safe { --v: var(--leaf); --v-ink: var(--on-leaf); background: color-mix(in srgb, var(--leaf) 9%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--leaf) 45%, transparent); }
.verdict-sec.neutral { --v: var(--muted); --v-ink: #fff; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.lvl-none .who-ico { background: var(--leaf); color: var(--on-leaf); }
.lvl-none .who-tag { background: var(--leaf-soft); color: var(--leaf); }
.tone-safe .v-tag.sm { background: var(--leaf); color: var(--on-leaf); }
.tone-safe .mq-ico { color: var(--leaf); }
.badge.tone-safe { background: var(--leaf); color: var(--on-leaf); }
.badge.tone-safe small { color: rgba(255, 255, 255, .85); }
.more-answers .mini-q:first-of-type { margin-top: 0; }

/* ---------- care ---------- */
.care-grid { list-style: none; margin: 18px 0 8px; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-width: none !important; }
.care-grid li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-family: var(--sans); font-size: 15px; line-height: 1.45; max-width: none; }
.care-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--leaf-soft); color: var(--leaf); }
.care-ico .ico { width: 22px; height: 22px; }
.care-light .care-ico { background: color-mix(in srgb, var(--wattle) 30%, var(--surface)); color: var(--wattle-ink); }
.care-water .care-ico, .care-humidity .care-ico { background: color-mix(in srgb, #3f7fb5 18%, var(--surface)); color: #2f6a9c; }
.care-hardiness .care-ico, .care-temperature .care-ico { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.care-pests .care-ico { background: var(--sunk); color: var(--ink-2); }
.care-body { display: grid; gap: 2px; }
.care-body b { font-size: 15.5px; }
.care-body span { color: var(--ink-2); }

/* ---------- "Check your plant": the side card's call to action ---------- */
.infobox .check { background: color-mix(in srgb, var(--wattle) 14%, var(--surface)); }
.check-cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 4px; border: 0; border-radius: 14px;
  background: var(--wattle); color: #1b1606; font-size: 17px; font-weight: 700; text-decoration: none;
  box-shadow: inset 0 0 0 2px #1b1606, 0 6px 16px -8px rgba(138, 98, 0, .55); transition: transform .15s, box-shadow .15s; }
.check-cta svg { width: 22px; height: 22px; flex: none; }
.check-cta:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px #1b1606, 0 10px 20px -8px rgba(138, 98, 0, .6); }
.check-cta:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

/* ================================================================
   The scanner: the photo the model reads, its 16 x 16 patches lighting up as the scan line passes, then the
   real candidates flicking past before it locks on to the best match.
   ================================================================ */
.scanner { --glow: #f4c043; --scan-ink: #eaf2ec; position: relative; border-radius: 24px; padding: 10px; background: radial-gradient(120% 80% at 50% 0%, #1a2a21, #0b1310 70%); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .06); color: var(--scan-ink); }
.sc-stage { position: relative; aspect-ratio: 1; max-height: 560px; margin: 0 auto; border-radius: 16px; overflow: hidden; isolation: isolate; cursor: pointer; background: #0b1310; }
.scanner[data-state="done"] .sc-stage, .scanner[data-state="scan"] .sc-stage { cursor: default; }
.sc-img, .sc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-img { opacity: 0; transform: scale(1.04); transition: opacity .5s, transform 1.2s cubic-bezier(.2, .7, .2, 1), filter .6s; }
.sc-img.in { opacity: 1; transform: none; }
.scanner.scanning .sc-img { filter: saturate(.7) brightness(.82) contrast(1.05); }
.scanner.locked .sc-img { filter: none; }
.sc-video { z-index: 1; }

/* the 256 patches */
.sc-grid { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(16, 1fr); opacity: 0; transition: opacity .4s; pointer-events: none; }
.sc-grid i { border: .5px solid rgba(244, 192, 67, .16); }
.scanner.scanning .sc-grid { opacity: 1; }
.scanner.scanning .sc-grid i { animation: patch 1.8s linear infinite; animation-delay: calc(var(--r) * 100ms + var(--c) * 7ms); }
@keyframes patch {
  0%, 100% { background: transparent; box-shadow: none; }
  4% { background: rgba(244, 192, 67, .5); box-shadow: 0 0 12px 2px rgba(244, 192, 67, .55); }
  22% { background: rgba(120, 196, 150, .22); box-shadow: none; }
  60% { background: rgba(120, 196, 150, .06); }
}
.sc-sweep { position: absolute; left: 0; right: 0; top: 0; height: 22%; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(244, 192, 67, 0), rgba(244, 192, 67, .22) 80%, rgba(255, 220, 130, .9)); border-bottom: 2px solid #ffe08a;
  box-shadow: 0 8px 30px 4px rgba(244, 192, 67, .45); transform: translateY(-100%); }
.scanner.scanning .sc-sweep { opacity: 1; animation: sweep 1.8s linear infinite; }
@keyframes sweep { to { transform: translateY(460%); } }

/* corners lock on */
.sc-corner { position: absolute; z-index: 4; width: 34px; height: 34px; border: 0 solid rgba(255, 255, 255, .9); pointer-events: none; transition: inset .45s cubic-bezier(.3, 1.4, .5, 1), border-color .3s; }
.sc-corner.tl { top: 14px; left: 14px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 12px; }
.sc-corner.tr { top: 14px; right: 14px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 12px; }
.sc-corner.bl { bottom: 14px; left: 14px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 12px; }
.sc-corner.br { bottom: 14px; right: 14px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 12px; }
.scanner.scanning .sc-corner { border-color: var(--glow); animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.92); } }
.scanner.locked .sc-corner { border-color: #8fe0a8; }
.scanner.locked .sc-corner.tl, .scanner.locked .sc-corner.tr { top: 26px; }
.scanner.locked .sc-corner.bl, .scanner.locked .sc-corner.br { bottom: 26px; }
.scanner.locked .sc-corner.tl, .scanner.locked .sc-corner.bl { left: 26px; }
.scanner.locked .sc-corner.tr, .scanner.locked .sc-corner.br { right: 26px; }
.scanner.over .sc-stage { outline: 3px solid var(--glow); outline-offset: -3px; }

/* the candidates flicking past, and the match */
.sc-ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 70px 22px 20px; display: grid; gap: 2px; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 14, 11, 0), rgba(8, 14, 11, .85) 65%); opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.scanner.ticking .sc-ticker, .scanner.locked .sc-ticker { opacity: 1; transform: none; }
.sc-tick-label { font-size: 13px; font-weight: 600; color: var(--glow); }
.sc-ticker b { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.05; color: #fff; text-wrap: balance; }
.sc-ticker i { font-family: var(--serif); font-size: 16px; color: rgba(234, 242, 236, .75); min-height: 1.2em; }
.scanner.ticking .sc-ticker b { filter: blur(.4px); opacity: .85; }
.scanner.locked .sc-ticker b { animation: land .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes land { from { transform: scale(1.08); } }
.sc-badge { position: absolute; top: 18px; right: 18px; z-index: 5; padding: 6px 14px; border-radius: 999px; background: #8fe0a8; color: #0b1310; font-weight: 800; font-size: 18px; opacity: 0; transform: scale(.6); transition: opacity .3s .2s, transform .4s .2s cubic-bezier(.3, 1.6, .5, 1); }
.scanner.locked .sc-badge:not(:empty) { opacity: 1; transform: none; }
.sc-empty { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; padding: 14px 22px; border-radius: 16px; background: rgba(8, 14, 11, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; text-align: center; pointer-events: none; opacity: 0; transition: opacity .3s; }
.sc-empty b { font-size: 17px; }
.sc-empty span { font-size: 13px; color: rgba(255, 255, 255, .75); }
.scanner.demo .sc-stage:hover .sc-empty, .scanner.over .sc-empty { opacity: 1; }

/* the camera on a computer */
.sc-cam-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6)); }
.sc-cancel { justify-self: start; padding: 8px 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sc-shutter { width: 70px; height: 70px; border-radius: 50%; border: 0; background: var(--glow); box-shadow: 0 0 0 4px rgba(0, 0, 0, .5), 0 0 0 7px #fff; cursor: pointer; transition: transform .1s; }
.sc-shutter:active { transform: scale(.92); }

/* the status line under the photo */
.sc-hud { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 10px 8px 2px; font-size: 14.5px; font-weight: 600; color: var(--scan-ink); }
.sc-stage-text { flex: 1; min-width: 0; }
.scanner.scanning .sc-stage-text::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 9px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--glow); vertical-align: 1px; animation: pulse 1s ease-in-out infinite; }
.sc-progress { flex: 0 0 34%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.sc-progress i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #8fe0a8, var(--glow)); transition: width .25s linear; }
.sc-progress.indet i { width: 35%; animation: indet 1.1s ease-in-out infinite; }
.scanner.error .sc-hud { color: #ffb3a3; }
@keyframes pulse { 50% { opacity: .35; } }

/* the photos so far */
.tray { margin-top: 14px; }
.same-plant { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; padding: 9px 14px; border-radius: 14px; background: color-mix(in srgb, var(--wattle) 22%, var(--surface)); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; }
.same-plant::before { content: "!"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--wattle); color: #1b1606; font-weight: 800; }
.tray-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tray-item { position: relative; }
.tray-thumb { display: block; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow); }
.tray-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tray-item.scanning .tray-thumb { box-shadow: 0 0 0 3px var(--wattle); animation: pulse 1.2s ease-in-out infinite; }
.tray-item.done .tray-thumb { box-shadow: 0 0 0 3px var(--leaf); }
.tray-x { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 16px; line-height: 1; cursor: pointer; }

/* take / choose */
.photo-step .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.photo-step .actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; font-size: 16px; }
.photo-step .actions .btn svg { width: 21px; height: 21px; }
#camera-btn { background: var(--wattle); color: #1b1606; box-shadow: inset 0 0 0 2px #1b1606; }

/* the location switch */
.loc-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--sunk); cursor: pointer; }
.lt-text b { display: block; font-size: 15.5px; }
.lt-text small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.loc-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.lt-switch { position: relative; width: 50px; height: 30px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 25%, var(--surface)); transition: background .2s; }
.lt-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.loc-toggle input:checked + .lt-switch { background: var(--leaf); }
.loc-toggle input:checked + .lt-switch::after { transform: translateX(20px); }
.loc-toggle input:focus-visible + .lt-switch { outline: 3px solid var(--wattle); outline-offset: 2px; }

.model.idle .dot { background: var(--muted); }
@media (max-width: 600px) {
  .scanner { padding: 6px; border-radius: 20px; }
  .photo-step .actions .btn { min-height: 50px; font-size: 15px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .scanner.scanning .sc-grid i, .scanner.scanning .sc-sweep, .scanner.scanning .sc-corner { animation: none; }
  .scanner.scanning .sc-grid i { background: rgba(244, 192, 67, .08); }
}
@media (max-width: 440px) { .photo-step .actions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- how likely a match is: green tick, yellow half circle, red question mark ---------- */
.lk-ico { width: 17px; height: 17px; flex: none; }
.conf::before, .match::before { content: none; }
.conf, .match, .cand, .row-pct { --lk: var(--muted); }
.conf.strong, .match.strong, .lk-strong { --lk: var(--leaf); }
.conf.likely, .match.likely, .lk-likely { --lk: #b8860b; }
.conf.possible, .match.possible, .lk-possible { --lk: var(--muted); }
.conf .lk-ico, .match .lk-ico, .cand .lk-ico, .row-pct .lk-ico { color: var(--lk); }
.conf { color: var(--lk); font-weight: 700; }
.match { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lk) 55%, transparent), var(--shadow); }
.match b { color: var(--lk); }
.cand { gap: 7px; }
.cand b { color: var(--lk); font-weight: 700; }
.cand[aria-current="true"] { background: color-mix(in srgb, var(--lk) 14%, var(--surface)); border-color: var(--lk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--lk); }
.cand[aria-current="true"] b { color: var(--lk); opacity: 1; }
.row-pct { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--lk); font-weight: 700; }
.row-pct .lk-ico { width: 15px; height: 15px; }

/* ---------- the brief card beside a match that has a guide ---------- */
.sp-brief { margin: 22px 0 0; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.sp-brief .badges { margin: 0 0 12px; }
.sp-brief .badge { box-shadow: none; }
.sp-brief .badge:not(.tone-danger):not(.tone-caution):not(.tone-safe) { background: var(--sunk); }
.sp-brief .origin { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- about page ---------- */
.about h2 { font-family: var(--serif); font-weight: 450; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.025em; margin: 0; font-variation-settings: "opsz" 72; text-wrap: balance; }
.ab-cta { flex: none; min-height: 54px; padding: 0 26px; text-decoration: none; }

.ab-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.ab-hero h1 { font-family: var(--serif); font-weight: 450; font-size: clamp(52px, 7.4vw, 100px); line-height: .98; letter-spacing: -0.035em; margin: 0 0 28px; font-variation-settings: "opsz" 72; text-wrap: balance; }
.ab-lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 34em; margin: 0 0 32px; }
.ab-sheets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.ab-sheet { margin: 0; padding: 10px 10px 12px; background: var(--surface); border-radius: 6px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.ab-sheet img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; background: var(--sunk); }
.ab-sheet figcaption { display: flex; flex-direction: column; padding: 9px 2px 0; line-height: 1.25; }
.ab-sheet i { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.ab-sheet span { font-size: 12px; color: var(--muted); }
.ab-sheet.s1 { z-index: 1; margin-top: 12px; margin-right: -10px; transform: rotate(-1.6deg); }
.ab-sheet.s2 { z-index: 2; margin-top: 64px; transform: rotate(.8deg); }
.ab-sheet.s3 { z-index: 1; margin-left: -10px; transform: rotate(-.6deg); }

.ab-works { padding-top: 56px; padding-bottom: 56px; }
.ab-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 36px; }
.ab-head p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }

/* The memorable thing: the device boundary, drawn like the scanner on the home page. Same colours in both themes. */
.dv { --dv-ink: #eaf2ec; --dv-soft: #a9bcb0; --dv-glow: #f4c043; --dv-line: rgba(234, 242, 236, .14); border-radius: 24px; background: radial-gradient(120% 90% at 50% 0%, #1a2a21, #0b1310 70%); color: var(--dv-ink); box-shadow: var(--shadow); padding: 12px; }
.dv-device { position: relative; padding: 28px 36px 36px; }
.dv-corner { position: absolute; width: 34px; height: 34px; border: 0 solid var(--dv-glow); pointer-events: none; }
.dv-corner.tl { top: 8px; left: 8px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 12px; }
.dv-corner.tr { top: 8px; right: 8px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 12px; }
.dv-corner.bl { bottom: 8px; left: 8px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 12px; }
.dv-corner.br { bottom: 8px; right: 8px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 12px; }
.dv-label { margin: 0 0 22px; font-size: 14px; font-weight: 600; color: var(--dv-glow); }
.dv-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; }
.dv-node { position: relative; display: flex; flex-direction: column; }
.dv-node:not(:last-child)::after { content: ""; position: absolute; top: 90px; left: 100%; width: 56px; height: 2px; background: repeating-linear-gradient(90deg, var(--dv-glow) 0 6px, transparent 6px 12px); background-size: 12px 2px; animation: dv-flow 1s linear infinite; }
@keyframes dv-flow { to { background-position: 12px 0; } }
.dv-art { height: 180px; border-radius: 14px; overflow: hidden; background: rgba(234, 242, 236, .06); margin: 0 0 14px; }
.dv-art img { width: 100%; height: 100%; object-fit: cover; }
.dv-node b { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; }
.dv-node > span { font-size: 15px; color: var(--dv-soft); }
.dv-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr); gap: 3px; padding: 12px; }
.dv-grid i { border-radius: 3px; background: rgba(234, 242, 236, .1); animation: dv-cell 2.6s ease-in-out infinite; animation-delay: calc(var(--d) * 110ms); }
@keyframes dv-cell { 0%, 55%, 100% { background: rgba(234, 242, 236, .1); } 25% { background: var(--dv-glow); } }
.dv-matches { list-style: none; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; margin-top: 0; }
.dv-matches li { display: flex; align-items: center; flex: 1; padding: 0 12px; border-radius: 8px; font-size: 14.5px; color: var(--dv-soft); }
.dv-matches li:first-child { background: var(--dv-glow); color: #1b1606; font-weight: 700; }
.dv-server { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; margin: 4px 0 0; padding: 18px 36px 20px; border-top: 1px solid var(--dv-line); }
.dv-server .dv-label { margin: 0; color: var(--dv-ink); }
.dv-server ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 15px; color: var(--dv-soft); }
.dv-server li { display: inline-flex; align-items: center; gap: 8px; }
.dv-server svg { width: 18px; height: 18px; flex: none; color: var(--dv-glow); }
.dv-server li.never { color: var(--dv-ink); font-weight: 600; }
.dv-server li.never svg { color: #ef8b76; }

.ab-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 40px; }
.ab-steps h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; letter-spacing: -0.01em; margin: 0 0 8px; }
.ab-steps p { margin: 0; color: var(--ink-2); line-height: 1.6; }

.ab-built { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.ab-built-text p { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 22px 0 0; max-width: 34em; }
.ab-built .tally { margin: 0; }

.ab-tiers { padding-top: 32px; padding-bottom: 72px; }
.ab-tiers .ab-head { margin-bottom: 28px; }
.tier-key { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 8px; padding: 0; font-size: 14px; color: var(--ink-2); }
.tier-key li { display: inline-flex; align-items: center; gap: 8px; }
.tier-key i { width: 11px; height: 11px; border-radius: 3px; }
.tier-key .k1, .tier-bar .b1 { background: var(--leaf); }
.tier-key .k5, .tier-bar .b5 { background: color-mix(in srgb, var(--leaf) 38%, var(--sunk)); }
.tier-list { list-style: none; margin: 0; padding: 0; }
.tier-list > li { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) 190px; gap: 32px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.tier-name b { display: block; font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; line-height: 1.15; }
.tier-name span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.tier-bar { position: relative; height: 18px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.tier-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; }
.tier-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.tier-nums dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tier-nums dd { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; text-align: right; }
.tier-nums div + div dd { color: var(--ink-2); }
.ab-diff { padding-top: 40px; padding-bottom: 56px; }
.ab-table { width: 100%; margin-top: 32px; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; }
.ab-table th, .ab-table td { padding: 20px 28px; text-align: left; vertical-align: middle; font-size: 17px; border-top: 1px solid var(--line); }
.ab-table thead th, .ab-table thead td { border-top: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.ab-table tbody th { font-weight: 600; font-size: 15px; color: var(--ink-2); width: 22%; }
.ab-table tbody td:not(.us) { color: var(--muted); }
.ab-table .us { background: var(--leaf-soft); color: var(--ink); font-weight: 600; }
.ab-table thead .us { color: var(--ink); font-family: var(--serif); font-size: 19px; font-weight: 500; }
.ab-table td.us svg { display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; color: var(--leaf); }
.ab-note { margin: 22px 0 0; font-size: 17px; color: var(--ink-2); }

.ab-loc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; padding-top: 64px; padding-bottom: 64px; }
.ab-loc p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 34em; }

.ab-close { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.ab-close .ab-cta { background: var(--wattle); color: #1b1606; box-shadow: inset 0 0 0 2px #1b1606; }
.ab-close .ab-cta:hover { box-shadow: inset 0 0 0 2px #1b1606, 0 6px 18px -8px #1b1606; }
.about + .foot { margin-top: 48px; }

@media (max-width: 960px) {
  .ab-hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-top: 40px; padding-bottom: 48px; }
  .ab-head, .ab-built, .ab-loc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ab-built { gap: 36px; padding-top: 48px; padding-bottom: 48px; }
  .ab-loc { padding-top: 44px; padding-bottom: 44px; }
  .ab-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tier-list > li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ab-tiers { padding-top: 8px; padding-bottom: 48px; }
  .tier-nums dt { position: static; width: auto; height: auto; clip-path: none; white-space: normal; font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
  .tier-nums dd { text-align: left; }
  .dv-flow { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .dv-device { padding: 24px 20px 28px; }
  .dv-node:not(:last-child)::after { top: 100%; left: 24px; width: 2px; height: 36px; margin-top: 4px; background: repeating-linear-gradient(180deg, var(--dv-glow) 0 6px, transparent 6px 12px); background-size: 2px 12px; animation-name: dv-flow-down; }
  .dv-server { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 20px 20px; }
  .dv-server ul { flex-direction: column; }
}
@keyframes dv-flow-down { to { background-position: 0 12px; } }
@media (max-width: 640px) {
  .ab-table, .ab-table tbody, .ab-table tr, .ab-table th, .ab-table td { display: block; width: auto; }
  .ab-table thead { display: none; }
  .ab-table tbody tr + tr { border-top: 1px solid var(--line); }
  .ab-table tbody th { border-top: 0; padding: 16px 20px 8px; width: auto; }
  .ab-table td { border-top: 0; padding: 4px 20px 12px; font-size: 16px; }
  .ab-table td::before { content: attr(data-col); display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
  .ab-table td.us { padding-top: 12px; padding-bottom: 14px; }
  .ab-table td.us svg { display: none; }
  .ab-close { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dv-node::after, .dv-grid i { animation: none !important; }
  .ab-sheet { transform: none; }
}
@media (max-width: 420px) {
  .bar-cta { font-size: 0; gap: 0; padding: 0 11px; }
  .bar-cta svg { width: 20px; height: 20px; }
}
@media (max-width: 372px) {
  .mark span { display: none; }
}

/* ---------- weed identifier ---------- */
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 860px) {
  .bar-link.wide-only { display: none; }
}
/* The hero asks the question and answers it in the same place, on the scanner's dark ground, in both themes. */
.wd-hero { --bg: #0f1a14; --surface: #1b2a22; --sunk: #24352c; --ink: #eef4ef; --ink-2: #b3c4b9; --muted: #8fa397; --line: rgba(238, 244, 239, .16);
  --leaf: #8cc4a4; --on-leaf: #0e1612; --leaf-soft: #27412f; background: radial-gradient(90% 120% at 15% 0%, #1d3226, #0f1a14 65%); color: var(--ink); }
.wd-hero-in { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "q photo" "act photo"; grid-template-rows: auto 1fr; gap: 20px 64px; }
.wd-q { grid-area: q; margin: 0; font-family: var(--serif); font-weight: 450; font-size: clamp(56px, 8.4vw, 118px); line-height: .96; letter-spacing: -0.035em; font-variation-settings: "opsz" 72; text-wrap: balance; }
.wd-q span { display: block; margin-bottom: 16px; font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.3; color: var(--wattle); }
.wd-photo { grid-area: photo; min-width: 0; align-self: start; }
.wd-photo .scanner { box-shadow: 0 0 0 1px var(--line), 0 18px 40px -22px #000; }
.wd-act { grid-area: act; min-width: 0; }
.wd-lead { margin: 4px 0 26px; max-width: 32em; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; color: var(--ink-2); }
.wd-act .actions { margin-top: 0; }
.wd-act .loc-toggle { margin-top: 14px; }
.wd-verdict { margin: 0 0 26px; }
.wd .wv-a { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-size: clamp(64px, 8vw, 104px); line-height: 1; letter-spacing: -0.03em; font-variation-settings: "opsz" 72; }
.wd .wv-a.yes { color: #ff9a84; }
.wd .wv-a.no { color: #8fdcaf; }
.wd .wv-a.unsure { color: var(--wattle); }
.wv-why { margin: 0; max-width: 32em; font-size: 19px; line-height: 1.45; color: var(--ink); }
.wv-all { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.wv-all summary { cursor: pointer; font-weight: 600; }
.wv-all p { margin: 6px 0 0; line-height: 1.5; }
.wv-why b { font-weight: 700; }
.wv-source { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.wv-compare { flex: none; min-height: 44px; margin-top: 16px; font-size: 15px; }

.wd-results { padding-top: 28px; padding-bottom: 8px; }
.wd-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 15px; color: var(--ink-2); }
.wd-h3 { margin: 12px 0 16px; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; }
.wd-matches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.wd-match { display: flex; flex-direction: column; gap: 10px; width: 100%; height: 100%; padding: 8px 8px 12px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.wd-match { position: relative; }
.wd-match .tile { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.wd-rank { position: absolute; top: 14px; left: 14px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 17px; box-shadow: var(--shadow); font-variant-numeric: lining-nums; }
.wd-match .row-pct { min-width: 0; padding: 0 4px; text-align: left; display: flex; justify-content: flex-start; align-items: center; gap: 6px; }
.wd-listed-in { padding: 0 4px; font-size: 13px; color: var(--ink-2); }
.wd-none { margin: 0; font-size: 17px; color: var(--ink-2); }
.wd-name { flex: 1; display: grid; align-content: start; padding: 0 4px; }
.wd-name .row-name { font-size: 17px; }
.wd-results .fine { margin-top: 14px; }

.wd h2 { font-family: var(--serif); font-weight: 450; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.wd-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 32px; }
.wd-head p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.wd-answers { padding-top: 64px; padding-bottom: 32px; }
.wd-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.wd-one { --tone: var(--leaf); padding-top: 18px; border-top: 3px solid var(--tone); }
.wd-one.yes { --tone: var(--danger); }
.wd-one.unsure { --tone: var(--wattle); }
.wd-one h3 { margin: 0 0 16px; font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }
.wd-one > p:last-child { margin: 0; line-height: 1.55; color: var(--ink-2); }
.wd-listed { padding-top: 48px; padding-bottom: 40px; }
.wd-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 16px; }
.wd-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--sunk); margin-bottom: 10px; }
.wd-gallery b { display: block; font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.2; }
.wd-gallery i { display: block; margin-top: 2px; font-family: var(--serif); font-size: 14px; color: var(--ink-2); }
.wd-gallery span { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--danger); }
.wd-end { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 72px; padding-top: 40px; padding-bottom: 32px; }
.wd-end p { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.wd-end .faq { margin-top: 18px; }
@media (max-width: 960px) {
  .wd-hero-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "q" "photo" "act"; grid-template-rows: none; padding-top: 28px; padding-bottom: 36px; }
  .wd-matches { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .wd-head, .wd-end { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wd-end { gap: 40px; }
  .wd-three { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .wd-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wd .wd-second { margin-top: 36px; }

/* ---------- accuracy evidence ---------- */
.ac { padding-top: 40px; padding-bottom: 24px; max-width: 1040px; }
.ac h1 { margin: 0 0 8px; font-family: var(--serif); font-weight: 450; font-size: clamp(38px, 5vw, 60px); line-height: 1.03; letter-spacing: -0.025em; font-variation-settings: "opsz" 72; text-wrap: balance; }
.ac-date { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); }
.ac section { padding: 28px 0; border-top: 1px solid var(--line); }
.ac h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 450; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.1; letter-spacing: -0.02em; }
.ac p { max-width: 44em; font-size: 17px; line-height: 1.6; }
.ac-scroll { overflow-x: auto; margin-top: 16px; }
.ac-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; font-size: 15px; }
.ac-table caption { caption-side: top; padding: 0 0 10px; text-align: left; font-size: 14px; color: var(--ink-2); }
.ac-table th, .ac-table td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.ac-table thead th { border-top: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ac-table tbody th { font-weight: 600; }
.ac-table td { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wd-gallery .tile { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.wd-gallery .tile img { margin: 0; aspect-ratio: auto; height: 100%; }

/* ---------- weed page: country picker ---------- */
.wd-where { margin-top: 14px; }
.wd-where-grid { display: grid; gap: 12px; }
.wd-where-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cp[hidden] { display: none; }
.wd-where-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.wd-where-note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
.cp { position: relative; }
.cp-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .18); font: 600 17px var(--sans); text-align: left; cursor: pointer; transition: background .12s; }
.cp-btn:hover { background: var(--sunk); }
.cp-btn:focus-visible, .cp-locate:focus-visible, .cp-search:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.cp-flag { flex: none; display: grid; place-items: center; width: 26px; height: 20px; }
.cp-flag img { display: block; width: 26px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(127, 127, 127, .35); }
.cp-flag svg { width: 20px; height: 20px; color: var(--ink-2); }
.cp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-chev { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
.cp-btn[aria-expanded="true"] .cp-chev { transform: rotate(180deg); }
.cp-pop { scroll-margin-bottom: 16px; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 10px 12px -6px rgba(0, 0, 0, .4); }
.cp-pop[hidden] { display: none; }
.cp-pop .cp-locate { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--leaf); font: 600 15px var(--sans); cursor: pointer; }
.cp-pop .cp-locate:hover { background: var(--sunk); }
.cp-locate svg { flex: none; width: 26px; height: 20px; }
.cp-search { display: block; width: 100%; min-height: 42px; margin-top: 4px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--sunk); color: var(--ink); font: 16px var(--sans); box-sizing: border-box; }
.cp-search::-webkit-search-cancel-button { display: none; }
.cp-search::placeholder { color: var(--muted); }
.cp-list { list-style: none; max-height: 288px; margin: 6px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.cp-list li { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 9px; font-size: 15px; cursor: pointer; }
.cp-list li[hidden] { display: none; }
.cp-list li:hover, .cp-list li.active { background: var(--sunk); }
.cp-list li[aria-selected="true"] .cp-opt { font-weight: 700; }
.cp-opt { min-width: 0; }
.cp-list small { flex: none; margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-none { margin: 10px; font-size: 14px; color: var(--ink-2); }

/* ---------- weed page: how, answers, method ---------- */
.wd-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px 72px; padding-top: 56px; padding-bottom: 32px; }
.wd-how-head p { margin: 16px 0 22px; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.wd-cta { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; text-decoration: none; }
.wd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.wd-steps li { padding-top: 14px; border-top: 1px solid var(--line); }
.wd-steps b { display: block; font-size: 18px; font-weight: 650; }
.wd-steps p { margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.wd-answers { padding-top: 40px; padding-bottom: 24px; }
.wd-answers h2 { margin-bottom: 28px !important; }
.wd-one h3 { margin-bottom: 6px; }
.wd-sample { margin: 0 0 12px; font-weight: 600; }

.wd-method { --bg: #0f1a14; --surface: #1b2a22; --sunk: #24352c; --ink: #eef4ef; --ink-2: #b3c4b9; --muted: #8fa397; --line: rgba(238, 244, 239, .16); --leaf: #8cc4a4;
  margin-top: 40px; background: #0f1a14; color: var(--ink); }
.wd-method-in { max-width: var(--wrap); margin: 0 auto; padding: 72px var(--gutter) 80px; }
.wd-method-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 72px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.wd-method .wd-method-lead { margin-top: 16px; font-size: 19px; }
.wd-method-big { margin: 0; font-size: 17px; color: var(--ink-2); }
.wd-method-big b { display: block; font-family: var(--serif); font-weight: 450; font-size: clamp(72px, 9vw, 124px); line-height: .95; letter-spacing: -0.035em; color: var(--ink); }
.wd-method-big b span { display: block; font-size: .52em; line-height: 1.1; letter-spacing: -0.025em; }
.wd-method-big b { margin-bottom: 12px; }
.wd-method h3 { margin: 56px 0 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 3vw, 32px); line-height: 1.12; letter-spacing: -0.015em; }
.wd-method p { max-width: 44em; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.wd-method a { color: var(--leaf); }
.wd-numbers { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.wd-numbers b { display: block; margin-bottom: 4px; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.wd-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 24px; }
.wd-method-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.wd-method-steps p { font-size: 16px; }
.wd-matrix td { color: var(--ink-2); }
.wd-matrix td b { display: block; font-size: 19px; color: var(--ink); }
.wd-matrix td.good b { color: #a8dcbc; }
.wd-matrix td.bad b { color: #f0b3a6; }
.wd-sum { margin: 18px 0 0; font-size: 19px !important; font-weight: 600; color: var(--ink) !important; }
.wd-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
@media (max-width: 860px) {
  .wd-how, .wd-method-head { grid-template-columns: minmax(0, 1fr); }
  .wd-how { gap: 24px; padding-top: 40px; }
  .wd-method-in { padding-top: 52px; padding-bottom: 60px; }
  .wd-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-rates { grid-template-columns: minmax(0, 1fr); }
  .wd-method-steps { grid-template-columns: minmax(0, 1fr); }
  .wd-method h3 { margin-top: 44px; }
}
@media (max-width: 560px) {
  .wd-matrix { font-size: 13px; }
  .wd-matrix th, .wd-matrix td { padding: 9px 8px; }
  .wd-matrix td b { font-size: 15px; }
}

/* ---------- weed page: the lists behind an answer ---------- */
.wv-lists { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.wv-lists li { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.wv-lists b { font-size: 15px; }
.wv-lists a { overflow-wrap: anywhere; }
.wv-place { color: var(--ink-2); }
.wv-cat { justify-self: start; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #17291f; background: #cfe6d6; }
.wv-cat.c0 { background: #f3c6bc; }
.wv-cat.c1 { background: #f7dfa4; }
.wv-cat.c3, .wv-cat.c4 { background: #c9dcf0; }
.sp-weed { margin-top: 18px; }
.sp-weed h3 { margin: 0; font-size: 17px; }
.sp-weed p { margin: 6px 0 0; color: var(--ink-2); }
.sp-weed .wv-lists { max-height: 320px; overflow-y: auto; padding-right: 6px; }
.wd-gallery li span, .wd-listed-in { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .wd-where-grid.two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- weed page: the app ---------- */
.wd-install { margin-top: 12px; min-height: 44px; }
.wd-recent { padding-top: 32px; }
.wd-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.wd-recent-head .wd-h3 { margin: 0; }
.wd-recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wd-check { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23, 41, 31, .08); text-align: left; cursor: pointer; }
.wd-check img { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.wd-check-text { flex: 1; min-width: 0; display: grid; font-size: 13px; color: var(--ink-2); }
.wd-check-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--ink); }
.wv-a-chip { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #17291f; background: #f7dfa4; }
.wv-a-chip.yes { background: #f3c6bc; }
.wv-a-chip.no { background: #cfe6d6; }

/* ---------- weed scanner: is it a weed here ---------- */
.sc-verdict { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; font: 700 16px/1.2 var(--sans); color: #17291f; background: #bfe8cc; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .5); animation: land .4s cubic-bezier(.3, 1.5, .5, 1); }
.sc-verdict[hidden] { display: none; }
.sc-verdict.yes { background: #f3c6bc; }
.sc-verdict.unsure { background: #f7dfa4; }
.sc-verdict img { flex: none; width: 26px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(23, 41, 31, .25); }

/* ---------- weed page: good and bad photos ---------- */
.wd-photos { padding-top: 48px; padding-bottom: 16px; }
.wd-photo-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.wd-photo-set h3 { margin: 0 0 14px; font-family: var(--serif); font-weight: 500; font-size: 24px; }
.wd-photo-set ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wd-photo-set b { display: block; margin-top: 10px; font-size: 15px; }
.wd-photo-set li p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.wd-shot { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.wd-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wd-shot img.blurred { filter: blur(5px); transform: scale(1.08); }
.wd-mark { position: absolute; left: 8px; top: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #17291f; background: #bfe8cc; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 6px rgba(0, 0, 0, .35); }
.bad .wd-mark { background: #f3c6bc; }
.wd-mark svg { width: 18px; height: 18px; }
.wd-photo-set .bad .wd-shot img:not(.blurred) { filter: saturate(.85); }
@media (max-width: 860px) {
  .wd-photo-sets { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wd-photo-set ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wd-photo-set li { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; align-content: start; }
  .wd-shot { grid-row: span 2; }
  .wd-photo-set b { margin-top: 0; }
}
