/* ─────────────────────────────────────────────────────────────
   Design System — PrathmIQ
   Google Fonts, CSS custom properties, base reset, typography
   ───────────────────────────────────────────────────────────── */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@700;800&family=Instrument+Serif:ital@1&family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ── Colour tokens — dark mode defaults ─────────────────────── */
:root {
  --bg:       #050505;
  --bg2:      #0d0d0d;
  --bg3:      #141414;
  --text:     #f0f0f0;
  --text2:    #a0a0a0;
  --text3:    #555;
  --iq:       #F59E0B;
  --iq2:      #fbbf24;
  --iq-dim:   rgba(245,158,11,0.10);
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.14);
  --danger:   #ef4444;
  --crit:     #ef4444;
  --crit-dim: rgba(239,68,68,0.12);
  --high:     #f97316;
  --high-dim: rgba(249,115,22,0.12);
  --med:      #eab308;
  --med-dim:  rgba(234,179,8,0.12);
  --low:      #22c55e;
  --low-dim:  rgba(34,197,94,0.12);
  --blue:     #60a5fa;
  --blue-dim: rgba(96,165,250,0.10);
  --cg:       rgba(255,255,255,0.05);
  --ct:       #555;
  --max:      1200px;
}

/* ── Light mode overrides ───────────────────────────────────── */
[data-theme="light"] {
  --bg:       #ffffff;
  --bg2:      #f5f5f5;
  --bg3:      #ebebeb;
  --text:     #0a0a0a;
  --text2:    #444;
  --text3:    #888;
  --iq:       #F59E0B;
  --iq2:      #d97706;
  --iq-dim:   rgba(245,158,11,0.09);
  --border:   rgba(0,0,0,0.08);
  --border2:  rgba(0,0,0,0.16);
  --danger:   #dc2626;
  --crit-dim: rgba(239,68,68,0.09);
  --high-dim: rgba(249,115,22,0.09);
  --med-dim:  rgba(234,179,8,0.09);
  --low-dim:  rgba(34,197,94,0.09);
  --blue-dim: rgba(96,165,250,0.09);
  --cg:       rgba(0,0,0,0.06);
  --ct:       #888;
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background .25s, color .25s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
  padding-top: 60px; /* nav height */
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Layout utilities ───────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Shared button styles ───────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0a0a0a;
  background: var(--iq);
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  background: transparent;
  padding: 11px 24px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn-outline:hover {
  background: var(--bg3);
  border-color: var(--text3);
}

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Skeleton shimmer ───────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-bar {
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border2) 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-bar--lg { height: 28px; width: 60%; }
.skeleton-bar--md { height: 16px; width: 80%; margin-top: 12px; }
.skeleton-bar--sm { height: 12px; width: 50%; margin-top: 8px; }
