/* Field Survey Crew: an ecology crew's staked meadow. Field drawn by art.js (colors from the --fs-* properties below). */
html {
  --fs-edge: #6e9e4c; --fs-edge-blade: #4f7f36; --fs-soil: #8a6a46;
  --fs-tall1: #7fb35a; --fs-tall2: #5d9441; --fs-blade: #3f7a2e; --fs-blade2: #a6d27a;
  --fs-short: #b7d88e; --fs-short-blade: #8dbb63;
  --fs-tall1b: #a9c46a; --fs-tall2b: #8eaa4f;
  --fs-string: #f4eedc; --fs-stake: #b3541e; --fs-flag: #f26b1d;
  --fs-frame: #ffffff; --fs-tape: #f5c518; --fs-tape-tick: #3a2d12;
  --fs-ok: #137a3e; --fs-bad: #b3261e; --fs-ink: #1f2a22; --fs-accent: #2d6a4f; --fs-accent-ink: #ffffff;
  --fs-panel1: #fbf8ef; --fs-panel2: #f0ead6; --fs-panel-line: #2d6a4f; --fs-rule: rgba(45,106,79,.14);
  --fs-clip: #fffdf7; --fs-clip-metal: #9aa3a8; --fs-board1: #b98f5f; --fs-board2: #94704a;
  --fs-target: rgba(242,183,5,.22); --fs-est: #2d6a4f; --fs-cen: #b06a1a; --fs-beetle-edge: #0b0d10; --fs-beetle-leg: #1a1d22;
}
html[data-theme="dark"] {
  --fs-edge: #2f4a26; --fs-edge-blade: #3f6332; --fs-soil: #4a3826;
  --fs-tall1: #3d6a2e; --fs-tall2: #2c5222; --fs-blade: #6fa456; --fs-blade2: #4c7d3a;
  --fs-short: #5c7a43; --fs-short-blade: #77985a;
  --fs-tall1b: #5a6b30; --fs-tall2b: #47561f;
  --fs-string: #d9d0b4; --fs-stake: #e08a52; --fs-flag: #ff8a4a;
  --fs-frame: #f4f4f0; --fs-tape: #f5c518; --fs-tape-tick: #3a2d12;
  --fs-ok: #5fd38f; --fs-bad: #ff8a80; --fs-ink: #eef2ea; --fs-accent: #7fd1a8; --fs-accent-ink: #0f2419;
  --fs-panel1: #252a24; --fs-panel2: #1e221d; --fs-panel-line: #6fbf9a; --fs-rule: rgba(127,209,168,.12);
  --fs-clip: #23262a; --fs-clip-metal: #6c757b; --fs-board1: #4a3627; --fs-board2: #36271c;
  --fs-target: rgba(242,183,5,.18); --fs-est: #7fd1a8; --fs-cen: #f0a65a; --fs-beetle-edge: #dfe7f2; --fs-beetle-leg: #c3ccd8;
}

/* ── layout ── */
.fs { position: absolute; inset: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; padding: 10px;
  color: var(--tlg-text); font-size: 16px; }
.fs input, .fs button { font: inherit; }
.fs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* field notebook */
.fs-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 12px 10px 16px;
  background: repeating-linear-gradient(transparent 0 27px, var(--fs-rule) 27px 28px), linear-gradient(var(--fs-panel1), var(--fs-panel2));
  color: var(--fs-ink); border: 3px solid var(--fs-panel-line); border-left-width: 9px; border-radius: 12px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.fs-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fs-accent); }
