/* Tradecraft Daily — Be a pro. Dark, mobile-first. */
:root {
  --bg: #0c0e10;
  --surface: #161a1f;
  --surface2: #1e242b;
  --border: #2a323c;
  --text: #e8ecef;
  --muted: #8b97a5;
  --gold: #c9a227;
  --gold-dim: #8a7018;
  --accent: #3d7ea6;
  --good: #3d8b6e;
  --hard: #b8860b;
  --again: #a14b4b;
  --easy: #4a7c59;
  --medical: #8b4a5a;
  --fieldcraft: #4a6b8b;
  --sof: #5a5a7a;
  --bushcraft: #4a6b4a;
  --opsec: #6b5a4a;
  --radius: 12px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  font-size: 16px; line-height: 1.45;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}
body { padding: 0 0 4rem; }

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

header.app-header {
  display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
header h1 {
  margin: 0; font-size: 1.15rem; font-weight: 650;
  letter-spacing: 0.02em;
}
header h1 span { color: var(--gold); }
.theme { color: var(--muted); font-size: 0.75rem; width: 100%; }

.stats {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  font-size: 0.8rem; color: var(--muted);
  margin-bottom: 1rem;
}
.stats strong { color: var(--gold); font-weight: 600; }

.banner {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem; color: var(--muted);
  margin-bottom: 1rem;
}
.banner strong { color: var(--text); }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1rem;
}
.toolbar button, .toolbar select {
  font: inherit; font-size: 0.8rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.toolbar button:hover, .toolbar select:hover { border-color: var(--gold-dim); }
.toolbar button.active {
  border-color: var(--gold);
  color: var(--gold);
}
.toolbar select { max-width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  min-height: 280px;
  display: flex; flex-direction: column;
  gap: 0.75rem;
}
.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  color: var(--muted);
}
.pill.fieldcraft { border-color: var(--fieldcraft); color: #9bb8d4; }
.pill.sof { border-color: var(--sof); color: #b0b0d0; }
.pill.bushcraft { border-color: var(--bushcraft); color: #9bc49b; }
.pill.medical { border-color: var(--medical); color: #d4a0ac; }
.pill.opsec { border-color: var(--opsec); color: #c4b09a; }
.pill.axis { color: var(--gold); border-color: var(--gold-dim); }

.fact {
  font-size: 1.05rem; font-weight: 500;
  color: var(--text);
}
.why {
  font-size: 0.85rem; color: var(--muted);
  font-style: italic;
}
.why::before { content: "Why it matters — "; font-style: normal; color: var(--gold-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }

.prompt {
  font-size: 0.95rem; font-weight: 560;
  margin-top: 0.25rem;
}

.choices { display: flex; flex-direction: column; gap: 0.45rem; }
.choice {
  text-align: left;
  font: inherit; font-size: 0.9rem;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice:disabled { cursor: default; opacity: 0.95; }
.choice.correct {
  border-color: var(--good);
  background: #1a2e26;
}
.choice.wrong {
  border-color: var(--again);
  background: #2a1a1a;
}
.choice.picked:not(.correct):not(.wrong) {
  border-color: var(--accent);
}

.explain {
  font-size: 0.85rem;
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
}
.explain strong { color: var(--text); }

.hard-limit {
  font-size: 0.75rem;
  color: #d4a0ac;
  border: 1px solid var(--medical);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

.drill-hook {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 0.65rem;
}
.drill-hook label {
  display: flex; align-items: flex-start; gap: 0.5rem;
  cursor: pointer;
}
.drill-hook input { margin-top: 0.2rem; }

.grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: auto;
}
.grades button {
  font: inherit; font-size: 0.75rem; font-weight: 600;
  border: none; border-radius: 8px;
  padding: 0.65rem 0.25rem;
  cursor: pointer;
  color: #fff;
}
.grades .again { background: var(--again); }
.grades .hard { background: var(--hard); color: #111; }
.grades .good { background: var(--good); }
.grades .easy { background: var(--easy); }
.grades button:disabled { opacity: 0.4; cursor: not-allowed; }

.progress-bar {
  height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden;
  margin-bottom: 0.75rem;
}
.progress-bar > i {
  display: block; height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.2s ease;
}

.empty, .done {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}
.done h2 { color: var(--gold); font-size: 1.2rem; margin: 0 0 0.5rem; }

footer.app-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}
footer a { color: var(--accent); }

.hidden { display: none !important; }

@media (min-width: 480px) {
  .grades button { font-size: 0.8rem; padding: 0.7rem 0.4rem; }
}
