:root {
  color-scheme: light;
  --navy: #112d4d;
  --ink: #132943;
  --muted: #50667c;
  --line: #dbe4ed;
  --background: #f4f7fb;
  --white: #fff;
  --blue: #20548a;
  --ice: #eaf1fa;
  --orange: #ffad44;
  --orange-dark: #a65000;
  --orange-pale: #fff1dc;
  --green: #126747;
  --green-pale: #e5f4ed;
  --danger: #982f2f;
  --danger-pale: #fff1ed;
  --r: 16px;
  --side: 246px;
  font: 16px/1.55 "Inter", "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled, fieldset:disabled button { opacity: .53; cursor: default; }
button[aria-disabled="true"] { cursor: default; }
:focus-visible { outline: 3px solid #bd670f; outline-offset: 3px; }
#content:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4.7vw, 3.2rem); line-height: 1.04; letter-spacing: -.05em; }
h2 { line-height: 1.19; letter-spacing: -.03em; font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
h3 { line-height: 1.27; letter-spacing: -.016em; }
small, .small { font-size: .84rem; }
[lang="en"] { font-style: normal; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; transform: translateY(-150%); background: white; padding: 10px 14px; border-radius: 9px; }
.skip-link:focus { transform: none; }
.sidebar { width: var(--side); position: fixed; inset: 0 auto 0 0; z-index: 5; background: white; border-right: 1px solid var(--line); padding: 29px 21px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.branding { display: grid; justify-items: start; margin: 0 6px 27px; line-height: 1.15; }
.branding img { display: block; width: 100%; max-width: 184px; height: auto; margin-bottom: 17px; }
.wordmark { font-size: 1.25rem; font-weight: 850; letter-spacing: -.061em; white-space: nowrap; }
.wordmark strong { color: var(--orange-dark); }
.byline { color: var(--muted); font-size: .76rem; margin-top: 4px; }
#navigation { display: grid; gap: 3px; }
.nav-link { display: flex; gap: 11px; align-items: center; min-height: 44px; padding: 8px 11px; border-radius: 9px; color: #374f68; font-weight: 650; font-size: .91rem; }
.nav-link:hover { background: var(--background); }
.nav-link[aria-current="page"] { background: var(--orange-pale); color: var(--navy); }
.nav-icon { display: inline-grid; place-items: center; width: 24px; height: 25px; font-size: 1.13rem; flex-shrink: 0; color: var(--blue); font-weight: 750; line-height: 1; }
.nav-icon.letters { font-size: .88rem; }
.nav-link[aria-current="page"] .nav-icon { color: var(--orange-dark); }
.sidebar-foot { color: var(--muted); font-size: .72rem; padding: 15px 5px 0; margin-top: auto; }
.brand-dot { display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: #ee971e; margin-right: 4px; vertical-align: 1px; }
.workspace { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 69px; padding: 10px clamp(20px, 4vw, 54px); display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); align-items: center; font-size: .88rem; font-weight: 620; }
.breadcrumb strong, .breadcrumb a:hover { color: var(--navy); }
.topbar-options { display: flex; align-items: center; gap: 9px; margin-left: auto; flex-shrink: 0; }


.level-picker { position: relative; z-index: 6; flex-shrink: 0; }
.level-picker summary { color: var(--navy); background: var(--ice); border: 1px solid #d5e3f2; border-radius: 9px; min-height: 42px; padding: 8px 13px; font-size: .86rem; font-weight: 750; list-style: none; display: flex; align-items: center; gap: 10px; }
.level-picker summary::-webkit-details-marker { display: none; }
.level-picker summary::after { content: "⌄"; font-size: 1.02rem; line-height: .7; }
.level-options { position: absolute; right: 0; top: calc(100% + 8px); background: white; padding: 6px; width: 236px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 36px #142e4e22; }
.level-option { display: grid; grid-template-columns: 34px 1fr; gap: 8px; width: 100%; align-items: center; border-radius: 7px; padding: 8px; background: #fff; color: var(--muted); font-size: .86rem; }
.level-option strong { color: var(--navy); }
.level-option[aria-current="true"], .level-option:is(a):hover { background: var(--ice); }
.level-option[aria-disabled="true"] { opacity: .8; }
.mobile-menu, .mobile-branding { display: none !important; }
#content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 33px clamp(20px, 4vw, 54px) 44px; flex: 1; }
.footer { color: var(--muted); padding: 14px clamp(20px, 4vw, 54px) 22px; border-top: 1px solid var(--line); font-size: .76rem; }
.footer span { padding-inline: 4px; }
.download-action { margin-left: 4px; padding: 3px 5px; border: 0; border-radius: 4px; background: transparent; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
#offline-status:not(:empty) { display: block; margin-top: 4px; }
.school-links { display: inline-flex; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 0 8px; }
.school-links a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.hero { isolation: isolate; position: relative; overflow: hidden; border-radius: 21px; min-height: 263px; padding: clamp(23px, 4vw, 43px); display: grid; align-items: center; color: white; background: linear-gradient(116deg,#102c4e 15%,#17426f 68%,#225687); }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 410px; height: 410px; right: -43px; top: -75px; border-radius: 100%; border: 1px solid #ffffff22; }
.hero::after { transform: scale(.76); border-color: #ffbf682c; }
.hero-inner { position: relative; z-index: 1; max-width: min(75%, 610px); }
.hero h1 { margin-top: 9px; }
.hero p { color: #e1ebf7; margin: 13px 0 21px; max-width: 46ch; }
.hero-level { position: absolute; right: clamp(24px, 5vw, 83px); top: 50%; transform: translateY(-52%); font-size: clamp(4.5rem, 15vw, 12.6rem); font-weight: 850; line-height: 1; letter-spacing: -.09em; color: #ffffff12; user-select: none; }
.kicker { font-size: .76rem; font-weight: 780; letter-spacing: .105em; color: var(--blue); }
.hero .kicker { color: #ffc681; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 15px; border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 9px; font-weight: 700; font-size: .89rem; text-align: center; }
.button:not(:disabled):hover { border-color: #a7b9cd; background: var(--ice); }
.button.primary { background: var(--orange); border-color: #ed9e39; color: #192c40; }
.button.primary:not(:disabled):hover { background: #ffc278; border-color: #d88d29; }
.button.subtle { border-color: transparent; color: var(--blue); background: transparent; }
.button[aria-pressed="true"] { background: var(--ice); border-color: #92b2d5; }
.icon-button { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: white; font-weight: 740; }
.icon-button:hover { background: var(--ice); }
.page-head { margin: 0 0 22px; }
.page-head .kicker { margin-bottom: 7px; }
.page-head p:not(.kicker) { color: var(--muted); margin-top: 9px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 31px 0 13px; }
.section-head p { color: var(--muted); font-size: .9rem; padding-top: 3px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 15px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.stat strong { display: block; font-size: 1.18rem; letter-spacing: -.035em; line-height: 1.2; }
.stat small { color: var(--muted); }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ice); color: var(--blue); border-radius: 9px; font-weight: 750; }
.chapter-grid { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.chapter-card { min-width: 0; display: flex; flex-direction: column; min-height: 140px; padding: 15px; gap: 8px; background: white; border: 1px solid var(--line); border-radius: 13px; transition: background-color .16s, border-color .16s; }
.chapter-card:hover { background: #fdfefe; border-color: #b4c9de; }
.chapter-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chapter-number { color: var(--blue); font-size: .77rem; font-weight: 750; }
.chapter-arrow { font-size: 1.05rem; color: var(--blue); }
.chapter-card h3 { margin: 0 0 auto; font-size: 1.06rem; }
.chapter-meta { color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
progress { width: 100%; height: 6px; border: 0; border-radius: 20px; accent-color: #2c679e; background: var(--ice); }
progress::-webkit-progress-bar { background: var(--ice); border-radius: 20px; }
progress::-webkit-progress-value { background: #2c679e; border-radius: 20px; }
progress::-moz-progress-bar { background: #2c679e; border-radius: 20px; }
.audio-notice { margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ice); color: var(--muted); font-size: .86rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tab { border: 1px solid var(--line); border-radius: 8px; padding: 8px 13px; min-height: 41px; font-weight: 680; font-size: .89rem; color: var(--blue); background: #fff; }
.tab[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab:hover:not([aria-current="page"]) { background: var(--ice); }
.panel, .topic { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 3vw, 30px); }
.stack { display: grid; gap: 13px; }
.restricted { max-width: 900px; }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.space { margin-top: 17px; }
.dim { color: var(--muted); }
.chip { border-radius: 30px; color: var(--blue); background: var(--ice); font-size: .77rem; font-weight: 720; padding: 3px 9px; white-space: nowrap; }
.chip.done { color: var(--green); background: var(--green-pale); }
.flash { text-align: center; display: grid; place-items: center; min-height: 248px; background: linear-gradient(145deg,#f9fbff,#eaf1fa); padding: 20px 10px; border-radius: 13px; margin: 15px 0; }
.flash-word { font-size: clamp(1.5rem, 4.2vw, 2.75rem); line-height: 1.14; overflow-wrap: anywhere; letter-spacing: -.032em; }
.flash p { margin-top: 6px; }
.flash .controls { justify-content: center; margin-top: 13px; }
input[type="text"], input[type="search"] { border: 1px solid #aebfd0; border-radius: 8px; color: var(--ink); background: white; width: 100%; min-height: 44px; padding: 8px 12px; }
.search { max-width: 320px; }
.table-wrap { overflow-x: auto; margin-top: 11px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
caption { text-align: left; font-weight: 760; margin-bottom: 6px; }
th, td { padding: 9px 10px; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: #edf3fb; color: var(--navy); font-size: .84rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:nth-child(even) { background: #f9fbfe; }
td[lang="en"] { color: var(--muted); }
.term { font-weight: 740; }
.word-table .small { display: block; font-weight: 450; color: var(--muted); }
.word-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.topic { padding: 0; overflow: clip; }
.topic summary { padding: 14px 15px; display: flex; align-items: center; gap: 10px; list-style: none; font-weight: 750; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary::after { content: "+"; font-size: 1.25rem; line-height: 1; margin-left: auto; color: var(--blue); }
.topic[open] summary::after { content: "−"; }
.topic[open] summary { border-bottom: 1px solid var(--line); }
.topic summary:hover { background: #f7faff; }
.topic summary:focus-visible { outline-offset: -3px; }
.topic-body { padding: clamp(15px, 3vw, 25px); }
.english { background: #edf4fc; border-left: 3px solid #8db1d5; color: #314c66; border-radius: 0 8px 8px 0; margin-top: 11px; padding: 9px 11px; }
.fix { background: var(--orange-pale); margin-top: 13px; padding: 9px 11px; border-radius: 8px; }
.practice-head { margin-bottom: 13px; }
.practice-head progress { margin-top: 9px; }
.prompt { font-size: clamp(1.14rem, 3vw, 1.6rem); font-weight: 720; line-height: 1.4; padding: 6px 0; overflow-wrap: anywhere; }
.prompt mark { background: #ffe1d7; color: #7b2727; border-radius: 3px; padding: 0 2px; }
.hint { margin: 12px 0; color: var(--blue); }
.hint summary { width: fit-content; min-height: 34px; font-size: .9rem; font-weight: 720; }
.hint p { margin-top: 5px; color: var(--muted); }
.order-zone { min-height: 57px; background: #f7faff; border: 1px dashed #9fb6cd; border-radius: 10px; padding: 8px; }
.tiles { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tiles .button { min-height: 39px; padding: 6px 11px; }
.tiles .fixed { display: inline-block; font-size: .89rem; font-weight: 710; background: #dbe9f8; border-radius: 7px; padding: 8px 10px; }
.tiles:not(.order-zone) { margin: 8px 0 12px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback { margin-top: 13px; border-radius: 10px; padding: 11px 13px; }
.feedback p + p { margin-top: 4px; }
.feedback.good { background: var(--green-pale); color: #164934; }
.feedback.again { background: var(--danger-pale); color: #782e2e; }
.feedback.neutral { background: var(--ice); color: var(--navy); }
.practice-foot { margin-top: 14px; }
.progress-row { display: grid; grid-template-columns: minmax(145px,1fr) minmax(100px,1fr) max-content; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.progress-row:last-child { border-bottom: none; }
.status-note { margin-top: 12px; line-height: 1.4; color: var(--danger); font-size: .85rem; }
@media (max-width: 1080px) {
  :root { --side: 211px; }
  .chapter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  :root { --mobile-header-height: 105px; }
  .workspace { margin: 0; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 7;
    height: var(--mobile-header-height);
    padding: 7px 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: 44px 42px;
    grid-template-areas: "menu logo logo" "breadcrumb breadcrumb controls";
    gap: 4px 10px;
  }
  .mobile-menu { display: inline-grid !important; grid-area: menu; }
  .mobile-branding { display: inline-flex !important; grid-area: logo; width: min(185px, 100%); }
  .mobile-branding img { display: block; width: 100%; height: auto; }
  .breadcrumb { grid-area: breadcrumb; min-width: 0; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .breadcrumb span { margin-inline: 3px; }
  .topbar-options { grid-area: controls; margin-left: 0; }
  .sidebar { visibility: hidden; transform: translateX(-101%); top: var(--mobile-header-height); padding-top: 15px; box-shadow: 0 12px 30px #1227402e; }
  .sidebar .branding { display: none; }
  body.menu-open .sidebar { visibility: visible; transform: none; }
  body.menu-open::after { content: ""; position: fixed; inset: var(--mobile-header-height) 0 0; background: #112b4b45; z-index: 4; pointer-events: none; }
  #content { padding: 20px 15px 29px; }
  .hero { min-height: 226px; }
  .hero::before, .hero::after { right: -200px; top: -90px; }
  .hero-inner { max-width: 100%; }
  .hero-level { right: 22px; font-size: 7rem; }
  .section-head { margin-top: 24px; }
}
@media (max-width: 470px) {
  .stats { gap: 6px; }
  .stat { grid-template-columns: 1fr; gap: 5px; padding: 9px 8px; }
  .stat-icon { display: none; }
  .stat strong { font-size: 1.01rem; }
  .stat small { font-size: .73rem; line-height: 1.25; }
  .chapter-grid { gap: 8px; }
  .chapter-card { padding: 11px; min-height: 132px; gap: 5px; }
  .chapter-card h3 { font-size: .95rem; }
  .chapter-meta { font-size: .72rem; }
  .section-head { align-items: start; }
  .section-head .button { font-size: .76rem; padding-inline: 9px; }
  .progress-row { grid-template-columns: minmax(0,1fr) auto; column-gap: 8px; row-gap: 3px; }
  .progress-row progress { grid-column: 1 / -1; grid-row: 2; }
  .word-actions .icon-button { min-width: 38px; min-height: 38px; }
  th, td { padding: 7px 6px; }
  .breadcrumb { font-size: .79rem; }
  .topbar { column-gap: 8px; }
  .topbar-options { gap: 5px; }
  .level-picker summary { padding-inline: 6px; font-size: .79rem; }
}
@media (max-width: 370px) {

}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
