@font-face {
  font-family: "Barlow SC";
  src: url("fonts/barlow-semi-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --paper: #f4f7f1;
  --ink: #1d261d;
  --muted: #535f50;
  --line: #d3dccd;
  --green: #2c6a37;
  --green-ink: #ffffff;
  --bar: #24452c;
  --bar-ink: #f3f7ef;
  --pink: #b8325f;
  --pink-bg: #fbe8ef;
  --pink-soft: #f2abc2;
  --bark: #8a6a4d;
  --leaf: #86bd5f;
  --amber: #8a5b0a;
  --amber-bg: #fdf3dc;
  --focus: #1b66c9;
  --r: 6px;
  --head: "Barlow SC", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101510;
    --paper: #182118;
    --ink: #e6eee2;
    --muted: #a8b6a2;
    --line: #2f3d2e;
    --green: #8fc46a;
    --green-ink: #0e1a0e;
    --bar: #0b110b;
    --bar-ink: #e6eee2;
    --pink: #f08fb0;
    --pink-bg: #3a1a26;
    --pink-soft: #a8476a;
    --bark: #b8946f;
    --leaf: #6f9f4c;
    --amber: #f0c060;
    --amber-bg: #33280f;
    --focus: #7fb2ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--green); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.topbar { background: var(--bar); color: var(--bar-ink); }
.topbar-in { display: flex; align-items: center; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 700 22px/1 var(--head); letter-spacing: .01em; }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; }
h1 { font-size: 34px; margin: 16px 0 4px; }
h2 { font-size: 26px; margin: 0 0 10px; }
h3 { font-size: 20px; }
.lede { margin: 0 0 16px; color: var(--muted); max-width: 60ch; }

/* ---------- tool ---------- */
.tool { display: grid; gap: 14px; }
fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
legend, .lab { display: block; font: 700 17px/1.2 var(--head); margin: 0 0 6px; padding: 0; }
.lab { font-size: 16px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips.small { display: flex; flex-wrap: wrap; }
.chips label, .seg label { position: relative; cursor: pointer; }
.chips input, .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: flex; align-items: center; gap: 7px; min-height: 46px; height: 100%; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); font-size: 15.5px; line-height: 1.15; }
@media (max-width: 359px) { .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips span::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; flex: none; }
.chips input:checked + span { border-color: var(--green); background: var(--paper); font-weight: 600; }
.chips input:checked + span::before { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px var(--bg); }
.chips input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips.small span { min-height: 40px; padding: 6px 12px; font-size: 15px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 6px 8px; font-size: 15.5px; line-height: 1.2; }
.seg label + label span { border-left: 1.5px solid var(--line); }
.seg input:checked + span { background: var(--green); color: var(--green-ink); font-weight: 600; }
select, input[type=date], input[type=text], input[type=number] {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r);
  min-height: 44px; padding: 8px 10px; width: 100%; max-width: 100%;
}
.blooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.drow { display: grid; gap: 2px; font-size: 15px; color: var(--muted); }
.drow input { min-width: 0; }
.more { margin: 4px 0 0; border-top: 1px solid var(--line); }
.more summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--green); min-height: 44px; }
.more-in { padding-bottom: 8px; display: grid; gap: 6px; }
.more-in .lab { margin-top: 8px; }

.results { min-width: 0; }
.results:focus { outline: none; }
.answer { border: 2px solid var(--green); border-radius: var(--r); padding: 14px 16px; background: var(--paper); }
.answer p { margin: 0 0 6px; }
.kicker { font: 700 15px/1 var(--head); color: var(--green); }
.answer .big { display: flex; gap: 12px; align-items: center; font: 700 25px/1.15 var(--head); margin: 6px 0 8px; }
.answer .big b { color: var(--green); }
.answer .look { color: var(--ink); }
.when { color: var(--muted); }
.ex1 { font-size: 16px; }
.bloomline, .beerule { display: flex; gap: 8px; align-items: center; background: var(--pink-bg); color: var(--ink); border-left: 4px solid var(--pink); padding: 8px 10px; border-radius: 0 var(--r) var(--r) 0; margin: 4px 0 10px !important; font-weight: 600; }
.ic { width: 28px; height: 28px; flex: none; color: var(--bark); }
.ic.lg { width: 44px; height: 44px; }
.ic.sm { width: 22px; height: 22px; }

