/* ===================================================
   KnowYourRights.guide — Legal Rights Hub
   Authoritative & Classical Aesthetic
   =================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --charcoal: #1a1a2e;
  --charcoal-deep: #12121f;
  --charcoal-light: #252540;
  --charcoal-mid: #1e1e34;
  --brass: #c9a84c;
  --brass-light: #ddc06a;
  --brass-dim: #a08838;
  --brass-glow: rgba(201,168,76,0.15);
  --ivory: #f5f0e8;
  --ivory-dim: #e8e0d0;
  --parchment: #faf6ef;
  --text-primary: #e8e4dc;
  --text-secondary: #b0a998;
  --text-muted: #7a7468;
  --border-subtle: rgba(201,168,76,0.12);
  --border-accent: rgba(201,168,76,0.3);
  --shadow-deep: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px rgba(201,168,76,0.08);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', 'Crimson Pro', Georgia, serif;
  --font-mono: 'Courier New', monospace;
  --max-width: 1140px;
  --section-spacing: 5rem;
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--charcoal);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Texture overlay on body */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ivory);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--text-primary); }

a {
  color: var(--brass);
  text-decoration: none;
  transition: color var(--transition-smooth);
}
a:hover { color: var(--brass-light); }

strong { color: var(--ivory); font-weight: 600; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

section {
  padding: var(--section-spacing) 0;
  position: relative;
}

/* Decorative section divider */
.section-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  margin: 0 auto 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* --- Scales of Justice SVG decoration --- */
.scales-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.7;
}

/* --- Navigation --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(18, 18, 31, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.main-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ivory);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  fill: var(--brass);
}

.nav-logo span {
  color: var(--brass);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-links li a {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: color var(--transition-smooth);
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width var(--transition-smooth);
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--brass);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 60%;
}

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ivory);
  margin: 5px 0;
  transition: all 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,168,76,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(201,168,76,0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--charcoal-deep) 0%, var(--charcoal) 100%);
  z-index: 0;
}

/* Scales watermark */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23c9a84c' stroke-width='0.3' opacity='0.06'%3E%3Cline x1='50' y1='10' x2='50' y2='35'/%3E%3Ccircle cx='50' cy='8' r='3'/%3E%3Cline x1='25' y1='35' x2='75' y2='35'/%3E%3Cpath d='M25 35 L15 55 Q20 62 30 62 L35 55 Z'/%3E%3Cpath d='M75 35 L65 55 Q70 62 80 62 L85 55 Z'/%3E%3Cline x1='50' y1='35' x2='50' y2='80'/%3E%3Crect x='35' y='80' width='30' height='5' rx='1'/%3E%3Crect x='30' y='85' width='40' height='3' rx='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border-accent);
  border-radius: 2px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brass);
  margin-bottom: 2rem;
  font-family: var(--font-body);
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero h1 .accent {
  color: var(--brass);
  display: block;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-style: italic;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-transform: uppercase;
}

.btn-primary {
  background: var(--brass);
  color: var(--charcoal-deep);
}
.btn-primary:hover {
  background: var(--brass-light);
  color: var(--charcoal-deep);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--brass);
  border: 1px solid var(--border-accent);
}
.btn-secondary:hover {
  background: var(--brass-glow);
  border-color: var(--brass);
}

/* --- Topic Navigation Grid --- */
.topics-nav {
  background: var(--charcoal-deep);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.2rem 1rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
}

.topic-card:hover {
  border-color: var(--brass);
  background: var(--charcoal-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.topic-card .topic-icon {
  font-size: 1.5rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.topic-card .topic-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ivory);
  font-weight: 500;
}

/* --- Guide Sections --- */
.guide-section {
  border-bottom: 1px solid var(--border-subtle);
}

.guide-section:last-of-type {
  border-bottom: none;
}

.guide-article {
  max-width: 800px;
  margin: 0 auto;
}

.guide-article-number {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-accent);
}

.guide-article h2 {
  margin-bottom: 0.5rem;
}

.guide-article .guide-subtitle {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.guide-article h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--brass-light);
  font-size: 1.3rem;
}

.guide-article h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--ivory);
}

.guide-article ul, .guide-article ol {
  margin-bottom: 1.2rem;
}

.guide-article li {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Key takeaway box */
.key-takeaway {
  background: var(--brass-glow);
  border-left: 3px solid var(--brass);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 3px 3px 0;
}

.key-takeaway strong {
  color: var(--brass);
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
}

/* Warning box */
.warning-box {
  background: rgba(180,60,60,0.1);
  border-left: 3px solid #b43c3c;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 3px 3px 0;
}

.warning-box strong {
  color: #d35555;
}

/* --- Ad Slots --- */
.ad-slot {
  min-height: 250px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 3px;
}

/* --- Quiz Section --- */
.quiz-section {
  background: var(--charcoal-deep);
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--charcoal-light);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  padding: 3rem;
  box-shadow: var(--shadow-deep);
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ivory);
  margin-bottom: 1.5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.quiz-option {
  padding: 1rem 1.5rem;
  background: var(--charcoal-mid);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--brass);
  background: var(--brass-glow);
  color: var(--ivory);
}