.fs-step { display: grid; gap: 4px; }
.fs-step-h { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; margin: 0; font-size: 17px; line-height: 1.2; }
.fs-step-h .fs-mark { max-width: 130px; text-align: right; line-height: 1.15; }
.fs-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--fs-accent); color: var(--fs-accent-ink); font-size: 16px; font-weight: 800; }
.fs-step.is-done .fs-n { background: var(--fs-ok); color: #fff; }
html[data-theme="dark"] .fs-step.is-done .fs-n { color: #0f2419; }
.fs-step.is-wrong .fs-n { background: var(--fs-bad); color: #fff; }
.fs-mark { font-weight: 800; font-size: 16px; }
.fs-mark.is-ok { color: var(--fs-ok); } .fs-mark.is-bad { color: var(--fs-bad); }
.fs-note { margin: 0; font-size: 16px; opacity: .85; line-height: 1.25; }
.fs-budget { margin: 0; font-weight: 800; font-size: 16px; }
.fs-budget-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fs-budget-icons { display: flex; gap: 6px; align-items: center; min-height: 26px; }
.fs-bi { width: 24px; height: 24px; border-radius: 3px; border: 3px dashed #8a8f84; background: transparent; }
.fs-bi.is-used { border: 4px solid var(--fs-accent); background: var(--fs-short); box-shadow: inset 0 0 0 2px #fff; }
.fs-bi--belt { width: 96px; height: 18px; }
.fs-bi--trap { border-radius: 50%; }
.fs-bi--trap.is-used { background: #3b2a1c; }
.fs-bi-gap { width: 1px; height: 22px; margin: 0 4px; background: #8a8f84; }

.fs-num { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fs-num input { width: 132px; font-size: 17px; min-height: 42px; padding: 5px 9px; border: 2px solid #9a8f78; border-radius: 8px; background: #fff; color: #1f2a22; }
html[data-theme="dark"] .fs-num input { background: #171a16; color: #f1f4ee; border-color: #6f7a68; }
.fs-num input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.fs-num input:disabled { opacity: 1; }
.fs-unit { font-weight: 700; }
.fs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fs-num--site { display: grid; gap: 2px; }
.fs-num--site input { width: 100%; }
.fs-num-tag { font-weight: 700; font-size: 16px; }
.fs-undef { min-height: 42px; padding: 4px 10px; border: 2px dashed #8a8f84; border-radius: 8px; background: transparent; color: var(--fs-ink); font-size: 16px; cursor: pointer; }
.fs-undef:hover:not(:disabled) { border-color: var(--fs-accent); }
.fs-undef:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.fs-undef:disabled { cursor: default; opacity: .6; }

/* radio pills and cards */
.fs-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 5px; }
.fs-pills { grid-template-columns: repeat(3, 1fr); }
.fs-opt { position: relative; display: flex; align-items: center; border: 2px solid #b4a88c; border-radius: 10px; background: #fffdf8; cursor: pointer; min-height: 44px; color: var(--fs-ink); }
html[data-theme="dark"] .fs-opt { background: #2c312b; border-color: #66705f; }
.fs-opt input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fs-opt > b, .fs-opt > span { width: 100%; padding: 3px 9px; font-size: 16px; line-height: 1.2; }
.fs-pills .fs-opt > b { text-align: center; padding: 4px; }
.fs-opt:has(input:checked) { border-color: var(--fs-accent); background: var(--fs-accent); color: var(--fs-accent-ink); box-shadow: inset 0 0 0 2px var(--fs-accent-ink); }
.fs-opt:has(input:focus-visible) { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.fs-opt:hover:not(:has(input:disabled)) { border-color: var(--fs-accent); }
.fs-opt:has(input:disabled) { cursor: default; }
.fs.is-locked .fs-opt:not(:has(input:checked)) { opacity: .55; }
.fs.is-revealed .fs-opt.is-key { opacity: 1; border-color: var(--fs-ok); border-style: dashed; border-width: 3px; }
.fs.is-revealed .fs-opt.is-key:not(:has(input:checked))::after { content: "✓ best"; position: absolute; right: 6px; bottom: 2px; font-weight: 800; color: var(--fs-ok); font-size: 16px; }

/* ── right: plan chips, map, clipboard ── */
.fs-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.fs-spec { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 10px; border: 2px solid var(--fs-accent); border-radius: 999px; background: var(--fs-panel1); color: var(--fs-ink); font-size: 16px; }
.fs-chip-k { opacity: .85; }
.fs-chip--budget { border-color: var(--fs-flag); }
.fs-table { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; padding: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 58px, rgba(0,0,0,.08) 58px 60px), linear-gradient(var(--fs-board1), var(--fs-board2)); border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.fs-mapcol { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; align-items: center; }
.fs-tabs { display: flex; gap: 6px; align-items: center; align-self: stretch; }
.fs-tab { min-height: 36px; padding: 2px 16px; border: 2px solid #f4eedc; border-radius: 8px 8px 0 0; background: rgba(0,0,0,.25); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.fs-tab[aria-pressed="true"] { background: var(--fs-panel1); color: var(--fs-ink); border-color: var(--fs-panel1); text-decoration: underline; text-underline-offset: 3px; }
.fs-tab:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.fs-tab.is-next { animation: fs-nudge 1.4s ease-in-out infinite; }
.fs-tabcap { color: #fff; font-weight: 700; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.fs-mapbox { position: relative; flex: 1 1 auto; min-height: 0; aspect-ratio: 1; max-width: 100%; }
.fs-map { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(0,0,0,.3)); }
.fs-cap { margin: 0; color: #fff; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.6); text-align: center; }

/* the map art */
.fs-edge { fill: url(#fs-p-edge); }
.fs-soil { fill: var(--fs-soil); }
.fs-tall { fill: url(#fs-p-tall); }
.is-pasture .fs-tall { fill: url(#fs-p-graze); }
.fs-cut { fill: url(#fs-p-short); }
.fs-strings path { stroke: var(--fs-string); stroke-width: 1.4; opacity: .9; }
.fs-stakes circle { fill: var(--fs-stake); stroke: #3a2412; stroke-width: 1; }
.fs-flag path:last-child { fill: var(--fs-flag); }
.fs-frame-sh { fill: none; stroke: rgba(0,0,0,.3); stroke-width: 4; }
.fs-frame-r { fill: none; stroke: var(--fs-frame); stroke-width: 4; }
.fs-belt-edge { fill: none; stroke: var(--fs-frame); stroke-width: 3; stroke-dasharray: 7 5; }
.fs-tape { stroke: var(--fs-tape); stroke-width: 5; stroke-linecap: round; }
.fs-tape-ticks { stroke: var(--fs-tape-tick); stroke-width: 1.6; }
.fs-mow { fill: url(#fs-p-tall); pointer-events: none; animation: fs-mow .5s ease-in .05s both; }
.fs-census-plot { opacity: 0; animation: fs-fade .6s ease-out both; }
.fs.is-revealed .fs-tall { opacity: .55; }

/* click targets over the map */
.fs-grid { position: absolute; left: 5%; top: 5%; width: 90%; height: 90%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); }
.fs-grid--rows { grid-template-columns: 1fr; }
.fs-cell { position: relative; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 3px; min-width: 0; min-height: 0; }
.fs-cell-n { position: absolute; left: 3px; top: 2px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.82); color: #1f2a22; font-size: 16px; font-weight: 700; line-height: 1.15; pointer-events: none; }
.fs-grid--rows .fs-cell-n { left: auto; right: -2px; top: 50%; transform: translate(100%, -50%); background: transparent; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); display: none; }
.fs-grid--rows .fs-cell::before { content: attr(aria-label); display: none; }
.fs-cell:hover:not(:disabled) { box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 7px rgba(0,0,0,.25); background: rgba(255,255,255,.12); }
.fs-cell:focus-visible { outline: 4px solid var(--tlg-focus, #1a73e8); outline-offset: -4px; z-index: 1; }
.fs-cell:disabled { cursor: default; }
.fs-cell.is-on .fs-cell-n { background: var(--fs-accent); color: var(--fs-accent-ink); }
.fs.is-locked .fs-cell:not(.is-on) .fs-cell-n { opacity: .7; }
.fs-grid--rows .fs-cell { border-bottom: 1px solid transparent; }
.fs-grid--rows .fs-cell .fs-cell-n { display: inline-block; position: absolute; left: 3px; top: 3px; right: auto; transform: none; background: rgba(255,255,255,.82); color: #1f2a22; text-shadow: none; }

/* clipboard: tally sheet */
.fs-clip { position: relative; min-height: 0; overflow: auto; padding: 18px 12px 10px; background: var(--fs-clip); color: var(--fs-ink); border-radius: 8px; box-shadow: 0 3px 6px rgba(0,0,0,.3); }
.fs-clip::before { content: ""; position: absolute; top: -2px; left: 50%; width: 90px; height: 14px; margin-left: -45px; border-radius: 0 0 6px 6px; background: var(--fs-clip-metal); }
.fs-clip-h { margin: 0 0 4px; font-size: 18px; }
.fs-tbl { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.fs-tbl th, .fs-tbl td { padding: 1px 4px; line-height: 1.3; text-align: center; border-bottom: 1px solid rgba(0,0,0,.12); }
html[data-theme="dark"] .fs-tbl th, html[data-theme="dark"] .fs-tbl td { border-bottom-color: rgba(255,255,255,.14); }
.fs-tbl thead th { white-space: nowrap; }
.fs-tbl thead th span { vertical-align: middle; }
.fs-tbl .is-target { background: var(--fs-target); }
.fs-tbl .is-total th, .fs-tbl .is-total td { font-weight: 800; border-top: 2px solid currentColor; border-bottom: 0; }
.fs-tbl .is-blank td, .fs-tbl .is-blank th { color: transparent; }
.fs-tbl .is-blank th { color: inherit; opacity: .4; }
.fs-tbl-cap { text-align: left; font-weight: 800; font-size: 16px; padding-top: 4px; }
.fs-tbl + .fs-tbl { margin-top: 4px; }
.fs-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 2px; }
.fs-line { margin: 4px 0 0; font-size: 16px; }
.fs-legend { margin: 4px 0 0; font-size: 16px; line-height: 1.3; }
.fs.is-revealed .fs-formula, .fs.is-revealed .fs-legend { display: none; }
.fs-formula { margin: 6px 0 0; padding: 4px 8px; border-left: 4px solid var(--fs-accent); background: var(--fs-rule); font-size: 16px; line-height: 1.3; }

/* census (practice reveal) */
.fs-census { margin-top: 8px; padding: 6px 8px; border: 2px solid var(--fs-cen); border-radius: 8px; animation: fs-fade .5s ease-out both; }
.fs-census-h { margin: 0 0 4px; font-weight: 800; font-size: 16px; }
.fs-census-n { margin: 4px 0 0; font-size: 16px; line-height: 1.3; }
.fs-bars { display: grid; gap: 4px; }
.fs-bar { display: grid; grid-template-columns: 102px 1fr auto; gap: 6px; align-items: center; font-size: 16px; }
.fs-bar-track { height: 16px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; }
html[data-theme="dark"] .fs-bar-track { background: rgba(255,255,255,.1); }
.fs-bar-fill { display: block; height: 100%; width: 0; transition: width .9s cubic-bezier(.2,.8,.3,1); }
.fs-bar--est { background: var(--fs-est); }
.fs-bar--cen { background: repeating-linear-gradient(45deg, var(--fs-cen) 0 6px, #d98c3a 6px 10px); }
.fs-tbl--cen { margin-top: 2px; }

.fs-readout { margin: 0; font-size: 16px; font-weight: 600; min-height: 1.3em; }
.fs-about { font-size: 16px; }
.fs-about summary { cursor: pointer; font-weight: 700; }
.fs-about p { margin: 4px 0; line-height: 1.35; }

/* Briefing example */
.fs-ex-svg { display: block; width: 100%; max-width: 600px; height: auto; }
.fs-ex-t { font: 600 16px var(--tlg-font, system-ui); fill: currentColor; }
.fs-ex-b { font-weight: 800; }

/* ── motion ── */
.fs-pop { transform-box: fill-box; transform-origin: center; animation: fs-pop .38s cubic-bezier(.3,1.6,.6,1) both; }
.fs-drop { transform-box: fill-box; transform-origin: center; animation: fs-drop .42s ease-out both; }
.fs-unroll .fs-tape { stroke-dasharray: 380; animation: fs-unroll .8s ease-out both; }
@keyframes fs-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fs-drop { from { transform: scale(1.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fs-unroll { from { stroke-dashoffset: 380; } to { stroke-dashoffset: 0; } }
@keyframes fs-mow { from { opacity: 1; } to { opacity: 0; } }
@keyframes fs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fs-nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,107,29,.0); } 50% { box-shadow: 0 0 0 4px rgba(242,107,29,.9); } }
@media (prefers-reduced-motion: reduce) {
  .fs-pop, .fs-drop, .fs-unroll .fs-tape, .fs-census-plot, .fs-census, .fs-tab.is-next { animation: none; opacity: 1; }
  .fs-mow { display: none; }
  .fs-bar-fill { transition: none; }
  .fs-tab.is-next { box-shadow: 0 0 0 4px rgba(242,107,29,.9); }
}

/* ── narrow ── */
@media (max-width: 900px) {
  .fs { position: static; grid-template-columns: 1fr; }
  .fs-controls { overflow: visible; }
  .fs-table { grid-template-columns: 1fr; }
  .fs-mapbox { width: 100%; max-width: 460px; flex: none; }
  .fs-clip { overflow: visible; }
}
