:root {
  --ink: #243247; --muted: #57677b; --navy: #203c65; --blue: #345f91;
  --teal: #14685e; --soft: #eaf0f8; --subtle: #f3f6fa; --line: #dce4ee;
  --paper: #fff; --sidebar: 252px;
  color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; font-weight: 400;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--subtle); font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #4c79af; outline-offset: 3px; }
svg.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -70px; left: 20px; z-index: 99; background: var(--navy); color: white; padding: 14px; border-radius: 6px; }
.skip:focus { top: 10px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: var(--sidebar); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 28px 16px 20px; background: white; border-right: 1px solid var(--line); }
.brand { padding: 0 12px; margin-bottom: 28px; color: var(--navy); font-size: 27px; font-weight: 750; letter-spacing: -.9px; line-height: 1.2; }
.brand-sub { display: block; font-size: 12px; font-weight: 400; letter-spacing: .2px; color: var(--muted); margin-top: 9px; }
.sidebar-section { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 12px; margin-bottom: 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; border-radius: 7px; min-height: 44px; padding: 10px 12px; color: var(--muted); margin-bottom: 3px; font-size: 14px; line-height: 1.45; }
.nav-item.active { background: var(--soft); color: var(--navy); font-weight: 650; }
.nav-item:hover { background: #f0f4f9; color: var(--navy); }
.subject-label { padding: 25px 12px 8px; font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.chapter-nav { flex: 1; overflow: auto; min-height: 100px; scrollbar-width: thin; scrollbar-color: #b8c8da transparent; }
.sidebar-module { margin-bottom: 14px; }
.sidebar-module > summary { font-size: 13px; font-weight: 650; color: var(--navy); padding: 8px 12px; cursor: pointer; }
.sidebar-module .nav-item { font-size: 14px; padding: 11px 12px; gap: 9px; }
.sidebar-module .nav-item > span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.upcoming-nav > summary { min-height: 42px; padding: 10px 12px 10px 24px; color: var(--muted); font-size: 13px; cursor: pointer; }
.upcoming-nav .nav-item { color: var(--muted); font-size: 13px; }
.main-shell { margin-left: var(--sidebar); width: calc(100% - var(--sidebar)); min-width: 0; }
.topbar { min-height: 74px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 22px; padding: 15px 34px; background: white; }
.breadcrumb { font-size: 14px; color: var(--muted); white-space: nowrap; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { margin: 0 10px; color: #65778e; }
.search-box { margin-left: auto; display: flex; gap: 9px; align-items: center; border: 1px solid #cbd6e3; border-radius: 7px; background: #f9fbfd; padding: 10px 12px; color: var(--muted); max-width: 340px; width: 42%; }
.search-box:focus-within { border-color: #4c79af; box-shadow: 0 0 0 3px #4c79af1a; }
.search-box input { border: 0; width: 100%; min-width: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box kbd { font: inherit; font-size: 12px; background: white; border: 1px solid var(--line); padding: 0 6px; border-radius: 4px; }
.collection-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mobile-brand, .mobile-nav { display: none; }
main { max-width: 1320px; padding: 32px 34px; margin: auto; min-height: calc(100vh - 148px); }
.eyebrow { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.home-heading { padding: 0 0 10px; }
.home-heading h1 { font-size: clamp(36px, 3.5vw, 44px); color: var(--navy); font-weight: 750; line-height: 1.2; letter-spacing: -1.3px; margin: 0; }
.home-section-title { margin-top: 18px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 15px; gap: 16px; }
.section-title h2 { font-size: 23px; font-weight: 650; letter-spacing: -.45px; margin: 0; line-height: 1.35; }
.section-title p { font-size: 14px; color: var(--muted); margin: 5px 0 0; }
.section-title > span { font-size: 13px; color: var(--muted); padding-bottom: 3px; white-space: nowrap; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.chapter-card { border: 1px solid var(--line); background: white; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 2px 5px #263c5810; transition: border-color .15s, box-shadow .15s; }
.chapter-card:hover { border-color: #8ea8ca; box-shadow: 0 5px 14px #263c5818; }
.chapter-card-top { display: flex; align-items: center; gap: 12px; padding: 22px 22px 0; }
.chapter-spec { display: grid; place-items: center; min-width: 43px; height: 40px; border-radius: 7px; color: var(--navy); background: var(--soft); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-card-content { padding: 17px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.chapter-card h3 { font-size: 22px; font-weight: 650; margin: 0 0 9px; letter-spacing: -.4px; line-height: 1.3; }
.chapter-card p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; }
.chapter-card-bottom { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: auto; }
.card-go { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); font-weight: 550; }
.card-go .icon { width: 15px; height: 15px; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.resource-tile { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 20px; }
.resource-tile > svg:first-child { color: var(--blue); width: 22px; height: 22px; }
.resource-tile > svg:last-child { color: var(--blue); width: 16px; height: 16px; margin-left: auto; }
.resource-tile strong { font-size: 16px; font-weight: 650; display: block; }
.resource-tile span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.resource-tile:hover { border-color: #8ea8ca; }
.study-note { display: flex; align-items: start; gap: 14px; padding: 20px 22px; border: 1px solid #d3e1df; border-radius: 9px; margin: 27px 0 0; background: #edf5f3; }
.study-note > .icon { color: var(--teal); margin-top: 3px; }
.study-note h3 { font-size: 15px; margin: 0 0 5px; font-weight: 650; color: #20564f; }
.study-note p { font-size: 14px; color: #435f5b; line-height: 1.7; max-width: 870px; margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--blue); line-height: 1.5; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 16px; height: 16px; }
.back-link { margin-bottom: 18px; }
.official-shortcuts { display: flex; gap: 12px 22px; flex-wrap: wrap; align-items: center; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; padding: 12px 34px 26px; max-width: 1320px; margin: auto; }
.chapter-heading { padding: 0 0 20px; }
.chapter-heading .eyebrow { color: var(--blue); margin-bottom: 9px; }
.chapter-heading h1, .search-heading h1 { font-size: 36px; line-height: 1.2; font-weight: 750; letter-spacing: -1px; margin: 0 0 10px; color: var(--navy); }
.chapter-heading p, .search-heading p { margin: 0; font-size: 15px; color: var(--muted); }
.chapter-navigation { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.chapter-navigation .back-link { margin: 0; }
.chapter-chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chapter-chip { font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 11px; color: var(--muted); background: white; }
.chapter-chip.active { background: var(--soft); border-color: #b4c7df; color: var(--navy); font-weight: 550; }
.chapter-chip:hover { border-color: #8ea8ca; }
.route-note { display: flex; gap: 10px; align-items: start; border-left: 3px solid #708fb7; border-radius: 0 7px 7px 0; padding: 12px 16px; background: #eaf0f8; font-size: 14px; color: var(--navy); }
.route-note .icon { margin-top: 2px; width: 18px; height: 18px; }
.pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pack-card { padding: 21px; background: white; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 2px 5px #263c5808; }
.pack-card.test-card { background: #edf6f3; border-color: #a7cfc3; border-top: 4px solid var(--teal); }
.pack-card.later-card { border-style: dashed; background: #f8fafc; box-shadow: none; }
.pack-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pack-number { font-size: 12px; color: var(--muted); letter-spacing: .55px; text-transform: uppercase; font-weight: 650; }
.pack-tag { font-size: 12px; padding: 3px 8px; border-radius: 5px; background: var(--soft); color: var(--navy); white-space: nowrap; }
.pack-tag.test { background: #dceee7; color: #135c4a; }
.pack-tag.later { background: #e9edf2; color: #526277; }
.pack-card h3 { font-size: 21px; line-height: 1.35; font-weight: 650; letter-spacing: -.35px; margin: 14px 0 10px; }
.pack-card h3 a:hover { color: var(--blue); }
.pack-details { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pack-details b { font-weight: 650; color: var(--ink); }
.pack-note { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.pack-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; padding-top: 3px; }
.pack-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 9px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; background: var(--navy); color: white; border: 1px solid var(--navy); line-height: 1.45; }
.pack-button:hover { background: #2d507f; }
.pack-button.secondary { color: var(--navy); background: white; border-color: #b8c9dd; }
.pack-button.secondary:hover { background: var(--soft); }
.test-card .pack-button:not(.secondary) { background: var(--teal); border-color: var(--teal); }
.pack-button .icon { width: 17px; height: 17px; }
.view-toolbar { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; flex-wrap: wrap; }
.view-toolbar > .text-link { margin-left: auto; }
.module-tabs { display: flex; gap: 8px; background: #e7edf5; border-radius: 8px; padding: 4px; }
.module-tabs a { padding: 9px 19px; border-radius: 6px; color: var(--muted); font-size: 15px; min-height: 44px; }
.module-tabs a.active { background: white; box-shadow: 0 1px 4px #24324718; color: var(--navy); font-weight: 650; }
.module-tabs a:hover { color: var(--blue); }
.module-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.module-number { display: grid; place-items: center; flex-shrink: 0; width: 47px; height: 47px; background: #e6edf7; border-radius: 9px; font-size: 25px; font-weight: 650; color: var(--navy); }
.module-heading h2 { font-size: 25px; line-height: 1.3; font-weight: 650; letter-spacing: -.5px; margin: 0; }
.module-chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.module-chapter { display: flex; gap: 12px; align-items: center; padding: 20px 18px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fc; }
.module-chapter.ready { background: white; border-color: #a8bed9; }
.module-chapter:hover { border-color: #7899c2; }
.spec-number { font-size: 14px; color: var(--blue); align-self: start; padding-top: 2px; font-variant-numeric: tabular-nums; }
.module-chapter h3 { font-size: 17px; font-weight: 650; margin: 0 0 5px; line-height: 1.4; }
.module-chapter div > span { font-size: 13px; color: var(--muted); }
.module-chapter > .icon { width: 15px; height: 15px; color: var(--muted); }
.availability { font-size: 12px; color: var(--muted); background: #e6ebf1; border-radius: 5px; padding: 3px 8px; margin-left: auto; white-space: nowrap; }
.availability.ready { color: #135c4a; background: #e3f1eb; }
.planned-panel { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 30px; color: var(--muted); max-width: 800px; }
.planned-panel > .icon { width: 30px; height: 30px; color: var(--blue); margin-right: 12px; }
.planned-panel h2 { font-size: 25px; font-weight: 650; color: var(--ink); margin: 18px 0 10px; }
.planned-panel p { font-size: 15px; max-width: 600px; }
.paper-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 20px; background: var(--line); }
.paper-summary div { padding: 16px 18px; background: white; }
.paper-summary b { display: block; font-size: 15px; font-weight: 650; }
.paper-summary span { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }
.paper-filters { background: white; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; }
.paper-filters label { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 14px; }
.paper-filters select { min-height: 44px; padding: 8px 11px; background: #fafcfe; border: 1px solid #becde0; border-radius: 6px; color: var(--ink); font-size: 14px; min-width: 146px; }
.paper-link-note { margin-left: auto; font-size: 13px; color: var(--muted); }
.paper-year .section-title { margin-top: 25px; margin-bottom: 12px; }
.paper-list { border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; }
.paper-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.paper-row:last-child { border-bottom: 0; }
.paper-number { width: 38px; height: 38px; display: grid; place-items: center; background: var(--soft); color: var(--navy); font-size: 16px; font-weight: 650; border-radius: 8px; }
.paper-info h3 { font-size: 17px; font-weight: 650; line-height: 1.4; margin: 0 0 7px; letter-spacing: -.2px; }
.paper-info p { display: flex; flex-wrap: wrap; gap: 3px 13px; margin: 0; font-size: 13px; color: var(--muted); }
.paper-actions { display: flex; gap: 8px; }
.paper-actions .pack-button { min-height: 42px; font-size: 13px; padding: 8px 12px; }
.paper-extras { display: flex; flex-wrap: wrap; gap: 4px 15px; align-items: center; margin-top: 7px; }
.paper-extras a { font-size: 13px; color: var(--blue); }
.paper-extras a:hover { text-decoration: underline; text-underline-offset: 3px; }
.correction-link { color: #765328 !important; text-decoration: underline; text-underline-offset: 3px; }
.resource-footnote { font-size: 13px; color: var(--muted); }
.boundary-note { font-size: 14px; color: var(--navy); background: var(--soft); border-left: 3px solid #708fb7; border-radius: 0 7px 7px 0; padding: 14px 18px; margin-bottom: 20px; }
.boundary-controls { gap: 12px; }
.segmented { display: inline-flex; gap: 3px; background: #e6edf5; border: 1px solid #d5dfeb; border-radius: 8px; padding: 4px; }
.segmented > button { font-size: 14px; color: var(--muted); background: transparent; padding: 8px 15px; min-height: 44px; border-radius: 5px; white-space: nowrap; }
.segmented .active { background: var(--navy); color: white; }
.units-toggle { background: white; }
.boundary-table-wrap { overflow: auto; max-height: 640px; border: 1px solid var(--line); border-radius: 10px; background: white; scrollbar-width: thin; scrollbar-color: #b6c7dc #f3f6fa; }
.boundary-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 750px; font-size: 15px; font-variant-numeric: tabular-nums; }
.boundary-table caption { text-align: left; font-size: 14px; padding: 15px 18px; background: #f7f9fc; color: var(--muted); border-bottom: 1px solid var(--line); }
.boundary-table thead th { position: sticky; top: 0; z-index: 2; font-size: 14px; color: var(--navy); background: #f2f6fb; padding: 13px 12px; text-align: center; font-weight: 650; border-bottom: 1px solid var(--line); }
.boundary-table thead th:first-child { text-align: left; padding-left: 18px; position: sticky; left: 0; z-index: 3; }
.boundary-table tbody th { padding: 14px 18px; text-align: left; border-bottom: 1px solid #e6ebf2; font-weight: 650; min-width: 172px; position: sticky; left: 0; background: white; z-index: 1; }
.boundary-table tbody th > span { display: flex; align-items: center; gap: 8px; }
.boundary-table tbody th > small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.boundary-table tbody td { text-align: center; padding: 14px 12px; border-bottom: 1px solid #e6ebf2; color: var(--ink); font-size: 16px; }
.boundary-table tbody tr:last-child td, .boundary-table tbody tr:last-child th { border-bottom: 0; }
.boundary-table tbody .latest-row td, .boundary-table tbody .latest-row th { background: #edf5f2; }
.boundary-table tbody .latest-row td:not(:last-child) { font-weight: 650; color: #20564f; }
.boundary-table tbody tr:hover td, .boundary-table tbody tr:hover th { background: #f0f5fb; }
.latest-tag { font-size: 12px; font-weight: 550; background: #dbece5; color: #20564f; padding: 1px 6px; border-radius: 4px; }
.boundary-table .text-link { font-size: 13px; }
.table-scroll-hint { display: none; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.search-heading { margin-bottom: 22px; }
.search-heading .eyebrow { margin-bottom: 8px; }
.empty-state { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 35px; color: var(--muted); }
.empty-state h2 { margin: 0 0 8px; font-size: 21px; color: var(--ink); }
.empty-state p { margin: 0; }
.empty-state .text-link { margin-top: 15px; }
.error-screen, .noscript { max-width: 600px; padding: 35px; margin: 40px auto; }
.error-screen h1 { color: var(--navy); }
.error-screen button { min-height: 44px; padding: 10px 20px; background: var(--navy); color: white; border-radius: 6px; }
.reader { height: 100dvh; position: fixed; inset: 0; background: #e5ebf3; z-index: 20; display: flex; flex-direction: column; }
.reader-header { background: white; display: flex; align-items: center; gap: 22px; min-height: 88px; padding: 15px 25px; border-bottom: 1px solid var(--line); }
.back-button { background: transparent; display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--blue); padding: 8px 0; white-space: nowrap; }
.reader-title { min-width: 0; flex: 1; }
.reader-title > span { font-size: 13px; color: var(--muted); }
.reader-title h1 { font-size: 20px; font-weight: 650; line-height: 1.3; margin: 4px 0 0; color: var(--navy); }
.reader-tabs { display: flex; gap: 3px; background: #f3f6fa; border: 1px solid var(--line); border-radius: 7px; padding: 3px; white-space: nowrap; }
.reader-tabs button { min-height: 44px; background: transparent; color: var(--muted); padding: 8px 15px; border-radius: 5px; font-size: 14px; }
.reader-tabs button.active { background: var(--navy); color: white; }
.reader-tools { background: #f7f9fc; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 9px 25px; border-bottom: 1px solid #d1dce9; font-size: 14px; color: var(--muted); }
.page-controls, .zoom-controls, .file-controls { display: flex; align-items: center; gap: 7px; }
.icon-button { display: grid; place-items: center; background: white; border: 1px solid #d4dfec; border-radius: 6px; width: 44px; height: 44px; color: var(--blue); }
.icon-button:hover { background: var(--soft); }
.icon-button .icon { width: 19px; height: 19px; }
.page-controls select { min-height: 44px; padding: 8px; border: 1px solid #bccce0; border-radius: 6px; background: white; color: var(--ink); font-size: 14px; max-width: 75px; }
.zoom-label { min-height: 44px; padding: 8px 10px; background: transparent; color: var(--blue); font-size: 14px; min-width: 70px; }
.file-controls { gap: 15px; }
.file-controls a { min-height: 44px; display: flex; align-items: center; gap: 6px; color: var(--blue); }
.file-controls a:hover { text-decoration: underline; }
.file-controls .icon { width: 17px; height: 17px; }
.reader-stage { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px; position: relative; scrollbar-color: #a9bbd3 transparent; scrollbar-width: thin; }
.reader-stage figure { margin: 0 auto; width: min(100%, 860px); text-align: center; max-width: none; }
.reader-stage img { width: 100%; height: auto; background: white; box-shadow: 0 3px 17px #20304720; display: block; }
.reader-stage figcaption { font-size: 13px; color: var(--muted); padding: 15px 0; }
.reader-stage[aria-busy="true"] figure, .reader-stage.has-error figure { display: none; }
.page-loading { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 180px; font-size: 15px; color: var(--navy); }
.loading-dot { width: 19px; height: 19px; border: 2px solid #becfe4; border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reader-bottom { display: flex; justify-content: space-between; gap: 15px; align-items: center; font-size: 12px; color: var(--muted); background: #f7f9fc; padding: 10px 25px; border-top: 1px solid var(--line); }
.page-error { padding: 24px; max-width: 600px; margin: 40px auto; background: white; color: var(--navy); border: 1px solid #bfcbd9; border-radius: 8px; }
@media (max-width: 1150px) {
  :root { --sidebar: 230px; }
  .sidebar { padding-inline: 12px; }
  .brand { font-size: 25px; }
  .topbar, .site-footer { padding-inline: 25px; }
  main { padding-inline: 25px; }
  .collection-label { display: none; }
  .search-box { width: 45%; }
  .module-chapters { grid-template-columns: 1fr; }
  .paper-row { grid-template-columns: 38px minmax(0, 1fr); }
  .paper-links { grid-column: 2; }
  .paper-summary div { padding: 14px; }
  .paper-filters label { flex-direction: column; align-items: start; gap: 5px; }
  .reader-title h1 { font-size: 18px; }
}
@media (max-width: 800px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main-shell { margin: 0; width: 100%; }
  .topbar { min-height: 72px; padding: 14px 22px; }
  .breadcrumb { display: none; }
  .mobile-brand { display: block; font-size: 25px; font-weight: 750; letter-spacing: -.7px; white-space: nowrap; color: var(--navy); }
  .search-box { width: 48%; max-width: 320px; }
  .mobile-nav { display: flex; padding: 8px 18px; gap: 4px; border-bottom: 1px solid var(--line); background: white; overflow: auto; white-space: nowrap; }
  .mobile-nav a { font-size: 14px; color: var(--muted); padding: 9px 12px; min-height: 44px; border-radius: 6px; }
  .mobile-nav a.active { background: var(--soft); color: var(--navy); font-weight: 600; }
  main { padding: 25px 22px; }
  .reader-header { padding: 12px 18px; gap: 14px; }
  .back-button span:not([data-icon]) { display: none; }
  .back-button { min-width: 44px; justify-content: center; }
  .reader-title h1 { font-size: 17px; }
  .reader-title > span { font-size: 12px; }
  .reader-tools { padding-inline: 18px; gap: 10px; }
  .reader-stage { padding: 18px 12px; }
  .reader-bottom { padding-inline: 18px; }
  .reader-bottom > span:last-child { display: none; }
  .table-scroll-hint { display: block; }
}
@media (max-width: 600px) {
  .topbar { padding: 14px 18px 12px; gap: 12px; flex-wrap: wrap; }
  .mobile-brand { font-size: 26px; }
  .search-box { width: 100%; max-width: none; margin: 0; }
  .search-box kbd { display: none; }
  .mobile-nav { padding: 7px 10px; justify-content: space-between; gap: 0; }
  .mobile-nav a { font-size: 13px; padding: 10px 6px; }
  main { padding: 22px 16px; }
  .home-heading h1 { font-size: 36px; }
  .section-title { gap: 10px; margin-top: 25px; }
  .section-title h2 { font-size: 22px; }
  .section-title p { font-size: 14px; }
  .home-section-title { align-items: start; flex-direction: column; }
  .chapter-grid, .resource-grid, .pack-grid, .module-chapters { grid-template-columns: 1fr; }
  .chapter-card-top { padding-top: 20px; }
  .resource-tile { padding: 19px; }
  .study-note { padding: 18px; gap: 11px; }
  .official-shortcuts { gap: 12px 18px; }
  .site-footer { padding: 10px 16px 24px; flex-direction: column; align-items: start; gap: 5px; }
  .chapter-navigation { flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
  .chapter-chip-row { width: 100%; }
  .chapter-heading h1, .search-heading h1 { font-size: 32px; }
  .route-note { padding: 12px 14px; font-size: 14px; }
  .pack-card { padding: 20px; }
  .pack-actions .pack-button { flex: 1; }
  .view-toolbar { gap: 14px; }
  .view-toolbar > .text-link { margin-left: 0; }
  .module-tabs a { padding-inline: 18px; }
  .module-heading h2 { font-size: 22px; }
  .module-chapter { padding: 18px 15px; gap: 10px; }
  .module-chapter > .icon { display: none; }
  .module-chapter h3 { font-size: 16px; }
  .module-chapter .availability { font-size: 12px; white-space: normal; text-align: center; max-width: 74px; }
  .planned-panel { padding: 24px; }
  .paper-summary { grid-template-columns: 1fr; }
  .paper-summary div { display: flex; gap: 14px; align-items: center; padding: 13px 17px; }
  .paper-summary span { margin-top: 0; }
  .paper-summary b { white-space: nowrap; }
  .paper-filters { padding: 15px; gap: 12px; }
  .paper-filters label { flex: 1; min-width: 0; }
  .paper-filters select { width: 100%; min-width: 0; font-size: 14px; }
  .paper-link-note { width: 100%; margin-left: 0; }
  .paper-row { padding: 17px 16px; gap: 12px; grid-template-columns: 32px minmax(0, 1fr); }
  .paper-number { width: 32px; height: 34px; }
  .paper-info h3 { font-size: 17px; }
  .paper-links { grid-column: 1 / -1; }
  .paper-actions .pack-button { flex: 1; font-size: 14px; min-height: 44px; }
  .paper-extras a { padding-block: 6px; font-size: 14px; }
  .boundary-controls { gap: 10px; }
  .segmented { gap: 2px; }
  .segmented > button { font-size: 13px; padding-inline: 10px; }
  .boundary-table tbody th { min-width: 130px; width: 130px; max-width: 130px; padding-inline: 14px; }
  .boundary-table tbody td { font-size: 15px; }
  .boundary-table caption { padding-inline: 14px; }
  .boundary-table thead th:first-child { padding-left: 14px; }
  .boundary-note { padding: 14px 16px; }
  .reader-header { padding: 12px; gap: 9px; flex-wrap: wrap; }
  .reader-title { flex-basis: calc(100% - 55px); }
  .reader-title h1 { font-size: 17px; }
  .reader-tabs { margin-left: 53px; }
  .reader-tabs button { font-size: 14px; padding-inline: 14px; }
  .reader-tools { padding: 9px 10px; gap: 9px 5px; }
  .page-controls { gap: 5px; }
  .zoom-controls { gap: 3px; }
  .zoom-label { padding-inline: 5px; min-width: 57px; }
  .file-controls { width: 100%; justify-content: space-between; padding-top: 2px; }
  .file-controls a { font-size: 14px; }
  .reader-bottom { padding: 9px 12px; font-size: 12px; }
  .reader-stage { padding: 16px 8px; }
  .empty-state { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
