/* SMASP Call — field-notebook calm: chlorophyll green on paper white, one action per screen. */
:root {
  --bg: #f5f7f3;
  --surface: #ffffff;
  --ink: #18231c;
  --muted: #5d6b62;
  --line: #d9e0d8;
  --accent: #2f6b3f;
  --accent-ink: #ffffff;
  --accent-soft: #e3efe4;
  --ok: #2f6b3f;
  --warn: #9a5b00;
  --warn-soft: #fbefd9;
  --bad: #a3322b;
  --bad-soft: #f8e3e1;
  --info-soft: #e5eef7;
  --info: #2c5a85;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111613; --surface: #19201b; --ink: #e6ece7; --muted: #9aa89f; --line: #2c3730;
    --accent: #7cc28c; --accent-ink: #0f1a12; --accent-soft: #1f3324; --ok: #7cc28c;
    --warn: #e6b45f; --warn-soft: #3a2d14; --bad: #ef8f86; --bad-soft: #3b1f1c;
    --info-soft: #1b2a38; --info: #8fb9e2; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: 1.65rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code { font-family: var(--mono); font-size: .9em; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-left)); display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { color: var(--ink); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--accent); }
.mark { width: 14px; height: 14px; border-radius: 50% 0; background: var(--accent); transform: rotate(45deg); display: inline-block; }
.topnav { display: flex; gap: 16px; align-items: center; font-size: .95rem; }
.topnav a { text-decoration: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
.wrap.wide { max-width: 1080px; }
.back { font-size: .95rem; text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.narrow { max-width: 440px; width: 100%; margin: 24px auto; }
.card.link { display: block; color: inherit; text-decoration: none; }
.card.link:hover { border-color: var(--accent); }
.list { display: grid; gap: 12px; }
.block { display: flex; flex-direction: column; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid2 .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 0 0 4px; }
.lead { color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
.num, .date, .pct { font-variant-numeric: tabular-nums; }

label { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], input:not([type]), textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 4.5em; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
select { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn.big { padding: 14px 22px; font-size: 1.1rem; width: 100%; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: wait; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.linkbtn.danger { color: var(--bad); }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

.flash { background: var(--accent-soft); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; }
.flash.err { background: var(--bad-soft); }

.phead h1 { margin-bottom: 8px; }
.pmeta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip { font-size: .85rem; background: var(--info-soft); color: var(--info); padding: 4px 10px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.bar { display: inline-block; width: 160px; max-width: 50vw; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.bar.sm { width: 80px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.next { background: var(--surface); border: 2px solid var(--accent); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.next h2 { font-size: 1.45rem; }
.next.done { border-color: var(--line); }

.tasks { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.tasks li.ok { color: var(--muted); }
.tasks li.ok a { color: var(--muted); }
.tasks li.ok::marker { content: "✓  "; color: var(--ok); }
.miles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.miles .date { display: inline-block; min-width: 7.5em; color: var(--muted); font-size: .9rem; }

details > summary { cursor: pointer; }
.more summary, .example summary { color: var(--accent); font-weight: 600; }
.example { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; }
.example p { margin: 8px 0 0; }
.aiout { border-left: 3px solid var(--accent); padding-left: 12px; display: flex; flex-direction: column; gap: 8px; }
.miss-title { font-weight: 600; color: var(--warn); margin: 0; }
#missingList { margin: 0; padding-left: 1.2em; }
.saved { color: var(--ok); }

.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-weight: 500; cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); }
.decided { font-size: 1.1rem; }

.role { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; }
.role legend { padding: 0 4px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.seg label { font-weight: 500; font-size: .92rem; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 420px) { .seg { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; }
.tabs a:hover { color: var(--accent); }

.rolemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.rm-h { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; }
.st { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.st-covered { background: var(--accent-soft); color: var(--ok); }
.st-possible { background: var(--info-soft); color: var(--info); }
.st-clash { background: var(--warn-soft); color: var(--warn); }
.st-open { background: var(--bad-soft); color: var(--bad); }
.lead-item { border-top: 1px dashed var(--line); padding-top: 6px; }
.adtext { font-family: var(--mono); font-size: .82rem; }

.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.partner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.partner header h3 { margin: 0; }
.ans .qlabel { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 2px; }
.ans p { margin: 0; overflow-wrap: anywhere; }
.dec { border-top: 1px solid var(--line); padding-top: 10px; }
.dec ul { margin: 0 0 6px; padding-left: 1.2em; }
.dec li.win { font-weight: 700; }
.votes { margin: 0; padding-left: 1.2em; }
.files { padding-left: 1.2em; }
.locked { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tbl .actions { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.danger-zone { border-color: var(--bad-soft); }
