/* PermitPrep design system. Energetic-but-trustworthy palette built for teens
   and parents: deep navy ink on near-white surfaces, electric-indigo primary,
   warm safety-orange accent for highlights and progress. Inter for everything
   so the test-prep UI reads like a modern app, not a textbook. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0e1530;
  --ink-soft: #3c466a;
  --ink-mute: #6b7592;
  --bg: #f6f7fb;
  --bg-card: #ffffff;
  --bg-band: #eef0f7;
  --bg-dark: #0e1530;
  --bg-dark-2: #1a2350;
  --primary: #4f46e5;
  --primary-hover: #3f37c9;
  --primary-soft: #eef0ff;
  --primary-ink: #ffffff;
  --accent: #ff7a3d;
  --accent-soft: #fff1e8;
  --accent-ink: #4a1d05;
  --success: #1f9d55;
  --success-soft: #e6f6ec;
  --danger: #c0392b;
  --danger-soft: #fce8e6;
  --line: #e3e6f0;
  --line-strong: #c9cee0;
  --shadow-sm: 0 1px 2px rgba(14,21,48,0.05);
  --shadow: 0 1px 2px rgba(14,21,48,0.04), 0 8px 22px rgba(14,21,48,0.07);
  --shadow-lift: 0 2px 4px rgba(14,21,48,0.06), 0 14px 32px rgba(14,21,48,0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --focus: 0 0 0 3px rgba(79,70,229,0.35);
  --measure: 68ch;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin-top: 1.8em;
}
h3 {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.3;
  font-weight: 700;
  margin-top: 1.4em;
}
h4 { font-size: 1rem; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1.05em; }
a { color: var(--primary); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; color: var(--ink); }
code { background: var(--bg-band); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
::selection { background: var(--accent); color: var(--ink); }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 12px; top: 12px; width: auto; height: auto; padding: 10px 16px;
  background: var(--ink); color: #fff; border-radius: 8px; z-index: 100;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800;
  min-height: 44px; letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
}
.brand-text { font-size: 1.25rem; }
.brand-text span { color: var(--primary); }
.primary-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.primary-nav a {
  color: var(--ink-soft); font-weight: 600;
  padding: 10px 14px; border-radius: 8px; min-height: 44px;
  display: inline-flex; align-items: center; font-size: 0.96rem;
}
.primary-nav a:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(255,122,61,0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 40%, rgba(79,70,229,0.18), transparent 60%),
    linear-gradient(180deg, #f6f7fb 0%, #ffffff 100%);
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 56px; align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.7rem);
  margin-bottom: 0.45em;
  line-height: 1.04;
}
.hero-copy h1 .accent { color: var(--primary); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.72rem; font-weight: 700;
  margin: 0 0 18px;
}
.eyebrow::before { content: "●"; font-size: 0.6rem; }
.lede {
  font-size: 1.18rem; color: var(--ink-soft); line-height: 1.55;
  max-width: 60ch; margin-bottom: 1.4em; font-weight: 400;
}
.hero-cta { display: flex; gap: 12px; margin: 22px 0 28px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  border: 1.5px solid transparent;
  min-height: 48px; min-width: 44px;
  font-size: 1rem; font-family: inherit; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: #e6651f; color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: #fff; text-decoration: none; border-color: var(--ink); }
.btn-block { width: 100%; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.hero-bullets { list-style: none; padding: 0; margin: 0; color: var(--ink-soft); }
.hero-bullets li { padding-left: 30px; position: relative; margin-bottom: 10px; line-height: 1.5; }
.hero-bullets li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--success-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231f9d55'><path d='M7.5 13.5l-3-3 1.4-1.4 1.6 1.6 4.6-4.6 1.4 1.4z'/></svg>") center/16px no-repeat;
}

/* State picker card in hero */
.state-picker {
  background: #fff; border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-lift); border: 1px solid var(--line);
}
.state-picker h2 {
  margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em;
}
.state-picker .pick-sub { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 18px; }
.state-picker form { display: flex; flex-direction: column; gap: 12px; }
.state-picker label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.state-picker select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 1rem; font-weight: 500;
  width: 100%; padding: 14px 44px 14px 16px;
  border-radius: 12px; border: 1.5px solid var(--line-strong);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230e1530'><path d='M5 8l5 5 5-5z'/></svg>") right 14px center/18px no-repeat;
  color: var(--ink); min-height: 48px;
}
.state-picker select:focus { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
.state-picker .stat-row {
  display: flex; gap: 18px; padding-top: 16px; margin-top: 6px;
  border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-soft);
}
.state-picker .stat-row strong { display: block; color: var(--ink); font-size: 1.4rem; font-weight: 800; line-height: 1.1; }

