/* Thought Extinct - field-notebook paper, forest ink, blaze-orange survey tape; the camera-trap stills stay dark in both themes. */
:root {
  --bg: #ebe5d3; --panel: #f8f4e8; --panel-2: #f1ead6; --ink: #1d271c; --muted: #545d50; --line: #cdc3a6;
  --accent: #b3440c; --accent-ink: #ffffff; --moss: #33502c; --moss-2: #dbe5cf; --tape: #ff8a2a;
  --revive: #a33a06; --revive-bg: #ffe2cc; --reshape: #6b5100; --reshape-bg: #fff0b8; --rest: #3c4650; --rest-bg: #dde3e8;
  --warn: #8a2a00; --warn-bg: #fde7d6; --info-bg: #e6ecdf; --night: #151a14; --shadow: 0 1px 0 rgba(40, 34, 14, 0.08), 0 6px 18px rgba(40, 34, 14, 0.07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e120d; --panel: #171e16; --panel-2: #1d261b; --ink: #e5eadc; --muted: #a4ae9b; --line: #2f3b2b;
    --accent: #ff8a2a; --accent-ink: #1a1105; --moss: #9cc28a; --moss-2: #22301f; --tape: #ff8a2a;
    --revive: #ffb27a; --revive-bg: #3a220f; --reshape: #ffdf73; --reshape-bg: #352d0c; --rest: #c9d3dc; --rest-bg: #252c33;
    --warn: #ffb48a; --warn-bg: #3a1d10; --info-bg: #1f2a1c; --night: #080a07; --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e120d; --panel: #171e16; --panel-2: #1d261b; --ink: #e5eadc; --muted: #a4ae9b; --line: #2f3b2b;
  --accent: #ff8a2a; --accent-ink: #1a1105; --moss: #9cc28a; --moss-2: #22301f; --tape: #ff8a2a;
  --revive: #ffb27a; --revive-bg: #3a220f; --reshape: #ffdf73; --reshape-bg: #352d0c; --rest: #c9d3dc; --rest-bg: #252c33;
  --warn: #ffb48a; --warn-bg: #3a1d10; --info-bg: #1f2a1c; --night: #080a07; --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.mono, .hud, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* --- Header ---------------------------------------------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-bottom: 3px solid var(--tape); box-shadow: var(--shadow); }
.back { text-decoration: none; color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.brand strong { font-size: 1.05rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 28px; height: 28px; flex: none; }
.lg-body { fill: var(--moss); } .lg-lens { fill: var(--night); } .lg-eye { fill: var(--tape); } .lg-ir { fill: var(--panel); } .lg-strap { fill: var(--muted); }
.session { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 34px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 0.9rem; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill:hover { border-color: var(--accent); }
.pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pill.ghost { background: transparent; cursor: default; }
.pill.tiny { min-height: 28px; padding: 3px 10px; font-size: 0.82rem; }
.pill.big { min-height: 44px; padding: 8px 20px; font-size: 1rem; }
.pill:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 520px) { .back-t { display: none; } .bar { padding: 8px 12px; gap: 6px; } .brand strong { font-size: 0.98rem; } .pill { padding: 4px 10px; } }

/* --- Hero ------------------------------------------------------------------------------------------------------ */
main { max-width: 1040px; margin: 0 auto; padding: 14px 16px 30px; }
.hero { padding: 14px 0 6px; }
.kicker { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--tape); background: var(--panel-2); font-size: 0.9rem; color: var(--muted); }
h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.h1b { display: block; font-size: clamp(1.02rem, 2.6vw, 1.35rem); font-weight: 400; font-style: italic; color: var(--moss); margin-top: 6px; letter-spacing: 0; }
.lede { max-width: 760px; margin: 0 0 12px; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px dashed var(--moss); background: transparent; color: var(--moss); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 0.9rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.chip.on { background: var(--moss); color: var(--panel); border-style: solid; }

/* --- Panels ---------------------------------------------------------------------------------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.ph { margin: 0 0 8px; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--tape); color: #1a1105; font: 700 0.95rem ui-sans-serif, system-ui, sans-serif; }
h3 { margin: 18px 0 8px; font-size: 1.1rem; overflow-wrap: anywhere; }
.mini-h { margin: 16px 0 6px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; }
.lbl { display: block; font-size: 0.84rem; color: var(--muted); margin: 8px 0 3px; font-family: ui-sans-serif, system-ui, sans-serif; }
.lbl.inline { display: inline; margin: 0 0 0 6px; }
input[type="text"], select, textarea { width: 100%; max-width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
textarea { resize: vertical; min-height: 54px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--tape); outline-offset: 1px; }
.cardrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.cardrow select { width: auto; min-width: 200px; }
.note { padding: 7px 10px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); }

/* --- Specimen tags (the hobby editor) -------------------------------------------------------------------------- */
.hobby-list { display: grid; gap: 12px; }
.hcard { position: relative; border: 1px solid var(--line); border-radius: 8px 8px 8px 24px; background: var(--panel-2); padding: 12px 12px 12px 16px; }
.hcard::before { content: ""; position: absolute; left: 7px; top: 14px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); }
.h-head { display: flex; align-items: center; gap: 8px; padding-left: 12px; }
.h-no { font: 700 0.8rem ui-monospace, Menlo, monospace; color: var(--accent); letter-spacing: 0.06em; white-space: nowrap; }
.h-head input { flex: 1; min-width: 0; font-weight: 600; }
.h-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.h-grid .lbl { margin-top: 4px; }
.h-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 760px) { .h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .h-two { grid-template-columns: 1fr; } }

