/* BeeGuide app styles
   One token set drives both themes. Components read tokens only, never raw
   colours, so light, dark and print all resolve from the same rules.       */

:root {
  --forest: #0F2A22;
  --forest-2: #173A2F;
  --ink: #13231D;
  --body: #34453D;
  --muted: #5F7369;
  --paper: #F4F6F1;
  --surface: #FFFFFF;
  --sunk: #E9EEE6;
  --line: #D3DCD0;
  --pollen: #E3A21A;
  --pollen-ink: #8A5E06;
  --pollen-soft: #FCEFD2;
  --moss: #3F7A4E;
  --moss-soft: #E1EFE3;
  --warn: #9A4B14;
  --warn-soft: #FBE9DC;
  --on-dark: #F2F5EE;
  --on-dark-muted: #A9BDB1;
  --shadow: 0 1px 2px rgba(15, 42, 34, .06), 0 6px 20px rgba(15, 42, 34, .06);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 10px;
  --tabbar-h: 64px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EFE4; --body: #C0CEC1; --muted: #8DA395;
    --paper: #0B1411; --surface: #13201A; --sunk: #0F1A15; --line: #25362D;
    --pollen: #F0B33A; --pollen-ink: #F6C766; --pollen-soft: #3A2C0E;
    --moss: #7FB78C; --moss-soft: #16291E;
    --warn: #F0A877; --warn-soft: #3A2215;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --ink: #E8EFE4; --body: #C0CEC1; --muted: #8DA395;
  --paper: #0B1411; --surface: #13201A; --sunk: #0F1A15; --line: #25362D;
  --pollen: #F0B33A; --pollen-ink: #F6C766; --pollen-soft: #3A2C0E;
  --moss: #7FB78C; --moss-soft: #16291E;
  --warn: #F0A877; --warn-soft: #3A2215;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--body);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--pollen); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pollen); color: var(--forest);
  padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
main { min-height: 60vh; outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { background: var(--forest); color: var(--on-dark); position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font: 800 23px/1 var(--display); letter-spacing: -.02em; color: var(--on-dark); }
.brand-word em { font-style: normal; color: var(--pollen); }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { text-decoration: none; color: var(--on-dark-muted); font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--on-dark); background: rgba(255,255,255,.06); }
.topnav a[aria-current="page"] { color: var(--forest); background: var(--pollen); }
.topnav-icon { display: grid; place-items: center; padding: 8px !important; }
.topnav-icon svg { width: 20px; height: 20px; }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar { display: none; }

@media (max-width: 767px) {
  .topnav { display: none; }
  .topbar-inner { height: 54px; justify-content: center; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; position: relative; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%;
    height: 3px; border-radius: 0 0 3px 3px; background: var(--pollen); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s; min-height: 46px; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--pollen); color: #1B1405; box-shadow: 0 4px 14px rgba(227,162,26,.35); }
.btn-gold:hover { box-shadow: 0 6px 20px rgba(227,162,26,.5); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-dark-ghost { background: transparent; color: var(--on-dark); border: 1.5px solid rgba(255,255,255,.25); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn svg { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 600; color: var(--ink); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.input { width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 11px 12px; min-height: 46px; }
.input:focus { border-color: var(--pollen); outline: none; box-shadow: 0 0 0 3px var(--pollen-soft); }
.row { display: flex; gap: 10px; }
.row > .input { flex: 1; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk);
  border-radius: 10px; padding: 4px; gap: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 9px 6px; border-radius: 7px; cursor: pointer; font-size: 14px;
  font-weight: 500; color: var(--muted); line-height: 1.2; }
.seg label small { display: block; font-size: 11px; font-weight: 400; opacity: .85; }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + label { outline: 3px solid var(--pollen); }

.chip { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px/1 var(--mono);
  padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.chip-stock { background: var(--moss-soft); color: var(--moss); }
.chip-order { background: var(--pollen-soft); color: var(--pollen-ink); }
.chip-muted { background: var(--sunk); color: var(--muted); }

.notice { border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-info { background: var(--sunk); color: var(--body); }

/* ---------- home ---------- */
.hero { background: var(--forest); color: var(--on-dark); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64 56 80v32M28 64 0 80v32' fill='none' stroke='%23E3A21A' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 98px;
  mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
  -webkit-mask-image: linear-gradient(115deg, transparent 20%, #000 75%); }
.hero-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 64px 20px 72px;
  display: grid; gap: 40px; grid-template-columns: 1.25fr .9fr; align-items: center; }
.hero h1 { color: var(--on-dark); font: 800 clamp(38px, 6vw, 68px)/1 var(--display); letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--pollen); }
.hero .lede { font-size: clamp(17px, 2vw, 19px); color: var(--on-dark-muted); max-width: 52ch; margin: 20px 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .eyebrow { color: var(--pollen); margin-bottom: 18px; }

.quick { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  padding: 22px; backdrop-filter: blur(4px); }
.quick h2 { color: var(--on-dark); font: 700 20px/1.2 var(--display); margin-bottom: 4px; }
.quick p { color: var(--on-dark-muted); font-size: 14px; margin: 0 0 16px; }
.quick .input { background: rgba(255,255,255,.95); color: #13231D; border-color: transparent;
  font: 500 20px/1 var(--mono); letter-spacing: .12em; }
.quick .row { flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; max-width: var(--wrap);
  margin: -34px auto 0; position: relative; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; }
.stats > div { padding: 20px 22px; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats .v { font: 700 30px/1 var(--display); color: var(--ink); }
.stats .k { font-size: 13px; color: var(--muted); margin-top: 6px; }

.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font: 700 clamp(28px, 4vw, 40px)/1.08 var(--display); letter-spacing: -.02em; margin-top: 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 12px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none;
  margin: 0; padding: 0; }
.steps li { background: var(--surface); border-radius: 14px; padding: 24px; border: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px; background: var(--forest); color: var(--pollen);
  font: 700 18px/1 var(--display); margin-bottom: 16px; }
.steps h3 { font: 700 19px/1.25 var(--display); margin-bottom: 6px; }
.steps p { margin: 0; font-size: 15px; color: var(--muted); }

.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 40px; }
.why div { border-top: 2px solid var(--ink); padding-top: 14px; }
.why h3 { font: 700 18px/1.3 var(--display); margin-bottom: 6px; }
.why p { margin: 0; color: var(--muted); font-size: 15px; }

.cta-band { background: var(--pollen); color: #1B1405; border-radius: 18px; padding: 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #1B1405; font: 800 clamp(24px, 3.4vw, 34px)/1.1 var(--display); max-width: 20ch; }
.cta-band .btn { background: var(--forest); color: var(--on-dark); box-shadow: none; }

/* ---------- page head ---------- */
.page-head { background: var(--forest); color: var(--on-dark); padding: 36px 0 30px; }
.page-head h1 { color: var(--on-dark); font: 800 clamp(30px, 4.6vw, 46px)/1.05 var(--display); letter-spacing: -.02em;
  margin-top: 8px; }
.page-head .eyebrow { color: var(--pollen); }
.page-head p { color: var(--on-dark-muted); margin: 10px 0 0; max-width: 60ch; }

/* ---------- plan page ---------- */
/* The plan is the page. Inputs live in a sheet once a plan exists, so the bed
   map and calendar get the full width and a phone is not scrolling past the
   results to find a form nobody expected there. */
.plan-layout { display: block; padding: 28px 0 56px; }
.form-home { max-width: 720px; margin: 0 auto; }
.plan-layout.has-results .form-home { display: none; }
.plan-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.btn-small { padding: 5px 10px; min-height: 0; font-size: 12.5px; }

/* The sheet: a drawer from the right, a bottom sheet on a phone. */
dialog.sheet { border: 0; padding: 0; margin: 0 0 0 auto; width: min(560px, 100%); max-width: 100%;
  height: 100dvh; max-height: 100dvh; background: var(--paper); color: var(--body); }
dialog.sheet::backdrop { background: rgba(6, 18, 14, .5); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font: 700 19px/1.2 var(--display); color: var(--ink); }
.sheet-body { padding: 16px 18px calc(28px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
  max-height: calc(100dvh - 62px); }
.sheet .form-panel { box-shadow: none; border: 0; padding: 0; background: transparent; }
.sheet .form-panel > h2 { display: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.form-panel { display: grid; gap: 18px; }
.form-panel h2 { font: 700 20px/1.2 var(--display); }
.site-card { border-radius: 10px; background: var(--sunk); padding: 12px 14px; display: grid; gap: 4px; font-size: 14px; }
.site-card strong { color: var(--ink); }
.site-card .mono { font-size: 13px; }
.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.fieldset legend { font-weight: 600; color: var(--ink); font-size: 14px; padding: 0; margin-bottom: 6px; }
.form-foot { display: grid; gap: 10px; }
.device-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.device-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.results { display: grid; gap: 22px; min-width: 0; }
.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line); border-radius: 14px; }
.empty h2 { font: 700 24px/1.2 var(--display); margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 42ch; }

.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.result-head h2 { font: 800 clamp(24px, 3.4vw, 34px)/1.1 var(--display); letter-spacing: -.015em; margin-top: 6px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .btn { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* The site summary is context for every tab, so it stays one strip above them.
   On a phone it scrolls sideways like the tab bar rather than stacking into six
   rows that push the plan itself off the screen. */
.summary { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.summary::-webkit-scrollbar { display: none; }
.summary > div { flex: 1 0 auto; min-width: 116px; padding: 9px 14px; border-right: 1px solid var(--line); }
.summary > div:last-child { border-right: 0; }
.summary dt { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.summary dd { margin: 4px 0 0; font-weight: 600; color: var(--ink); font-size: 14.5px; }
.summary dd small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }

/* funnel */
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; font-size: 14px; }
.funnel-bar { height: 12px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; border-radius: 6px; background: var(--moss); }
.funnel-row.final .funnel-bar i { background: var(--pollen); }
.funnel-row .n { text-align: right; font: 500 14px/1 var(--mono); color: var(--ink); }
.funnel-excl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
/* The sentences that say what the funnel means -- the bars alone left people
   wondering why 170 plants became three. */
.funnel-say { margin: 12px 0 0; font-size: 14px; max-width: 70ch; }
.why-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.why-list span { display: block; color: var(--muted); font-size: 13px; }

/* calendar */
.cal-card { padding: 0; overflow: hidden; }
.cal-top { padding: 18px 20px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-top h3 { font: 700 20px/1.2 var(--display); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; }
.legend .l-bloom { background: var(--pollen); }
.legend .l-plant { background: var(--moss); }
.legend .l-now { width: 2px; height: 14px; border-radius: 0; background: var(--ink); }

.cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); }
/* Every line the same height, so a plant carrying an extra note ("first flowers
   Apr 2028") does not stand taller than the rest. The name cell spans a plant's
   two lines, giving it 68px for at most three short lines. */
.cal { display: grid; grid-template-columns: minmax(140px, 200px) 44px repeat(12, minmax(36px, 1fr));
  min-width: 730px; grid-auto-rows: 34px; }
.cal > div { border-bottom: 1px solid var(--line); }
.cal .ch { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  text-align: center; padding: 10px 0; background: var(--sunk); }
.cal .ch.now { color: var(--ink); font-weight: 700; background: var(--pollen-soft); }
.cal .corner { background: var(--sunk); position: sticky; left: 0; z-index: 2; grid-column: span 2; }
/* Which of the two years a line covers. */
.cal .yr { background: var(--sunk); font: 500 11px/1 var(--mono); color: var(--muted);
  display: grid; place-items: center; border-right: 1px solid var(--line); }
.cal .yr.next { color: var(--ink); }
.cal .name { position: sticky; left: 0; z-index: 1; background: var(--surface); padding: 8px 12px;
  border-right: 1px solid var(--line); min-width: 0; overflow: hidden; }
.cal .name b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .name span { font-size: 11.5px; color: var(--muted); }
/* When the first flowering falls past the two lines drawn. */
.cal .name .later { display: block; color: var(--warn); font-size: 11px; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .cell { position: relative; display: grid; align-content: center; padding: 9px 1px; }
.cal .cell.now { background: color-mix(in srgb, var(--pollen-soft) 55%, transparent); }
/* Months outside a line's own year: this January has already gone. */
.cal .cell.void { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.cal .band { height: 11px; }
.cal .band.bloom { background: var(--pollen); }
.cal .band.plant { background: var(--moss); opacity: .85; }
.cal .band.start { border-top-left-radius: 5px; border-bottom-left-radius: 5px; margin-left: 3px; }
.cal .band.end { border-top-right-radius: 5px; border-bottom-right-radius: 5px; margin-right: 3px; }
.cal .band.none { background: transparent; }
.cal .foot { background: var(--sunk); font: 500 12px/1 var(--mono); text-align: center; padding: 10px 0; color: var(--ink); }
.cal .foot.zero { color: var(--warn); }
.cal .foot.void { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
/* The heavier rule marks where the grid ends and its tallies begin -- once, not
   above each of the two year lines. */
.cal .second { border-top: 0 !important; }
.cal .foot-name { background: var(--sunk); font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 7px 12px;
  position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line); grid-column: span 2; }
/* The footer answers a different question from the grid, so it is set apart. */
/* The year sits beside the label, not under it: the row is a fixed 34px. */
.cal .foot-name { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cal .foot-name small { font-weight: 400; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.cal .foot-name, .cal .foot { border-top: 2px solid var(--line); }
.cal-gaps { padding: 14px 20px 18px; display: grid; gap: 8px; }

/* form steps */
.form-step { border: 0; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.form-step > legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 4px;
  font: 700 17px/1.2 var(--display); color: var(--ink); }
.form-step .step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--forest); color: var(--pollen); font: 700 13px/1 var(--mono); }
.dims { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.dims-x { padding-bottom: 12px; color: var(--muted); font-size: 18px; }
.seg-units { max-width: 220px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--moss); flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }

/* how to plant */
.howto-glance .big-line { font-size: 18px; margin: 6px 0 0; max-width: 64ch; color: var(--ink); }
.bed-map-wrap { margin: 12px 0; overflow-x: auto; }
.bed-map { width: 100%; max-height: 520px; display: block; }
.bed-soil { fill: #8A6A48; }
.bed-grid line { stroke: rgba(255, 255, 255, .18); }
.bed-fence { stroke: var(--ink); stroke-linecap: round; }
.bed-label { fill: var(--muted); text-anchor: middle; dominant-baseline: middle; font-family: var(--sans); }
.bed-dim { font-family: var(--mono); }
.plant-dot circle { stroke: rgba(0, 0, 0, .35); stroke-width: .06; }
.plant-dot text { fill: #16120A; text-anchor: middle; dominant-baseline: central; font-weight: 700; font-family: var(--sans); }
.sw-winter circle, .sw.sw-winter, .map-num.sw-winter { fill: #7FA9D6; background: #7FA9D6; }
.sw-spring circle, .sw.sw-spring, .map-num.sw-spring { fill: #86C46E; background: #86C46E; }
.sw-summer circle, .sw.sw-summer, .map-num.sw-summer { fill: #F0B53A; background: #F0B53A; }
.sw-fall circle, .sw.sw-fall, .map-num.sw-fall { fill: #E0804A; background: #E0804A; }
.sw-unknown circle, .sw.sw-unknown, .map-num.sw-unknown { fill: #B7C0B9; background: #B7C0B9; }
.season-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; margin-bottom: 12px; }
.season-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.map-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 700 13px/1 var(--sans); color: #16120A; }
.plant-steps { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 8px; max-width: 72ch; }
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.years h4 { margin: 0 0 4px; font: 700 16px/1.2 var(--display); color: var(--ink); }
.years p { margin: 0; font-size: 14px; }
.howto-care ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }

/* plan steps */
.plan-tabs { position: sticky; top: 68px; z-index: 20; display: flex; gap: 6px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  overflow-x: auto; scrollbar-width: none; }
.plan-tabs::-webkit-scrollbar { display: none; }
.plan-tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s; }
.plan-tab:hover { color: var(--ink); background: var(--sunk); }
.plan-tab .step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 600 12px/1 var(--mono); background: var(--sunk); color: var(--muted); }
.plan-tab .count { font: 500 12px/1 var(--mono); padding: 3px 6px; border-radius: 999px;
  background: var(--sunk); color: var(--muted); }
.plan-tab[aria-selected="true"] { background: var(--forest); color: var(--on-dark); }
.plan-tab[aria-selected="true"] .step { background: var(--pollen); color: #1B1405; }
.plan-tab[aria-selected="true"] .count { background: rgba(255, 255, 255, .12); color: var(--on-dark); }
.tabpanel { display: grid; gap: 18px; outline: none; }
.tabpanel[hidden] { display: none; }
.tab-intro { margin: 0; font-size: 16px; color: var(--body); max-width: 68ch; }
.tab-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-top: 6px; border-top: 1px solid var(--line); }
.how summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.how[open] summary { margin-bottom: 14px; }
@media (max-width: 767px) {
  .plan-tabs { top: 54px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .plan-tab { flex: 0 0 auto; padding: 8px 12px; font-size: 14px; }
  .tab-nav .btn { flex: 1; }
}

/* where to buy */
.chip-link { background: var(--forest); color: var(--on-dark); text-decoration: none; padding: 7px 10px; }
.chip-link:hover { background: var(--forest-2); }
.buy { display: grid; gap: 14px; }
.buy-title { font: 700 20px/1.2 var(--display); margin-top: -6px; }
.buy-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; max-width: 80ch; }
/* Shopping trips: the next one leads, the rest wait their turn. */
.trips { display: grid; gap: 14px; margin-bottom: 20px; }
.trip { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.trip-first { border-color: var(--moss); box-shadow: 0 0 0 1px var(--moss) inset; }
.trip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.trip-head h4 { font: 700 19px/1.2 var(--display); color: var(--ink); margin: 2px 0 0; }
.trip-count { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.trip .shop-list { margin: 12px 0 0; }
.trip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.trip-order { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.trip-order summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 14px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.order-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.order-grid .order-wide { grid-column: 1 / -1; }
.order-grid input[type=text], .order-grid input[type=email], .order-grid input[type=tel], .order-grid select {
  font: 400 15px/1.3 var(--sans); padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper); color: var(--ink); min-width: 0; }
.order-grid label.check { display: flex; align-items: flex-start; gap: 8px; color: var(--body); }
.order-grid label.check input { margin-top: 3px; }
/* Each checklist line carries its own link, so the page has one place to buy a
   thing rather than a checklist, a plant table and a materials table repeating
   the same three links. */
.row-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0 26px; }
.row-links .hint { font-size: 11.5px; }
/* Checklists, shared by the trips. */
.shop-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.shop-list .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.shop-list .check input { margin-top: 3px; }
.shop-list small { display: block; color: var(--muted); font-size: 12px; }
.shop-list input:checked + span { color: var(--muted); }

.buy-table-title { margin: 6px 0 0; font-size: 13px; font-family: var(--mono); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.buy-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.buy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.buy-table th, .buy-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.buy-table thead th { background: var(--sunk); font: 500 11px/1.2 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.buy-table tbody tr:last-child > * { border-bottom: 0; }
.buy-table tbody th { font-weight: 400; }
/* Qualifiers under a cell's answer, e.g. seeds flowering a year later. */
.buy-table td small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.bt-name { display: block; color: var(--ink); font-weight: 600; }
.bt-sci { display: block; font-style: italic; font-size: 12.5px; color: var(--muted); }
.buy-table td .chip-link + .chip-link { margin-left: 4px; }
@media (max-width: 640px) {
  .buy-table thead { display: none; }
  .buy-table, .buy-table tbody, .buy-table tr, .buy-table th, .buy-table td { display: block; width: 100%; }
  .buy-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .buy-table tbody tr:last-child { border-bottom: 0; }
  .buy-table th, .buy-table td { border: 0; padding: 3px 0; }
  .buy-table td { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .buy-table td::before { content: attr(data-label); font: 500 11px/1.2 var(--mono); letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted); }
}
.buy-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.buy-cols h4 { margin: 0 0 6px; font-size: 13px; font-family: var(--mono); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.buy-list a { color: var(--ink); font-weight: 600; text-decoration-color: var(--pollen); text-underline-offset: 3px; }
/* A chip carries its own dark background, so it keeps its light text wherever it
   sits -- inside a buy-list the rule above would otherwise paint it dark on dark. */
.buy-list a.chip-link { color: var(--on-dark); text-decoration: none; }
.buy-by { display: block; font-size: 12.5px; color: var(--muted); }
.buy-list { gap: 8px; }

/* first plan for a new region */
.gather { display: grid; gap: 14px; }
.gather h2 { font: 800 clamp(22px, 3vw, 30px)/1.15 var(--display); }
.gather-bees { display: flex; flex-wrap: wrap; gap: 6px; }
.gather-bar { height: 12px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.gather-bar i { display: block; height: 100%; width: 2%; border-radius: 6px; transition: width .6s ease;
  background: linear-gradient(90deg, var(--moss), var(--pollen)); }
.gather-status { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink); }

/* bee list on the plan */
.bee-list { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 20px; }
.bee-list li { display: grid; grid-template-columns: 40px 1fr auto; column-gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line); align-items: baseline; }
.bee-thumb { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover; background: var(--sunk); display: block; }
.bee-name { grid-column: 2; color: var(--ink); font-weight: 600; font-size: 14px; }
.bee-sci { grid-column: 2; font-style: italic; font-size: 12.5px; color: var(--muted); }
.bee-count { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 12.5px; color: var(--muted); }

/* photos */
.card-photo, .bee-photo { position: relative; margin: 0; overflow: hidden; background: var(--sunk); }
.card-photo { margin: -16px -16px 2px; aspect-ratio: 4 / 3; border-radius: 13px 13px 0 0; }
.bee-photo { margin: -18px -18px 2px; aspect-ratio: 16 / 10; border-radius: 13px 13px 0 0; }
.card-photo img, .bee-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo figcaption, .bee-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 8px 5px; font-size: 10.5px; line-height: 1.2; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.ph-none { display: grid; place-items: center; color: var(--muted); }
.ph-none svg { width: 34px; height: 34px; opacity: .45; }
.ph-broken img { visibility: hidden; }
.credits { font-size: 13px; }
.credits summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.credits ul { margin: 8px 0; padding-left: 18px; color: var(--muted); }
.credits li { margin: 2px 0; }
.visited { font-size: 13.5px; }
.visited summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.visited p { margin: 6px 0 0; color: var(--muted); }
@media print { .visited[open] summary, .visited summary { list-style: none; } .visited p { display: block; } }

/* plant cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px;
  display: grid; gap: 10px; align-content: start; }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card h4 { margin: 0; font: 700 18px/1.2 var(--display); color: var(--ink); }
.card .sci { font-style: italic; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pips { display: flex; gap: 3px; align-items: center; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--pollen); }
.pips i.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.beebar { width: 88px; height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin-left: auto; }
.beebar i { display: block; height: 100%; border-radius: 4px; background: var(--pollen); }
.bee-intro { opacity: .8; }
.bee-intro .bee-meter i { background: var(--muted); }
.pips-label { font: 500 11.5px/1 var(--mono); color: var(--muted); margin-top: 5px; text-align: right; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.specs dt { font: 500 10.5px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; color: var(--body); }
/* The second planting window sits under the best one, not beside it. */
.specs dd small { display: block; color: var(--muted); font-size: 12px; }
.card-foot { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }

.print-only { display: none; }

/* ---------- bees page ---------- */
.bee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 28px 0 56px; }
.bee { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 10px; }
.bee h3 { font: 700 19px/1.2 var(--display); }
.bee .sci { font-style: italic; color: var(--muted); font-size: 14px; }
.bee-meter { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.bee-meter i { display: block; height: 100%; background: var(--pollen); }
.bee .count { font: 500 13px/1 var(--mono); color: var(--ink); }

/* ---------- about page ---------- */
.founder { display: grid; grid-template-columns: 300px 1fr; gap: 40px; padding: 40px 0; align-items: start; }
.portrait { aspect-ratio: 4/5; border-radius: 18px; overflow: hidden; background: var(--sunk); display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { display: grid; place-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 13px;
  padding: 16px; width: 100%; height: 100%; border: 2px dashed var(--line); border-radius: inherit; }
.placeholder svg { width: 36px; height: 36px; opacity: .6; }
.founder h2 { font: 800 clamp(28px, 4vw, 40px)/1.08 var(--display); letter-spacing: -.02em; margin-top: 8px; }
.founder .role { color: var(--pollen-ink); font-weight: 600; margin-top: 6px; }
.founder .bio p { font-size: 17px; max-width: 62ch; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-bottom: 64px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; }
.project .photo { aspect-ratio: 16/10; background: var(--sunk); }
.project .photo img { width: 100%; height: 100%; object-fit: cover; }
.project .body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.project h3 { font: 700 19px/1.25 var(--display); }
.project .meta { font: 500 12px/1 var(--mono); color: var(--muted); }
.project p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- settings ---------- */
.settings { display: grid; gap: 16px; max-width: 720px; padding: 28px 0 56px; }
.setting { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 16px; align-items: center; }
.setting h3 { font-size: 16px; font-family: var(--sans); font-weight: 600; }
.setting p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.setting + .setting { border-top: 1px solid var(--line); padding-top: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

/* ---------- footer ---------- */
.footer { background: var(--forest); color: var(--on-dark-muted); margin-top: 24px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 44px 20px 24px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.footer-brand p { margin: 10px 0 0; max-width: 32ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-cols h2 { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--pollen); margin-bottom: 12px; }
.footer-cols a { display: block; text-decoration: none; padding: 4px 0; font-size: 14px; }
.footer-cols a:hover { color: var(--on-dark); }
.footer-fine { max-width: var(--wrap); margin: 0 auto; padding: 16px 20px 28px; font-size: 12.5px;
  border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- loading ---------- */
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  dialog.sheet { width: 100%; height: auto; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .sheet-body { max-height: calc(92dvh - 62px); }
  .hero-inner { grid-template-columns: 1fr; padding: 48px 20px 64px; }
  .founder { grid-template-columns: 220px 1fr; gap: 28px; }
}
@media (max-width: 767px) {
  .wrap { padding: 0 16px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; margin: -28px 16px 0; }
  .stats > div { padding: 14px 12px; }
  .stats .v { font-size: 22px; }
  .stats .k { font-size: 11.5px; }
  .steps, .why { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta-band { padding: 26px; }
  .founder { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .setting { grid-template-columns: 1fr; gap: 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .funnel-row { grid-template-columns: 92px 1fr 40px; font-size: 13px; }
  .summary > div { min-width: 104px; padding: 8px 12px; }
  .page-head { padding: 26px 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- written pages: the blog and the static pages ---------- */
.prose { max-width: 70ch; padding: 32px 20px 56px; }
.prose h1 { font: 800 clamp(30px, 5vw, 42px)/1.1 var(--display); color: var(--ink); margin-bottom: 10px; }
.prose h2 { font: 700 24px/1.25 var(--display); color: var(--ink); margin: 32px 0 8px; }
.prose h3 { font: 700 19px/1.3 var(--display); color: var(--ink); margin: 26px 0 6px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 6px; }
.prose blockquote { margin: 0 0 18px; padding: 2px 0 2px 16px; border-left: 3px solid var(--pollen); color: var(--muted); }
.prose pre { background: var(--sunk); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.prose .lede { font-size: 19px; color: var(--muted); margin-bottom: 26px; }
.prose .eyebrow { margin-bottom: 4px; }
.post-photo { margin: 0 0 20px; }
.post-photo img { width: 100%; height: auto; border-radius: 14px; display: block; }
.post-back { margin-top: 36px; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.post-card { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.post-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.post-card h3 { margin: 2px 0 6px; font: 700 20px/1.25 var(--display); }
.post-card h3 a { color: var(--ink); text-decoration-color: var(--pollen); text-underline-offset: 3px; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 599px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card img { height: 180px; }
}

/* ---------- print: the plan, and nothing else ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  :root { --paper: #fff; --surface: #fff; --sunk: #F1F4EE; --line: #CFD8CC; --ink: #111; --body: #222; --muted: #555; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .topbar, .tabbar, .footer, .form-panel, .toolbar, .skip, .no-print, .page-head .actions { display: none !important; }
  .page-head { background: #fff; color: #111; padding: 0 0 8mm; border-bottom: 2px solid #111; }
  .page-head h1, .page-head p { color: #111; }
  .page-head .eyebrow { color: #555; }
  .plan-layout { display: block; padding: 6mm 0 0; }
  .wrap { max-width: none; padding: 0; }
  .print-only { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-scroll { overflow: visible; }
  .cal { min-width: 0; grid-template-columns: 140px 36px repeat(12, 1fr); }
  .cal .name, .cal .corner, .cal .foot-name { position: static; }
  .cal-card, .card, .summary, .panel { box-shadow: none; break-inside: avoid; }
  /* Paper has no sideways scroll: let the strip wrap instead. */
  .summary { flex-wrap: wrap; overflow: visible; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { padding: 10px; }
  .card-photo { margin: -10px -10px 2px; aspect-ratio: auto; height: 32mm; }
  .card-photo figcaption { font-size: 7pt; }
  .results { gap: 8mm; }
  a[href]::after { content: none; }
  /* print every step, one after another, each starting a new page */
  .tabpanel[hidden] { display: grid !important; }
  .tabpanel + .tabpanel { break-before: page; }
  .print-step { font: 700 18pt/1.2 var(--display); margin: 0 0 4mm; }
  /* a printed plan can't be clicked, so show where the buying links go */
  .buy-list a[href]::after { content: " — " attr(href); font-weight: 400; font-size: 8pt; word-break: break-all; }
}
