/* Farm Paperwork Helper: on top of styles.css */
.fp-hero { grid-template-columns: 1fr; }
.fp-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 16px 14px; margin: 0 0 14px; }
.fp-form legend { font-weight: 700; padding: 0 6px; }
.fp-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.fp-ticks .choice { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.fp-ticks input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.fp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 6px; }
.fp-bar input[type=search], .fp-bar select { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.fp-bar select { flex: 0 1 220px; }
.fp-inline { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.fp-area { margin: 22px 0 8px; font-size: 1.15rem; }
.fp-row { display: flex; gap: 10px; align-items: flex-start; }
.fp-row > details { flex: 1; min-width: 0; }
.fp-tick { padding-top: 14px; cursor: pointer; }
.fp-tick input { width: 22px; height: 22px; }
.fp-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; box-shadow: var(--shadow); }
.fp-item > summary { cursor: pointer; position: relative; padding: 12px 14px 12px 32px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; list-style: none; }
.fp-item > summary::-webkit-details-marker { display: none; }
.fp-item > summary::before { content: "▸"; color: var(--muted); position: absolute; left: 14px; top: 12px; }
.fp-item[open] > summary::before { content: "▾"; }
.fp-title { font-weight: 700; }
.fp-when { flex-basis: 100%; color: var(--muted); font-size: .92rem; }
.fp-next { font-size: .85rem; color: var(--muted); }
.fp-next.fp-soon, .fp-cal .fp-soon strong { color: var(--accent); font-weight: 700; }
.fp-st-open { background: var(--brand-soft); color: var(--brand); }
.fp-st-closed { background: var(--surface-2); color: var(--muted); }
.fp-done .fp-title { text-decoration: line-through; color: var(--muted); }
.fp-body { padding: 0 16px 14px 36px; border-top: 1px solid var(--line); }
.fp-body h4 { margin: 14px 0 4px; }
.fp-body ol, .fp-body ul { margin: 4px 0; padding-left: 22px; }
.fp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
.fp-dl dt { font-weight: 600; color: var(--muted); }
.fp-dl dd { margin: 0; }
.fp-mine { margin: 10px 0; }
.fp-num { font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.fp-copy { margin-left: 4px; }
.fp-cal { list-style: none; padding: 0; margin: 0; }
.fp-cal li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.fp-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 20px; margin: 14px 0; }
.fp-numin { display: flex; gap: 8px; align-items: center; }
.fp-numin input { flex: 1; min-width: 0; }
@media (max-width: 560px) {
  .fp-body { padding-left: 14px; }
  .fp-dl { grid-template-columns: 1fr; gap: 0; }
  .fp-dl dd { margin-bottom: 6px; }
}
@media print {
  .site-header, .notice, .site-footer, .fp-bar, .btn-row, .fp-tick { display: none !important; }
  .fp-item { box-shadow: none; break-inside: avoid; }
  body.fp-printnums main > section:not(#tab-numbers) { display: none !important; }
  body.fp-printnums #tab-numbers { display: block !important; }
}

/* What can I claim? */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ff-search { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.ff-search input { flex: 1 1 240px; min-width: 0; padding: 12px 14px; font: inherit; font-size: 1.05rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.ff-mapcard { margin: 14px 0; }
.ff-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.ff-maphint { margin: 6px 0 0; }
.ff-farm { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 16px; margin: 0 0 14px; }
.ff-farm > summary { cursor: pointer; }
.ff-farm .fp-ticks { margin-top: 10px; }
.ff-sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; box-shadow: var(--shadow); }
.ff-sum h2 { margin: 0 0 6px; font-size: 1.2rem; }
.ff-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 6px; }
.ff-counts span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 4px 12px; }
.ff-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 6px 10px; }
.ff-group { margin: 0 0 12px; }
.ff-group > summary { cursor: pointer; list-style: none; padding: 6px 0 8px; }
.ff-group > summary::-webkit-details-marker { display: none; }
.ff-group > summary h2 { display: inline; font-size: 1.15rem; margin: 0 8px 0 0; }
.ff-group > summary h2::before { content: "▸ "; color: var(--muted); }
.ff-group[open] > summary h2::before { content: "▾ "; }
.ff-group > summary .small { display: block; margin-top: 2px; }
.ff-n { font-size: .85rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 9px; vertical-align: middle; }
.ff-why { flex-basis: 100%; color: var(--good); font-size: .9rem; }
.ff-unsure { color: var(--accent); }
.ff-g-no .fp-title, .ff-g-closed .fp-title { color: var(--muted); }
.tag.ff-st-open, .tag.ff-st-rolling { background: var(--brand-soft); color: var(--brand); }
.tag.ff-st-coming { background: var(--warn-bg); color: var(--accent); }
.tag.ff-st-closed, .tag.ff-st-unclear { background: var(--surface-2); color: var(--muted); }
@media (max-width: 600px) { .ff-map { height: 360px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; } }
@media print { .ff-search, .ff-mapcard, .ff-farm, #ffPrint, .site-header .nav { display: none !important; } .ff-group { break-inside: auto; } }
.tag.ff-buys { background: var(--surface-2); color: var(--text); font-weight: 500; }
.ff-topic { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); margin: 0 0 8px; }
.ff-topic > summary { cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ff-topic > summary::-webkit-details-marker { display: none; }
.ff-topic > summary::before { content: "▸"; color: var(--muted); }
.ff-topic[open] > summary::before { content: "▾"; }
.ff-topic[open] > summary { border-bottom: 1px solid var(--line); }
.ff-topic > .ff-item { margin: 8px; }
.ff-fits { font-size: .85rem; font-weight: 500; color: var(--good); }
@media print { .ff-topic { break-inside: auto; } }
.ff-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ff-dlg::backdrop { background: rgba(10, 20, 15, .55); }
.ff-dlg h2 { margin: 0 0 4px; font-size: 1.25rem; }
.ff-dlg h3 { margin: 14px 0 4px; font-size: 1rem; }
.ff-dlg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; margin-top: 10px; }
.ff-dlg-f { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; font-weight: 600; }
.ff-dlg-f input { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.ff-dlg .fp-ticks { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ff-dlg-btns { position: sticky; bottom: -18px; background: var(--surface); padding: 12px 0 4px; margin-top: 10px; }
@media (max-width: 600px) { .ff-dlg { padding: 14px; } }
.ff-copy { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0 12px; }
.ff-copy dt { color: var(--muted); font-weight: 600; }
.ff-copy dd { margin: 0; overflow-wrap: anywhere; }
.ff-copy dd span { font-weight: 600; }
@media (max-width: 600px) { .ff-copy { grid-template-columns: 1fr; } .ff-copy dt { margin-top: 6px; } }
@media print { .ff-copy button { display: none; } }
.ff-confirm { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.ff-confirm p { margin: 0 0 8px; }
.ff-confirm .btn-row { margin: 0; }
.ff-map.ff-picking { cursor: crosshair; outline: 3px solid var(--brand); outline-offset: -3px; }

/* Colours from the logo: navy paper, golden wheat, green shoot */
:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --surface-2: #f4efe2;
  --text: #16233a;
  --muted: #5a6577;
  --line: #e4dccb;
  --brand: #17345f;
  --brand-ink: #ffffff;
  --brand-soft: #e9eef6;
  --gold: #f0a526;
  --gold-deep: #d4821a;
  --leaf: #78a43d;
  --accent: #c4721a;
  --warn-bg: #fff4dd;
  --warn-line: #f0a526;
  --good: #4a7f22;
  --bad: #a3322a;
  --focus: #f0a526;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1625; --surface: #152137; --surface-2: #1c2a44; --text: #e9eef5; --muted: #a2afc2; --line: #2a3a58;
    --brand: #93b6ec; --brand-ink: #0e1625; --brand-soft: #1a2a47; --gold: #f2b244; --gold-deep: #e39a2f; --leaf: #8cc152;
    --accent: #f2b244; --warn-bg: #2d2513; --warn-line: #9a7224; --good: #8cc152; --bad: #ef7d73;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1625; --surface: #152137; --surface-2: #1c2a44; --text: #e9eef5; --muted: #a2afc2; --line: #2a3a58;
  --brand: #93b6ec; --brand-ink: #0e1625; --brand-soft: #1a2a47; --gold: #f2b244; --gold-deep: #e39a2f; --leaf: #8cc152;
  --accent: #f2b244; --warn-bg: #2d2513; --warn-line: #9a7224; --good: #8cc152; --bad: #ef7d73;
}

/* header: the logo, the name with "Farm" in wheat gold, and a wheat-to-leaf line underneath */
.site-header { border-bottom: 0; box-shadow: 0 1px 0 var(--line); position: relative; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, var(--brand) 0 35%, var(--gold) 35% 75%, var(--leaf) 75%); }
.logo { gap: 10px; color: var(--brand); font-size: 1.2rem; letter-spacing: -.01em; }
.logo-img { width: 44px; height: 44px; display: block; }
.logo-farm { color: var(--gold-deep); }
/* in dark mode the navy paper needs a light tile behind it */
:root[data-theme="dark"] .logo-img, :root[data-theme="dark"] .ff-hero-logo { background: #f6f1e4; border-radius: 12px; padding: 3px; }
:root[data-theme="dark"] .ff-hero-logo { padding: 14px; border-radius: 22px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img, :root:not([data-theme="light"]) .ff-hero-logo { background: #f6f1e4; border-radius: 12px; padding: 3px; }
  :root:not([data-theme="light"]) .ff-hero-logo { padding: 14px; border-radius: 22px; }
}
.nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--gold); }
.notice { background: var(--surface-2); margin-top: 3px; }

/* hero: cream panel with the big logo */
.ff-hero { grid-template-columns: 1fr auto; align-items: center; background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; margin-bottom: 18px; }
.ff-hero h1 { color: var(--brand); }
.ff-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--gold-deep); margin: 0 0 6px; }
.ff-hero-logo { width: 190px; height: 190px; }
@media (max-width: 760px) { .ff-hero { grid-template-columns: 1fr; padding: 18px; } .ff-hero-logo { display: none; } }