/* --- Camera traps ---------------------------------------------------------------------------------------------- */
.verdict-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.verdict-row p { margin: 0; flex: 1; min-width: 200px; }
.badge { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 4px; font: 700 0.82rem ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); white-space: nowrap; }
.badge.v-revive { background: var(--revive-bg); color: var(--revive); border-color: var(--revive); }
.badge.v-reshape { background: var(--reshape-bg); color: var(--reshape); border-color: var(--reshape); }
.badge.v-rest { background: var(--rest-bg); color: var(--rest); border-color: var(--rest); }
.badge.v-pick { background: var(--tape); color: #1a1105; border-color: var(--tape); }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
@media (max-width: 420px) { .cam-grid { grid-template-columns: 1fr; } }
.cam-cell { margin: 0; background: var(--night); border-radius: 6px; padding: 6px 6px 8px; box-shadow: var(--shadow); }
.cam { display: block; width: 100%; height: auto; border-radius: 3px; }
.cam .hud { font-size: 10px; letter-spacing: 0.06em; }
.cam .stamp-t { font: 700 13px ui-monospace, Menlo, monospace; letter-spacing: 0.12em; }
.cam .pick-t { font-size: 9px; font-weight: 700; }
.cam-cap { margin: 6px 2px 0; color: #dfe5d8; font: 0.84rem/1.35 ui-sans-serif, system-ui, sans-serif; }
.cam-cap b { color: #ffffff; }
.cam-empty { padding: 26px 12px; text-align: center; color: #c9d1c2; font-family: ui-sans-serif, system-ui, sans-serif; }
.key-line { margin: 8px 0 0; }
.nb-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.notebook { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--panel); }
.notebook th, .notebook td { text-align: left; padding: 6px 9px; vertical-align: top; border-bottom: 1px solid var(--line); }
.notebook th { font: 600 0.78rem ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.notebook td.no { font-family: ui-monospace, Menlo, monospace; color: var(--accent); white-space: nowrap; }
.none { color: var(--muted); font-style: italic; }

/* --- Run ------------------------------------------------------------------------------------------------------- */
.runrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.runrow #price { flex: 1; min-width: 200px; }
.gate { margin: 10px 0 6px; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); }
.gate .pill { margin-left: 6px; }
.progress h3 { margin-top: 0; }
.steps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 3px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.92rem; }
.step { color: var(--muted); } .step.active { color: var(--ink); font-weight: 600; } .step.done { color: var(--moss); }
.step-ic { display: inline-block; width: 1.2em; font-family: ui-monospace, Menlo, monospace; }
.raw { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; background: var(--panel-2); padding: 10px; border-radius: 6px; font-size: 0.82rem; }

/* --- The survey report ----------------------------------------------------------------------------------------- */
.result { border-top: 6px solid var(--tape); }
.res-kick { margin: 0; text-transform: uppercase; letter-spacing: 0.1em; font-family: ui-sans-serif, system-ui, sans-serif; }
.result h2 { margin: 2px 0 8px; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.15; overflow-wrap: anywhere; }
.field-note { font-style: italic; margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--moss); }
.pick-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 12px; border-radius: 8px; background: var(--revive-bg); border: 1.5px dashed var(--accent); }
.pick-card .pk-ic { grid-row: span 3; width: 46px; height: 46px; border-radius: 50%; background: var(--tape); color: #1a1105; display: flex; align-items: center; justify-content: center; font: 700 0.72rem ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.06em; }
.pick-card b { font-size: 1.08rem; overflow-wrap: anywhere; }
.pick-card p { margin: 0; overflow-wrap: anywhere; }
.pick-card .pk-out { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.92rem; }
.pick-card.none-pick { background: var(--rest-bg); border-color: var(--rest); }
.pick-card.none-pick .pk-ic { background: var(--rest); color: var(--panel); }
.sheets { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sheet { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.sh-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--moss-2); border-bottom: 1px solid var(--line); }
.sh-head b { flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.sh-no { font: 700 0.8rem ui-monospace, Menlo, monospace; color: var(--revive); }
.sh-body { display: grid; grid-template-columns: 9.5em 1fr; gap: 6px 12px; padding: 10px 12px; }
.sh-body dt { font: 600 0.78rem ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 2px; }
.sh-body dd { margin: 0; overflow-wrap: anywhere; }
.sh-body dd.outing { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.94rem; }
.sh-body dd.outing::before { content: "30 min max"; display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 3px; background: var(--tape); color: #1a1105; font: 700 0.72rem ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.04em; vertical-align: 1px; }
@media (max-width: 560px) { .sh-body { grid-template-columns: 1fr; gap: 2px; } .sh-body dd { margin-bottom: 6px; } }
.pattern { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcol { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.pcol h4 { margin: 0 0 4px; font: 700 0.82rem ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.06em; }
.pcol p { margin: 0; overflow-wrap: anywhere; }
.pcol.pull { background: var(--moss-2); } .pcol.pull h4 { color: var(--moss); }
.pcol.push { background: var(--rest-bg); } .pcol.push h4 { color: var(--rest); }
@media (max-width: 560px) { .pattern { grid-template-columns: 1fr; } }
.pat-note { margin: 8px 0 0; }
.cam-cap .was { font-weight: 600; }
.pick-card .pk-copy { grid-column: 2; justify-self: start; margin-top: 4px; }
.q-copy { margin: 6px 0 0; }
.questions { margin: 0; padding-left: 1.4em; } .questions li { margin: 4px 0; overflow-wrap: anywhere; }
.recon { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.recon li { padding: 6px 10px; border-radius: 6px; font-size: 0.9rem; overflow-wrap: anywhere; }
.recon li.warn { background: var(--warn-bg); color: var(--warn); }
.recon li.info, .recon li.none { background: var(--info-bg); color: var(--ink); font-style: normal; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* --- Log, about, footer, toasts ------------------------------------------------------------------------------- */
.saved { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.hrow.none { display: block; border-style: dashed; }
.hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hinfo b { overflow-wrap: anywhere; }
.hbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-cam { width: 40px; height: 26px; flex: none; border-radius: 3px; background: var(--night); display: flex; align-items: center; justify-content: center; font: 700 0.6rem ui-monospace, Menlo, monospace; }
@media (max-width: 480px) { .hrow { flex-wrap: wrap; } .hbtns { width: 100%; } }
.aboutbox p { max-width: 820px; }
.foot { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; color: var(--muted); font-size: 0.88rem; }
.foot p { margin: 6px 0; }
.toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: grid; gap: 6px; width: min(92vw, 460px); }
.toast { padding: 9px 13px; border-radius: 8px; background: var(--ink); color: var(--panel); font: 0.9rem ui-sans-serif, system-ui, sans-serif; box-shadow: var(--shadow); transition: opacity 0.5s; }
.toast.err { background: var(--warn); color: var(--panel); }
.toast a { color: inherit; font-weight: 700; }
.toast.gone { opacity: 0; }