.quiz-option.selected {
  border-color: var(--brass);
  background: rgba(201,168,76,0.12);
  color: var(--brass-light);
}

.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
}

.quiz-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--charcoal-mid);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}

.quiz-progress-dot.completed {
  background: var(--brass);
  border-color: var(--brass);
}

.quiz-progress-dot.current {
  background: var(--brass-dim);
  border-color: var(--brass);
  box-shadow: 0 0 6px var(--brass-glow);
}

.quiz-result {
  text-align: center;
  padding: 2rem 0;
}

.quiz-result h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--brass-light);
}

.quiz-result p {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.quiz-result .result-level {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 2px;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.result-low { background: rgba(80,180,80,0.15); color: #6ecc6e; border: 1px solid rgba(80,180,80,0.3); }
.result-medium { background: rgba(220,180,50,0.15); color: #dcc032; border: 1px solid rgba(220,180,50,0.3); }
.result-high { background: rgba(200,70,70,0.15); color: #d36060; border: 1px solid rgba(200,70,70,0.3); }

/* --- State Finder --- */
.state-finder {
  background: var(--charcoal);
}

.finder-container {
  max-width: 800px;
  margin: 0 auto;
}

.finder-select-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.finder-select {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-accent);
  border-radius: 3px;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1.05rem;
  appearance: none;
  cursor: pointer;
}

.finder-select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 2px var(--brass-glow);
}

.finder-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brass);
  pointer-events: none;
  font-size: 1.2rem;
}

.state-info {
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2rem;
  display: none;
}

.state-info.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

.state-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.state-info-item {
  padding: 1.2rem;
  background: var(--charcoal-mid);
  border-radius: 3px;
  border-left: 3px solid var(--brass);
}

.state-info-item .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.state-info-item .value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brass-light);
  font-weight: 600;
}

.state-info-item .detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* --- Glossary --- */
.glossary-section {
  background: var(--charcoal-deep);
}

.glossary-search {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 2rem;
  display: block;
  padding: 0.9rem 1.5rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-accent);
  border-radius: 3px;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
}

.glossary-search:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 2px var(--brass-glow);
}

.glossary-search::placeholder {
  color: var(--text-muted);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.glossary-term {
  padding: 1rem 1.2rem;
  background: var(--charcoal-light);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  transition: all var(--transition-smooth);
}

.glossary-term:hover {
  border-color: var(--border-accent);
}

.glossary-term dt {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brass);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.glossary-term dd {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.glossary-term.hidden {
  display: none;
}

/* --- FAQ --- */
.faq-section { }

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ivory);
  font-weight: 500;
  transition: color var(--transition-smooth);
}

.faq-question:hover {
  color: var(--brass);
}

.faq-question .faq-toggle {
  font-size: 1.5rem;
  color: var(--brass);
  transition: transform 0.3s;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: 1.5rem;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Disclaimer --- */
.disclaimer-section {
  background: var(--charcoal-deep);
  border-top: 2px solid var(--brass-dim);
}

.disclaimer-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem;
  background: rgba(180,60,60,0.05);
  border: 1px solid rgba(180,60,60,0.2);
  border-radius: 4px;
}

.disclaimer-box h2 {
  color: #d35555;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.disclaimer-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* --- Footer --- */
.site-footer {
  background: var(--charcoal-deep);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}

.footer-logo span { color: var(--brass); }

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--charcoal-light);
  border: 1px solid var(--border-accent);
  border-radius: 3px;
  color: var(--brass);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brass);
  color: var(--charcoal-deep);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(18, 18, 31, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    border-bottom: 1px solid var(--border-subtle);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li a {
    display: block;
    padding: 0.8rem 0;
    font-size: 0.9rem;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-content { padding: 1rem; }

  .quiz-container { padding: 2rem 1.5rem; }

  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .topics-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .state-info-grid {
    grid-template-columns: 1fr;
  }

  :root {
    --section-spacing: 3.5rem;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 1.2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-description { font-size: 1rem; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.85rem; }
  .quiz-container { padding: 1.5rem 1rem; }
  .topics-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .topic-card { padding: 1rem 0.8rem; }
}

/* --- Entrance animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > .animate-in:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > .animate-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .animate-in:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > .animate-in:nth-child(4) { transition-delay: 0.2s; }
.stagger-children > .animate-in:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > .animate-in:nth-child(6) { transition-delay: 0.3s; }
.stagger-children > .animate-in:nth-child(7) { transition-delay: 0.35s; }
.stagger-children > .animate-in:nth-child(8) { transition-delay: 0.4s; }
.stagger-children > .animate-in:nth-child(9) { transition-delay: 0.45s; }
.stagger-children > .animate-in:nth-child(10) { transition-delay: 0.5s; }

/* Gavel decorative element */
.gavel-decoration {
  position: absolute;
  opacity: 0.04;
  pointer-events: none;
}
