/* =====================================================
   Rice Purity Test Checker — Premium Stylesheet v2.0
   Site: ricepuritytestchecker.com
   ===================================================== */

/* ── Google Fonts Import ──────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ────────────────────────── */
:root {
  /* Brand Colors */
  --color-primary:     #7c3aed;
  --color-primary-d:   #6d28d9;
  --color-primary-l:   #ede9fe;
  --color-accent:      #f59e0b;
  --color-accent-l:    #fef3c7;

  /* Semantic Colors */
  --color-success:     #059669;
  --color-success-l:   #d1fae5;
  --color-warning:     #d97706;
  --color-warning-l:   #fef3c7;
  --color-danger:      #dc2626;
  --color-danger-l:    #fee2e2;
  --color-info:        #2563eb;
  --color-info-l:      #dbeafe;

  /* Neutral Palette */
  --color-bg:          #faf8ff;
  --color-surface:     #ffffff;
  --color-surface-2:   #f8f7fc;
  --color-border:      #e5e3f0;
  --color-border-l:    #f0eef9;
  --color-text:        #111827;
  --color-text-2:      #374151;
  --color-muted:       #6b7280;
  --color-muted-l:     #9ca3af;

  /* Gradients */
  --grad-primary:      linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #8b5cf6 100%);
  --grad-hero:         linear-gradient(160deg, #4c1d95 0%, #7c3aed 40%, #a855f7 100%);
  --grad-card:         linear-gradient(145deg, #faf8ff 0%, #f3f0ff 100%);
  --grad-score:        linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --grad-cta:          linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

  /* Radii */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-2xl: 32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(124,58,237,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:   0 2px 8px rgba(124,58,237,.1),  0 1px 4px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(124,58,237,.14), 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 40px rgba(124,58,237,.18), 0 4px 16px rgba(0,0,0,.1);
  --shadow-xl:   0 16px 60px rgba(124,58,237,.22), 0 8px 24px rgba(0,0,0,.12);
  --shadow-glow: 0 0 30px rgba(124,58,237,.25);

  /* Spacing */
  --space-xs:  .25rem;
  --space-sm:  .5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  /* Transitions */
  --t-fast:   .15s ease;
  --t-base:   .25s ease;
  --t-slow:   .4s ease;
  --t-spring: .3s cubic-bezier(.34,1.56,.64,1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-sans);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: .9rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
  color: var(--color-muted);
  line-height: 1.75;
}
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--t-base);
}
a:hover { color: var(--color-primary-d); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .35rem; color: var(--color-muted); line-height: 1.7; }

strong, b { color: var(--color-text); font-weight: 600; }
em { font-style: italic; }
small { font-size: .85em; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Layout ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--wide {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

section { padding-block: 3.5rem; }
section + section { border-top: 1px solid var(--color-border); }

/* ── Navigation ───────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 20px rgba(124,58,237,.06);
  transition: box-shadow var(--t-base);
}

.site-nav.scrolled {
  box-shadow: 0 2px 30px rgba(124,58,237,.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -.02em;
  flex-shrink: 0;
  transition: opacity var(--t-base);
}
.nav-logo:hover { opacity: .85; text-decoration: none; color: var(--color-primary); }

.nav-logo-icon { font-size: 1.5rem; line-height: 1; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-sub { font-size: .65rem; font-weight: 500; color: var(--color-muted); letter-spacing: .06em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: .4rem .8rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-muted);
  border-radius: var(--r-md);
  transition: all var(--t-base);
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--color-primary);
  background: var(--color-primary-l);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--color-primary);
  background: var(--color-primary-l);
  font-weight: 600;
}

.nav-cta {
  background: var(--grad-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(124,58,237,.3) !important;
}
.nav-cta:hover {
  background: var(--color-primary-d) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,.4) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  padding: .4rem .6rem;
  cursor: pointer;
  color: var(--color-text);
  font-size: 1.1rem;
  line-height: 1;
  transition: all var(--t-base);
}
.nav-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem 1.5rem;
    gap: .25rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    z-index: 199;
  }
  .nav-links.open { display: flex; animation: slideDown .2s ease; }
  .nav-links a { padding: .65rem 1rem; font-size: .95rem; }
  .nav-cta { margin-top: .5rem; text-align: center; justify-content: center; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Section ─────────────────────────────────── */
.page-hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  padding: 4rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.page-hero .hero-sub {
  color: rgba(255,255,255,.88);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}

.page-hero .hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.95);
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: var(--r-full);
}

/* ── Breadcrumb ───────────────────────────────────── */
.breadcrumb {
  padding: .75rem 0;
  font-size: .82rem;
  color: var(--color-muted);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-l);
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before {
  content: '›';
  margin-right: .25rem;
  color: var(--color-muted-l);
}
.breadcrumb a { color: var(--color-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--color-primary); font-weight: 600; }

/* ── Benefits / Feature Row ───────────────────────── */
.benefits-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  padding-block: 1.5rem;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem .75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all var(--t-base);
}
.benefit-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.benefit-icon { font-size: 1.5rem; line-height: 1; }
.benefit-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: .01em;
}

