:root {
  --bg: #f6f7f4; --surface: #ffffff; --fg: #1d2420; --muted: #5b665f; --line: #d9ded8;
  --accent: #1f6f4a; --accent-fg: #ffffff; --accent-soft: #e4f0e9; --warn: #9a3412;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --surface: #1a201d; --fg: #e8ece9; --muted: #a2aea7; --line: #2d3531;
    --accent: #4fb385; --accent-fg: #0c1410; --accent-soft: #1d2e25; --warn: #f0a07a; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
main { max-width: 640px; margin: 0 auto; padding-block: 24px 48px; padding-inline: 16px;
  display: flex; flex-direction: column; gap: 16px; }
section { display: flex; flex-direction: column; gap: 14px; }
[hidden] { display: none !important; }
.brand { margin: 0; color: var(--muted); font-size: 14px; }
h1 { margin: 0; font-size: 24px; line-height: 1.25; text-wrap: balance; }
h2 { margin: 0; font-size: 18px; }
p { margin: 0; }
.lead { color: var(--muted); }
ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
li { padding-left: 2px; }
a { color: var(--accent); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; }
#approve-card { border-color: var(--accent); }
label { font-size: 14px; font-weight: 600; }
select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 44px; }
textarea { resize: vertical; }
button { font: inherit; font-weight: 600; min-height: 48px; padding: 10px 16px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent; touch-action: manipulation; }
button:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: progress; }
.primary { background: var(--accent); color: var(--accent-fg); width: 100%; }
.secondary { background: var(--accent-soft); color: var(--fg); border-color: var(--line); width: 100%; }
.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row button { flex: 1 1 140px; }
.confirm-q { font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; }
.field-error { color: var(--warn); font-size: 14px; }
#pages a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; display: inline-block; padding-block: 4px; }
#pages a:hover, #pages a:focus-visible { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pages-box { border: 0; margin: 0; padding: 0; min-width: 0; }
.pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.page { display: flex; align-items: stretch; gap: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; }
.page .tick { flex: 0 0 48px; display: flex; align-items: center; justify-content: center; min-height: 48px;
  cursor: pointer; }
.page .tick input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.page .tick input:disabled { cursor: default; opacity: .35; }
.page .pbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 8px 0; }
.page .ptitle { color: var(--fg); overflow-wrap: anywhere; }
a.ptitle { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px;
  display: inline-block; padding-block: 4px; min-height: 44px; }
a.ptitle:hover, a.ptitle:focus-visible { color: var(--accent); }
.pstate { font-size: 13px; color: var(--muted); }
.s-approved .pstate, .s-delivered .pstate { color: var(--accent); font-weight: 600; }
.s-change .pstate { color: var(--warn); font-weight: 600; }
.s-approved, .s-delivered { background: var(--accent-soft); }
input[type=checkbox]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
