/* =========================================================
   Epic Auto School — lessons, video player and quiz
   Loaded after styles.css on lessons.html and lesson.html.
   ========================================================= */

:root {
  --purple: #A593F4;
  --purple-soft: #E8E1FB;
  --purple-ink: #4b3bb0;
  --good: #1f9d55;
  --good-soft: #DDF5E6;
  --bad: #d64545;
  --bad-soft: #FBE1E1;
}

.learn-page { background: var(--bg-cream); min-height: 60vh; padding: 40px 0 90px; }
.learn-page .container { max-width: 1240px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

.crumb { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: #444; margin-bottom: 18px; }
.crumb:hover { color: #000; }

/* ---------- lessons list ---------- */
.lessons-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.lessons-head h1 { font-size: 44px; font-weight: 700; color: #111; margin-bottom: 8px; }
.lessons-head p { font-size: 18px; color: #444; margin: 0; max-width: 640px; }
.state-picker { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
.state-picker select {
  font: inherit; font-size: 1rem; padding: 12px 40px 12px 16px; border-radius: 12px;
  border: 2px solid #e2ddd5; background: #fff; color: #111; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.state-picker select:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 2px; }

.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.lesson-card {
  background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.lesson-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(0,0,0,.25); }
.lesson-card:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 3px; }
.lesson-thumb { aspect-ratio: 16/9; background: #222 center/cover no-repeat; position: relative; }
.lesson-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.45));
}
.lesson-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1;
  width: 58px; height: 58px; border-radius: 50%; background: var(--bg-yellow);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #111;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.5);
}
.lesson-card.locked .lesson-thumb { filter: grayscale(.85) brightness(.75); }
.lesson-card.locked .lesson-play { background: #fff; }
.lesson-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lesson-num { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #777; }
.lesson-body h3 { font-size: 19px; font-weight: 700; color: #111; margin: 0; }
.lesson-body p { font-size: 14.5px; color: #555; margin: 0; line-height: 1.5; }
.lesson-meta { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
}
.chip-free { background: var(--bg-yellow); color: #111; }
.chip-locked { background: #eee; color: #555; }
.chip-score { background: var(--purple-soft); color: var(--purple-ink); }
.chip-pass { background: var(--good-soft); color: var(--good); }
.chip-watched { background: #f3f3f3; color: #333; }

.lessons-unlock {
  margin-top: 48px; background: #FBF1DE; border-radius: 28px; padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.lessons-unlock h2 { font-size: 28px; font-weight: 700; color: #111; margin: 0 0 6px; }
.lessons-unlock p { margin: 0; color: #444; }
.lessons-unlock .download-stores .store-badge img { height: 48px; }

.learn-status { padding: 60px 0; text-align: center; color: #555; font-size: 1.05rem; }

/* ---------- lesson page ---------- */
.lesson-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.lesson-title-row h1 { font-size: 36px; font-weight: 700; color: #111; margin: 4px 0 6px; }
.lesson-title-row p { margin: 0; color: #555; max-width: 720px; }

.mode-toggle { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow-card); }
.mode-toggle button {
  padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: .9rem; color: #444;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mode-toggle button[aria-pressed="true"] { background: var(--bg-yellow); color: #111; font-weight: 700; }

.player {
  position: relative; background: #000; border-radius: 22px; overflow: hidden;
  aspect-ratio: 16/9; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45);
}
.player video { width: 100%; height: 100%; display: block; background: #000; }

/* fullscreen of the whole player (video + questions), see learn.js */
.player-fs {
  position: absolute; top: 12px; right: 12px; z-index: 7; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff; transition: background .2s var(--ease);
}
.player-fs:hover { background: rgba(0,0,0,.8); }
.player-fs:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 2px; }
.player-fs .fs-off, .player.is-fullscreen .player-fs .fs-on { display: none; }
.player.is-fullscreen .player-fs .fs-off { display: inline; }
.player.is-fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; margin: 0; }
.player.is-fullscreen video { object-fit: contain; }
.player.is-fullscreen .qov { position: absolute; align-items: center; }
.player-poster { position: absolute; inset: 0; background: #111 center/cover no-repeat; }

.player-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center; color: #fff; background: rgba(0,0,0,.62);
}
.player-msg h2 { font-size: 24px; margin: 0; color: #fff; }
.player-msg p { color: #eee; margin: 0; max-width: 520px; }
.player-msg .store-badge img { height: 44px; }
.player-msg .row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-outline { color: #111; border-color: #111; background: transparent; }
.btn-outline:hover { background: #111; color: #fff; transform: translateY(-2px); }

/* quiz interruption — covers the paused video */
.qov {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10,10,10,.72); backdrop-filter: blur(3px);
  overflow-y: auto;
}
.qov-card { background: #fff; border-radius: 22px; padding: 26px 28px; width: min(640px, 100%); max-height: 100%; overflow-y: auto; }
.qov-tag { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--purple-ink); }
.qov-card h3 { font-size: 21px; color: #111; margin: 6px 0 16px; }
.qov-feedback { margin: 14px 0 0; font-weight: 700; }
.qov-feedback.good { color: var(--good); }
.qov-feedback.bad { color: var(--bad); }
.qov-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.qov-actions[hidden] { display: none; } /* shown only after answering (display:flex would override [hidden]) */

/* short screens, e.g. a phone on its side in fullscreen: keep the whole question card visible */
@media (max-height: 500px) {
  .qov { padding: 10px; }
  .qov-card { padding: 14px 18px; border-radius: 16px; }
  .qov-card h3 { font-size: 16px; margin: 4px 0 10px; }
  .qov-card .options { gap: 6px; }
  .qov-card .option { padding: 8px 12px; font-size: 14.5px; }
  .qov-card .option .key { width: 24px; height: 24px; }
  .qov-feedback { margin-top: 8px; }
  .qov-actions { margin-top: 10px; }
}

/* quick question — floats over the playing video */
.qq {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 4;
  background: rgba(255,255,255,.96); border-radius: 18px; padding: 14px 18px; width: min(520px, calc(100% - 32px));
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.55);
  animation: qqIn .3s var(--ease);
}
.qq h4 { font-size: 16px; margin: 0 0 10px; color: #111; }
.qq .options { flex-direction: row; flex-wrap: wrap; }
.qq .option { flex: 1 1 140px; padding: 10px 14px; }
@keyframes qqIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

.toast {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 6;
  background: #fff; color: #111; font-weight: 700; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); pointer-events: none;
  animation: qqIn .25s var(--ease);
}
.toast.bad { background: var(--bad-soft); color: var(--bad); }
.celebrate { position: absolute; inset: 0; z-index: 6; pointer-events: none; display: flex; align-items: center; justify-content: center; font-size: 84px; animation: pop 1.1s var(--ease) forwards; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

.lesson-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.lesson-actions .hint { color: #555; font-size: .95rem; margin: 0; }

/* ---------- options (shared by QoV and quiz) ---------- */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 14px; border: 2px solid #e6e2da; background: #fff; color: #111;
  font-size: 16px; line-height: 1.4;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
}
.option:hover:not(:disabled) { border-color: var(--bg-yellow); }
.option:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 2px; }
.option .key {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cfc9bf;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: #555;
}
.option.selected { border-color: #111; background: #FFF8E1; }
.option.selected .key { background: #111; border-color: #111; color: #fff; }
.option.correct { border-color: var(--good); background: var(--good-soft); }
.option.correct .key { background: var(--good); border-color: var(--good); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option.wrong .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.option:disabled { cursor: default; }

/* ---------- quiz ---------- */
.quiz { background: #fff; border-radius: 28px; padding: 34px 40px 36px; box-shadow: var(--shadow-card); max-width: 820px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 500; color: #555; }
.quiz-progress { height: 8px; background: #f0ece4; border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.quiz-progress span { display: block; height: 100%; background: var(--bg-yellow); border-radius: 99px; transition: width .35s var(--ease); }
.quiz h2 { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 18px; }
.quiz-img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 16px; background: #f6f4f0; margin-bottom: 18px; }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.quiz-foot .btn:disabled { opacity: .45; pointer-events: none; }
.link-btn { font-weight: 500; color: #444; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #000; }

.explain { margin-top: 18px; border-radius: 16px; padding: 16px 18px; font-size: 15.5px; line-height: 1.6; }
.explain h4 { margin: 0 0 6px; font-size: 15px; }
.explain p { margin: 0 0 8px; color: inherit; }
.explain p:last-child { margin: 0; }
.explain.bad { background: var(--bad-soft); color: #5c1d1d; }
.explain.good { background: var(--good-soft); color: #134a2b; }
.explain + .explain { margin-top: 10px; }

/* ---------- result ---------- */
.result { text-align: center; }
.result-ring {
  --pct: 0; width: 160px; height: 160px; margin: 6px auto 18px; border-radius: 50%;
  background: conic-gradient(var(--ring, var(--bg-yellow)) calc(var(--pct) * 1%), #f0ece4 0);
  display: flex; align-items: center; justify-content: center;
}
.result-ring span {
  width: 124px; height: 124px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #111;
}
.result h2 { font-size: 30px; margin-bottom: 6px; }
.result p { font-size: 17px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- "get the app" modal (locked lessons) ---------- */
.app-modal {
  border: 0; border-radius: 28px; padding: 36px 40px 32px; width: min(620px, calc(100% - 32px));
  background: #fff; color: #111; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
}
html.modal-open { overflow: hidden; }
.app-modal { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.app-modal::backdrop { background: rgba(20,20,20,.55); backdrop-filter: blur(2px); }
.app-modal[open] { animation: modalIn .28s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.app-modal h2 { font-size: 28px; font-weight: 700; margin: 8px 0 10px; }
.app-modal p { font-size: 16.5px; color: #444; margin-bottom: 26px; }
.app-modal-close {
  position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  font-size: 26px; line-height: 1; color: #555; display: flex; align-items: center; justify-content: center;
}
.app-modal-close:hover { background: #f2f0ec; color: #111; }
.app-modal-close:focus-visible { outline: 3px solid var(--bg-yellow); }
.app-modal-get {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #FBF1DE; border-radius: 22px; padding: 22px 26px;
}
.app-modal-stores { display: flex; flex-direction: column; gap: 12px; }
.app-modal-stores .store-badge img { height: 52px; width: auto; }
.app-modal-qr { margin: 0; text-align: center; }
.app-modal-qr img { width: 140px; height: 140px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid #e6dcc6; }
.app-modal-qr figcaption { font-size: .82rem; color: #555; margin-top: 8px; font-weight: 500; }

/* ---------- generated pages: breadcrumbs, states, facts, practice questions ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; color: #666; margin-bottom: 18px; }
.crumbs a { color: #444; font-weight: 500; }
.crumbs a:hover { color: #000; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: #777; }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.state-card {
  background: #fff; border-radius: 24px; padding: 26px 26px 22px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.state-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(0,0,0,.25); }
.state-card h2 { font-size: 26px; font-weight: 700; margin: 0; color: #111; }
.state-card p { margin: 0 0 6px; color: #555; }
.state-card.is-mine { outline: 3px solid var(--bg-yellow); }
.state-card.is-mine::after {
  content: "Your state"; position: absolute; top: 18px; right: 18px; font-size: .75rem; font-weight: 700;
  background: var(--bg-yellow); padding: 3px 10px; border-radius: 999px;
}

.state-switch { margin: -14px 0 26px; color: #555; font-size: .95rem; }
.state-switch a { font-weight: 500; color: #222; text-decoration: underline; text-underline-offset: 3px; }

.test-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px;
}
.test-facts div { background: #fff; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; }
.test-facts strong { font-size: 26px; font-weight: 700; color: #111; line-height: 1.2; }
.test-facts span { font-size: .9rem; color: #555; }

.practice { margin-top: 56px; }
.practice > h2, .more-lessons h2 { font-size: 28px; font-weight: 700; color: #111; margin-bottom: 8px; }
.practice > p { color: #555; max-width: 760px; margin-bottom: 22px; }
.pq-list { display: flex; flex-direction: column; gap: 12px; }
.pq { background: #fff; border-radius: 18px; box-shadow: 0 8px 24px -16px rgba(0,0,0,.2); }
.pq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 20px;
}
.pq summary::-webkit-details-marker { display: none; }
.pq summary::after { content: "+"; margin-left: auto; font-size: 24px; font-weight: 500; color: #888; transition: transform .2s var(--ease); }
.pq[open] summary::after { transform: rotate(45deg); }
.pq summary:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 2px; border-radius: 18px; }
.pq summary h3 { font-size: 17px; font-weight: 700; margin: 0; color: #111; line-height: 1.4; }
.pq-n {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--purple-soft); color: var(--purple-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}
.pq-body { padding: 0 20px 18px 66px; }
.pq-img { max-width: 360px; width: 100%; border-radius: 12px; margin-bottom: 12px; background: #f6f4f0; }
.pq-options { margin: 0 0 10px; padding-left: 1.3em; color: #333; }
.pq-options li { margin-bottom: 4px; }
.pq-options li.correct { color: var(--good); font-weight: 700; }
.pq-tick { font-size: .8rem; background: var(--good-soft); padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.pq-answer { margin: 0 0 8px; color: #222; }
.pq-why { background: var(--good-soft); color: #134a2b; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.pq-why p { color: inherit; margin: 0 0 6px; }
.pq-why p:last-child { margin: 0; }

.more-lessons { margin-top: 48px; }
.more-lessons ul { display: flex; flex-wrap: wrap; gap: 10px; }
.more-lessons a {
  display: inline-block; background: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 500; color: #111;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.3); transition: background .2s var(--ease);
}
.more-lessons a:hover { background: var(--bg-yellow); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .learn-page { padding: 24px 0 60px; }
  .learn-page .container { padding-left: 16px; padding-right: 16px; }
  .lessons-head h1 { font-size: 30px; }
  .lessons-head p { font-size: 16px; }
  .state-picker, .state-picker select { width: 100%; }
  .lessons-unlock { padding: 26px 22px; border-radius: 22px; }
  .lessons-unlock h2 { font-size: 22px; }
  .lesson-title-row h1 { font-size: 26px; }
  .mode-toggle { width: 100%; }
  .mode-toggle button { flex: 1; padding: 9px 8px; font-size: .82rem; }
  .player { border-radius: 14px; margin: 0 -4px; }
  /* messages over the video must fit inside a 16:9 box on a phone */
  .player-msg { gap: 8px; padding: 12px; overflow-y: auto; }
  .player-msg h2 { font-size: 17px; }
  .player-msg p { font-size: 13.5px; line-height: 1.4; }
  .player-msg .btn { padding: 8px 18px; font-size: .92rem; }
  .player-msg .row { gap: 8px; }
  .player-msg .store-badge img { height: 32px; }
  /* On phones the question opens below the video instead of covering it */
  .qov { position: fixed; z-index: 120; align-items: flex-end; padding: 12px; }
  .qov-card { padding: 22px 18px; border-radius: 20px; max-height: 85vh; }
  .qq { bottom: 52px; padding: 10px 12px; }
  .qq .option { flex-basis: 100px; padding: 8px 10px; font-size: 14px; }
  .quiz { padding: 22px 18px 24px; border-radius: 22px; }
  .quiz h2 { font-size: 19px; }
  .option { font-size: 15px; padding: 12px 12px; }
  .quiz-foot { flex-direction: column-reverse; align-items: stretch; }
  .lesson-actions .btn { width: 100%; }
  .result-ring { width: 136px; height: 136px; }
  .result-ring span { width: 104px; height: 104px; font-size: 28px; }
  .result-actions .btn { width: 100%; }
  .test-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .test-facts strong { font-size: 22px; }
  .practice > h2, .more-lessons h2 { font-size: 22px; }
  .pq summary { padding: 14px 14px; gap: 10px; }
  .pq summary h3 { font-size: 15.5px; }
  .pq-body { padding: 0 14px 16px; }
  .app-modal { padding: 30px 20px 22px; border-radius: 22px; }
  .app-modal h2 { font-size: 22px; padding-right: 28px; }
  .app-modal p { font-size: 15px; margin-bottom: 18px; }
  .app-modal-get { flex-direction: column; padding: 18px; }
  .app-modal-stores { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .app-modal-stores .store-badge img { height: 44px; }
  /* On a phone the visitor is already on the device: the QR adds nothing */
  .app-modal-qr { display: none; }
}

/* =========================================================
   State test guide (<state>/) and free practice test (<state>/practice-test/)
   ========================================================= */
.guide-head { max-width: 860px; margin-bottom: 40px; }
.guide-head h1 { font-size: 40px; font-weight: 700; color: var(--ink, #111); margin: 6px 0 14px; line-height: 1.15; }
.guide-lede { font-size: 18px; color: #444; margin: 0 0 24px; }
.guide-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.guide-section { margin-top: 48px; }
.guide-section > h2, .practice-about h2 { font-size: 28px; font-weight: 700; color: #111; margin-bottom: 12px; }
.guide-section > p { color: #444; max-width: 780px; }
.guide-note { font-size: .95rem; color: #666; margin-top: 16px; }

.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.format-card { background: #fff; border-radius: 24px; padding: 22px 24px; box-shadow: var(--shadow-card); }
.format-label {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--purple-soft); color: var(--purple-ink);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
}
.format-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.format-nums div { display: flex; flex-direction: column; }
.format-nums strong { font-size: 34px; font-weight: 700; color: #111; line-height: 1.1; }
.format-nums span { font-size: .9rem; color: #555; }
.format-rule { margin: 14px 0 0; padding-top: 12px; border-top: 2px solid var(--bg-yellow); font-weight: 500; color: #222; }

.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.req-card { background: #fff; border-radius: 24px; padding: 22px 26px; box-shadow: var(--shadow-card); }
.req-card h3 { font-size: 20px; font-weight: 700; color: #111; margin-bottom: 10px; }
.req-card ul, .guide-list { list-style: disc; padding-left: 1.2em; margin: 0; color: #333; }
.req-card li, .guide-list li { margin-bottom: 8px; line-height: 1.55; }
.guide-list { max-width: 820px; }

.guide-lessons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.guide-lessons a {
  display: inline-block; background: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 500; color: #111;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.3); transition: background .2s var(--ease);
}
.guide-lessons a:hover { background: var(--bg-yellow); }

.guide-ready {
  margin-top: 56px; background: var(--bg-yellow); border-radius: 28px; padding: 32px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.guide-ready h2 { font-size: 28px; font-weight: 700; color: #111; margin: 0 0 6px; }
.guide-ready p { margin: 0; color: #2c2c2c; max-width: 620px; }
.guide-ready .btn-primary { background: #111; color: #fff; box-shadow: none; }
.guide-ready .btn-primary:hover { background: #000; }

.guide-sources p { font-size: .95rem; }
.guide-sources ul { list-style: disc; padding-left: 1.2em; margin: 0; }
.guide-sources li { margin-bottom: 6px; }
.guide-sources a { color: #222; text-decoration: underline; text-underline-offset: 3px; }

/* links from a state's lessons page to its guide and practice test */
.guide-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: -14px 0 28px; }
.guide-links a { font-weight: 700; color: #111; border-bottom: 2px solid var(--bg-yellow); }
.guide-links a::after { content: " →"; }

/* practice test */
.practice-start { text-align: center; }
.practice-start h2 { margin-bottom: 14px; }
.practice-real { max-width: 560px; margin: 0 auto 24px; color: #444; }
.age-choice { display: inline-flex; background: #f3f0ea; border-radius: 999px; padding: 4px; margin: 0 0 18px; }
.age-choice button { padding: 10px 18px; border-radius: 999px; font-weight: 500; color: #444; }
.age-choice button[aria-checked="true"] { background: var(--bg-yellow); color: #111; font-weight: 700; }
.age-choice button:focus-visible { outline: 3px solid var(--bg-yellow); outline-offset: 2px; }
.practice-get { display: flex; justify-content: center; margin: 18px 0 4px; }
.practice-review { text-align: left; margin-top: 32px; border-top: 2px solid #f0ece4; padding-top: 22px; }
.practice-review h3 { font-size: 20px; margin-bottom: 12px; }
.practice-review ul { display: flex; flex-direction: column; gap: 14px; }
.practice-review li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #faf8f4; border-radius: 14px; }
.practice-review span { color: var(--good); font-weight: 500; }
.practice-review a { font-weight: 700; color: #111; text-decoration: underline; text-underline-offset: 3px; }
.practice-about { margin-top: 48px; max-width: 820px; }
.practice-about p { color: #444; }
.practice-about a { font-weight: 700; color: #111; border-bottom: 2px solid var(--bg-yellow); }

@media (max-width: 760px) {
  .guide-head h1 { font-size: 28px; }
  .guide-lede { font-size: 16px; }
  .guide-cta .btn { width: 100%; }
  .guide-section > h2, .practice-about h2, .guide-ready h2 { font-size: 22px; }
  .format-nums strong { font-size: 28px; }
  .req-grid { grid-template-columns: 1fr; }
  .guide-ready { padding: 24px 22px; border-radius: 22px; }
  .guide-ready .btn { width: 100%; }
  .age-choice { display: flex; }
  .age-choice button { flex: 1; padding: 10px 8px; font-size: .92rem; }
}
.practice-review .review-img { width: 120px; max-height: 90px; object-fit: contain; border-radius: 8px; background: #fff; margin-bottom: 4px; }
.guide-updated { font-size: .92rem; color: #666; margin: -6px 0 14px; }
.guide-updated time { font-weight: 700; color: #222; }
.not-found { max-width: 720px; padding: 40px 0 20px; }
.not-found h1 { font-size: 40px; font-weight: 700; color: #111; margin: 6px 0 12px; }
.not-found p { font-size: 18px; color: #444; margin-bottom: 24px; }
.not-found .guide-lessons { margin-top: 28px; }
@media (max-width: 760px) { .not-found h1 { font-size: 28px; } .not-found .btn { width: 100%; } }