/* buttons: navy main buttons, the search button in wheat gold */
.btn { border-radius: 999px; }
.ff-search .btn-primary { background: var(--gold); color: #16233a; }
.ff-search .btn-primary:hover { background: var(--gold-deep); filter: none; }
.ff-search input { border-radius: 999px; border-width: 2px; padding-left: 18px; }
.ff-search input:focus { border-color: var(--gold); outline: none; }

/* report */
.ff-sum { border-top: 4px solid var(--gold); }
.ff-sum h2 { color: var(--brand); }
.ff-counts span { background: var(--brand-soft); color: var(--brand); }
.ff-group > summary h2 { color: var(--brand); }
.ff-g-now > summary h2::after, .ff-g-buyers > summary h2::after { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 8px; background: var(--leaf); vertical-align: middle; }
.ff-topic { background: var(--surface-2); }
.ff-topic > summary::before { color: var(--gold-deep); }
.ff-why { color: var(--good); }
.tag.ff-st-open, .tag.ff-st-rolling { background: #e7f1dc; color: #3c6b1a; }
.tag.ff-st-coming { background: var(--warn-bg); color: #9a5a0c; }
:root[data-theme="dark"] .tag.ff-st-open, :root[data-theme="dark"] .tag.ff-st-rolling { background: #22361a; color: var(--leaf); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.ff-st-open, :root:not([data-theme="light"]) .tag.ff-st-rolling { background: #22361a; color: var(--leaf); } :root:not([data-theme="light"]) .tag.ff-st-coming { color: var(--gold); } }
:root[data-theme="dark"] .tag.ff-st-coming { color: var(--gold); }
.ff-confirm { border-color: var(--gold); }
.ff-map.ff-picking { outline-color: var(--gold); }
.ff-dlg { border-top: 4px solid var(--gold); }
.ff-dlg h2 { color: var(--brand); }

/* footer: navy band */
.site-footer { background: #17345f; color: #d7e0ee; border-top: 3px solid var(--gold); }
.site-footer a { color: #ffd28a; }
.site-footer strong { color: #fff; }
:root[data-theme="dark"] .site-footer { background: #0a111d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #0a111d; } }

