/* ===========================================================================
   SEEP 6 Policy Lab — shared design system
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Sarabun:wght@400;600;700;800&display=swap');

:root {
  --navy-900: #0b1f3a;
  --navy-800: #112a4d;
  --navy-700: #18365f;
  --ink: #0b1f3a;
  --paper: #f6f8fc;
  --white: #ffffff;
  --muted: #6b7a90;
  --line: #e4e9f2;

  --brand: #5b8def;
  --brand-2: #7c5cff;
  --accent: #18c29c;
  --warn: #f5a524;
  --danger: #f23a5d;
  --gold: #ffd23f;

  /* Kahoot-style answer colors */
  --a0: #e8453c; /* red triangle */
  --a1: #1368ce; /* blue diamond */
  --a2: #e3a302; /* yellow circle */
  --a3: #289d4b; /* green square */

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(11, 31, 58, 0.16);
  --shadow-lg: 0 24px 70px rgba(11, 31, 58, 0.28);
  --font: 'IBM Plex Sans Thai', 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  padding: 0.7em 1.4em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity .12s;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  line-height: 1;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(91, 141, 239, .4); }
.btn-primary:hover:not(:disabled) { background: #4a7ce6; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(24, 194, 156, .4); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover:not(:disabled) { background: #f0f4fb; }
.btn-lg { font-size: 1.15rem; padding: 0.85em 1.8em; }

/* answer shapes */
.shape { display: inline-flex; width: 1.1em; height: 1.1em; }
.shape-tri::before { content: '▲'; }
.shape-dia::before { content: '◆'; }
.shape-cir::before { content: '●'; }
.shape-sq::before  { content: '■'; }

.fade-in { animation: fadeIn .4s ease both; }
/* opacity-only on purpose: a transform in this keyframe would override the JS
   shrink-to-fit scale (CSS animations beat inline styles in the cascade). */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pop { animation: pop .35s cubic-bezier(.2,1.3,.5,1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.85);} to { opacity: 1; transform: scale(1);} }

.pill {
  display: inline-flex; align-items: center; gap: .4em;
  background: rgba(255,255,255,.14); color: #fff;
  border-radius: 999px; padding: .35em .9em; font-weight: 600; font-size: .95rem;
}

/* simple bar */
.bar-track { background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden; height: 14px; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