/* ---------- Bands ---------- */
.band { padding: 64px 0; }
.band + .band { border-top: 1px solid var(--line); }
.band-light { background: var(--bg-band); border-top: 1px solid var(--line); }
.band-dark { background: var(--bg-dark); color: #cdd5f3; }
.band-dark h2.white,
.band-dark h2 { color: #fff; }
.band-dark h3 { color: #fff; }
.band-sub { color: var(--ink-soft); margin-bottom: 24px; max-width: 60ch; }
.band-dark .band-sub { color: #b5bdde; }

/* ---------- Cards / grids ---------- */
.featured-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin: 18px 0 22px;
}
.state-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; padding: 0; list-style: none; margin: 24px 0;
}
.state-grid li { list-style: none; }
.state-card {
  display: block; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
  min-height: 44px;
}
.state-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.state-card:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
.state-card .state-code {
  display: inline-block; background: var(--ink); color: #fff;
  border-radius: 6px; padding: 3px 9px; font-size: .78rem;
  font-weight: 700; letter-spacing: .04em;
}
.state-card .state-name { display: block; font-weight: 700; margin: 12px 0 4px; font-size: 1.05rem; letter-spacing: -0.01em; }
.state-card .state-meta { display: block; color: var(--ink-soft); font-size: .88rem; }
.centered { text-align: center; margin-top: 22px; }
.link-arrow { font-weight: 600; color: var(--primary); }
.link-arrow:hover { text-decoration: underline; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.promo-card h3 { margin-top: 0; }
.topic-list { list-style: none; padding: 0; margin: 12px 0; }
.topic-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.topic-list li:last-child { border-bottom: 0; }
.topic-list.big li { padding: 16px 0; }
.topic-list.big h3 { margin: 0 0 6px; }

/* ---------- Layout w/ sidebar ---------- */
.layout-with-sidebar {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px; margin: 24px 0 64px; align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.sidebar-card h3 { margin-top: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 700; }
.sidebar-card .topic-list a { color: var(--ink); font-weight: 500; }
.sidebar-card .topic-list a:hover { color: var(--primary); }
.sidebar-tip { background: linear-gradient(135deg, var(--primary) 0%, #6d63f5 100%); border: none; color: #fff; }
.sidebar-tip h3 { color: rgba(255,255,255,0.85); }
.sidebar-tip p { color: rgba(255,255,255,0.92); margin: 0; }
.sidebar-resources a { color: var(--ink); font-weight: 500; display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sidebar-resources a:last-child { border-bottom: 0; }
.sidebar-resources a:hover { color: var(--primary); }
.sidebar-resources .desc { display: block; font-size: 0.82rem; color: var(--ink-mute); font-weight: 400; margin-top: 2px; }

/* Article content readable line length */
.content { max-width: 100%; min-width: 0; }
.content > p,
.content > h2,
.content > h3,
.content > h4,
.content > ul,
.content > ol,
.content > .explanation,
.content > .study-context,
.content > .related,
.content > .fact-list,
.content > .question-list,
.content > .sample-list { max-width: var(--measure); }
.content > h1 { max-width: 22ch; }
.content > h2 { max-width: 28ch; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-size: .9rem; color: var(--ink-soft); margin: 22px 0 8px; line-height: 1.5; }
.breadcrumb a { color: var(--ink-soft); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }

.state-header { padding: 26px 0 10px; }
.fact-list { padding-left: 22px; }
.fact-list li { margin-bottom: 8px; }
.sample-list, .question-list { padding-left: 24px; }
.sample-list li, .question-list li { margin-bottom: 10px; }
.muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------- GDL fact card grid ---------- */
.gdl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin: 18px 0 26px;
}
.gdl-fact {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.gdl-fact .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); font-weight: 700; margin: 0 0 8px; }
.gdl-fact .value { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.gdl-fact .sub { font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }

.rule-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; }
.rule-list li {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); padding: 14px 18px;
}
.rule-list li strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 0.95rem; }

/* DMV checklist */
.checklist { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.checklist li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px 14px 48px; position: relative; line-height: 1.5;
}
.checklist li::before {
  content: ""; position: absolute; left: 14px; top: 14px;
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line-strong);
}
.checklist li strong { color: var(--ink); }

/* Road sign reference */
.signs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0 30px; }
.sign-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.sign-card .sign-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); font-weight: 700; margin: 0 0 6px; }
.sign-card .sign-name { font-weight: 700; margin: 0 0 6px; font-size: 1.05rem; }
.sign-card .sign-shape { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 8px; }
.sign-card .sign-meaning { font-size: 0.95rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* ---------- Question + Quiz UI ---------- */
.choices { list-style: none; padding: 0; margin: 28px 0; counter-reset: choice; }
.choices .choice {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 10px; display: flex; align-items: flex-start; gap: 14px;
  line-height: 1.5;
}
.choices .correct { background: var(--success-soft); border-color: var(--success); }
.choice-letter {
  font-weight: 700; color: var(--ink-soft); min-width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-band); font-size: 0.85rem;
}
.choices .correct .choice-letter { background: var(--success); color: #fff; }
.choice-text { flex: 1; }
.badge {
  background: var(--success); color: #fff; font-size: .72rem;
  padding: 4px 10px; border-radius: 999px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; align-self: center;
}
.explanation {
  background: var(--primary-soft); border-left: 4px solid var(--primary);
  padding: 18px 22px; border-radius: var(--radius-sm); margin: 24px 0;
}
.explanation h2 { margin-top: 0; font-size: 1.05rem; font-weight: 700; }
.study-context { margin: 28px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.pager .btn { flex: 0 1 auto; }

/* Interactive quiz */
.quiz-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.quiz-progress {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 18px; font-size: 0.88rem; color: var(--ink-soft); font-weight: 600;
}
.quiz-bar { height: 8px; background: var(--bg-band); border-radius: 999px; overflow: hidden; flex: 1; }
.quiz-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .3s ease; }
.quiz-q { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin: 8px 0 18px; letter-spacing: -0.015em; }
.quiz-choices { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.quiz-choices button {
  width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; font: inherit; color: var(--ink);
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  min-height: 48px;
}
.quiz-choices button:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.quiz-choices button:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
.quiz-choices button .letter {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--bg-band);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: var(--ink-soft);
}
.quiz-choices button.is-correct { background: var(--success-soft); border-color: var(--success); }
.quiz-choices button.is-correct .letter { background: var(--success); color: #fff; }
.quiz-choices button.is-wrong { background: var(--danger-soft); border-color: var(--danger); }
.quiz-choices button.is-wrong .letter { background: var(--danger); color: #fff; }
.quiz-choices button:disabled { cursor: default; }
.quiz-feedback { background: var(--primary-soft); border-left: 4px solid var(--primary); padding: 14px 18px; border-radius: var(--radius-sm); margin: 0 0 22px; }
.quiz-feedback.is-wrong { background: var(--danger-soft); border-left-color: var(--danger); }
.quiz-feedback .feedback-label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.quiz-feedback.is-wrong .feedback-label { color: var(--danger); }
.quiz-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .score { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--primary); margin: 8px 0; }
.quiz-result .verdict { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 0 0 18px; }
.quiz-result .quiz-actions { justify-content: center; }
.quiz-fallback { padding: 16px; background: var(--accent-soft); border: 1px solid #f4c8a4; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.9rem; color: var(--accent-ink); }

.topic-articles { display: grid; gap: 18px; margin-top: 24px; }
.topic-article h2 { margin-top: 0; }
.inline-state-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; }
.inline-state-links li { list-style: none; }
.inline-state-links a {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--bg-band); color: var(--ink); font-size: .92rem; font-weight: 500;
}
.inline-state-links a:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* ---------- Related / cross-link blocks ---------- */
.related {
  margin: 36px 0; padding: 22px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.related h2 {
  margin-top: 0; font-size: 1.1rem; font-weight: 700; max-width: none;
}
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related-list li {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.related-list li:hover { transform: translateY(-1px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.related-list a { display: block; padding: 14px 16px; color: var(--ink); min-height: 44px; font-weight: 500; }
.related-list a:hover { background: #fff; text-decoration: none; }
.related-list strong { display: block; color: var(--ink); margin-bottom: 4px; line-height: 1.35; font-weight: 700; }
.related-list span { color: var(--ink-soft); font-size: .9rem; display: block; line-height: 1.4; font-weight: 400; }

.sibling-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 16px 0 8px; padding: 0; list-style: none;
}
.sibling-nav li { list-style: none; }
.sibling-nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 8px 16px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: .9rem; font-weight: 600;
  border: 1.5px solid var(--line);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sibling-nav a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.sibling-nav a[aria-current="page"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
  pointer-events: none;
}

.guides-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; padding: 0; list-style: none; margin: 24px 0;
}
.guides-grid li { list-style: none; }
.guide-card { padding: 20px; }
.guide-card .state-name { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark); color: #b5bdde;
  padding: 56px 0 28px; margin-top: 56px;
}
.site-footer h4 {
  color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em;
  margin: 0 0 14px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; line-height: 1.4; }
.footer-grid a { color: #b5bdde; font-weight: 500; }
.footer-grid a:hover { color: #fff; }
.footer-brand { font-weight: 800; font-size: 1.3rem; color: #fff; margin: 0 0 8px; letter-spacing: -0.02em; }
.footer-tag { color: #b5bdde; max-width: 36ch; line-height: 1.5; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 40px;
  padding-top: 20px; font-size: .85rem; color: #8b94be; line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 44px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .state-picker { order: -1; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .three-col { grid-template-columns: 1fr; gap: 18px; }
  .layout-with-sidebar { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .primary-nav { gap: 0; font-size: .95rem; }
  .primary-nav a { padding: 8px 10px; }
  .band { padding: 48px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 32px 0 40px; }
  .hero-copy h1 { font-size: clamp(1.95rem, 7.5vw, 2.5rem); }
  .lede { font-size: 1.05rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-row { flex-wrap: wrap; padding: 12px 18px; gap: 8px; }
  .header-row .brand { flex: 1 1 auto; }
  .primary-nav { width: 100%; justify-content: flex-start; gap: 4px; flex-wrap: wrap; }
  .primary-nav a { padding: 8px 10px; font-size: .9rem; }
  .featured-grid, .state-grid, .guides-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .state-card { padding: 14px; }
  .related { padding: 18px; }
  .pager { flex-direction: column; }
  .pager .btn { width: 100%; }
  .band { padding: 36px 0; }
  .quiz-shell { padding: 20px; }
  .quiz-q { font-size: 1.1rem; }
  h1 { font-size: clamp(1.7rem, 6vw, 2.1rem); }
  h2 { font-size: clamp(1.25rem, 4.5vw, 1.5rem); }
}
@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .header-row { padding: 10px 14px; }
  .featured-grid, .state-grid { grid-template-columns: 1fr 1fr; }
}