/* ── Quiz / Calculator Card ───────────────────────── */
.quiz-card {
  background: var(--color-surface);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: box-shadow var(--t-base);
}

.quiz-header {
  background: var(--grad-hero);
  padding: 2rem 2.5rem 1.75rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quiz-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.1) 0%, transparent 60%);
  pointer-events: none;
}

.quiz-header h2 {
  color: #fff;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  margin-bottom: .4rem;
  position: relative;
}

.quiz-header p {
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  margin: 0;
  position: relative;
}

.quiz-header-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.quiz-header-meta span {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.15);
  border-radius: var(--r-full);
  padding: .2rem .7rem;
  border: 1px solid rgba(255,255,255,.2);
}

.quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.25rem;
  position: relative;
}
.quiz-progress-label {
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  min-width: 60px;
}
.quiz-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: var(--r-full);
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: rgba(255,255,255,.9);
  border-radius: var(--r-full);
  transition: width .35s ease;
  width: 0%;
  position: relative;
}
.quiz-progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255,255,255,.8);
  opacity: 0;
  transition: opacity var(--t-base);
}
.quiz-progress-bar[style*="width: 0%"]::after { opacity: 0; }
.quiz-progress-count {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

.quiz-body { padding: 1.75rem 2rem; }

/* Category Filters */
.quiz-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.quiz-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-muted);
  transition: all var(--t-base);
  white-space: nowrap;
  font-family: inherit;
}
.quiz-cat-btn:hover {
  background: var(--color-primary-l);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}
.quiz-cat-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.quiz-cat-count {
  background: rgba(255,255,255,.25);
  font-size: .68rem;
  padding: .05rem .35rem;
  border-radius: var(--r-full);
}
.quiz-cat-btn:not(.active) .quiz-cat-count {
  background: var(--color-border);
  color: var(--color-muted);
}

/* Question List */
.question-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.question-item {
  display: grid;
  grid-template-columns: 20px 28px 1fr;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--color-surface);
  user-select: none;
  position: relative;
}
.question-item:hover {
  border-color: var(--color-primary);
  background: #faf8ff;
  box-shadow: 0 0 0 3px rgba(124,58,237,.06);
}
.question-item:active { transform: scale(.99); }
.question-item.checked {
  border-color: var(--color-primary);
  background: linear-gradient(90deg, #f3eeff 0%, #faf5ff 100%);
  box-shadow: 0 0 0 3px rgba(124,58,237,.08);
}
.question-item.checked .q-num {
  background: var(--color-primary);
  color: #fff;
}

.q-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 5px;
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.question-item.checked .q-checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.q-checkbox-icon {
  display: none;
  color: #fff;
  font-size: .65rem;
  font-weight: 900;
  line-height: 1;
}
.question-item.checked .q-checkbox-icon { display: block; }

.q-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-bg);
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-muted);
  transition: all var(--t-fast);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.q-text {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--color-text-2);
  transition: color var(--t-fast);
}
.question-item.checked .q-text {
  color: var(--color-primary-d);
  font-weight: 500;
}

/* Live Score Ticker */
.live-score-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .88rem;
}
.live-score-ticker .ticker-label { color: var(--color-muted); }
.live-score-ticker .ticker-score {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-primary);
  transition: all var(--t-spring);
}
.live-score-ticker .ticker-checked { color: var(--color-muted); font-size: .82rem; }

