/* Word Duel — guide pages (server-rendered, see server/site.js). Small, no web fonts, no JS. */
:root {
  --bg: #f4f5fb; --surface: #ffffff; --surface-2: #eceef6; --ink: #1b2134; --ink-2: #3c4459; --muted: #5f6782;
  --line: #d9dcea; --accent: #5b5bf0; --accent-ink: #fff; --link: #4646d8;
  --correct: #22b35e; --present: #e5a50f; --absent: #7d859c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1222; --surface: #171c33; --surface-2: #20274a; --ink: #eef0ff; --ink-2: #c9cdea; --muted: #9aa2cc;
    --line: #2c3460; --accent: #7c7cff; --link: #a5a5ff;
    --correct: #2fcf73; --present: #f2b632; --absent: #4a5280;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: 10px max(16px, calc(50% - 560px)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; letter-spacing: .04em; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }

.btn {
  display: inline-block; border-radius: 14px; padding: 10px 16px; font-weight: 700; text-decoration: none;
  white-space: nowrap; transition: transform .08s, filter .15s;
}
.btn.play { background: var(--accent); color: var(--accent-ink); }
.btn.play:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.big { font-size: 19px; padding: 15px 26px; border-radius: 16px; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }

/* article */
.article { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.article.narrow { max-width: 620px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 26px; line-height: 1.25; margin: 40px 0 12px; scroll-margin-top: 70px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
.lead { font-size: 20px; color: var(--ink-2); margin: 0 0 20px; }
p, ul, ol { margin: 0 0 16px; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }
section { margin-bottom: 8px; }

.cta-block {
  margin: 28px 0; padding: 22px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.cta-block p { margin: 10px 0 0; font-size: 14px; }

/* tiles demo */
.tiles-demo { display: flex; gap: 6px; margin: 8px 0 18px; }
.tiles-demo .t {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 8px; color: #fff;
  font-weight: 800; font-size: 26px;
}
.t.correct, .dot.correct { background: var(--correct); }
.t.present, .dot.present { background: var(--present); }
.t.absent, .dot.absent { background: var(--absent); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }

/* data */
table.data { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 16px; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
table.data th, table.data td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
.answer { letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.starters { padding-left: 28px; }
.starters li { margin: 8px 0; }
.starters .answer { font-size: 19px; }

/* theme links */
.theme-links { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.theme-links li { margin: 0; }
.theme-links a {
  display: block; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.theme-links a:hover { border-color: var(--accent); }
.theme-links a[aria-current="page"] { border-color: var(--accent); background: var(--surface-2); }

/* faq */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
details.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 650; list-style: none; position: relative; padding-right: 44px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 22px; color: var(--muted); }
details.faq[open] summary::after { content: "–"; }
details.faq > p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 24px 16px 32px; text-align: center; color: var(--muted); font-size: 14px; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.site-foot a { color: var(--ink-2); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-head { gap: 6px 10px; flex-wrap: wrap; justify-content: space-between; padding-bottom: 6px; }
  .site-head .btn.play { padding: 8px 12px; font-size: 14px; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 -6px; }
  .site-nav a { font-size: 14px; padding: 5px 8px; }
  h2 { font-size: 22px; }
  .lead { font-size: 18px; }
  .tiles-demo .t { width: 44px; height: 44px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
