/* Elo Everything: a quiz board. Chalk-on-slate palette, one accent for ratings. */
:root {
  --bg: #f4f5f2; --surface: #ffffff; --ink: #1e2422; --muted: #66706b; --line: #d9ddd8;
  --accent: #2f5d8a; --accent-ink: #ffffff; --up: #2e7d4f; --down: #b3412f;
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151a19; --surface: #1e2523; --ink: #e5e9e6; --muted: #9aa49f; --line: #333c39;
    --accent: #8fb4dc; --accent-ink: #10161a; --up: #6cc392; --down: #e48a79; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--accent); }
h1, h2 { line-height: 1.2; text-wrap: balance; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.nav { display: flex; justify-content: space-between; align-items: center; padding-block: 12px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links form { margin: 0; }
.link-button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px;
  padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button.small { padding: 5px 12px; font-size: .9rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.flash { padding: 10px 14px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.flash-alert { border-color: var(--down); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.card.narrow { max-width: 420px; margin-inline: auto; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.stack { display: grid; gap: 8px; }
/* Text fields only: the submit button keeps the .button look. */
.stack textarea, .stack input:not([type=submit]) { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--ink); }
.stack .button { margin-top: 8px; }
.errors { color: var(--down); margin: 0; padding-left: 18px; }
.hero { margin-bottom: 20px; } .hero p { max-width: 60ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile-name { font-weight: 600; }
.rating { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.rating.big { font-size: 2.2rem; line-height: 1; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hardest { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.hardest li span:first-child { margin-right: 6px; }
.quiz { max-width: 680px; margin-inline: auto; }
.question { font-size: 1.4rem; margin: 16px 0; }
.question-picture { max-width: 100%; border-radius: 8px; margin-top: 12px; }
.answers { display: grid; gap: 10px; }
.answer { text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.answer:hover, .answer:focus-visible { border-color: var(--accent); outline: none; }
.pass { justify-self: start; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.verdict { font-weight: 700; font-size: 1.1rem; margin: 0; }
.verdict-correct { color: var(--up); } .verdict-wrong { color: var(--down); } .verdict-pass { color: var(--muted); }
.changes { margin: 16px 0 20px; } .changes tr.tag td { color: var(--muted); font-size: .9rem; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); }
.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.recent li { display: flex; gap: 8px; align-items: baseline; }
.recent .delta { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-correct { background: var(--up); } .dot-wrong { background: var(--down); }
fieldset { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.rows { display: grid; gap: 6px; }
.input-row { display: flex; gap: 6px; }
.input-row input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: var(--bg); color: var(--ink); }
.icon-button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; width: 38px; font-size: 1.1rem; cursor: pointer; }
.stack .link-button { justify-self: start; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--accent); }
