/* SpawnPoint public policy site. One stylesheet, no fonts or images from elsewhere. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5f7;
  --text: #14181d;
  --muted: #4a5561;      /* 7.6:1 on --bg */
  --line: #c3cad2;
  --link: #0b57c2;       /* 6.5:1 on --bg */
  --accent: #0b57c2;
  --on-accent: #ffffff;
  --danger: #b3261e;     /* 6.5:1 on --bg */
  --on-danger: #ffffff;
  --ok: #18663a;
  --warn-bg: #fff1c2;
  --warn-text: #3d2c00;
  --warn-line: #8a6400;
  --todo-bg: #ffe0dc;
  --todo-text: #7a130c;
  --focus: #0b57c2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1317;
    --surface: #1a2027;
    --text: #e9edf1;
    --muted: #aeb8c3;    /* 9:1 on --bg */
    --line: #3a444f;
    --link: #8ab9ff;     /* 8.9:1 on --bg */
    --accent: #8ab9ff;
    --on-accent: #06203f;
    --danger: #ffb4ab;
    --on-danger: #561610;
    --ok: #8fd6a8;
    --warn-bg: #3d3000;
    --warn-text: #ffe9a8;
    --warn-line: #d6ad3a;
    --todo-bg: #4d1712;
    --todo-text: #ffd9d4;
    --focus: #8ab9ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999rem; top: 0; background: var(--bg); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.draft {
  background: var(--warn-bg); color: var(--warn-text);
  border-bottom: 2px solid var(--warn-line);
  padding: 0.6rem 0; font-weight: 600;
}
.draft p { margin: 0; }

.site-head { border-bottom: 1px solid var(--line); padding: 0.75rem 0 0.25rem; }
.brand { font-size: 1.15rem; font-weight: 700; color: var(--text); text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.brand small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-nav a { display: inline-block; padding: 0.7rem 0; min-height: 44px; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; text-decoration: none; }

main { padding: 1rem 0 3rem; }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 1rem 0 0.5rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.2rem 0 0.5rem; }
h3 { font-size: 1.08rem; line-height: 1.35; margin: 1.5rem 0 0.4rem; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
.lead { font-size: 1.08rem; }
.meta { color: var(--muted); font-size: 0.95rem; }
dt { font-weight: 700; }
dd { margin: 0 0 0.75rem; }

.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 0.25em; border-radius: 3px; font-weight: 600; }

.note, .owner-note, .box {
  border: 1px solid var(--line); border-left-width: 4px;
  background: var(--surface); padding: 0.85rem 1rem; border-radius: 4px; margin: 0 0 1rem;
}
.note > :last-child, .owner-note > :last-child, .box > :last-child { margin-bottom: 0; }
.owner-note { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
.owner-note a { color: inherit; }
.box.danger { border-left-color: var(--danger); }
.box.ok { border-left-color: var(--ok); }

.toc { border: 1px solid var(--line); border-radius: 4px; padding: 0.85rem 1rem; }
.toc ol { margin: 0; }

.cards { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.cards a { display: block; border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1rem; text-decoration: none; color: var(--text); background: var(--surface); }
.cards a strong { color: var(--link); text-decoration: underline; display: block; }
.cards a span { color: var(--muted); }
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }

/* Tables turn into stacked blocks on narrow screens so nothing scrolls sideways. */
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font-weight: 700; padding: 0.25rem 0 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.6rem 0.6rem 0; border-bottom: 1px solid var(--line); }
thead th { border-bottom-width: 2px; }
@media (max-width: 39.99rem) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
  table.stack th, table.stack td { display: block; border: 0; padding: 0.15rem 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--muted); }
}

.site-foot { border-top: 1px solid var(--line); padding: 1.25rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
.site-foot ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-foot a { display: inline-block; padding: 0.5rem 0; }

/* Deletion form */
.steps { counter-reset: step; list-style: none; padding: 0; }
.step { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.step h3 { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.4rem; }
input[type="tel"], input[type="text"], input[type="password"] {
  width: 100%; max-width: 24rem; min-height: 48px; padding: 0.6rem 0.75rem;
  font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--muted); border-radius: 6px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; align-items: center; }
button, .button {
  font: inherit; font-weight: 700; min-height: 48px; padding: 0.6rem 1.1rem;
  border-radius: 6px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none; display: inline-block;
}
button.secondary { background: transparent; color: var(--link); }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }
.msg { margin: 0.9rem 0 0; padding: 0.75rem 1rem; border-radius: 4px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); }
.msg.error { border-left-color: var(--danger); }
.msg.ok { border-left-color: var(--ok); }
.msg:empty { display: none; }
.receipt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; word-break: break-all; display: block; padding: 0.6rem 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 0.5rem; user-select: all; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-nav, .skip, .site-foot ul, #web-flow { display: none; } a { color: inherit; } }

.check { margin-top: 1rem; }
.check label { font-weight: 400; }
.check input { width: 1.25rem; height: 1.25rem; margin-right: 0.4rem; vertical-align: -0.2rem; }
