:root {
  color-scheme: light dark;
  --bg: #eef3f0;
  --panel: #fff;
  --ink: #172c26;
  --muted: #405950;
  --border: #82998e;
  --accent: #075849;
  --on-accent: #fff;
  --soft: #edf6f1;
  --focus: #984400;
  font-family: system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101d19;
    --panel: #192923;
    --ink: #eef8f1;
    --muted: #c4d8cd;
    --border: #849e90;
    --accent: #9ee5ca;
    --on-accent: #102d23;
    --soft: #233a30;
    --focus: #ffbf74;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
.wrap { width: min(76rem, calc(100% - 2rem)); margin-inline: auto; }
.hero { background: #11463d; color: #fff; padding: clamp(1.5rem, 4vw, 3.5rem) 0; }
.hero p { max-width: 66ch; margin: .6rem 0 0; }
h1, h2, legend { line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 0; letter-spacing: -.045em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); margin: 0 0 .75rem; }
p { margin: .65rem 0 1rem; }
a { color: var(--accent); text-underline-offset: .16em; }
.skip { position: absolute; top: .5rem; left: .5rem; background: var(--panel); padding: .5rem; }
.skip:not(:focus) { clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; margin-top: 1.25rem; }
.stack { display: grid; gap: 1rem; min-width: 0; }
.card { min-width: 0; padding: clamp(1rem, 2.6vw, 1.7rem); background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; }
.section-head, .actions, nav { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.section-head { justify-content: space-between; }
.section-head h2 { margin: 0; }
nav { padding: 1rem 0; }
button { min-height: 2.65rem; padding: .45rem .8rem; border: 1px solid var(--accent); border-radius: .55rem; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 650; cursor: pointer; }
button.secondary, nav button { background: var(--panel); color: var(--accent); }
nav button { font-size: .875rem; }
nav button[aria-current="step"] { background: var(--accent); color: var(--on-accent); }
button:hover:not(:disabled) { box-shadow: inset 0 0 0 2px currentColor; }
button:disabled { background: var(--soft); color: var(--muted); cursor: default; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: 1.16rem; margin-block: .35rem; }
label { display: block; font-weight: 600; margin: .65rem 0; }
input:not([type="checkbox"]), textarea, select {
  display: block; width: 100%; min-width: 0; margin-top: .25rem; padding: .55rem;
  background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: .4rem; font: inherit;
}
textarea { resize: vertical; }
.check { display: flex; gap: .65rem; align-items: baseline; }
input[type="checkbox"] { accent-color: var(--accent); inline-size: 1.1rem; block-size: 1.1rem; flex: none; align-self: center; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .7rem; }
.actions { margin-top: .8rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--soft); padding: 1rem; border-radius: .6rem; max-height: 34rem; overflow: auto; }
details, #prompt-panel { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
summary { cursor: pointer; font-weight: 650; }
blockquote { margin: .5rem 0; border-inline-start: .2rem solid var(--border); padding-inline-start: .75rem; overflow-wrap: anywhere; }
.finding { margin-top: .8rem; padding: .75rem; background: var(--soft); border-radius: .6rem; overflow-wrap: anywhere; }
.status { color: var(--muted); }
.status:empty, #tc-status:empty { margin: 0; }
#deadlines { white-space: pre-line; }
footer { padding-block: 1.4rem 2rem; }
@media (max-width: 54rem) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 30rem) { .columns { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@page { size: A4; margin: 20mm; }
@media print {
  :root { color-scheme: light; }
  body, .preview, #draft { background: #fff; color: #000; }
  body > :not(main), main > :not(.layout:not(.tools)), .layout > :not(.preview),
  .preview > :not(#draft) { display: none !important; }
  main.wrap, .layout:not(.tools), .preview, #draft { display: block; width: auto; margin: 0; padding: 0; border: 0; max-height: none; overflow: visible; }
  #draft { font: 11pt/1.4 serif; }
}
