:root {
  --bg: #0d0d10;
  --surface: #141419;
  --surface-2: #1b1b22;
  --border: rgba(212, 175, 122, 0.16);
  --border-strong: rgba(212, 175, 122, 0.34);
  --text: #f3efe8;
  --muted: #a9a297;
  --gold: #d4af7a;
  --gold-bright: #f1d5a7;
  --crimson: #8c2d3e;
  --crimson-soft: rgba(140, 45, 62, 0.2);
  --safe: #3f7a68;
  --radius: 16px;
  --maxw: 880px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Footer */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 16, 0.92);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--gold-bright);
}
.brand:hover { text-decoration: none; }
.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-grid h4 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }

/* Typography & Hero */
main { padding: 36px 0 24px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.18;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.35rem;
  margin: 32px 0 12px;
  color: var(--gold-bright);
}
h3 {
  font-size: 1.08rem;
  margin: 20px 0 8px;
}
.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 68ch;
}

/* Cards & Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
}
.panel-subtle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 14px 0;
}
.disclaimer-bar {
  background: rgba(212, 175, 122, 0.06);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 18px 0;
}
.safe-banner {
  background: rgba(63, 122, 104, 0.14);
  border: 1px solid rgba(63, 122, 104, 0.45);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}
.badge-thumb {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.badge-hero {
  width: 116px;
  height: 116px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
}

/* Buttons & Controls */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, #d4af7a, #b3864d);
  color: #100e0c;
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.06); text-decoration: none; color: #100e0c; }
.btn:hover { border-color: var(--gold-bright); text-decoration: none; }
.btn-danger {
  border-color: rgba(212, 82, 102, 0.55);
  color: #f3a6b2;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pill {
  font-size: 0.8rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--crimson-soft);
  border: 1px solid rgba(140, 45, 62, 0.45);
  color: #f1d9dd;
}

/* Quiz UI */
.mode-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.mode-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
}
.mode-tab.active {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(212, 175, 122, 0.12);
}
.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width 0.2s ease;
}
.q-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 8px 0 20px;
}
.likert-list {
  display: grid;
  gap: 10px;
}
.likert-btn {
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.96rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.likert-btn:hover, .likert-btn.selected {
  border-color: var(--gold);
  background: rgba(212, 175, 122, 0.14);
}

/* Bars */
.bar-row { margin-bottom: 14px; }
.bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
}

/* Forms & Checklists */
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 12px 0;
  cursor: pointer;
}
.check-row input { margin-top: 4px; accent-color: var(--gold); }
.input-text {
  width: 100%;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.tri-group { display: flex; gap: 6px; }
.tri-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.tri-btn.active-yes { background: rgba(63, 122, 104, 0.35); border-color: #63b59b; color: #e8fff7; }
.tri-btn.active-maybe { background: rgba(212, 175, 122, 0.25); border-color: var(--gold); color: var(--gold-bright); }
.tri-btn.active-no { background: rgba(140, 45, 62, 0.32); border-color: #d46a7e; color: #ffe5ea; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