/* season chart */
.chart { margin: 16px 0 6px; }
.ch { --nm: 62px; font-size: 13px; }
.ch-months { position: relative; height: 20px; margin-left: var(--nm); color: var(--muted); }
.ch-months span { position: absolute; top: 0; text-align: center; overflow: hidden; white-space: nowrap; font-size: 13px; }
.ch-body { position: relative; }
.ch-area { position: absolute; left: var(--nm); right: 0; top: 0; bottom: 0; pointer-events: none; }
.mline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.band { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--pink) 18%, transparent) 5px 8px); border-left: 1.5px solid var(--pink); border-right: 1.5px solid var(--pink); }
.band span { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--pink); font-weight: 700; font-size: 12.5px; }
.today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--focus); }
.ch-row { display: grid; grid-template-columns: var(--nm) 1fr; align-items: center; height: 30px; }
.ch-name { font-weight: 600; font-size: 14px; line-height: 1.05; overflow: hidden; overflow-wrap: anywhere; }
.ch-track { position: relative; height: 16px; }
.ch-track i { position: absolute; top: 0; bottom: 0; }
i.bar { border-radius: 2px; }
.s-dormant { background: var(--bark); opacity: .55; }
.s-budswell { background: var(--leaf); }
.s-prebloom { background: var(--pink-soft); }
.s-bloom { background: var(--pink); }
.s-petalfall { background: var(--green); }
.tick { width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
.tick.k-harvest { width: 12px; height: 12px; margin: 2px 0 0 -6px; border-radius: 50%; background: #d29a1c; }
.tick.k-maggot, .tick.k-fruitfly { background: transparent; border: 2px solid var(--ink); width: 8px; margin-left: -4px; }
.tick.k-fall { background: #c98a2c; }
.ch-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 26px 0 0; font-size: 14px; color: var(--muted); }
.ch-key span { display: inline-flex; align-items: center; gap: 6px; }
.kk { display: inline-block; width: 16px; height: 10px; border-radius: 2px; }
.kk.tk { width: 4px; height: 14px; background: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.btn { display: inline-flex; align-items: center; text-decoration: none; font: inherit; font-size: 16px; font-weight: 600; min-height: 44px; padding: 8px 16px; border-radius: var(--r); border: 1.5px solid var(--green); background: var(--bg); color: var(--green); cursor: pointer; }
.btn.primary { background: var(--green); color: var(--green-ink); }
.linkbtn { font: inherit; font-size: 15px; background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--green); text-decoration: underline; cursor: pointer; }
.toast { min-height: 1.4em; margin: 6px 0; color: var(--green); font-weight: 600; font-size: 15px; }
.label-line { font-size: 15px; color: var(--muted); margin: 0 0 12px; border-left: 3px solid var(--amber); padding-left: 10px; }

/* calendar list */
.list-h { margin-top: 18px; }
.grp { margin: 0; padding: 0 0 4px; }
.grp.past { opacity: .62; }
.gdate { font-size: 18px; margin: 10px 0 2px; color: var(--green); }
.grp { border-top: 1px solid var(--line); }
.ev { border-left: 4px solid transparent; background: var(--bg); }
.ev + .ev { border-top: 1px solid var(--line); }
.ev.k-bloom { border-left-color: var(--pink); background: var(--pink-bg); }
.ev[open] { background: var(--paper); }
.ev.k-bloom[open] { background: var(--pink-bg); }
.ev summary { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px 8px 6px; cursor: pointer; list-style: none; min-height: 44px; }
.ev summary::-webkit-details-marker { display: none; }
.ev summary::after { content: "+"; margin-left: auto; font-weight: 700; color: var(--muted); padding-left: 6px; }
.ev[open] summary::after { content: "\2212"; }
.ev-t { display: block; min-width: 0; }
.ev-w { display: block; color: var(--muted); font-size: 15px; }
.key { font-size: 13px; font-weight: 600; color: var(--green); border: 1px solid var(--green); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.dn { font-size: 13px; font-weight: 600; color: var(--green-ink); background: var(--green); border-radius: 3px; padding: 0 5px; }
.ev.done .ev-t b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ev-b { padding: 0 10px 10px 44px; }
.ev-b p { margin: 0 0 8px; }
.task { font-size: 16px; }
.ex { width: 100%; border-collapse: collapse; font-size: 15px; margin: 4px 0 8px; }
.ex th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px 4px 0; }
.ex td { vertical-align: top; border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; }
.ex td:first-child { width: 42%; }
.nt { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.bee { font-size: 12.5px; font-weight: 600; color: var(--pink); white-space: nowrap; }
.none { color: var(--muted); }
.src { font-size: 14px; color: var(--muted); }
.beewarn { background: var(--amber-bg); border-left: 4px solid var(--amber); padding: 8px 10px; font-size: 15px; }
.more-c { font-size: 15px; color: var(--muted); }
.ev-act { display: flex; gap: 14px; align-items: center; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }

/* log */
.log { margin: 34px 0 10px; padding-top: 20px; border-top: 3px solid var(--bar); }
.log-form { max-width: 640px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.row2 > div { min-width: 0; }
.lg-trees { margin: 0 0 10px; }
.err { color: #b3261e; font-weight: 600; min-height: 0; margin: 0 0 6px; }
@media (prefers-color-scheme: dark) { .err { color: #ff8a80; } }
.picks { padding-left: 18px; margin: 10px 0; }
.muted { color: var(--muted); }
.warnline { color: var(--amber); }
.logt { width: 100%; border-collapse: collapse; font-size: 15px; }
.logt th, .logt td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.saved { font-size: 15px; color: var(--muted); }
.saved.warn { color: var(--amber); }

.shared { border: 2px solid var(--amber); background: var(--amber-bg); border-radius: var(--r); padding: 10px 14px; margin: 0 0 14px; }
.shared p { margin: 0 0 8px; }
.sh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.undo-toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 8px 8px 16px; border-radius: var(--r); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); font-size: 15px; }
.undo-toast .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* content */
.content { max-width: 760px; margin: 40px 0 20px; }
.content section { margin: 0 0 34px; }
.content p, .content li { max-width: 70ch; }
.stages { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.stages li { display: flex; gap: 10px; align-items: center; }
.stages svg { width: 32px; height: 32px; flex: none; color: var(--bark); }
.plain { padding-left: 20px; }
.plain li { margin-bottom: 6px; }
details.phi, details.states { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.phi summary, details.states summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--green); min-height: 44px; }
#phi-table { border-collapse: collapse; font-size: 15px; margin: 0 0 12px; width: 100%; }
#phi-table caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 4px; }
#phi-table th, #phi-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 5px 8px 5px 0; vertical-align: top; }
.state-list { columns: 2 150px; padding-left: 18px; margin: 4px 0 12px; }
.state-list li { break-inside: avoid; padding: 3px 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: 44px; }
.faq details p { margin: 0 0 14px; }
.sources { font-size: 14px; color: var(--muted); }
footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 18px 0 30px; font-size: 14px; color: var(--muted); }
.sb-footer p { margin: 0 0 8px; }

.printable { display: none; }

@media (min-width: 600px) {
  h1 { font-size: 42px; }
  .blooms { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media (min-width: 960px) {
  .tool { grid-template-columns: 360px minmax(0, 1fr); gap: 36px; align-items: start; }
  .setup { position: sticky; top: 12px; }
  .ch { --nm: 76px; }
}
@media (max-width: 420px) {
  .row2 { grid-template-columns: 1fr; }
  .ev-b { padding-left: 12px; }
  .ex td:first-child { width: 46%; }
  .logt th:nth-child(2), .logt td:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- print ---------- */
@media print {
  @page { size: auto; margin: 12mm 11mm; }
  :root { --bg: #fff; --paper: #fff; --ink: #000; --muted: #333; --line: #999; --green: #1f5a2b; --pink: #b8325f; --pink-bg: #fff; --pink-soft: #f2abc2; --bark: #8a6a4d; --leaf: #86bd5f; }
  body { font-size: 10pt; background: #fff; color: #000; }
  .skip, .topbar, .hero, .tool, .log, .content, .shared, footer, .undo-toast, .sprite { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .printable { display: block !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-head h2 { font-size: 20pt; margin: 0 0 4pt; }
  .pr-head p { margin: 0 0 3pt; }
  .pr-chart { margin: 8pt 0 6pt; break-inside: avoid; }
  .pr-chart .ch { --nm: 60pt; font-size: 9pt; }
  .pr-chart .ch-row { height: 20pt; }
  .pr-chart .ch-track { height: 11pt; }
  .pr-chart .ch-key { margin-top: 18pt; font-size: 8.5pt; }
  .pr-t { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 6pt; }
  .pr-t col.c1 { width: 13%; } .pr-t col.c2 { width: 6%; } .pr-t col.c3 { width: 37%; } .pr-t col.c4 { width: 44%; }
  .pr-t th { text-align: left; font-size: 9pt; border-bottom: 1.2pt solid #000; padding: 3pt 4pt; }
  .pr-t td { vertical-align: top; border-bottom: .6pt solid #999; padding: 4pt; font-size: 9.5pt; line-height: 1.3; }
  .pr-t td span { font-size: 9pt; }
  .pr-t tbody { break-inside: avoid; }
  .pr-t thead { display: table-header-group; }
  .pr-t td.pc::before { content: ""; display: block; width: 10pt; height: 10pt; border: 1pt solid #000; margin: 1pt auto 0; }
  .pr-t tr.k-bloom td { background: #fbe8ef; }
  .pbee { color: #8a1f45; }
  .pr-safe { break-inside: avoid; border: 1pt solid #000; padding: 4pt 8pt; margin: 10pt 0; }
  .pr-safe h3, .pr-log h3 { font-size: 12pt; margin: 2pt 0 4pt; }
  .pr-safe p { margin: 0 0 3pt; }
  .pr-src { font-size: 8.5pt; color: #333; }
  .pr-log { break-before: page; }
  .pr-lt { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .pr-lt th { text-align: left; font-size: 9pt; border-bottom: 1.2pt solid #000; padding: 3pt 4pt; }
  .pr-lt td { border-bottom: .6pt solid #777; height: 22pt; padding: 3pt 4pt; font-size: 9.5pt; }
  .pr-lt th:nth-child(1) { width: 12%; } .pr-lt th:nth-child(2) { width: 16%; } .pr-lt th:nth-child(3) { width: 28%; } .pr-lt th:nth-child(4) { width: 20%; } .pr-lt th:nth-child(5) { width: 10%; } .pr-lt th:nth-child(6) { width: 14%; }
  .band span { bottom: -14pt; font-size: 8pt; }
}
