/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #1a1a2e;
  --bg-card: #16213e;
  --bg-surface: #0f3460;
  --text: #e8e8e8;
  --text-muted: #a0a0b0;
  --know: #06d6a0;
  --unsure: #ffd166;
  --dunno: #ef476f;
  --accent: #e94560;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --font-body: 'DM Sans', sans-serif;
  --font-heading: 'Fraunces', serif;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

/* ── Layout helpers ────────────────────────────────── */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* ── Typography ────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); }

h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.25rem; color: var(--text-muted); font-weight: 400; margin-bottom: 1.5rem; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  text-decoration: none;
  color: #fff;
}

.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--accent); }
.btn-know      { background: var(--know); color: #1a1a2e; }
.btn-unsure    { background: var(--unsure); color: #1a1a2e; }
.btn-dunno     { background: var(--dunno); }
.btn-outline   { background: transparent; border: 2px solid var(--text-muted); color: var(--text); }

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ── Progress bar ──────────────────────────────────── */
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ── Confidence chips ──────────────────────────────── */
.chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip-know   { background: var(--know);   color: #1a1a2e; }
.chip-unsure { background: var(--unsure); color: #1a1a2e; }
.chip-dunno  { background: var(--dunno);  color: #fff; }

/* ── Topic list (index page) ──────────────────────── */
.topic-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.topic-link {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.topic-link:hover { background: var(--bg-surface); }

.topic-link .number {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}