.quiz-footer {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(to bottom, var(--color-bg), var(--color-surface));
}

.quiz-controls {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.quiz-stat {
  font-size: .85rem;
  color: var(--color-muted);
  margin-bottom: .75rem;
}
.quiz-stat strong { color: var(--color-text); font-weight: 700; }

/* ── Result Box ───────────────────────────────────── */
.result-box {
  display: none;
  position: relative;
  background: var(--grad-score);
  border-radius: var(--r-2xl);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  color: #fff;
  margin-bottom: 2rem;
  overflow: hidden;
  animation: resultReveal .5s cubic-bezier(.34,1.56,.64,1);
}
.result-box.visible { display: block; }

.result-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(255,255,255,.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.07) 0%, transparent 40%);
  pointer-events: none;
}

.result-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.result-score-wrap { position: relative; margin-bottom: .5rem; }
.result-score {
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  text-shadow: 0 4px 30px rgba(0,0,0,.25);
  transition: all var(--t-slow);
}
.result-score-slash {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
  color: rgba(255,255,255,.6);
}
.result-label {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  margin-bottom: .5rem;
  color: rgba(255,255,255,.95);
}
.result-desc {
  font-size: .95rem;
  color: rgba(255,255,255,.8);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}

.result-meter {
  width: 100%;
  max-width: 400px;
  margin: 1rem auto;
  background: rgba(255,255,255,.2);
  height: 10px;
  border-radius: var(--r-full);
  overflow: hidden;
}
.result-meter-fill {
  height: 100%;
  background: #fff;
  border-radius: var(--r-full);
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.result-meter-fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,.8);
}

.result-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

@keyframes resultReveal {
  from { opacity: 0; transform: scale(.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.5rem;
  border-radius: var(--r-full);
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-base);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: .01em;
}
.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:active { transform: scale(.97) !important; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(124,58,237,.35);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(124,58,237,.45);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-l);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-primary-l);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.btn-sm  { padding: .4rem 1rem;   font-size: .8rem; }
.btn-lg  { padding: .85rem 2.25rem; font-size: 1rem; }
.btn-xl  { padding: 1.1rem 2.75rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

.btn-cta {
  background: var(--grad-cta);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(239,68,68,.35);
}
.btn-cta:hover {
  box-shadow: 0 4px 20px rgba(239,68,68,.45);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-base);
}
.card:hover { box-shadow: var(--shadow-sm); }

.card--raised {
  box-shadow: var(--shadow-md);
}
.card--raised:hover { box-shadow: var(--shadow-lg); }

.card--highlight {
  border-color: var(--color-primary);
  background: linear-gradient(145deg, #fff 0%, #faf8ff 100%);
  box-shadow: 0 0 0 1px rgba(124,58,237,.15), var(--shadow-md);
}

.card--grad {
  background: var(--grad-card);
  border-color: rgba(124,58,237,.15);
}

/* ── Score Guide Table ────────────────────────────── */
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .88rem;
  border-radius: var(--r-md);
  overflow: hidden;
}
.score-table thead tr:first-child th:first-child { border-radius: var(--r-md) 0 0 0; }
.score-table thead tr:first-child th:last-child  { border-radius: 0 var(--r-md) 0 0; }
.score-table th {
  background: var(--grad-primary);
  color: #fff;
  padding: .85rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.score-table td {
  padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  vertical-align: middle;
  background: var(--color-surface);
}
.score-table tr:last-child td { border-bottom: none; }
.score-table tr:hover td { background: #faf8ff; }
.score-table td:first-child { font-weight: 700; color: var(--color-text); white-space: nowrap; }

/* ── Badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .75rem;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge-green  { background: var(--color-success-l); color: #065f46; }
.badge-blue   { background: var(--color-info-l);    color: #1e40af; }
.badge-yellow { background: var(--color-accent-l);  color: #92400e; }
.badge-orange { background: #ffedd5; color: #7c2d12; }
.badge-red    { background: var(--color-danger-l);  color: #991b1b; }
.badge-purple { background: var(--color-primary-l); color: #5b21b6; }

/* ── Section Header ───────────────────────────────── */
.section-header { margin-bottom: 2.25rem; }
.section-header .label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--color-primary-l);
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: var(--r-full);
  margin-bottom: .85rem;
  border: 1px solid rgba(124,58,237,.15);
}
.section-header h2 { margin-bottom: .65rem; }
.section-header p { font-size: 1.05rem; max-width: 650px; line-height: 1.7; }

