:root {
  --navy: #11223a;
  --navy-2: #1b3556;
  --yellow: #f6b21a;
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #26364a;
  --muted: #65738a;
  --line: #e5e9ef;
  --soft-yellow: #fff3cf;
  --soft-blue: #eef5ff;
  --shadow: 0 18px 45px rgba(17, 34, 58, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.skip-link { position:absolute; left:-999px; top:10px; z-index:20; background:var(--navy); color:#fff; padding:10px 14px; border-radius:10px; }
.skip-link:focus { left:10px; }
.container { width:min(1160px, calc(100% - 36px)); margin-inline:auto; }
.section { padding:82px 0; }
.section-soft { background: #f5f8fc; }
.eyebrow { color: #926301; font-weight: 800; letter-spacing:.08em; text-transform:uppercase; font-size:.78rem; }
.section-heading { max-width: 700px; margin:0 auto 34px; text-align:center; }
.section-heading h2 { color:var(--navy); margin:8px 0 10px; font-size:clamp(1.85rem, 4vw, 2.7rem); line-height:1.08; }
.section-heading p { margin:0; color:var(--muted); }

.site-header { background:rgba(255,255,255,.93); backdrop-filter: blur(12px); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.header-wrap { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand { display:flex; align-items:center; text-decoration:none; min-width:208px; }
.brand img { width:205px; height:auto; display:block; }
.site-nav { display:flex; align-items:center; gap:8px; }
.site-nav a { text-decoration:none; font-weight:750; color:var(--navy); padding:10px 12px; border-radius:9px; }
.site-nav a:hover, .site-nav a:focus-visible { background:var(--soft-yellow); outline:none; }
.menu-toggle { display:none; background:none; border:0; color:var(--navy); font-size:1.55rem; }

.button { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:15px 20px; border-radius:12px; border:2px solid transparent; text-decoration:none; font-weight:850; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); box-shadow:0 10px 21px rgba(17,34,58,.14); }
.button-primary { background:var(--yellow); color:var(--navy); }
.button-primary:hover { background:#ffc640; }
.button-secondary { border-color:var(--navy); background:#fff; color:var(--navy); }
.button-dark { background:var(--navy); color:#fff; }

.hero { overflow:hidden; position:relative; padding:74px 0 62px; background:linear-gradient(120deg, #fff 0%, #fff8e8 52%, #eef5ff 100%); }
.hero::before { content:""; width:500px; height:500px; right:-185px; top:-210px; position:absolute; border-radius:50%; background:var(--yellow); opacity:.22; }
.hero-grid { display:grid; grid-template-columns: 1.08fr .92fr; gap:60px; align-items:center; position:relative; }
.hero h1 { color:var(--navy); margin:10px 0 18px; letter-spacing:-.045em; font-size:clamp(2.7rem, 6vw, 5rem); line-height:.99; }
.highlight { color:#bc7b00; position:relative; white-space:nowrap; }
.hero p { max-width:600px; color:#526276; font-size:1.12rem; margin:0 0 26px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:13px; }
.hero-notes { display:flex; flex-wrap:wrap; gap:19px; margin-top:25px; color:var(--navy); font-weight:750; font-size:.92rem; }
.hero-notes span::before { content:"✓"; display:inline-grid; place-items:center; width:20px; height:20px; background:var(--soft-yellow); color:#745000; border-radius:50%; margin-right:7px; }
.hero-art { min-height:380px; position:relative; border-radius:34px; background:var(--navy); box-shadow:var(--shadow); overflow:hidden; }
.hero-art::before { content:""; position:absolute; inset:28px; border:1px solid rgba(255,255,255,.2); border-radius:26px; }
.hero-art .formula { color:#fff; font-family:Georgia, serif; font-size:clamp(2rem, 4vw, 3.8rem); font-style:italic; position:absolute; }
.hero-art .formula.one { left:42px; top:52px; transform:rotate(-7deg); }
.hero-art .formula.two { right:42px; bottom:48px; transform:rotate(7deg); color:var(--yellow); }
.hero-art .orbit { position:absolute; width:230px; aspect-ratio:1; border:2px solid rgba(255,255,255,.62); border-radius:50%; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-21deg); }
.hero-art .orbit::after, .hero-art .orbit::before { content:""; position:absolute; inset:36px -35px; border:2px solid rgba(255,255,255,.5); border-radius:50%; transform:rotate(68deg); }
.hero-art .orbit::after { transform:rotate(125deg); }
.hero-art .dot { position:absolute; width:17px; height:17px; border-radius:50%; background:var(--yellow); top:48%; left:70%; box-shadow:0 0 0 7px rgba(246,178,26,.17); }
.hero-art .book-shape { position:absolute; left:50%; bottom:46px; width:210px; height:65px; transform:translateX(-50%); }
.book-shape::before, .book-shape::after { content:""; position:absolute; bottom:0; width:51%; height:100%; background:#fff; border-radius:5px 5px 22px 5px; transform:skewY(12deg); }
.book-shape::before { left:0; transform:skewY(-12deg); border-radius:5px 5px 5px 22px; }
.book-shape::after { right:0; }

.choice-grid, .value-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:22px; }
.choice-card, .info-card, .price-card, .topic-panel, .contact-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 25px rgba(17,34,58,.06); }
.choice-card { padding:32px; min-height:255px; position:relative; overflow:hidden; }
.choice-card::after { content:""; position:absolute; width:125px; height:125px; border-radius:50%; right:-38px; bottom:-42px; background:var(--soft-yellow); }
.choice-card:nth-child(2)::after { background:var(--soft-blue); }
.card-icon { width:50px; height:50px; display:grid; place-items:center; border-radius:15px; background:var(--soft-yellow); color:var(--navy); font-size:1.65rem; }
.choice-card:nth-child(2) .card-icon { background:var(--soft-blue); }
.choice-card h2 { margin:18px 0 9px; color:var(--navy); font-size:1.55rem; }
.choice-card p { margin:0 0 20px; color:var(--muted); max-width:430px; position:relative; z-index:1; }

.value-grid { grid-template-columns:repeat(3, minmax(0,1fr)); }
.info-card { padding:25px; }
.info-card h3 { color:var(--navy); margin:10px 0 7px; }
.info-card p { margin:0; color:var(--muted); }
.info-mark { color:#aa7000; font-weight:850; }

.ad-placeholder { min-height:112px; max-width:970px; margin:44px auto; border:1px dashed #bdc9d8; display:grid; place-items:center; color:#6b7b90; border-radius:13px; background:rgba(255,255,255,.55); font-size:.78rem; text-transform:uppercase; letter-spacing:.12em; }
.ad-placeholder span { padding:6px 10px; border:1px solid #d7e0ea; border-radius:99px; background:#fff; }

.page-hero { padding:60px 0 42px; background:linear-gradient(120deg,#fff8e8,#fff); border-bottom:1px solid var(--line); }
.page-hero h1 { color:var(--navy); font-size:clamp(2.35rem, 5vw, 4.2rem); line-height:1; margin:9px 0 14px; letter-spacing:-.04em; }
.page-hero p { max-width:680px; margin:0; color:var(--muted); font-size:1.05rem; }

.booking-grid { display:grid; grid-template-columns:.95fr 1.05fr; gap:28px; align-items:start; }
.contact-card, .topic-panel { padding:30px; }
.contact-card h2, .topic-panel h2 { color:var(--navy); margin:0 0 12px; }
.contact-card p { margin:0 0 20px; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:15px; }
.field { display:grid; gap:7px; }
.field.full { grid-column:1/-1; }
.field label { color:var(--navy); font-weight:800; font-size:.9rem; }
.field input, .field select, .field textarea { width:100%; border:1px solid #cbd5e1; border-radius:10px; padding:12px 13px; color:var(--ink); background:#fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline:3px solid rgba(246,178,26,.32); border-color:#d89700; }
.field textarea { min-height:130px; resize:vertical; }
.form-note { font-size:.85rem; color:var(--muted); margin-top:11px; }
.social-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:19px; }
.social-button { display:inline-flex; align-items:center; gap:8px; text-decoration:none; padding:10px 12px; border-radius:10px; font-weight:800; background:var(--soft-blue); color:var(--navy); }
.social-button:hover { background:#deecff; }
.social-icon { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:var(--navy); color:#fff; font-size:.75rem; }

.price-layout { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.price-card { padding:26px; }
.price-card.featured { border:2px solid var(--yellow); transform:translateY(-7px); }
.price-label { display:inline-block; padding:6px 9px; background:var(--soft-yellow); color:#855900; border-radius:99px; font-size:.75rem; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.price-card h3 { margin:15px 0 6px; color:var(--navy); font-size:1.4rem; }
.price { color:var(--navy); font-size:2rem; font-weight:900; letter-spacing:-.04em; margin:0; }
.price span { font-size:.95rem; font-weight:700; letter-spacing:0; color:var(--muted); }
.price-card ul { margin:18px 0 0; padding:0; list-style:none; color:var(--muted); }
.price-card li { margin:9px 0; padding-left:23px; position:relative; }
.price-card li::before { content:"✓"; position:absolute; left:0; color:#ae7600; font-weight:900; }
.travel-note { margin-top:25px; border-left:5px solid var(--yellow); border-radius:0 13px 13px 0; padding:18px 19px; background:var(--soft-yellow); color:#624a10; }
.travel-note strong { color:var(--navy); }

.tabs { display:flex; flex-wrap:wrap; gap:10px; }
.tab-button, .topic-tab, .level-button { border:1px solid #cdd7e2; background:#fff; color:var(--navy); border-radius:10px; padding:10px 13px; font-weight:820; }
.tab-button:hover, .topic-tab:hover, .level-button:hover { border-color:var(--navy); }
.tab-button.is-active { background:var(--navy); color:#fff; border-color:var(--navy); }
.topic-tab.is-active { background:var(--soft-yellow); border-color:var(--yellow); }
.practice-grid { display:grid; grid-template-columns:.34fr .66fr; gap:24px; align-items:start; }
.practice-sidebar { position:sticky; top:98px; }
.add-topic-box { margin-top:24px; border:1px dashed #b7c4d4; background:#fff; border-radius:14px; padding:18px; color:var(--muted); font-size:.92rem; }
.add-topic-box code { display:block; margin-top:10px; padding:9px; background:#f3f6fa; border-radius:8px; color:var(--navy); overflow:auto; }
.topic-panel { min-height:590px; }
.topic-panel h2 { font-size:1.75rem; }
.topic-panel > p { color:var(--muted); margin-top:0; }
.level-wrap { margin:22px 0 14px; }
.level-wrap h3 { color:var(--navy); font-size:1rem; margin:0 0 9px; }
#difficulty-buttons { display:flex; flex-wrap:wrap; gap:10px; }
.level-button { background:var(--soft-blue); }
.level-button:hover { background:#dfeeff; }
.viewer-meta { font-size:.86rem; color:var(--muted); margin:12px 0; }
.pdf-viewer { width:100%; height:650px; border:1px solid #cdd7e2; border-radius:12px; background:#f2f5f8; }
.viewer-notice { min-height:420px; border:1px dashed #b8c4d3; border-radius:12px; display:grid; align-content:center; justify-items:center; text-align:center; padding:35px; background:#fbfcfe; }
.viewer-notice .notice-mark { font-size:3rem; }
.viewer-notice p { max-width:500px; }

.site-footer { padding:45px 0 25px; background:var(--navy); color:#e9eef7; }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:34px; }
.footer-logo { width:230px; filter:brightness(0) invert(1); opacity:.96; }
.site-footer h3 { margin:0 0 13px; font-size:1rem; color:#fff; }
.site-footer p, .site-footer a { color:#c5d0df; font-size:.92rem; }
.site-footer a { text-decoration:none; }
.site-footer a:hover { color:#fff; }
.footer-links { display:grid; gap:7px; }
.copyright { border-top:1px solid rgba(255,255,255,.16); margin-top:28px; padding-top:20px; color:#aebdd0; font-size:.85rem; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }

.cookie-banner { position:fixed; left:18px; right:18px; bottom:18px; z-index:30; max-width:760px; margin:auto; padding:17px; display:flex; justify-content:space-between; gap:20px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow); }
.cookie-banner p { margin:0; color:var(--muted); font-size:.9rem; }
.cookie-banner a { color:var(--navy); font-weight:800; }

.legal-copy { max-width:820px; margin:auto; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:36px; }
.legal-copy h2 { color:var(--navy); margin-top:28px; }
.legal-copy p, .legal-copy li { color:var(--muted); }

@media (max-width: 850px) {
  .hero-grid, .booking-grid, .practice-grid { grid-template-columns:1fr; }
  .hero-art { min-height:320px; }
  .value-grid { grid-template-columns:1fr; }
  .practice-sidebar { position:static; }
  .pdf-viewer { height:520px; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .header-wrap { min-height:68px; }
  .brand { min-width:165px; }
  .brand img { width:165px; }
  .menu-toggle { display:block; }
  .site-nav { display:none; position:absolute; top:68px; left:0; right:0; padding:13px 18px 18px; background:#fff; border-bottom:1px solid var(--line); box-shadow:0 9px 18px rgba(17,34,58,.08); flex-direction:column; align-items:stretch; }
  .site-nav.is-open { display:flex; }
  .site-nav a { padding:12px; }
  .hero { padding:56px 0 48px; }
  .hero-grid { gap:31px; }
  .choice-grid, .price-layout { grid-template-columns:1fr; }
  .choice-card { min-height:auto; }
  .price-card.featured { transform:none; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .section { padding:59px 0; }
  .footer-grid { grid-template-columns:1fr; gap:24px; }
  .cookie-banner { align-items:flex-start; flex-direction:column; }
  .pdf-viewer { height:440px; }
}

/* ──────────────────────────────────────────────────────────────
   Bold brand refresh + curriculum → subject → topic practice flow
   ────────────────────────────────────────────────────────────── */
:root {
  --navy: #081f45;
  --navy-2: #0e3d82;
  --yellow: #ffbd17;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --ink: #17243a;
  --muted: #53637a;
  --line: #d9e0ea;
  --soft-yellow: #fff1bc;
  --soft-blue: #e7f0ff;
  --shadow: 0 19px 40px rgba(8,31,69,.14);
}

body { background:var(--cream); }
.site-header { background:#fffdf8; border-bottom:3px solid var(--navy); }
.site-nav a:hover, .site-nav a:focus-visible { background:var(--yellow); color:var(--navy); }
.button { border-radius:9px; box-shadow:none; }
.button-primary { background:var(--yellow); color:var(--navy); border-color:var(--yellow); }
.button-primary:hover { background:#ffd24b; }
.button-secondary { background:#fffdf8; color:var(--navy); border-color:var(--navy); }
.button-secondary:hover { background:var(--navy); color:#fff; }
.button-dark { background:var(--navy); color:#fff; }
.button-dark:hover { background:var(--navy-2); }

.hero { background:var(--navy); }
.hero::before { background:var(--yellow); opacity:1; width:250px; height:250px; right:-70px; top:-110px; }
.hero h1, .hero p, .hero-notes { color:#fff; }
.hero .highlight { color:var(--yellow); }
.hero p { color:#d5e1f3; }
.hero-notes span::before { background:var(--yellow); color:var(--navy); }
.hero-art { background:#fffdf8; box-shadow:14px 14px 0 rgba(255,189,23,.95); }
.hero-art::before { border-color:rgba(8,31,69,.22); }
.hero-art .formula { color:var(--navy); }
.hero-art .formula.two { color:#d98b00; }
.hero-art .orbit, .hero-art .orbit::after, .hero-art .orbit::before { border-color:rgba(8,31,69,.58); }
.hero-art .dot { background:var(--yellow); box-shadow:0 0 0 7px rgba(255,189,23,.28); }
.book-shape::before, .book-shape::after { background:var(--yellow); }

.section-soft { background:var(--navy); }
.section-soft .section-heading h2, .section-soft .section-heading p { color:#fff; }
.section-soft .eyebrow { color:var(--yellow); }
.choice-card, .info-card, .price-card, .topic-panel, .contact-card, .sidebar-card, .subject-screen { border:2px solid var(--navy); box-shadow:8px 8px 0 rgba(8,31,69,.10); border-radius:15px; }
.choice-card::after { background:var(--yellow); opacity:1; }
.choice-card:nth-child(2)::after { background:#7fd9ff; }
.card-icon { background:var(--yellow); border:2px solid var(--navy); }
.choice-card:nth-child(2) .card-icon { background:#7fd9ff; }
.info-card { background:#fffdf8; }
.info-mark { color:#c17d00; }
.ad-placeholder { border:2px dashed var(--navy); background:#fffdf8; color:var(--navy); }
.ad-placeholder span { border-color:var(--navy); background:var(--yellow); font-weight:900; }

.page-hero { background:var(--yellow); border-bottom:4px solid var(--navy); }
.page-hero .eyebrow { color:var(--navy); }
.page-hero h1 { color:var(--navy); }
.page-hero h1 span { color:#0e3d82; }
.page-hero p { color:#263a58; font-weight:600; }
.practice-page-hero { position:relative; overflow:hidden; }
.practice-page-hero::after { content:""; width:220px; height:220px; position:absolute; right:-70px; bottom:-100px; border:23px solid var(--navy); border-radius:50%; opacity:.9; }
.practice-steps { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; position:relative; z-index:1; }
.practice-steps span { background:var(--navy); color:#fff; border-radius:99px; padding:7px 11px; font-size:.8rem; font-weight:850; }

.practice-grid { grid-template-columns:280px minmax(0, 1fr); gap:28px; }
.sidebar-card { background:var(--navy); color:#fff; padding:23px; }
.sidebar-card h2 { margin:4px 0 17px; color:#fff; font-size:1.25rem; }
.sidebar-step, .stage-kicker { color:var(--yellow); font-weight:900; font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; }
.stage-kicker { color:#a56a00; margin-bottom:5px; }
.stage-kicker.compact { font-size:.7rem; margin-bottom:3px; }
.practice-sidebar .tabs { display:grid; gap:8px; }
.tab-button, .topic-tab, .level-button { border:2px solid var(--navy); background:#fffdf8; color:var(--navy); border-radius:8px; padding:11px 13px; font-weight:850; }
.tab-button:hover, .topic-tab:hover, .level-button:hover { border-color:var(--yellow); background:var(--yellow); }
.tab-button.is-active { background:var(--yellow); color:var(--navy); border-color:var(--yellow); }
.topic-tab.is-active { background:var(--navy); color:#fff; border-color:var(--navy); }
.add-topic-box { border:2px dashed var(--navy); background:#fffdf8; border-radius:13px; color:var(--ink); }
.add-topic-box strong { color:var(--navy); }
.add-topic-box code { background:var(--soft-blue); color:var(--navy); }

.practice-stage { min-width:0; }
.subject-screen { background:#fffdf8; padding:30px; min-height:575px; }
.subject-screen h2 { color:var(--navy); margin:4px 0 8px; font-size:clamp(1.8rem,4vw,2.6rem); }
.subject-screen > p { color:var(--muted); margin:0 0 24px; max-width:660px; }
.subject-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.subject-card { text-align:left; border:2px solid var(--navy); border-radius:12px; background:#fff; min-height:180px; padding:19px; color:var(--navy); display:flex; flex-direction:column; align-items:flex-start; transition:transform .18s ease, box-shadow .18s ease, background .18s ease; }
.subject-card:hover, .subject-card:focus-visible { transform:translate(-3px,-3px); background:var(--yellow); box-shadow:6px 6px 0 var(--navy); outline:none; }
.subject-number { font-weight:900; color:#c17d00; font-size:.8rem; letter-spacing:.08em; }
.subject-card strong { font-size:1.38rem; margin:14px 0 6px; }
.subject-card-copy { font-size:.92rem; line-height:1.45; color:var(--muted); }
.subject-card:hover .subject-card-copy, .subject-card:focus-visible .subject-card-copy { color:var(--navy); }
.subject-arrow { margin-top:auto; padding-top:14px; font-size:.9rem; font-weight:900; }
.topic-panel { background:#fffdf8; padding:30px; min-height:590px; }
.back-button { border:0; background:transparent; padding:0; margin-bottom:22px; color:var(--navy); font-weight:900; text-decoration:underline; text-underline-offset:4px; }
.back-button:hover { color:#b87500; }
.level-wrap { border-top:2px solid var(--line); border-bottom:2px solid var(--line); padding:18px 0; display:flex; gap:18px; justify-content:space-between; align-items:center; flex-wrap:wrap; }
.level-button { background:var(--soft-blue); }
.level-button:hover { background:var(--yellow); }
.pdf-viewer { border:2px solid var(--navy); border-radius:10px; background:#f2f5f8; }
.viewer-notice { border:2px dashed var(--navy); background:#fff8df; }
.viewer-notice .notice-mark { color:var(--navy); }

.price-card.featured { border-color:var(--yellow); box-shadow:8px 8px 0 rgba(255,189,23,.52); }
.price-label { background:var(--yellow); color:var(--navy); }
.travel-note { border-left-color:var(--navy); background:var(--yellow); color:var(--navy); }
.social-button { background:var(--navy); color:#fff; }
.social-button:hover { background:var(--yellow); color:var(--navy); }
.social-icon { background:var(--yellow); color:var(--navy); }

.site-footer { background:var(--navy); border-top:5px solid var(--yellow); }
.footer-logo { filter:none; opacity:1; background:#fffdf8; border-radius:9px; padding:7px; }

@media (max-width:850px) {
  .practice-grid { grid-template-columns:1fr; }
  .subject-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .practice-sidebar .tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:700px) {
  .subject-card-grid, .practice-sidebar .tabs { grid-template-columns:1fr; }
  .hero-art { box-shadow:8px 8px 0 rgba(255,189,23,.95); }
  .subject-screen, .topic-panel { padding:22px; }
}

/* ─────────────── Reader and reliability refinements ─────────────── */
/* Prevent an author display rule from overriding the browser's [hidden] rule. */
.cookie-banner[hidden] { display:none !important; }

/* The wider SVG viewBox and these dimensions keep every word of the logo visible. */
.header-wrap { min-height:82px; }
.brand { min-width:230px; }
.brand img { width:220px; height:62px; object-fit:contain; object-position:left center; }
.footer-logo { width:260px; height:85px; object-fit:contain; object-position:left center; }

/* Large reading surface plus a compact, side-mounted difficulty rail. */
.difficulty-hint { margin:5px 0 0; max-width:610px; color:var(--muted); font-size:.9rem; }
.level-wrap { margin:22px 0 12px; }
.reader-layout { display:grid; grid-template-columns:120px minmax(0, 1fr); gap:14px; align-items:stretch; }
.difficulty-rail { align-self:stretch; background:var(--navy); border:2px solid var(--navy); border-radius:10px; padding:11px 9px; display:flex; flex-direction:column; gap:10px; }
.rail-label { color:var(--yellow); text-transform:uppercase; letter-spacing:.08em; font-size:.69rem; font-weight:900; padding:0 3px; }
#difficulty-buttons { display:grid; grid-template-columns:1fr; gap:8px; }
.level-button { width:100%; min-height:58px; padding:8px 7px; font-size:.76rem; line-height:1.2; white-space:pre-line; text-align:center; }
.level-button.is-active { background:var(--yellow); color:var(--navy); border-color:var(--yellow); box-shadow:inset 0 0 0 1px var(--navy); }
.pdf-stage { min-width:0; }
.pdf-viewer { display:block; width:100%; height:clamp(720px, 82vh, 1060px); min-height:720px; border:2px solid var(--navy); border-radius:10px; background:#f2f5f8; }
.viewer-notice { min-height:clamp(720px, 82vh, 1060px); }

@media (max-width:850px) {
  .header-wrap { min-height:76px; }
  .reader-layout { grid-template-columns:104px minmax(0, 1fr); gap:11px; }
  .difficulty-rail { padding:9px 7px; }
  .level-button { min-height:52px; font-size:.72rem; }
  .pdf-viewer { height:clamp(650px, 78vh, 900px); min-height:650px; }
  .viewer-notice { min-height:650px; }
}

@media (max-width:700px) {
  .header-wrap { min-height:68px; }
  .brand { min-width:168px; }
  .brand img { width:168px; height:52px; }
  .reader-layout { grid-template-columns:1fr; }
  .difficulty-rail { display:block; }
  .rail-label { display:block; margin-bottom:8px; }
  #difficulty-buttons { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .level-button { min-height:46px; font-size:.72rem; }
  .pdf-viewer { height:74vh; min-height:560px; }
  .viewer-notice { min-height:560px; }
}

/* ─────────────── Controlled no-toolbar PDF reader ─────────────── */
/* The reader renders pages on a canvas, rather than exposing Chrome's native PDF toolbar. */
.practice-page-hero + .section .container.practice-grid { width:min(1540px, calc(100% - 32px)); }
.reader-layout { grid-template-columns:88px minmax(0, 1fr); gap:12px; }
.difficulty-rail { padding:9px 6px; gap:8px; border-radius:9px; }
.rail-label { font-size:.62rem; padding:0 2px; text-align:center; }
#difficulty-buttons { gap:7px; }
.level-button { min-height:48px; padding:6px 4px; font-size:.68rem; border-width:1px; }
.controlled-reader { min-width:0; border:2px solid var(--navy); border-radius:12px; overflow:hidden; background:#dfe7f1; box-shadow:8px 8px 0 rgba(8,31,69,.10); }
.reader-toolbar { min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 9px 7px 12px; color:#fff; background:var(--navy); }
.reader-status { min-width:0; display:flex; align-items:center; gap:8px; font-size:.74rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reader-dot { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:var(--yellow); box-shadow:0 0 0 3px rgba(255,189,23,.18); }
.reader-actions { display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.reader-icon-button { width:31px; height:31px; padding:0; display:grid; place-items:center; border:1px solid rgba(255,255,255,.36); border-radius:7px; color:#fff; background:transparent; font-weight:900; line-height:1; }
.reader-icon-button:hover:not(:disabled), .reader-icon-button:focus-visible:not(:disabled) { color:var(--navy); background:var(--yellow); border-color:var(--yellow); outline:none; }
.reader-icon-button:disabled { opacity:.42; cursor:not-allowed; }
.reader-page-counter { min-width:74px; padding-inline:3px; color:#f4f7fb; font-size:.72rem; font-weight:800; text-align:center; }
.pdf-reading-surface { position:relative; min-height:clamp(790px, 89vh, 1200px); height:calc(100vh - 158px); max-height:1200px; display:grid; place-items:center; overflow:auto; padding:13px; background:#cfd8e6; outline:none; }
.pdf-reading-surface:focus-visible { box-shadow:inset 0 0 0 4px var(--yellow); }
.pdf-canvas { display:block; max-width:100%; max-height:100%; background:#fff; box-shadow:0 8px 22px rgba(8,31,69,.24); }
.reader-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; color:#fff; background:rgba(8,31,69,.62); z-index:2; font-size:.9rem; font-weight:850; }
.reader-spinner { width:20px; height:20px; border:3px solid rgba(255,255,255,.38); border-top-color:var(--yellow); border-radius:50%; animation:eyw-spin .72s linear infinite; }
@keyframes eyw-spin { to { transform:rotate(360deg); } }
.reader-protection-note { margin:0; padding:7px 13px 8px; color:#46617e; background:#eaf0f7; font-size:.7rem; font-weight:750; }
.controlled-reader .viewer-notice { position:absolute; inset:46px 0 0; min-height:0; border:0; border-radius:0; z-index:3; }
.controlled-reader { position:relative; }
.controlled-reader:not(.has-notice) .viewer-notice { display:none; }
.controlled-reader.has-notice .pdf-reading-surface, .controlled-reader.has-notice .reader-protection-note { display:none; }

.controlled-reader:fullscreen { width:100vw; height:100vh; max-width:none; border-radius:0; border:0; background:#cfd8e6; }
.controlled-reader:fullscreen .reader-toolbar { min-height:52px; padding-inline:18px; }
.controlled-reader:fullscreen .pdf-reading-surface { height:calc(100vh - 78px); max-height:none; min-height:0; padding:18px; }
.controlled-reader:fullscreen .reader-protection-note { display:none; }

@media (max-width:850px) {
  .practice-page-hero + .section .container.practice-grid { width:min(100% - 28px, 1160px); }
  .reader-layout { grid-template-columns:78px minmax(0, 1fr); gap:9px; }
  .difficulty-rail { padding:8px 5px; }
  .level-button { min-height:45px; font-size:.64rem; }
  .pdf-reading-surface { min-height:740px; height:82vh; }
}

@media (max-width:700px) {
  .reader-layout { grid-template-columns:1fr; }
  .difficulty-rail { display:block; }
  .rail-label { display:block; margin-bottom:7px; text-align:left; }
  #difficulty-buttons { grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .level-button { min-height:40px; font-size:.64rem; }
  .reader-toolbar { padding-left:9px; gap:7px; }
  .reader-status { max-width:36vw; font-size:.66rem; }
  .reader-page-counter { display:none; }
  .pdf-reading-surface { height:76vh; min-height:590px; padding:9px; }
}


/* ──────────────────────────────────────────────────────────────
   Version 7: image-page practice reader (works from file://)
   ────────────────────────────────────────────────────────────── */
.practice-section { padding-top: 64px; }
.reader-intro { border-top:2px solid var(--line); border-bottom:2px solid var(--line); padding:18px 0; display:flex; justify-content:space-between; align-items:flex-end; gap:18px; margin-top:21px; }
.reader-intro h3 { color:var(--navy); margin:3px 0 4px; font-size:1.15rem; }
.reader-intro p { margin:0; color:var(--muted); }
.reader-meta { text-align:right; max-width:460px; font-size:.82rem; font-weight:700; }
.image-reader-layout { align-items:stretch; margin-top:19px; }
.image-reader { position:relative; min-width:0; border:3px solid var(--navy); border-radius:12px; overflow:hidden; background:#d5deeb; box-shadow:8px 8px 0 rgba(8,31,69,.12); }
.image-reader-toolbar { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; background:var(--navy); color:#fff; }
.image-reading-surface { position:relative; min-height:clamp(720px, 80vh, 1200px); height:calc(100vh - 150px); max-height:1200px; display:flex; align-items:center; justify-content:center; overflow:auto; padding:14px; background:#c7d2e0; outline:none; user-select:none; -webkit-user-select:none; }
.image-reading-surface:focus-visible { box-shadow:inset 0 0 0 4px var(--yellow); }
.practice-page-image { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100vh - 190px); background:#fff; box-shadow:0 10px 25px rgba(8,31,69,.29); -webkit-user-drag:none; user-select:none; }
.image-reader .reader-protection-note { margin:0; padding:7px 13px 8px; color:#314b69; background:#edf3fa; font-size:.7rem; font-weight:750; }
.image-viewer-notice { position:absolute; inset:48px 0 0; display:grid; place-content:center; gap:8px; padding:36px; background:#fff8df; color:var(--navy); text-align:center; z-index:3; }
.image-viewer-notice[hidden] { display:none; }
.image-viewer-notice h3 { margin:0; font-size:1.38rem; }
.image-viewer-notice p { max-width:530px; margin:0; color:var(--ink); }
.image-viewer-notice strong { color:var(--navy); }
.image-viewer-notice .notice-mark { width:44px; height:44px; margin:0 auto 4px; display:grid; place-items:center; background:var(--yellow); border:2px solid var(--navy); border-radius:12px; font-size:1.45rem; }
.image-reader:fullscreen { width:100vw; height:100vh; max-width:none; border:0; border-radius:0; background:#c7d2e0; box-shadow:none; }
.image-reader:fullscreen .image-reader-toolbar { min-height:54px; padding-inline:18px; }
.image-reader:fullscreen .image-reading-surface { height:calc(100vh - 79px); max-height:none; min-height:0; padding:18px; }
.image-reader:fullscreen .practice-page-image { max-height:calc(100vh - 100px); }
.image-reader:fullscreen .reader-protection-note { display:none; }

@media (min-width:1100px) {
  .practice-grid { grid-template-columns:255px minmax(0, 1fr); gap:23px; }
  .image-reader-layout { grid-template-columns:68px minmax(0, 1fr); gap:10px; }
  .difficulty-rail { padding:10px 5px; }
  .level-button { min-height:49px; padding:7px 4px; font-size:.66rem; }
}

@media (max-width:850px) {
  .reader-intro { align-items:flex-start; flex-direction:column; }
  .reader-meta { text-align:left; max-width:none; }
  .image-reading-surface { min-height:650px; height:78vh; }
  .practice-page-image { max-height:calc(78vh - 45px); }
}

@media (max-width:700px) {
  .practice-section { padding-top:46px; }
  .reader-intro { margin-top:17px; padding:14px 0; }
  .image-reader-layout { grid-template-columns:1fr; }
  .difficulty-rail { padding:8px; }
  #difficulty-buttons { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .image-reader-toolbar { padding:8px 9px; }
  .reader-status { max-width:39vw; }
  .image-reading-surface { min-height:540px; height:73vh; padding:8px; }
  .practice-page-image { max-height:calc(73vh - 43px); }
  .image-viewer-notice { inset:47px 0 0; padding:24px 15px; }
}

/* ──────────────────────────────────────────────────────────────
   Version 9: fast native PDF practice reader
   ────────────────────────────────────────────────────────────── */
.compact-practice-hero { padding-block: 48px 44px; }
.compact-practice-hero h1 { margin-bottom: 8px; }
.compact-practice-hero p { max-width: 730px; }
.native-practice-section { padding-top: 42px; }
.native-practice-grid { width: min(1640px, calc(100% - 30px)); grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
.topic-heading-row { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin:18px 0 14px; }
.topic-heading-row h2 { margin:2px 0 4px; color:var(--navy); }
.topic-heading-row p { margin:0; color:var(--muted); }
.native-reader-layout { display:grid; grid-template-columns:64px minmax(0, 1fr); gap:10px; align-items:stretch; margin-top:18px; }
.native-reader-layout .difficulty-rail { padding:8px 4px; border-radius:10px; }
.native-reader-layout .rail-label { font-size:.59rem; }
.native-reader-layout #difficulty-buttons { gap:6px; }
.native-reader-layout .level-button { min-height:48px; padding:6px 3px; border-width:1px; border-radius:8px; font-size:.62rem; line-height:1.1; }
.native-pdf-reader { position:relative; min-width:0; overflow:hidden; border:3px solid var(--navy); border-radius:13px; background:#cbd5e3; box-shadow:10px 10px 0 rgba(8,31,69,.12); }
.native-reader-toolbar { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 10px 6px 12px; color:#fff; background:var(--navy); }
.native-pdf-surface { position:relative; height:calc(100svh - 152px); min-height:760px; max-height:1240px; background:#cbd5e3; }
.practice-pdf-frame { width:100%; height:100%; display:block; border:0; background:#fff; }
.native-viewer-notice { position:absolute; inset:0; display:grid; place-content:center; gap:8px; padding:38px; background:#fff8df; color:var(--navy); text-align:center; z-index:2; }
.native-viewer-notice[hidden] { display:none; }
.native-viewer-notice h3 { margin:0; font-size:1.38rem; }
.native-viewer-notice p { max-width:560px; margin:0; color:var(--ink); }
.native-viewer-notice .notice-mark { width:44px; height:44px; margin:0 auto 4px; display:grid; place-items:center; background:var(--yellow); border:2px solid var(--navy); border-radius:12px; font-size:1.45rem; }
.native-pdf-reader .reader-status { min-width:0; display:flex; align-items:center; gap:8px; font-size:.74rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.native-pdf-reader .reader-actions { display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.native-pdf-reader .reader-icon-button { width:30px; height:30px; padding:0; display:grid; place-items:center; border:1px solid rgba(255,255,255,.36); border-radius:7px; color:#fff; background:transparent; font-weight:900; line-height:1; }
.native-pdf-reader .reader-icon-button:hover:not(:disabled), .native-pdf-reader .reader-icon-button:focus-visible:not(:disabled) { color:var(--navy); background:var(--yellow); border-color:var(--yellow); outline:none; }
.native-pdf-reader .reader-icon-button:disabled { opacity:.42; cursor:not-allowed; }
.native-pdf-reader .reader-page-counter { min-width:74px; padding-inline:3px; color:#f4f7fb; font-size:.72rem; font-weight:800; text-align:center; }
.native-reader-note { margin:7px 0 0 74px; color:#58708d; font-size:.69rem; font-weight:750; }
.native-pdf-reader:fullscreen { width:100vw; height:100vh; max-width:none; border:0; border-radius:0; box-shadow:none; background:#cbd5e3; }
.native-pdf-reader:fullscreen .native-reader-toolbar { min-height:50px; padding-inline:18px; }
.native-pdf-reader:fullscreen .native-pdf-surface { height:calc(100vh - 50px); min-height:0; max-height:none; }

@media (max-width: 900px) {
  .native-practice-grid { width:min(100% - 28px, 1160px); grid-template-columns:1fr; }
  .topic-heading-row { align-items:flex-start; flex-direction:column; }
  .reader-meta { text-align:left; max-width:none; }
  .native-pdf-surface { height:80svh; min-height:650px; }
}
@media (max-width: 700px) {
  .compact-practice-hero { padding-block:36px 34px; }
  .native-practice-section { padding-top:30px; }
  .native-reader-layout { grid-template-columns:1fr; }
  .native-reader-layout .difficulty-rail { padding:8px; }
  .native-reader-layout .rail-label { display:block; margin-bottom:7px; text-align:left; }
  .native-reader-layout #difficulty-buttons { grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .native-reader-layout .level-button { min-height:40px; font-size:.61rem; }
  .native-reader-toolbar { padding:7px 8px; gap:7px; }
  .native-pdf-reader .reader-status { max-width:38vw; font-size:.66rem; }
  .native-pdf-reader .reader-page-counter { display:none; }
  .native-pdf-surface { height:76svh; min-height:560px; }
  .native-reader-note { margin-left:0; }
}

/* ───────────── Version 11: fast native reader + mobile curriculum flow ───────────── */
.native-pdf-reader { min-height:0; }
.native-pdf-surface { height:clamp(720px, 84svh, 1280px); min-height:0; }
.native-reader-loading { position:absolute; inset:0; z-index:4; display:flex; align-items:center; justify-content:center; gap:10px; padding:24px; color:#fff; background:rgba(8,31,69,.78); font-weight:800; text-align:center; }
.native-reader-loading[hidden] { display:none; }
.loading-spinner { width:22px; height:22px; flex:0 0 auto; border:3px solid rgba(255,255,255,.32); border-top-color:var(--yellow); border-radius:50%; animation:ewy-spin .8s linear infinite; }
@keyframes ewy-spin { to { transform:rotate(360deg); } }
.native-pdf-reader.has-notice .native-reader-loading { display:none; }

@media (max-width:760px) {
  .practice-sidebar { position:relative; z-index:1; }
  .subject-screen { scroll-margin-top:84px; }
  .topic-panel { scroll-margin-top:84px; }
  .native-pdf-surface { height:82svh; min-height:620px; }
  .native-reader-layout { gap:9px; }
  .native-reader-note { margin-top:8px; }
}

@media (max-width:480px) {
  .native-pdf-surface { height:76svh; min-height:540px; }
  .native-reader-toolbar { min-height:42px; }
  .native-pdf-reader .reader-icon-button { width:29px; height:29px; }
}

/* ───────────── Version 12: speed-focused custom PDF study reader ───────────── */
.speed-reader-section { padding-top:42px; }
.speed-practice-grid { width:min(1660px, calc(100% - 30px)); display:grid; grid-template-columns:220px minmax(0, 1fr); gap:18px; align-items:start; }
.speed-topic-heading { margin-bottom:14px; }
.speed-reader-layout { display:grid; grid-template-columns:60px minmax(0,1fr); gap:10px; margin-top:18px; align-items:stretch; }
.speed-difficulty-rail { padding:8px 4px; border-radius:10px; }
.speed-difficulty-rail .rail-label { font-size:.58rem; }
.speed-difficulty-rail #difficulty-buttons { gap:6px; }
.speed-difficulty-rail .level-button { min-height:48px; padding:5px 3px; border-width:1px; border-radius:8px; font-size:.61rem; line-height:1.1; }
.speed-pdf-reader { position:relative; min-width:0; overflow:hidden; border:3px solid var(--navy); border-radius:13px; background:#d3ddea; box-shadow:10px 10px 0 rgba(8,31,69,.12); }
.speed-reader-toolbar { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 10px 6px 12px; color:#fff; background:var(--navy); }
.speed-pdf-reader .reader-status { min-width:0; display:flex; align-items:center; gap:8px; font-size:.74rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.speed-pdf-reader .reader-actions { display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.speed-pdf-reader .reader-icon-button { width:30px; height:30px; padding:0; display:grid; place-items:center; border:1px solid rgba(255,255,255,.36); border-radius:7px; color:#fff; background:transparent; font-weight:900; line-height:1; }
.speed-pdf-reader .reader-icon-button:hover:not(:disabled), .speed-pdf-reader .reader-icon-button:focus-visible:not(:disabled) { color:var(--navy); background:var(--yellow); border-color:var(--yellow); outline:none; }
.speed-pdf-reader .reader-icon-button:disabled { opacity:.42; cursor:not-allowed; }
.speed-pdf-reader .reader-page-counter { min-width:74px; padding-inline:3px; color:#f4f7fb; font-size:.72rem; font-weight:800; text-align:center; }
.speed-reading-surface { position:relative; height:clamp(700px, 84svh, 1280px); min-height:0; display:grid; place-items:start center; overflow:auto; padding:12px; background:#d3ddea; outline:none; overscroll-behavior:contain; }
.speed-reading-surface:focus-visible { box-shadow:inset 0 0 0 4px var(--yellow); }
.speed-pdf-canvas { display:block; max-width:none; background:#fff; box-shadow:0 8px 22px rgba(8,31,69,.23); }
.speed-reader-loading { position:absolute; inset:0; z-index:4; display:flex; align-items:center; justify-content:center; gap:10px; padding:24px; color:#fff; background:rgba(8,31,69,.74); font-weight:850; text-align:center; }
.speed-reader-loading[hidden] { display:none; }
.speed-viewer-notice { position:absolute; inset:0; z-index:3; display:grid; place-content:center; gap:8px; padding:38px; background:#fff8df; color:var(--navy); text-align:center; }
.speed-viewer-notice[hidden] { display:none; }
.speed-viewer-notice h3 { margin:0; font-size:1.38rem; }
.speed-viewer-notice p { max-width:560px; margin:0; color:var(--ink); }
.speed-viewer-notice .notice-mark { width:44px; height:44px; margin:0 auto 4px; display:grid; place-items:center; background:var(--yellow); border:2px solid var(--navy); border-radius:12px; font-size:1.45rem; }
.speed-pdf-reader.has-notice .speed-reader-loading { display:none; }
.speed-reader-note { margin:0; padding:7px 13px 8px; color:#425c79; background:#edf3fa; font-size:.7rem; font-weight:750; }
.speed-reader-help { margin:8px 0 0 70px; color:#58708d; font-size:.69rem; font-weight:750; }
.speed-pdf-reader:fullscreen { width:100vw; height:100vh; max-width:none; border:0; border-radius:0; box-shadow:none; background:#d3ddea; }
.speed-pdf-reader:fullscreen .speed-reader-toolbar { min-height:52px; padding-inline:18px; }
.speed-pdf-reader:fullscreen .speed-reading-surface { height:calc(100vh - 78px); max-height:none; min-height:0; padding:18px; }
.speed-pdf-reader:fullscreen .speed-reader-note { display:none; }

@media (max-width: 920px) {
  .speed-practice-grid { width:min(100% - 28px, 1160px); grid-template-columns:1fr; }
  .speed-reading-surface { height:82svh; min-height:620px; }
}
@media (max-width: 620px) {
  .speed-reader-section { padding-top:30px; }
  .speed-reader-layout { grid-template-columns:1fr; gap:9px; }
  .speed-difficulty-rail { padding:8px; }
  .speed-difficulty-rail .rail-label { display:block; margin-bottom:7px; text-align:left; }
  .speed-difficulty-rail #difficulty-buttons { grid-template-columns:repeat(4, minmax(0,1fr)); }
  .speed-difficulty-rail .level-button { min-height:40px; font-size:.61rem; }
  .speed-reader-toolbar { padding:7px 8px; gap:7px; }
  .speed-pdf-reader .reader-status { max-width:38vw; font-size:.66rem; }
  .speed-pdf-reader .reader-page-counter { display:none; }
  .speed-reading-surface { height:76svh; min-height:540px; padding:8px; }
  .speed-reader-help { margin-left:0; }
}


/* ──────────────────────────────────────────────────────────────
   Version 13 — routed syllabus picker + fast custom PDF reader
   ────────────────────────────────────────────────────────────── */
.practice-hero { padding-block: clamp(54px, 7vw, 94px); }
.practice-intro-strip { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.practice-intro-strip span { background:#e9f0fa; color:var(--navy); border:1px solid #c8d6e8; border-radius:999px; padding:7px 10px; font-size:.74rem; font-weight:850; }
.practice-flow-label { color:#586d84; font-size:.78rem; font-weight:850; margin:0 0 12px; }
.practice-flow-label span { color:var(--yellow); padding-inline:3px; }
.syllabus-tabs { margin-bottom:18px; }
.curriculum-tab { min-height:50px; }
.branch-screen, .paper-screen { background:#fffdf8; border:2px solid var(--navy); box-shadow:8px 8px 0 rgba(8,31,69,.10); border-radius:15px; padding:30px; scroll-margin-top:84px; }
.screen-heading, .topic-heading-row { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:22px; }
.screen-heading h2, .topic-heading-row h2 { color:var(--navy); margin:4px 0 8px; font-size:clamp(1.7rem,4vw,2.55rem); line-height:1.08; }
.screen-heading p, .topic-heading-row p { color:var(--muted); margin:0; max-width:710px; }
.text-back { appearance:none; border:0; background:transparent; color:var(--navy); font:inherit; font-weight:850; padding:8px 0; white-space:nowrap; cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
.text-back:hover { color:#906200; }
.branch-cards, .subject-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.branch-card { appearance:none; position:relative; text-align:left; display:flex; flex-direction:column; align-items:flex-start; min-height:194px; background:var(--navy); color:white; border:2px solid var(--navy); border-radius:14px; padding:22px; cursor:pointer; transition:transform .2s ease, box-shadow .2s ease; overflow:hidden; }
.branch-card::after { content:''; position:absolute; width:120px; height:120px; border-radius:50%; background:var(--yellow); right:-40px; bottom:-54px; opacity:.95; }
.branch-card:hover { transform:translateY(-3px); box-shadow:7px 8px 0 var(--yellow); }
.branch-card strong { position:relative; z-index:1; font-size:1.55rem; }
.branch-card .subject-number, .branch-card .subject-card-copy, .branch-card .subject-arrow { position:relative; z-index:1; }
.branch-card .subject-card-copy { color:#e6edf8; }
.branch-card .subject-arrow { color:var(--yellow); margin-top:auto; }
.paper-screen { margin-top:18px; }
.paper-tabs { display:flex; flex-wrap:wrap; gap:10px; }
.paper-tab { appearance:none; border:2px solid var(--navy); background:#fff; color:var(--navy); border-radius:9px; padding:12px 16px; font:inherit; font-weight:850; cursor:pointer; min-width:118px; }
.paper-tab:hover, .paper-tab.is-active { background:var(--yellow); border-color:var(--yellow); }
.topic-panel { margin-top:18px; min-height:0; scroll-margin-top:84px; }
.topic-tabs { display:flex; flex-wrap:wrap; gap:9px; margin:18px 0 18px; }
.topic-tab { min-height:44px; }
.reader-meta { padding:12px 14px; border-left:4px solid var(--yellow); background:#f0f5fb; color:#38516e; font-weight:750; font-size:.83rem; }
.speed-reader-layout { grid-template-columns:72px minmax(0,1fr); gap:12px; margin-top:14px; }
.speed-difficulty-rail { gap:8px; }
.rail-label { display:block; text-align:center; color:#506780; font-size:.65rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.speed-difficulty-rail .level-button { min-height:49px; font-size:.62rem; }
.help-book-button { display:block; margin-top:3px; padding:9px 4px; border-radius:8px; border:1px solid var(--navy); background:var(--yellow); color:var(--navy); text-decoration:none; text-align:center; font-size:.58rem; line-height:1.25; font-weight:800; box-shadow:2px 2px 0 var(--navy); }
.help-book-button:hover { transform:translate(-1px,-1px); box-shadow:4px 4px 0 var(--navy); }
.help-book-button strong { font-size:.62rem; }
.speed-reading-surface { height:clamp(650px, 82svh, 1120px); min-height:0; display:block; overflow:auto; padding:14px; background:#d0dcec; scroll-behavior:smooth; }
.pdf-page-stack { width:100%; display:flex; flex-direction:column; align-items:center; gap:14px; padding-bottom:10px; }
.pdf-page-shell { display:flex; flex-direction:column; align-items:center; width:max-content; max-width:100%; background:#fff; box-shadow:0 9px 22px rgba(8,31,69,.22); position:relative; }
.pdf-page-shell.is-loading::after { content:'Rendering page…'; position:absolute; inset:30px; display:grid; place-items:center; background:rgba(255,255,255,.85); color:var(--navy); font-weight:850; }
.pdf-page-label { width:100%; padding:7px 10px; color:#586d84; background:#edf3fa; font-size:.68rem; font-weight:850; text-align:right; }
.speed-pdf-canvas { display:block; max-width:none; background:white; }
.speed-reader-note { font-size:.74rem; line-height:1.45; }
.speed-reader-help { margin-left:84px; font-size:.74rem; line-height:1.45; }
.speed-reader-toolbar { position:sticky; top:0; z-index:5; }
.speed-reader-toolbar .reader-actions { display:flex; align-items:center; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
.reader-icon-button:disabled { opacity:.42; cursor:not-allowed; }

@media (max-width: 760px) {
  .practice-intro-strip { gap:6px; }
  .practice-intro-strip span { font-size:.65rem; padding:6px 8px; }
  .practice-flow-label { font-size:.7rem; line-height:1.5; }
  .branch-screen, .paper-screen, .subject-screen, .topic-panel { padding:20px; }
  .screen-heading, .topic-heading-row { flex-direction:column; gap:6px; }
  .text-back { padding:4px 0; }
  .branch-cards, .subject-cards { grid-template-columns:1fr; }
  .branch-card { min-height:170px; }
  .speed-reader-layout { grid-template-columns:1fr; gap:9px; }
  .speed-difficulty-rail { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; align-items:stretch; }
  .speed-difficulty-rail .rail-label { grid-column:1/-1; text-align:left; }
  .speed-difficulty-rail .level-button { min-height:45px; font-size:.61rem; }
  .help-book-button { grid-column:1/-1; margin:1px 0 0; padding:10px; font-size:.72rem; }
  .help-book-button strong { font-size:.78rem; }
  .speed-reading-surface { height:74svh; min-height:480px; padding:8px; }
  .speed-reader-toolbar { align-items:flex-start; flex-direction:column; padding:8px; }
  .speed-reader-toolbar .reader-actions { width:100%; justify-content:flex-start; }
  .reader-page-counter { font-size:.7rem; }
  .speed-reader-help { margin-left:0; }
}

@media (max-width: 390px) {
  .curriculum-tab { width:100%; }
  .speed-difficulty-rail .level-button { font-size:.56rem; padding:5px 2px; }
  .reader-icon-button { min-width:31px; }
}

/* ──────────────────────────────────────────────────────────────
   Version 14 — enlarged reading view + floating quick zoom
   ────────────────────────────────────────────────────────────── */
.speed-reader-layout { grid-template-columns:62px minmax(0, 1fr); gap:10px; }
.speed-reading-surface {
  height:clamp(720px, 86svh, 1320px);
  padding:8px 6px 12px;
  scrollbar-gutter:stable both-edges;
}
.speed-pdf-reader { isolation:isolate; }
.pdf-page-stack { gap:12px; padding-inline:0; }
.pdf-page-shell { box-shadow:0 11px 27px rgba(8,31,69,.24); }

/* The dock sits above the scrolling document, so it stays available while students read. */
.floating-zoom-control {
  position:absolute;
  right:16px;
  bottom:58px;
  z-index:12;
  display:grid;
  grid-template-columns:38px 58px 38px;
  min-height:40px;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.95);
  border-radius:12px;
  background:rgba(8,31,69,.94);
  box-shadow:0 8px 21px rgba(8,31,69,.34);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.floating-zoom-button,
.floating-zoom-readout {
  appearance:none;
  min-width:0;
  border:0;
  color:#fff;
  background:transparent;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  touch-action:manipulation;
}
.floating-zoom-button { font-size:1.35rem; line-height:1; }
.floating-zoom-readout {
  border-inline:1px solid rgba(255,255,255,.24);
  padding:0 5px;
  font-size:.74rem;
  letter-spacing:.01em;
}
.floating-zoom-button:hover:not(:disabled),
.floating-zoom-readout:hover:not(:disabled) { background:var(--yellow); color:var(--navy); }
.floating-zoom-button:focus-visible,
.floating-zoom-readout:focus-visible { outline:3px solid var(--yellow); outline-offset:-3px; }
.floating-zoom-button:disabled,
.floating-zoom-readout:disabled { opacity:.45; cursor:not-allowed; }
.speed-pdf-reader.has-notice .floating-zoom-control { display:none; }
.speed-pdf-reader:fullscreen .speed-reading-surface { height:calc(100vh - 74px); padding:10px; }
.speed-pdf-reader:fullscreen .floating-zoom-control { right:22px; bottom:18px; }

@media (max-width:760px) {
  .speed-reader-layout { grid-template-columns:1fr; }
  .speed-reading-surface { height:78svh; min-height:520px; padding:6px 4px 10px; }
  .floating-zoom-control { right:12px; bottom:76px; grid-template-columns:36px 54px 36px; min-height:38px; border-radius:11px; }
  .floating-zoom-button { font-size:1.25rem; }
  .floating-zoom-readout { font-size:.7rem; }
  .speed-pdf-reader:fullscreen .floating-zoom-control { right:14px; bottom:14px; }
}

@media (max-width:390px) {
  .floating-zoom-control { right:9px; bottom:80px; grid-template-columns:34px 50px 34px; }
}
/* Preserve horizontal room for the larger reading scale instead of shrinking the page back to fit. */
.pdf-page-stack { width:max-content; min-width:100%; }
.pdf-page-shell { max-width:none; }


/* ──────────────────────────────────────────────────────────────
   Version 15 — fast first paint + crisp text + guaranteed zoom dock
   ────────────────────────────────────────────────────────────── */
.speed-reader-layout { grid-template-columns:64px minmax(0, 1fr); gap:11px; }
.speed-pdf-reader { overflow:visible; background:#d9e3f0; }
.speed-reading-surface {
  height:clamp(760px, 88svh, 1420px);
  padding:8px 4px 14px;
  background:linear-gradient(135deg,#d6e2ef 0%,#c3d3e5 100%);
  scrollbar-color:#647b97 #dbe6f2;
}
.pdf-page-stack { gap:14px; padding:0 4px 12px; }
.pdf-page-shell {
  border:1px solid rgba(8,31,69,.12);
  background:#fff;
  box-shadow:0 12px 32px rgba(8,31,69,.27);
}
.pdf-page-label { padding:5px 9px; font-size:.64rem; color:#54708e; background:#edf4fb; }
.speed-pdf-canvas {
  background:#fff;
  image-rendering:auto;
  filter:contrast(1.025) brightness(1.01);
}
/* Always-visible page zoom dock. It is outside the reader now, so it cannot be hidden by canvas overflow. */
.floating-zoom-control {
  position:fixed;
  right:max(14px, env(safe-area-inset-right));
  bottom:max(14px, env(safe-area-inset-bottom));
  z-index:2147483000;
  grid-template-columns:42px 66px 42px;
  min-height:44px;
  border:2px solid var(--yellow);
  border-radius:13px;
  background:rgba(8,31,69,.98);
  box-shadow:0 10px 28px rgba(8,31,69,.42);
}
.floating-zoom-control.is-hidden { display:none; }
.floating-zoom-button { font-size:1.5rem; }
.floating-zoom-readout { font-size:.78rem; }
.floating-zoom-control::before {
  content:'ZOOM'; position:absolute; top:-18px; right:1px;
  color:var(--navy); background:var(--yellow); border-radius:5px 5px 0 0;
  padding:3px 7px; font-size:.53rem; line-height:1; letter-spacing:.1em; font-weight:950;
}
.speed-pdf-reader:fullscreen { overflow:hidden; }
.speed-pdf-reader:fullscreen .speed-reading-surface { height:calc(100vh - 74px); }
@media (max-width:760px) {
  .speed-reader-layout { grid-template-columns:1fr; }
  .speed-reading-surface { height:82svh; min-height:585px; padding:6px 2px 12px; }
  .pdf-page-shell { box-shadow:0 8px 22px rgba(8,31,69,.25); }
  .pdf-page-label { display:none; }
  .floating-zoom-control { right:10px; bottom:10px; grid-template-columns:39px 61px 39px; min-height:42px; border-radius:12px; }
  .floating-zoom-control::before { top:-17px; font-size:.5rem; }
}
@media (max-width:390px) {
  .speed-reading-surface { height:80svh; min-height:555px; }
  .floating-zoom-control { right:8px; bottom:8px; grid-template-columns:36px 56px 36px; min-height:39px; }
}

/* ──────────────────────────────────────────────────────────────
   Version 16 — 85% default reading size + stable focus while zooming
   ────────────────────────────────────────────────────────────── */
.speed-reading-surface,
.pdf-page-stack,
.pdf-page-shell {
  overflow-anchor: none;
}
.speed-reading-surface {
  scroll-behavior: auto;
  overscroll-behavior: contain;
}
.pdf-page-shell {
  contain: layout paint;
}
.floating-zoom-control::before { content:'READING SIZE'; }

/* ──────────────────────────────────────────────────────────────
   Version 17 — instant preview pages, fixed 85% default and reliable flow scroll
   ────────────────────────────────────────────────────────────── */
.branch-screen,
.subject-screen,
.paper-screen,
.topic-panel,
.speed-reader-layout {
  scroll-margin-top: 96px;
}
.speed-pdf-preview {
  display:block;
  height:auto;
  max-width:none;
  background:#fff;
  box-shadow:0 12px 32px rgba(8,31,69,.27);
  image-rendering:auto;
}
.pdf-page-shell.is-preview {
  min-height:48px;
  background:#fff;
}
.pdf-page-shell.is-preview::after {
  content:'Quick preview · crisp PDF loading';
  position:absolute;
  right:9px;
  top:32px;
  z-index:2;
  padding:4px 7px;
  border-radius:999px;
  background:rgba(8,31,69,.86);
  color:#fff;
  font-size:.58rem;
  letter-spacing:.03em;
  font-weight:800;
}
.pdf-page-shell.is-loading:not(.is-preview)::after {
  content:'Rendering page…';
  position:absolute;
  right:9px;
  top:32px;
  z-index:2;
  padding:4px 7px;
  border-radius:999px;
  background:rgba(8,31,69,.86);
  color:#fff;
  font-size:.58rem;
  letter-spacing:.03em;
  font-weight:800;
}
@media (max-width:760px) {
  .branch-screen,
  .subject-screen,
  .paper-screen,
  .topic-panel,
  .speed-reader-layout { scroll-margin-top:78px; }
  .pdf-page-shell.is-preview::after,
  .pdf-page-shell.is-loading:not(.is-preview)::after { top:7px; right:7px; font-size:.52rem; }
}

/* Version 18 — small availability indicators for routes awaiting resource packs */
.subject-card { position:relative; }
.subject-availability {
  display:inline-flex; align-items:center; width:max-content; margin-top:12px;
  padding:3px 7px; border:1px solid #b7c3d0; border-radius:999px;
  color:#60758d; background:#f4f7fb; font-size:.62rem; line-height:1; font-weight:900;
  letter-spacing:.035em; text-transform:uppercase;
}
.subject-card.is-coming-soon { border-style:dashed; background:#fbfcfe; }
.subject-card.is-coming-soon:hover, .subject-card.is-coming-soon:focus-visible { background:#f3f6fb; box-shadow:5px 5px 0 #d5dde8; }
.topic-tab.is-coming-soon { display:inline-flex; align-items:center; gap:7px; border-style:dashed; color:#526b85; background:#fbfcfe; }
.topic-availability { padding:2px 5px; border-radius:999px; background:#edf2f7; color:#687f96; font-size:.56rem; font-weight:900; text-transform:uppercase; letter-spacing:.03em; }
@media (max-width:760px) { .subject-availability { margin-top:9px; } }

/* ──────────────────────────────────────────────────────────────
   Version 20 — mobile-first pinch zoom and readable difficulty controls
   Desktop layout intentionally remains unchanged.
   ────────────────────────────────────────────────────────────── */
.mobile-pinch-help { display:none; }
.speed-reading-surface {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.speed-reading-surface.is-pinching {
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}
.speed-reading-surface.is-pinching .pdf-page-stack {
  will-change: transform;
}

@media (max-width:760px) {
  .speed-difficulty-rail {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:9px;
    padding:10px;
  }
  .speed-difficulty-rail .rail-label {
    grid-column:1 / -1;
    margin:0 0 1px;
    font-size:.68rem;
    letter-spacing:.09em;
  }
  .speed-difficulty-rail .level-button {
    min-height:54px;
    padding:8px 7px;
    font-size:.78rem;
    line-height:1.15;
    letter-spacing:.005em;
  }
  .speed-difficulty-rail .help-book-button {
    grid-column:1 / -1;
    min-height:44px;
    padding:9px 11px;
    font-size:.76rem;
  }
  .speed-difficulty-rail .help-book-button strong { font-size:.82rem; }

  /* Near full-screen document area: one finger scrolls the paper, not the site. */
  .speed-reading-surface {
    height:calc(100svh - 118px);
    min-height:560px;
    max-height:none;
    padding:6px 2px 20px;
    overflow:auto;
    overscroll-behavior:contain;
  }
  .pdf-page-stack { padding:0 1px 32px; }
  .mobile-pinch-help {
    display:block;
    margin-top:6px;
    color:#4f6580;
    font-size:.72rem;
    line-height:1.35;
  }
  .floating-zoom-control::before { content:'PINCH / SIZE'; }
}

@media (max-width:390px) {
  .speed-difficulty-rail { gap:7px; padding:8px; }
  .speed-difficulty-rail .level-button { min-height:50px; padding:7px 4px; font-size:.71rem; }
  .speed-reading-surface { height:calc(100svh - 108px); min-height:520px; }
}
