/* public/style.css — the whole site's look. Colours are tokens on :root (a
   dark scheme follows the visitor's setting); change the tokens first. */
:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #17181c;
  --muted: #5d6270;
  --line: #e2e4ea;
  --accent: #4f5bd5;
  --accent-text: #ffffff;
  --danger: #c2334d;
  --ok-bg: #e7f6ee;
  --ok-text: #1d6b43;
  --err-bg: #fbe9ec;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111216;
    --surface: #1a1c22;
    --text: #eceef3;
    --muted: #9aa0ae;
    --line: #2b2e37;
    --accent: #8b94ff;
    --accent-text: #0f1020;
    --danger: #ff7b93;
    --ok-bg: #16301f;
    --ok-text: #8fe0b1;
    --err-bg: #3a1a22;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 var(--font); background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }

.site-header { display: flex; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; }
.main { width: min(960px, 100%); margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2rem); flex: 1; }
.site-footer { display: flex; gap: 1rem; justify-content: center; padding: 1.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }

.hero { padding: 3rem 0 2rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 40rem; margin: 0 auto 1.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.features article, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.card + .card, .card + .list, .list .card + .card { margin-top: 1rem; }
.list { margin-top: 1.5rem; }
.prose { max-width: 42rem; }

.button { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 999px; padding: .65rem 1.3rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button--ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.button--small { padding: .35rem .9rem; font-size: .92rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.danger { color: var(--danger); }
.inline { display: inline; }

.form { display: grid; gap: .9rem; max-width: 30rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
input, textarea { font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
input:focus, textarea:focus, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.note, .error { padding: .7rem 1rem; border-radius: 8px; margin: 0 0 1.25rem; }
.note { background: var(--ok-bg); color: var(--ok-text); }
.error { background: var(--err-bg); color: var(--danger); }

.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.5rem; display: grid; }
.stat strong { font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.table th { font-size: .85rem; color: var(--muted); }
.note-item h3 { margin-bottom: .25rem; }
.note-item p { white-space: pre-wrap; margin: 0 0 .5rem; }