/* ── FAQ Accordion ────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: .5rem; }

.faq-item {
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.faq-item:hover { border-color: rgba(124,58,237,.3); box-shadow: var(--shadow-xs); }
.faq-item:has(.faq-question[aria-expanded="true"]) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.08), var(--shadow-sm);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-size: .94rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: all var(--t-base);
  font-family: inherit;
}
.faq-question:hover { background: #faf8ff; color: var(--color-primary); }
.faq-question[aria-expanded="true"] {
  color: var(--color-primary);
  background: var(--color-primary-l);
}

.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  transition: all var(--t-base);
  color: var(--color-primary);
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.faq-answer {
  display: none;
  padding: 0 1.35rem 1.25rem;
  font-size: .92rem;
  color: var(--color-muted);
  animation: fadeIn .2s ease;
}
.faq-answer.open { display: block; }
.faq-answer p { line-height: 1.75; }
.faq-answer p:last-child { margin: 0; }

/* ── Related Link Cards ───────────────────────────── */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.related-link-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: all var(--t-base);
}
.related-link-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  background: #faf8ff;
}

.rlc-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  padding-top: .1rem;
}
.rlc-text { flex: 1; min-width: 0; }
.rlc-title {
  display: block;
  font-weight: 700;
  font-size: .88rem;
  color: var(--color-text);
  margin-bottom: .2rem;
  line-height: 1.3;
}
.rlc-desc {
  display: block;
  font-size: .78rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ── Steps List ───────────────────────────────────── */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  counter-reset: steps;
}

.step-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  counter-increment: steps;
}

.step-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .88rem;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
  position: relative;
  z-index: 1;
}
.step-num::after { content: counter(steps); }

.step-connector {
  position: relative;
}
.step-connector::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 38px;
  bottom: -1.35rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(124,58,237,.3), transparent);
}
.step-list .step-item:last-child .step-connector::before { display: none; }

.step-content { flex: 1; padding-top: .35rem; }
.step-content h4 { margin-bottom: .3rem; font-size: 1rem; }
.step-content p { margin: 0; font-size: .9rem; line-height: 1.65; }

/* ── Callout / Notice ─────────────────────────────── */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  font-size: .9rem;
  line-height: 1.65;
}
.callout-icon { font-size: 1.2rem; flex-shrink: 0; padding-top: .1rem; }
.callout p { margin: 0; }
.callout p + p { margin-top: .5rem; }

.callout-info    { background: var(--color-info-l);    border-color: rgba(37,99,235,.2); border-left: 4px solid var(--color-info); }
.callout-warning { background: var(--color-warning-l); border-color: rgba(217,119,6,.2); border-left: 4px solid var(--color-warning); }
.callout-success { background: var(--color-success-l); border-color: rgba(5,150,105,.2); border-left: 4px solid var(--color-success); }
.callout-danger  { background: var(--color-danger-l);  border-color: rgba(220,38,38,.2); border-left: 4px solid var(--color-danger); }
.callout-purple  { background: var(--color-primary-l); border-color: rgba(124,58,237,.2); border-left: 4px solid var(--color-primary); }

/* ── Stat Cards ───────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  text-align: center;
  transition: all var(--t-base);
}
.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.stat-value {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Forms ────────────────────────────────────────── */
.form-group { margin-bottom: 1.35rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .45rem;
  color: var(--color-text);
}
.form-hint {
  font-size: .8rem;
  color: var(--color-muted);
  margin-top: .3rem;
}
.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: .93rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: all var(--t-base);
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.form-control::placeholder { color: var(--color-muted-l); }
textarea.form-control { resize: vertical; min-height: 130px; }

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  background: #0f0a1e;
  color: rgba(255,255,255,.65);
  padding: 3.5rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .nav-logo-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: .75rem;
}
.footer-brand p {
  font-size: .86rem;
  line-height: 1.7;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  font-size: .9rem;
  transition: all var(--t-base);
  color: rgba(255,255,255,.6);
}
.footer-social a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; text-decoration: none; }

.footer-col h4 {
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: .55rem; }
.footer-col ul li a {
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  transition: color var(--t-base);
}
.footer-col ul li a:hover {
  color: rgba(255,255,255,.9);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
}
.footer-bottom p { margin: 0; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: rgba(255,255,255,.9); text-decoration: none; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Score Color Classes ──────────────────────────── */
.score-100-94 { color: #065f46; }
.score-93-77  { color: #1e40af; }
.score-76-45  { color: #92400e; }
.score-44-9   { color: #7c2d12; }
.score-8-0    { color: #991b1b; }

/* ── Grid Helpers ─────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 800px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px)  { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px)  { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .grid-4 { grid-template-columns: 1fr; } }

/* ── Long-tail / Support Pages ────────────────────── */
.lt-hero {
  background: var(--grad-hero);
  padding: 3rem 0 2.5rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lt-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.lt-hero h1 { color: #fff; margin-bottom: .5rem; }
.lt-hero .subtitle {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
}

.page-content { padding: 2.5rem 0 4rem; }

/* ── Table of Contents ────────────────────────────── */
.toc {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: .3rem; }
.toc a {
  font-size: .88rem;
  color: var(--color-muted);
  font-weight: 500;
}
.toc a:hover { color: var(--color-primary); }

/* ── Social Share Strip ───────────────────────────── */
.social-share {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  font-size: .82rem;
  color: var(--color-muted);
}
.social-share-label { font-weight: 600; margin-right: .25rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .8rem;
  border-radius: var(--r-full);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: inherit;
  transition: all var(--t-base);
}
.share-btn-twitter  { background: #1da1f2; color: #fff; }
.share-btn-facebook { background: #1877f2; color: #fff; }
.share-btn-whatsapp { background: #25d366; color: #fff; }
.share-btn-copy     { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.share-btn:hover    { opacity: .85; transform: translateY(-1px); text-decoration: none; }

/* ── Animated Counters ────────────────────────────── */
.count-up { transition: all .5s ease; }

/* ── Animations ───────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120px) rotate(720deg); opacity: 0; }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,.4); }
  70%      { box-shadow: 0 0 0 10px rgba(124,58,237,0); }
}
@keyframes scoreCountUp {
  from { opacity: .6; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-fade-in     { animation: fadeIn .4s ease forwards; }
.animate-fade-in-up  { animation: fadeInUp .4s ease forwards; }
.animate-pop         { animation: pop .3s ease; }

/* ── Utilities ────────────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-muted   { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .78rem; }
.text-lg      { font-size: 1.125rem; }
.text-xl      { font-size: 1.25rem; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }

.mb-0  { margin-bottom: 0 !important; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.my-2  { margin-block: 1rem; }
.my-3  { margin-block: 1.5rem; }

.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.flex      { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

.rounded-full { border-radius: var(--r-full); }
.rounded      { border-radius: var(--r-md); }
.rounded-lg   { border-radius: var(--r-lg); }

/* Visually Hidden (accessibility) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 9999;
  font-size: .88rem;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }

/* ── Responsive Tweaks ────────────────────────────── */
@media (max-width: 640px) {
  .quiz-body  { padding: 1.25rem 1rem; }
  .quiz-footer { padding: 1.25rem 1rem 1.5rem; }
  .quiz-header { padding: 1.5rem 1.25rem 1.25rem; }
  .card   { padding: 1.25rem; }
  section { padding-block: 2.5rem; }
  .result-box { padding: 2rem 1.25rem; }
  .benefits-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) {
  .benefits-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Focus Visible ────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ── Print ────────────────────────────────────────── */
@media print {
  .site-nav, .site-footer, .quiz-controls, .result-actions, .nav-toggle { display: none !important; }
  .result-box { background: #f0e8ff !important; color: var(--color-text) !important; }
  body { background: white; }
  .quiz-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── Scrollbar Styling ────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ── Selection ────────────────────────────────────── */
::selection { background: rgba(124,58,237,.15); color: var(--color-primary-d); }
