:root {
  --ink: #15253d;
  --ink-soft: #64728a;
  --navy: #203d55;
  --navy-2: #294d68;
  --paper: #f7f8fc;
  --surface: #ffffff;
  --line: #e5e9f1;
  --line-dark: rgba(255,255,255,.24);
  --orange: #f8a116;
  --orange-pale: #fff3dd;
  --blue: #5369e8;
  --blue-pale: #eef1ff;
  --green: #36a889;
  --green-pale: #eaf8f4;
  --purple: #8c72e8;
  --purple-pale: #f0edff;
  --red: #e76655;
  --shadow: 0 16px 40px rgba(33, 55, 84, .08);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

.toefl-ctw-page { min-height: 100vh; background: #f7f8fb; color: #252631; }
.toefl-ctw-content { width: min(1100px, calc(100% - 68px)); margin: 0 auto; padding: 48px 0 78px; }
.toefl-ctw-content h1 { margin: 10px 0 8px; color: #1f2028; font-size: 30px; letter-spacing: -.035em; }
.toefl-ctw-instruction { margin: 0 0 24px; color: #858995; font-size: 13px; }
.toefl-ctw-passage { padding: 30px 34px 35px; border: 1px solid #e2e3ea; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(38, 39, 66, .05); color: #3b3d47; font-size: 18px; line-height: 2.35; }
.toefl-ctw-word { display: inline-flex; align-items: baseline; vertical-align: baseline; white-space: nowrap; }
.toefl-ctw-gap { display: inline-flex; align-items: baseline; gap: 5px; margin: 0; vertical-align: baseline; }
.toefl-ctw-field { display: inline-grid; width: calc(var(--blank-length, 5) * 1ch); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 1em; line-height: 1.35; }
.toefl-ctw-input { grid-area: 1 / 1; z-index: 1; width: 100%; min-width: 0; height: 1.35em; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: inherit; font: inherit; line-height: 1.35; text-align: left; }
.toefl-ctw-input::placeholder { color: transparent; opacity: 1; }
.toefl-ctw-input:focus-visible { background: transparent; outline: none; }
.toefl-ctw-slots { --blank-line: #7a7e87; grid-area: 1 / 1; z-index: 2; display: flex; color: transparent; pointer-events: none; user-select: none; }
.toefl-ctw-slot { position: relative; flex: 0 0 1ch; width: 1ch; text-align: center; }
.toefl-ctw-slot::after { position: absolute; right: .12ch; bottom: .12em; left: .12ch; height: 1px; background-color: var(--blank-line); content: ""; }
.toefl-ctw-slot.is-filled { visibility: hidden; }
.toefl-ctw-input.correct-answer { color: #237b58; }
.toefl-ctw-input.wrong-answer { color: #bd4e56; }
.toefl-ctw-input.wrong-answer + .toefl-ctw-slots { --blank-line: #bd4e56; }
.toefl-ctw-expected { display: inline-block; margin-left: 5px; color: #bd4e56; font-size: .72em; font-weight: 750; white-space: nowrap; }
.toefl-ctw-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
@media (max-width: 700px) {
  .toefl-ctw-content { width: min(100% - 34px, 1100px); padding-top: 28px; }
  .toefl-ctw-content h1 { font-size: 24px; }
  .toefl-ctw-passage { padding: 20px 17px 24px; font-size: 16px; line-height: 2.15; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
body { font-size: 15px; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
/* The landing page and learning workspace use the canvas itself as the entry point. */
.topbar { display: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; position: relative; background: linear-gradient(145deg,#ffbf29,#f28e14); display: inline-block; box-shadow: inset -4px -3px 0 rgba(219,112,0,.22); }
.brand-mark:after { content: ""; width: 8px; height: 4px; border: 2px solid #57a33c; border-bottom: 0; border-radius: 10px 10px 0 0; position: absolute; top: -2px; right: 3px; transform: rotate(-25deg); }
.nav-links { display: flex; align-items: center; gap: 8px; height: 100%; }
.nav-link { padding: 11px 18px; border-radius: 99px; font-weight: 650; color: #232c3b; transition: background .2s, color .2s; white-space: nowrap; }
.nav-link:hover { background: #f2f4f8; }
.nav-link.active { color: #fff; background: var(--orange); box-shadow: 0 5px 14px rgba(248,161,22,.28); }
.account-action { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; background: #f2f4fa; padding: 10px 15px; border-radius: 9px; }
.account-action:hover { background: #e9edf7; }
.account-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.page { min-height: 100vh; }
.home-page { background: var(--paper); padding: 0 42px 54px; }
.home-hero { position: relative; overflow: hidden; max-width: 1450px; min-height: 650px; margin: 0 auto; border-radius: 28px; background: var(--navy); color: #fff; padding: 30px 70px 44px; display: flex; flex-direction: column; }
.home-hero:before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.04), transparent 48%); pointer-events: none; }
.hero-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; position: relative; z-index: 1; }
.hero-account { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.34); border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; font-weight: 700; white-space: nowrap; }
.hero-account:hover { background: rgba(255,255,255,.17); }
.hero-account .account-dot { background: #8de0b8; }
.hero-brand { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: .03em; }
.hero-brand small { display: block; font-family: inherit; font-size: 13px; letter-spacing: .1em; margin-top: 5px; font-weight: 600; }
.hero-rule { height: 1px; background: var(--line-dark); margin: 24px -70px 0; }
.hero-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 38px 0 24px; position: relative; z-index: 1; }
.hero-content h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px, 5vw, 86px); line-height: 1.02; letter-spacing: .005em; max-width: 850px; margin: 0; }
.hero-content h1 span { display: block; }
.hero-cn { font-size: 38px; letter-spacing: .12em; margin: 28px 0 34px; font-weight: 400; }
.hero-tagline { font-size: 19px; margin: 0; color: rgba(255,255,255,.95); }
.hero-cards { width: min(100%, 1070px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 76px; }
.hero-card { min-height: 180px; border: 1px solid rgba(255,255,255,.43); border-radius: 14px; background: rgba(255,255,255,.1); padding: 27px 36px; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; text-align: left; transition: transform .22s, background .22s; }
.hero-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.17); }
.hero-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hero-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; line-height: 1.02; margin: 8px 0 0; }
.hero-card p { font-size: 17px; line-height: 1.35; margin: 20px 0 0; color: rgba(255,255,255,.94); }
.circle-arrow { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: rgba(224,235,243,.32); color: white; display: grid; place-items: center; font-size: 26px; transition: background .2s; }
.hero-card:hover .circle-arrow { background: var(--orange); }
.home-below { max-width: 1450px; margin: 24px auto 0; display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.surface-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 28px 30px; box-shadow: var(--shadow); }
.panel-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: var(--blue); }
.surface-panel h2 { margin: 7px 0 20px; font-size: 24px; letter-spacing: -.03em; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-tile { padding: 15px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 98px; transition: border .2s, transform .2s; }
.quick-tile:hover { border-color: var(--blue); transform: translateY(-2px); }
.quick-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 850; }
.quick-tile strong { font-size: 15px; }
.quick-tile small { color: var(--ink-soft); line-height: 1.35; }
.progress-row { display: flex; align-items: center; gap: 16px; margin: 14px 0; }
.progress-label { width: 72px; color: var(--ink-soft); }
.progress-track { height: 9px; background: #edf0f6; border-radius: 99px; flex: 1; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; }
.progress-value { width: 36px; text-align: right; font-weight: 800; }
.progress-total { display: flex; align-items: baseline; gap: 9px; margin: -7px 0 19px; color: var(--ink-soft); }
.progress-total strong { color: var(--ink); font-size: 28px; line-height: 1; }
.progress-total span { font-size: 13px; }
.progress-value { width: 85px; font-size: 12px; white-space: nowrap; }

.workspace-page { display: grid; grid-template-columns: 274px minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.workspace-sidebar { border-right: 1px solid var(--line); padding: 36px 24px; background: #fff; }
.workspace-sidebar h2 { margin: 0 0 5px 26px; font-size: 22px; }
.workspace-sidebar > p { margin: 0 0 34px 26px; color: #8b8f99; font-size: 12px; letter-spacing: .2em; font-weight: 700; }
.side-nav { display: grid; gap: 9px; }
.side-nav button { display: flex; align-items: center; gap: 15px; height: 55px; padding: 0 22px; border-radius: 13px; background: transparent; color: #353740; font-size: 17px; font-weight: 650; text-align: left; }
.side-nav button:hover { background: #f3f5f9; }
.side-nav button.active { background: #222224; color: #fff; box-shadow: 0 7px 18px rgba(20,25,33,.15); }
.side-icon { width: 22px; text-align: center; font-size: 20px; color: #7b808b; }
.side-nav button.active .side-icon { color: #fff; }
.workspace-main { padding: 63px clamp(26px, 6vw, 90px) 70px; max-width: 1280px; width: 100%; }
.practice-heading { margin-bottom: 24px; }
.practice-heading h1 { font-size: 37px; letter-spacing: -.045em; margin: 0 0 14px; }
.practice-heading p { font-size: 17px; color: #969aa5; margin: 0; }
.tool-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: #f3f4f8; border-radius: 12px; margin-bottom: 48px; }
.tool-tab { padding: 11px 20px; border-radius: 8px; color: #777b86; background: transparent; font-weight: 700; }
.tool-tab.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(33,55,84,.08); }
.tool-tab .badge { margin-left: 8px; background: #ec4e68; color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 5px; }
.skill-overview { display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; padding: 14px 17px; margin: -25px 0 35px; }
.overview-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 11px; font-size: 21px; font-weight: 850; }
.overview-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.overview-copy strong { font-size: 15px; }
.overview-copy small { color: var(--ink-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-count { color: var(--ink-soft); font-size: 12px; font-weight: 800; white-space: nowrap; }
.section-title { margin: 0 0 22px 4px; font-size: 23px; letter-spacing: -.03em; }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(280px,1fr)); gap: 24px; }
.bank-card { min-height: 126px; border: 1px solid #e2e5ec; border-radius: 17px; background: #fff; display: flex; align-items: center; gap: 24px; padding: 26px 31px; text-align: left; transition: border .2s, box-shadow .2s, transform .2s; }
.bank-card:hover { border-color: #d0d7e7; box-shadow: 0 13px 28px rgba(30,55,90,.08); transform: translateY(-2px); }
.bank-card.wide { grid-column: 1 / -1; }
.bank-mark { width: 61px; height: 61px; flex: 0 0 61px; border: 1px solid #edf0f5; border-radius: 14px; display: grid; place-items: center; font-size: 29px; color: var(--blue); }
.bank-card:nth-child(2) .bank-mark { color: var(--orange); }
.bank-card:nth-child(3) .bank-mark { color: var(--green); }
.bank-card:nth-child(4) .bank-mark { color: var(--purple); }
.bank-card:nth-child(5) .bank-mark { color: #718197; }
.bank-copy strong { display: block; font-size: 20px; margin-bottom: 7px; }
.bank-copy small { color: #9b9ea7; font-size: 15px; }
.tool-placeholder { padding: 56px 30px; text-align: center; border: 1px dashed #ccd4e4; border-radius: 15px; color: var(--ink-soft); }

.mock-page { max-width: 1360px; margin: 0 auto; padding: 52px 42px 80px; }
.mock-overview { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; border-radius: 17px; background: var(--navy); color: #fff; padding: 33px 38px; margin-bottom: 43px; box-shadow: 0 18px 36px rgba(30,58,82,.13); }
.mock-overview-copy { min-width: 0; }
.mock-eyebrow { font-size: 11px; font-weight: 850; letter-spacing: .14em; color: #b7c9d7; }
.mock-overview h2 { font-size: 28px; letter-spacing: -.04em; margin: 11px 0 8px; }
.mock-overview p { color: rgba(255,255,255,.78); margin: 0; }
.mock-parts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.mock-parts span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.24); border-radius: 7px; color: rgba(255,255,255,.78); font-size: 12px; }
.mock-parts b { color: #fff; margin-right: 4px; }
.mock-start { background: var(--orange); color: #fff; white-space: nowrap; }
.mock-start:hover { background: #ffae25; }
.mock-start span { margin-left: 8px; font-size: 20px; line-height: 0; vertical-align: -2px; }
.mock-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.mock-section-head h2 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.035em; }
.mock-count { color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.mock-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.mock-card { min-height: 108px; display: flex; align-items: center; gap: 17px; text-align: left; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 20px 23px; transition: border .2s, transform .2s, box-shadow .2s; }
.mock-card:hover { border-color: #c7d0e5; box-shadow: 0 13px 28px rgba(30,55,90,.08); transform: translateY(-2px); }
.mock-card-featured { grid-column: 1 / -1; background: #f3f6ff; border-color: #d9e0fc; }
.mock-card-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-pale); font-size: 24px; font-weight: 850; }
.mock-card-featured .mock-card-icon { background: var(--ink); color: #fff; }
.mock-card-copy { min-width: 0; flex: 1; display: grid; gap: 6px; }
.mock-card-copy strong { font-size: 17px; }
.mock-card-copy small { color: var(--ink-soft); line-height: 1.4; }
.mock-card-arrow { font-size: 23px; color: #8995ad; }
.mock-note { margin-top: 38px; border-top: 1px solid var(--line); padding: 27px 0 0; }
.mock-note strong { display: block; margin: 7px 0; font-size: 17px; }
.mock-note p { margin: 0; color: var(--ink-soft); }

.exercise-shell { max-width: 980px; margin: 0 auto; }
.exercise-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.back-button { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); background: transparent; font-weight: 700; padding: 8px 0; }
.back-button:hover { color: var(--ink); }
.exercise-title { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.timer { padding: 9px 14px; border-radius: 9px; background: #f4f6fb; font-weight: 800; color: var(--ink); }
.exercise-progress { height: 7px; background: #eef1f5; border-radius: 99px; overflow: hidden; margin-bottom: 32px; }
.exercise-progress i { display: block; height: 100%; background: var(--orange); border-radius: inherit; transition: width .2s; }
.question-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 34px 38px; box-shadow: var(--shadow); }
.question-meta { display: flex; justify-content: space-between; color: #8e95a6; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.question-card h2 { font-size: 23px; line-height: 1.5; margin: 25px 0; }
.exercise-loading { text-align: center; padding: 72px 28px; }
.exercise-loading p { color: var(--ink-soft); margin-top: 8px; }
.loading-spinner { width: 34px; height: 34px; margin: 0 auto 18px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
.exercise-audio { display: grid; gap: 8px; margin: 0 0 22px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.exercise-audio audio { width: 100%; }
.exercise-audio span { color: var(--ink-soft); font-size: .86rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.question-context { background: #f7f8fb; padding: 18px; border-radius: 10px; line-height: 1.75; color: #4f5b70; margin-bottom: 20px; }
.option-list { display: grid; gap: 12px; }
.option { display: flex; align-items: center; gap: 14px; border: 1px solid #e3e7ef; border-radius: 10px; padding: 15px 17px; cursor: pointer; transition: border .2s, background .2s; }
.option:hover { border-color: #b7c3f3; background: #f9faff; }
.option.selected { border-color: var(--blue); background: var(--blue-pale); }
.option input { accent-color: var(--blue); }
.text-answer { width: 100%; border: 1px solid #e1e5ee; border-radius: 10px; padding: 15px; resize: vertical; min-height: 120px; outline: none; }
.text-answer:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(83,105,232,.12); }
.exercise-actions { display: flex; justify-content: flex-end; gap: 11px; margin-top: 26px; }
.primary-button, .secondary-button { border-radius: 9px; padding: 12px 20px; font-weight: 800; }
.primary-button { background: var(--ink); color: #fff; }
.primary-button:hover { background: var(--navy-2); }
.secondary-button { background: #f1f3f8; color: var(--ink); }
.secondary-button:hover { background: #e8ebf2; }
.result-panel { text-align: center; padding: 22px 8px 4px; }
.result-score { font-size: 48px; font-weight: 900; color: var(--blue); margin: 3px 0; }
.result-panel p { color: var(--ink-soft); }

/* Mango-style reading room: fixed exam header with independently scrollable panes. */
.reading-room { min-height: 100vh; background: #f7f7f8; color: #1d1d1f; display: flex; flex-direction: column; }
.reading-room-header { min-height: 66px; padding: 0 28px; background: #fff; border-bottom: 1px solid #e2e2e5; display: flex; align-items: center; gap: 28px; }
.room-brand { display: inline-flex; align-items: center; gap: 9px; min-width: 190px; color: #222; }
.room-brand-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--orange); color: #fff; font: 800 14px Georgia, serif; }
.room-title { min-width: 0; flex: 1; display: grid; gap: 2px; }
.room-title span { color: #86868b; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.room-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.room-header-actions { display: inline-flex; align-items: center; gap: 14px; }
.room-timer { color: #e34838; font-variant-numeric: tabular-nums; font-weight: 750; }
.room-submit { padding: 8px 14px; border: 1px solid #d1d1d6; border-radius: 5px; background: #fff; color: #1d1d1f; font-weight: 700; }
.room-submit:hover { border-color: var(--orange); color: #bd6900; }
.room-instruction { padding: 10px 28px; border-bottom: 1px solid #e5e5e7; background: #fafafa; color: #5c5c60; font-size: 12px; }
.reading-split { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr); }
.reading-pane { min-height: 0; overflow: auto; padding: 28px 34px 46px; background: #fff; }
.passage-pane { border-right: 1px solid #d7d7dc; }
.questions-pane { background: #fbfbfc; overflow-anchor: none; }
.pane-label { margin-bottom: 15px; color: #86868b; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.passage-pane h1 { margin: 0 0 26px; font: 700 24px/1.25 Georgia, 'Times New Roman', serif; }
.reading-passage { max-width: 760px; color: #303034; font-size: 15px; line-height: 1.85; }
.reading-passage p { margin: 0 0 20px; }
.question-instruction { margin: -4px 0 26px; color: #4b4b50; font-size: 14px; line-height: 1.6; }
.reading-question-list { display: grid; gap: 0; }
.reading-question { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-top: 1px solid #e2e2e5; }
.reading-question.current { margin-inline: -10px; padding-inline: 10px; background: #fffaf2; border-radius: 6px; }
.reading-question.question-correct { border-left: 3px solid #2f8a63; padding-left: 12px; }
.reading-question.question-wrong { border-left: 3px solid #c94b45; padding-left: 12px; }
.reading-question.question-ungraded { border-left: 3px solid #9299a8; padding-left: 12px; }
.reading-question-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #f0f0f2; color: #4b4b50; font-weight: 800; }
.reading-question-body h2 { margin: 1px 0 20px; font-size: 17px; line-height: 1.55; font-weight: 700; }
.reading-options { display: grid; gap: 12px; }
.reading-option { width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 6px 0; background: transparent; color: #343438; cursor: pointer; line-height: 1.45; text-align: left; }
.reading-option:disabled { cursor: default; }
.reading-radio { width: 16px; height: 16px; margin-top: 2px; border: 1.5px solid #9a9aa1; border-radius: 50%; background: #fff; }
.reading-option.selected .reading-radio { border: 5px solid var(--orange); }
.reading-option.selected { color: #141416; font-weight: 700; }
.reading-option.correct-answer, .option.correct-answer { border-color: #2f8a63; background: #edf8f2; color: #1f684b; }
.reading-option.wrong-answer, .option.wrong-answer { border-color: #c94b45; background: #fff0ef; color: #96352f; }
.reading-option.correct-answer .reading-radio { border: 5px solid #2f8a63; }
.reading-option.wrong-answer .reading-radio { border: 5px solid #c94b45; }
.reading-fill { display: grid; gap: 8px; max-width: 300px; }
.reading-text-input { width: 100%; border: 0; border-bottom: 2px solid #8b8b91; padding: 8px 2px; background: transparent; outline: none; font-size: 16px; }
.reading-text-input:focus { border-color: var(--orange); }
.reading-text-input.correct-answer, .text-answer.correct-answer { border-color: #2f8a63; background: #edf8f2; color: #1f684b; }
.reading-text-input.wrong-answer, .text-answer.wrong-answer { border-color: #c94b45; background: #fff0ef; color: #96352f; }
.answer-feedback { display: grid; gap: 8px; margin-top: 14px; padding: 13px 15px; border: 1px solid; border-radius: 6px; font-size: 13px; line-height: 1.55; }
.answer-feedback > div { display: grid; gap: 4px; }
.answer-correct { border-color: #b8dfcb; background: #edf8f2; color: #1f684b; }
.answer-wrong { border-color: #efc1bd; background: #fff0ef; color: #96352f; }
.answer-ungraded { border-color: #d9dce3; background: #f5f6f8; color: #626a78; }
.reading-fill span { color: #86868b; font-size: 11px; text-transform: uppercase; }
.room-question-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e2e2e5; }
.room-result { display: grid; justify-items: center; gap: 8px; margin-top: 22px; padding: 18px; border: 1px solid #dfe4f5; background: #f7f8ff; border-radius: 8px; }
.room-result strong { color: var(--blue); font-size: 34px; }
.room-result span { color: #666b7a; font-size: 13px; }
.room-result.result-ungraded strong { color: #626a78; font-size: 20px; }
.room-result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.room-footer { min-height: 58px; padding: 8px 28px; border-top: 1px solid #dedee2; background: #fff; display: flex; align-items: center; gap: 22px; }
.room-question-nav { display: flex; align-items: center; gap: 6px; flex: 1; overflow-x: auto; }
.room-question-nav > span { color: #86868b; font-size: 12px; margin-right: 4px; }
.room-q-number { width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid #d1d1d6; border-radius: 4px; background: #fff; color: #55555b; font-size: 12px; }
.room-q-number:hover { border-color: var(--orange); }
.room-q-number.active { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 800; }
.room-q-number.answered:not(.active) { background: #f2f2f5; color: #222; }
.room-q-number.nav-correct { border-color: #2f8a63; color: #1f684b; background: #edf8f2; }
.room-q-number.nav-wrong { border-color: #c94b45; color: #96352f; background: #fff0ef; }
.room-q-number.nav-ungraded { border-color: #aeb4c0; color: #626a78; background: #f5f6f8; }
.room-q-number.active.nav-correct, .room-q-number.active.nav-wrong, .room-q-number.active.nav-ungraded { box-shadow: 0 0 0 2px var(--orange); }
.room-progress-label { color: #86868b; font-size: 12px; white-space: nowrap; }

/* The exam shell keeps both panes inside the viewport, as in the reference exam UI. */
.reading-room { height: 100vh; min-height: 620px; overflow: hidden; }
.reading-room-header { flex: 0 0 auto; }
.room-font-controls { display: inline-flex; align-items: center; gap: 3px; }
.room-icon-button { width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #68686d; font-size: 12px; font-weight: 750; cursor: pointer; }
.room-icon-button:hover, .room-icon-button:focus-visible { background: #f1f1f3; color: #1d1d1f; outline: none; }
.room-timer { min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.room-submit { background: #2d2d31; border-color: #2d2d31; color: #fff; cursor: pointer; }
.room-submit:hover { background: #111113; border-color: #111113; color: #fff; }
.room-submit:disabled { opacity: .62; cursor: default; }
.room-instruction { display: flex; align-items: center; gap: 8px; }
.question-rules { margin: -5px 0 18px; color: #414146; font-size: 13px; line-height: 1.5; }
.question-rules p { margin: 0 0 4px; }
.question-rules dl { margin: 10px 0 0; display: grid; gap: 3px; }
.question-rules dl > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px; }
.question-rules dt { font-weight: 800; }
.question-rules dd { margin: 0; }
.reading-room.font-large .reading-passage { font-size: 17px; }
.reading-room.font-large .reading-question-body h2 { font-size: 18px; }

.ielts-question-group { margin: 24px 0 0; padding: 16px 18px; border: 1px solid #dedfe4; border-radius: 6px; background: #fff; color: #404046; }
.ielts-question-group strong { display: block; margin-bottom: 6px; font-size: 14px; }
.ielts-question-group p { margin: 0; white-space: pre-line; font-size: 13px; line-height: 1.55; }
.ielts-question-context { margin-top: 13px; padding-top: 13px; border-top: 1px solid #ececef; white-space: pre-line; font: 14px/1.65 Georgia, "Times New Roman", serif; color: #303034; }
.ielts-question-image { display: block; width: 100%; max-height: 680px; object-fit: contain; margin-top: 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }

.listening-room { height: 100vh; overflow: hidden; }
.listening-player { padding: 14px 28px; border-bottom: 1px solid #dedee2; background: #fff; display: grid; grid-template-columns: minmax(180px, .5fr) minmax(320px, 1fr); align-items: center; gap: 24px; }
.listening-player > div { display: grid; gap: 3px; min-width: 0; }
.listening-player strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listening-player span { color: #77777d; font-size: 12px; }
.listening-player audio { width: 100%; height: 38px; }
.listening-question-pane { min-height: 0; flex: 1; overflow: auto; padding: 24px max(24px, calc((100vw - 920px) / 2)) 48px; background: #fbfbfc; }
.listening-transcript { flex: 0 0 auto; max-height: 34vh; overflow: auto; padding: 12px max(24px, calc((100vw - 920px) / 2)); border-top: 1px solid #dedee2; background: #fff; color: #4b4b50; }
.listening-transcript summary { cursor: pointer; font-weight: 750; }
.listening-transcript div { padding-top: 12px; white-space: pre-line; font-size: 13px; line-height: 1.65; }

.production-room { height: 100vh; min-height: 620px; overflow: hidden; background: #f7f7f8; color: #1d1d1f; display: flex; flex-direction: column; }
.production-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(360px, .85fr) minmax(480px, 1.15fr); }
.production-prompt, .production-answer { min-height: 0; overflow: auto; padding: 30px 36px 46px; }
.production-prompt { border-right: 1px solid #d7d7dc; background: #fff; }
.production-prompt h1 { margin: 0 0 22px; font: 700 24px/1.3 Georgia, "Times New Roman", serif; }
.production-question { white-space: pre-line; color: #303034; font: 16px/1.75 Georgia, "Times New Roman", serif; }
.production-translation { margin-top: 22px; padding: 16px; border-left: 3px solid var(--orange); background: #fffaf1; white-space: pre-line; color: #65656a; line-height: 1.65; }
.writing-diagram { display: block; max-width: min(100%, 720px); max-height: 560px; margin: 26px auto 0; object-fit: contain; background: #fff; }
.production-answer { display: flex; flex-direction: column; background: #fbfbfc; }
.production-answer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.production-answer-head span { color: #77777d; font-size: 12px; }
.production-answer textarea { width: 100%; min-height: 420px; flex: 1; resize: none; padding: 20px; border: 1px solid #d9d9de; border-radius: 6px; outline: none; background: #fff; color: #202024; font: 15px/1.75 Inter, "Segoe UI", sans-serif; }
.production-answer textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(248, 161, 22, .13); }

.vocab-page, .history-page, .admin-page { max-width: 1360px; margin: 0 auto; padding: 52px 42px 80px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.page-heading h1 { margin: 0 0 9px; font-size: 38px; letter-spacing: -.045em; }
.page-heading p { margin: 0; color: var(--ink-soft); }
.vocab-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; }
.vocab-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.vocab-tabs { display: flex; gap: 9px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 34px; }
.vocab-tab { background: transparent; padding: 8px 13px; color: var(--ink-soft); font-weight: 750; border-radius: 7px; }
.vocab-tab.active { background: var(--blue-pale); color: var(--blue); }
.flash-wrap { text-align: center; }
.flash-word { font-size: 57px; font-weight: 900; letter-spacing: -.04em; margin: 16px 0 7px; }
.flash-phonetic { color: var(--blue); font-weight: 750; }
.flash-definition { color: var(--ink-soft); font-size: 18px; margin: 16px 0 28px; }
.flash-example { background: #f7f8fc; color: #59667c; padding: 15px 20px; line-height: 1.6; border-radius: 9px; text-align: left; margin-bottom: 25px; }
.flash-actions { display: flex; justify-content: center; gap: 10px; }
.vocab-stats { display: grid; gap: 14px; }
.stat-line { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.stat-line:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-line span { color: var(--ink-soft); }
.stat-line strong { font-size: 24px; }
.word-table { width: 100%; border-collapse: collapse; }
.word-table th, .word-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.word-table th { color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }

.vocab-library-page { min-height: calc(100vh - 72px); }
.vocab-category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 42px; }
.vocab-category-tab { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; min-height: 84px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 5px 18px rgba(31, 41, 55, .05); }
.vocab-category-tab:hover { border-color: #aeb8c8; transform: translateY(-1px); }
.vocab-category-tab.active { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.vocab-category-tab > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.vocab-category-tab strong { font-size: 17px; }
.vocab-category-tab small { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vocab-category-tab b { color: var(--ink-soft); font-size: 13px; }
.vocab-category-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 7px; background: var(--category-pale); color: var(--category-color); font-weight: 900; }
.vocab-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.vocab-library-heading span { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: 0; }
.vocab-library-heading h2 { margin: 5px 0 0; font-size: 26px; }
.vocab-library-heading p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.vocab-package-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vocab-package-card { display: grid; grid-template-columns: 42px 1fr 34px; align-items: center; gap: 15px; min-height: 118px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 5px 18px rgba(31, 41, 55, .05); }
.vocab-package-card:hover { border-color: #9ca8ba; box-shadow: 0 9px 24px rgba(31, 41, 55, .09); transform: translateY(-1px); }
.vocab-package-index { color: #a1a8b3; font: 800 14px/1 Georgia, "Times New Roman", serif; }
.vocab-package-copy { display: grid; gap: 6px; min-width: 0; }
.vocab-package-copy small { color: var(--blue); font-size: 11px; font-weight: 850; }
.vocab-package-copy strong { font-size: 18px; }
.vocab-package-copy > span { color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.vocab-package-arrow { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 17px; }
.vocab-player-page { min-height: calc(100vh - 68px); padding: 14px; background: #eef1f4; }
.vocab-player-toolbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; max-width: 1520px; min-height: 58px; margin: 0 auto 12px; padding: 8px 10px; }
.vocab-player-toolbar > div { display: grid; gap: 2px; min-width: 0; }
.vocab-player-toolbar span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.vocab-player-toolbar strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.vocab-open-window { text-decoration: none; }
.vocab-player-frame { display: block; width: min(100%, 1520px); height: calc(100vh - 164px); min-height: 620px; margin: 0 auto; border: 1px solid #d7dce3; border-radius: 8px; background: #fff; }

.records-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.records-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 23px; border-bottom: 1px solid var(--line); gap: 15px; }
.records-toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--ink); background: #fff; }
.record-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) 120px 120px 120px; align-items: center; gap: 16px; padding: 18px 23px; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: 0; }
.record-entry { border-bottom: 1px solid var(--line); }
.record-entry:last-child { border-bottom: 0; }
.record-entry > summary { list-style: none; cursor: pointer; }
.record-entry > summary::-webkit-details-marker { display: none; }
.record-entry[open] > summary { background: #fafaff; border-bottom: 1px solid #ececf2; }
.record-entry-action { display: grid; justify-items: end; gap: 5px; }
.record-entry-action b { color: var(--blue); font-size: 12px; }
.record-entry[open] .record-entry-action b { color: #676c7b; }
.record-review-panel { padding: 20px 23px 24px; background: #fbfbfd; }
.record-student { display: flex; align-items: baseline; gap: 10px; margin-bottom: 15px; }
.record-student span { color: var(--ink-soft); font-size: 12px; }
.record-answer-list { display: grid; gap: 10px; }
.record-answer-item { padding: 15px 16px; border: 1px solid #e5e6ed; border-radius: 10px; background: #fff; }
.record-answer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; }
.record-answer-item h3 { margin: 8px 0 12px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.record-answer-item dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.record-answer-item dl > div { padding: 10px 12px; border-radius: 8px; background: #f6f7fa; }
.record-answer-item dt { margin-bottom: 4px; color: var(--ink-soft); font-size: 11px; }
.record-answer-item dd { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-answer-status { padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.record-answer-status.correct { background: #eaf8f1; color: #20845e; }
.record-answer-status.wrong { background: #fff0f0; color: #b94b52; }
.record-answer-status.pending { background: #fff6df; color: #a56a08; }
.record-review-empty { padding: 18px; color: var(--ink-soft); text-align: center; }
.record-kind { font-size: 11px; color: var(--blue); text-transform: uppercase; font-weight: 850; letter-spacing: .1em; }
.record-title { font-weight: 800; margin-top: 5px; }
.record-muted { color: var(--ink-soft); font-size: 13px; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--ink-soft); }

.admin-note { padding: 16px 18px; border-radius: 10px; background: var(--orange-pale); color: #8a5a13; margin-bottom: 22px; }
.teacher-sync-note { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.teacher-sync-state { font-size:13px; font-weight:800; }
.teacher-sync-state.sync-ready { color:#17865f; }
.teacher-sync-state.sync-loading { color:#1769aa; }
.teacher-sync-state.sync-error { color:#b42318; }
.teacher-sync-note .mini-button { margin-left:auto; background:#fff; }
.user-row { display: grid; grid-template-columns: 1.2fr 1.5fr 120px 170px; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.status-pill { display: inline-flex; width: fit-content; border-radius: 99px; padding: 5px 10px; font-size: 12px; font-weight: 800; }
.status-pending { background: var(--orange-pale); color: #a86b08; }
.status-approved { background: var(--green-pale); color: #237962; }
.status-rejected { background: #ffebe8; color: #a7473a; }
.user-actions { display: flex; gap: 7px; justify-content: flex-end; }
.mini-button { padding: 8px 11px; border-radius: 7px; background: #f0f2f7; color: var(--ink); font-size: 12px; font-weight: 800; }
.mini-button.approve { color: #22785f; background: var(--green-pale); }
.mini-button.reject { color: #a7473a; background: #ffebe8; }

.modal-layer { position: fixed; inset: 0; background: rgba(19,31,49,.45); z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal { width: min(100%, 430px); background: #fff; border-radius: 15px; padding: 29px; box-shadow: 0 25px 70px rgba(15,28,48,.25); }
.modal h2 { margin: 0 0 8px; font-size: 26px; }
.modal > p { color: var(--ink-soft); margin: 0 0 23px; line-height: 1.55; }
.form-field { display: grid; gap: 7px; margin-bottom: 15px; }
.form-field label { color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.form-field input { border: 1px solid #dfe4ee; border-radius: 8px; padding: 12px 13px; outline: none; }
.form-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(83,105,232,.12); }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 24px; }
.modal-switch { background: transparent; color: var(--blue); font-size: 13px; font-weight: 750; padding: 0; }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 4px; }
.profile-actions { display: grid; gap: 10px; }
.profile-actions button { width: 100%; text-align: left; background: #f5f6fa; border-radius: 8px; padding: 12px 14px; font-weight: 750; }
.profile-actions button:hover { background: #edf0f7; }

.toast { position: fixed; right: 25px; bottom: 25px; z-index: 70; background: var(--ink); color: #fff; padding: 13px 17px; border-radius: 9px; box-shadow: var(--shadow); animation: toast-in .25s ease-out; }
@keyframes toast-in { from { transform: translateY(9px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 960px) {
  .topbar { padding: 0 22px; }
  .nav-links { gap: 0; }
  .nav-link { padding: 10px 11px; font-size: 13px; }
  .account-action { padding: 9px 11px; font-size: 13px; }
  .home-page { padding: 16px 18px 35px; }
  .home-hero { padding: 27px 35px 34px; min-height: 620px; }
  .hero-rule { margin-left: -35px; margin-right: -35px; }
  .hero-cards { gap: 12px; margin-top: 53px; }
  .hero-card { padding: 19px; }
  .hero-card h2 { font-size: 24px; }
  .hero-card p { font-size: 14px; }
  .circle-arrow { width: 42px; height: 42px; flex-basis: 42px; }
  .home-below { grid-template-columns: 1fr; }
  .workspace-page { grid-template-columns: 220px minmax(0,1fr); }
  .workspace-main { padding: 45px 34px; }
  .workspace-sidebar { padding-left: 15px; padding-right: 15px; }
  .workspace-sidebar h2, .workspace-sidebar > p { margin-left: 15px; }
  .side-nav button { padding: 0 14px; }
  .vocab-layout { grid-template-columns: 1fr; }
  .mock-page { padding: 37px 24px 60px; }
  .mock-overview { align-items: flex-start; flex-direction: column; padding: 25px 24px; }
  .mock-start { width: 100%; }
}

@media (max-width: 700px) {
  .topbar { height: auto; min-height: 68px; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 24px; height: 24px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; justify-content: space-between; padding-bottom: 2px; }
  .nav-link { font-size: 12px; padding: 8px 9px; }
  .account-action { margin-left: auto; }
  .page { min-height: 100vh; }
  .home-hero { min-height: 700px; padding: 23px 21px 28px; border-radius: 18px; }
  .hero-rule { margin-left: -21px; margin-right: -21px; }
  .hero-content { padding-top: 32px; }
  .hero-content h1 { font-size: 46px; }
  .hero-cn { font-size: 26px; margin: 25px 0 29px; }
  .hero-tagline { font-size: 14px; }
  .hero-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 38px; }
  .hero-card { min-height: 112px; padding: 16px 18px; }
  .hero-card h2 { font-size: 22px; }
  .hero-card p { margin-top: 8px; font-size: 13px; }
  .circle-arrow { width: 38px; height: 38px; flex-basis: 38px; font-size: 21px; }
  .home-below { margin-top: 15px; }
  .surface-panel { padding: 21px 18px; }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
  .workspace-page { display: block; }
  .workspace-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 16px 12px; }
  .workspace-sidebar h2 { margin-left: 0; font-size: 19px; }
  .workspace-sidebar > p { margin: 3px 0 16px; }
  .side-nav { display: flex; overflow-x: auto; gap: 6px; }
  .side-nav button { flex: 0 0 auto; height: 43px; border-radius: 9px; padding: 0 12px; font-size: 14px; gap: 8px; }
  .workspace-main { padding: 32px 17px 55px; }
  .practice-heading h1 { font-size: 30px; }
  .practice-heading p { font-size: 14px; }
  .tool-tabs { margin-bottom: 28px; width: 100%; }
  .tool-tab { flex: 1; padding: 10px 7px; font-size: 12px; }
  .tool-tab .badge { display: block; width: fit-content; margin: 3px auto 0; }
  .skill-overview { margin: -10px 0 27px; padding: 12px; }
  .overview-copy small { white-space: normal; line-height: 1.35; }
  .overview-count { display: none; }
  .bank-grid { grid-template-columns: 1fr; gap: 12px; }
  .bank-card.wide { grid-column: auto; }
  .bank-card { min-height: 102px; padding: 17px; gap: 15px; border-radius: 13px; }
  .bank-mark { width: 49px; height: 49px; flex-basis: 49px; }
  .bank-copy strong { font-size: 17px; }
  .bank-copy small { font-size: 13px; }
  .question-card { padding: 23px 18px; }
  .question-card h2 { font-size: 19px; }
  .exercise-top { align-items: flex-start; gap: 12px; }
  .exercise-title { font-size: 23px; }
  .timer { font-size: 13px; white-space: nowrap; }
  .vocab-page, .history-page, .admin-page { padding: 32px 17px 55px; }
  .mock-page { padding: 31px 17px 55px; }
  .mock-overview { padding: 21px 18px; margin-bottom: 32px; }
  .mock-overview h2 { font-size: 24px; }
  .mock-parts { gap: 6px; }
  .mock-parts span { font-size: 11px; padding: 7px 8px; }
  .mock-grid { grid-template-columns: 1fr; gap: 11px; }
  .mock-card-featured { grid-column: auto; }
  .mock-card { min-height: 96px; padding: 16px; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 30px; }
  .vocab-card { padding: 20px 17px; }
  .vocab-category-tabs { grid-template-columns: 1fr; gap: 9px; margin-bottom: 30px; }
  .vocab-category-tab { min-height: 72px; }
  .vocab-package-grid { grid-template-columns: 1fr; }
  .vocab-package-card { min-height: 105px; padding: 17px 15px; }
  .vocab-player-page { padding: 8px; }
  .vocab-player-toolbar { grid-template-columns: auto 1fr; gap: 10px; }
  .vocab-player-toolbar .vocab-open-window { display: none; }
  .vocab-player-frame { height: calc(100vh - 150px); min-height: 540px; }
  .flash-word { font-size: 44px; }
  .record-row { grid-template-columns: 1fr 75px; gap: 8px; padding: 16px; }
  .record-row > :nth-child(3) { display: none; }
  .record-entry-action { justify-items: start; }
  .record-entry-action .record-muted { display: none; }
  .record-review-panel { padding: 14px; }
  .record-answer-item dl { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 1fr auto; gap: 8px; padding: 16px; }
  .user-row > :nth-child(2) { grid-column: 1 / -1; }
  .user-row > :nth-child(3) { grid-row: 1; grid-column: 2; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .reading-room-header { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .reading-room { height: auto; min-height: 100vh; overflow: visible; }
  .room-brand { min-width: auto; }
  .room-title { order: 3; flex-basis: 100%; }
  .room-header-actions { margin-left: auto; }
  .room-instruction { padding: 9px 14px; }
  .reading-split { display: flex; flex-direction: column; }
  .reading-pane { padding: 22px 18px 30px; overflow: visible; }
  .passage-pane { max-height: 46vh; overflow: auto; border-right: 0; border-bottom: 1px solid #d7d7dc; }
  .questions-pane { min-height: 48vh; }
  .passage-pane h1 { font-size: 21px; }
  .reading-passage { font-size: 14px; }
  .room-footer { padding: 8px 14px; gap: 10px; }
  .room-footer .back-button { font-size: 12px; }
  .room-question-nav > span { display: none; }
  .listening-room, .production-room { height: auto; min-height: 100vh; overflow: visible; }
  .listening-player { grid-template-columns: 1fr; padding: 13px 14px; gap: 10px; }
  .listening-question-pane { overflow: visible; padding: 20px 16px 34px; }
  .listening-transcript { max-height: none; padding: 12px 16px; }
  .production-layout { display: flex; flex-direction: column; }
  .production-prompt, .production-answer { overflow: visible; padding: 22px 18px 30px; }
  .production-prompt { border-right: 0; border-bottom: 1px solid #d7d7dc; }
  .production-prompt h1 { font-size: 21px; }
  .production-answer textarea { min-height: 360px; resize: vertical; }
}

/* Imported catalogue surfaces mirror the two reference libraries. */
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 0 18px; }
.catalog-heading h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.03em; }
.catalog-heading p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.catalog-search { display: inline-flex; align-items: center; gap: 8px; min-width: 238px; padding: 9px 12px; border: 1px solid #e5e8f0; border-radius: 9px; background: #fff; color: #9098a8; }
.catalog-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.catalog-filter { padding: 8px 13px; border: 1px solid #e8eaf0; border-radius: 8px; background: #fff; color: #71798a; font-size: 12px; font-weight: 750; }
.catalog-filter:hover { border-color: #cbd4f3; color: var(--blue); }
.catalog-filter.active { border-color: var(--orange); background: var(--orange); color: #fff; box-shadow: 0 5px 13px rgba(248,161,22,.18); }
.imported-reading-grid, .imported-hang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.imported-reading-card, .imported-hang-card { min-width: 0; padding: 19px 20px 16px; border: 1px solid #e7e9ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(33,55,84,.045); transition: transform .2s, border-color .2s, box-shadow .2s; }
.imported-reading-card:hover, .imported-hang-card:hover { border-color: #d3daf4; box-shadow: 0 14px 30px rgba(33,55,84,.09); transform: translateY(-2px); }
.imported-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.imported-part { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 5px; background: #edf1ff; color: #586be1; font-size: 11px; font-weight: 850; }
.imported-free { color: #f09b10; font-size: 11px; font-weight: 800; }
.imported-reading-card h3, .imported-hang-card h3 { margin: 0; color: #20283a; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.imported-cn { margin: 5px 0 2px; color: #343b4d; font-size: 12px; font-weight: 650; }
.imported-tag { min-height: 17px; margin: 0 0 12px; color: #9299a8; font-size: 11px; }
.imported-recall { min-height: 20px; margin-bottom: 9px; color: #f0a11b; font-size: 11px; font-weight: 750; }
.imported-recall b { margin-left: 5px; color: #7d86a0; font-weight: 650; }
.imported-type-row, .imported-season-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 23px; margin-bottom: 8px; }
.imported-type-row span { padding: 3px 7px; border-radius: 4px; background: #f4f5f8; color: #777f8f; font-size: 11px; }
.imported-season-row span { padding: 3px 7px; border-radius: 4px; background: #fff5e7; color: #e99a16; font-size: 11px; }
.imported-season-row span:last-child { background: #f3edff; color: #8664d8; }
.imported-card-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 0 11px; margin-top: 7px; border-top: 1px solid #f0f1f5; }
.imported-card-stats > div { min-width: 0; text-align: center; }
.imported-card-stats strong { display: block; overflow: hidden; color: #283248; font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.imported-card-stats small { display: block; margin-top: 3px; overflow: hidden; color: #9aa1ae; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.imported-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid #f0f1f5; }
.imported-history { color: #8f96a4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.imported-start { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; padding: 9px 13px; border-radius: 7px; background: #ff9f0a; color: #fff; font-size: 12px; font-weight: 850; box-shadow: 0 5px 12px rgba(255,159,10,.2); }
.imported-start:hover { background: #f39100; }
.imported-start span { font-size: 15px; line-height: 1; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 8px; color: #8a91a0; font-size: 12px; }
.catalog-pagination button { padding: 8px 12px; border: 1px solid #e5e8ef; border-radius: 7px; background: #fff; color: #59627a; font-weight: 750; }
.catalog-pagination button:not(:disabled):hover { border-color: var(--orange); color: var(--orange); }
.catalog-pagination button:disabled { cursor: not-allowed; opacity: .42; }
.catalog-jump { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid #e5e8ef; }
.catalog-jump input { width: 58px; height: 34px; padding: 5px 7px; border: 1px solid #dfe3eb; border-radius: 6px; background: #fff; color: var(--ink); text-align: center; outline: none; }
.catalog-jump input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(248,161,22,.12); }
.catalog-jump button { background: var(--ink); color: #fff; }
.imported-exercise-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; margin: -8px 0 18px; padding: 13px 16px; border: 1px solid #e6eaf6; border-radius: 11px; background: #fbfcff; }
.imported-exercise-banner strong { overflow: hidden; color: #273148; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.imported-exercise-banner small { grid-column: 2; color: #8c95a5; font-size: 12px; }

@media (max-width: 760px) {
  .catalog-heading { display: block; }
  .catalog-search { width: 100%; min-width: 0; margin-top: 12px; }
  .imported-reading-grid, .imported-hang-grid { grid-template-columns: 1fr; gap: 12px; }
  .imported-reading-card, .imported-hang-card { padding: 16px 15px 14px; }
  .imported-reading-card h3, .imported-hang-card h3 { font-size: 16px; }
  .catalog-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .catalog-filter { flex: 0 0 auto; }
  .catalog-pagination { flex-wrap: wrap; gap: 8px; font-size: 11px; }
  .catalog-pagination > span { width: 100%; max-width: none; text-align: center; order: -1; }
  .catalog-jump { padding-left: 0; border-left: 0; }
  .catalog-jump input { width: 52px; }
  .imported-exercise-banner { grid-template-columns: auto minmax(0, 1fr); }
}

/* TOEFL lab surfaces follow the Hang in There reference: quiet canvas, compact tabs, and scannable sets. */
.toefl-page { min-height: 100vh; background: #f7f8fb; color: #20212a; }
.toefl-nav { min-height: 68px; display: flex; align-items: center; gap: 24px; padding: 0 38px; background: #fff; border-bottom: 1px solid #e8e9ef; }
.toefl-hub-layout { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 15px; margin: 0 auto; padding: 36px 26px 56px; }
.toefl-hub-welcome, .toefl-weekly-panel, .toefl-recent-panel { min-width: 0; border: 1px solid #e4e5eb; border-radius: 8px; background: #fff; }
.toefl-hub-welcome { min-height: 200px; display: flex; flex-direction: column; justify-content: center; padding: 28px 30px; }
.toefl-hub-welcome h1 { margin: 12px 0 8px; color: #242631; font-size: 29px; }
.toefl-hub-welcome p { margin: 0; color: #898d99; font-size: 14px; }
.toefl-weekly-panel { padding: 18px 20px; }
.toefl-weekly-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.toefl-weekly-head div span, .toefl-recent-head > div > span { display: block; color: #888c99; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.toefl-weekly-head div strong { display: block; margin-top: 4px; color: #343642; font-size: 15px; }
.toefl-weekly-head > b { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 7px; background: #f0effa; color: #554dc1; font-size: 15px; }
.toefl-week-row { display: grid; grid-template-columns: 68px minmax(0, 1fr) 18px; align-items: center; gap: 9px; margin: 11px 0; color: #626674; font-size: 11px; }
.toefl-week-row div { height: 5px; overflow: hidden; border-radius: 8px; background: #eff0f4; }
.toefl-week-row i { height: 100%; display: block; border-radius: inherit; }
.toefl-week-row b { color: #555865; text-align: right; font-size: 10px; }
.toefl-skill-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.toefl-skill-card { min-width: 0; min-height: 82px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid #e3e4ea; border-radius: 8px; background: #fff; color: #2c2e39; text-align: left; transition: border-color .18s, background .18s; }
.toefl-skill-card:hover { border-color: #c9c6ec; background: #fcfbff; }
.toefl-skill-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 6px; background: var(--skill-pale); color: var(--skill-color); font-size: 12px; font-weight: 850; }
.toefl-skill-copy { min-width: 0; display: grid; gap: 4px; }
.toefl-skill-copy strong { font-size: 13px; }
.toefl-skill-copy small { overflow: hidden; color: #8f929d; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.toefl-skill-count { color: #999ca6; font-size: 9px; white-space: nowrap; }
.toefl-skill-card .toefl-arrow { font-size: 15px; }
.toefl-recent-panel { grid-column: 1 / -1; padding: 20px 22px; }
.toefl-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid #eff0f3; }
.toefl-recent-head h2 { margin: 4px 0 0; color: #2c2e39; font-size: 19px; }
.toefl-quiet-button { padding: 7px 10px; border: 1px solid #e5e5eb; border-radius: 6px; background: #fff; color: #5f6270; font-size: 11px; font-weight: 750; }
.toefl-recent-empty { padding: 25px 18px; border-bottom: 1px solid #eff0f3; color: #9699a4; font-size: 12px; text-align: center; }
.toefl-recent-list { display: grid; }
.toefl-recent-row { min-height: 53px; display: grid; grid-template-columns: minmax(0, 1fr) 55px 120px; align-items: center; gap: 16px; border-bottom: 1px solid #eff0f3; }
.toefl-recent-row > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.toefl-recent-row strong { overflow: hidden; color: #3b3d49; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.toefl-recent-row span, .toefl-recent-row time { color: #9295a0; font-size: 10px; }
.toefl-recent-row > b { color: #5149bf; font-size: 12px; text-align: right; }
.toefl-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 184px; }
.toefl-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #6659d9; color: #fff; font: 800 15px Georgia, serif; }
.toefl-brand strong { display: block; font-size: 15px; line-height: 1.1; }
.toefl-brand small { display: block; margin-top: 3px; color: #9396a2; font-size: 9px; letter-spacing: .15em; }
.toefl-main-links { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.toefl-nav-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.toefl-home-link, .toefl-exam-home-link { padding: 8px 10px; border: 1px solid #e5e5ec; border-radius: 7px; background: #fff; color: #666977; font-size: 11px; font-weight: 750; white-space: nowrap; }
.toefl-home-link:hover, .toefl-exam-home-link:hover { border-color: #c6c1ef; background: #faf9ff; color: #5145bc; }
.toefl-main-link { padding: 10px 12px; border-radius: 7px; background: transparent; color: #555965; font-size: 13px; font-weight: 700; white-space: nowrap; }
.toefl-main-link:hover:not(:disabled) { background: #f2f2f7; color: #2c2c37; }
.toefl-main-link.active { background: #efedff; color: #5145bc; }
.toefl-main-link.muted { color: #aeb1bb; cursor: not-allowed; }
.toefl-account { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #ececf2; border-radius: 8px; background: #fbfbfd; color: #50535f; font-size: 12px; font-weight: 750; white-space: nowrap; }
.toefl-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 1200px; margin: 0 auto; padding: 66px 42px 42px; }
.toefl-eyebrow { color: #6558ce; font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.toefl-hero h1 { margin: 11px 0 8px; color: #1d1e26; font-size: 42px; letter-spacing: -.045em; }
.toefl-hero p { margin: 0; color: #9295a0; font-size: 15px; }
.toefl-hero-stat { display: grid; justify-items: end; gap: 4px; padding: 16px 20px; border: 1px solid #e9e9f1; border-radius: 12px; background: #fff; color: #9699a5; font-size: 12px; }
.toefl-hero-stat strong { color: #242532; font-size: 30px; line-height: 1; }
.toefl-workspace { max-width: 1200px; margin: 0 auto; padding: 0 42px 72px; }
.toefl-mode-tabs { display: inline-flex; gap: 4px; margin-bottom: 19px; padding: 4px; border: 1px solid #e5e5ed; border-radius: 9px; background: #eff0f5; }
.toefl-mode-tab { min-height: 36px; padding: 8px 16px; border-radius: 6px; background: transparent; color: #797c89; font-size: 12px; font-weight: 750; white-space: nowrap; }
.toefl-mode-tab.active { background: #fff; color: #5145bc; box-shadow: 0 2px 8px rgba(47, 43, 99, .08); }
.toefl-teacher-empty { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; border: 1px dashed #d9d9e4; border-radius: 11px; background: rgba(255,255,255,.64); text-align: center; }
.toefl-teacher-empty h2 { margin: 11px 0 6px; color: #282a34; font-size: 21px; }
.toefl-teacher-empty p { margin: 0; color: #9194a0; font-size: 13px; }
.toefl-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 7px; border: 1px solid #e5e5ed; border-radius: 11px; background: #eff0f5; }
.toefl-tab { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #555966; text-align: left; }
.toefl-tab:hover { color: #2c2e39; }
.toefl-tab.active { border-color: #ddd9ff; background: #fff; box-shadow: 0 4px 12px rgba(47, 43, 99, .08); color: #252631; }
.toefl-tab-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #e7e8f0; color: #666a77; font-size: 11px; font-weight: 850; }
.toefl-tab.active .toefl-tab-number { background: #6054d5; color: #fff; }
.toefl-tab strong, .toefl-tab small { display: block; }
.toefl-tab strong { font-size: 13px; }
.toefl-tab small { margin-top: 3px; color: #9296a4; font-size: 11px; }
.toefl-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 33px 0 18px; }
.toefl-list-heading h2 { margin: 0 0 6px; color: #21232d; font-size: 22px; letter-spacing: -.03em; }
.toefl-list-heading p { margin: 0; color: #9396a0; font-size: 13px; }
.toefl-list-count { color: #9b9eaa; font-size: 12px; font-weight: 750; }
.toefl-reading-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.toefl-reading-card { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 13px; padding: 17px 18px 14px; border: 1px solid #e4e5eb; border-radius: 11px; background: #fff; color: #272933; text-align: left; box-shadow: 0 5px 15px rgba(41, 44, 70, .025); transition: border-color .18s, box-shadow .18s, transform .18s; }
.toefl-reading-card:hover { border-color: #bdb6f5; box-shadow: 0 12px 24px rgba(72, 64, 158, .1); transform: translateY(-2px); }
.toefl-card-top, .toefl-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.toefl-card-top { color: #858996; font-size: 11px; }
.toefl-reading-card > strong { min-height: 38px; font-size: 16px; line-height: 1.25; }
.toefl-card-footer { padding-top: 10px; border-top: 1px solid #f0f0f4; color: #9b9da6; font-size: 11px; }
.toefl-card-footer .done { color: #6358c7; font-weight: 750; }
.toefl-arrow { color: #aaaebb; font-size: 18px; line-height: 1; }
.toefl-listening-list { display: grid; gap: 12px; }
.toefl-listening-set { padding: 17px 20px 16px; border: 1px solid #e3e4ea; border-radius: 11px; background: #fff; box-shadow: 0 5px 15px rgba(41, 44, 70, .025); }
.toefl-listening-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.toefl-listening-head strong, .toefl-listening-head span { display: block; }
.toefl-listening-head strong { color: #2b2d37; font-size: 14px; }
.toefl-listening-head div span { margin-top: 7px; color: #9699a3; font-size: 11px; }
.toefl-listening-head > span { color: #777b89; font-size: 11px; }
.toefl-question-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.toefl-question-chip { min-width: 38px; height: 30px; padding: 0 7px; border: 1px solid #dedfe7; border-radius: 7px; background: #fff; color: #555967; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.toefl-question-chip:hover, .toefl-question-chip.completed { border-color: #c1bbf4; background: #f3f1ff; color: #5548c5; }
.toefl-exam-page { min-height: 100vh; background: #f7f8fb; color: #252631; }
.toefl-exam-header { min-height: 68px; display: flex; align-items: center; gap: 22px; padding: 10px 38px; border-bottom: 1px solid #e5e6ec; background: #fff; }
.toefl-exam-header > div:not(.toefl-exam-back-actions) { flex: 1; min-width: 0; display: grid; gap: 3px; }
.toefl-exam-header > div:not(.toefl-exam-back-actions) span { color: #8b8e9b; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.toefl-exam-header > div:not(.toefl-exam-back-actions) strong { overflow: hidden; color: #242631; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.toefl-exam-back-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.toefl-exam-counter { color: #6a6d7b; font-size: 12px; font-weight: 800; }
.toefl-exam-progress { height: 4px; background: #ececf2; }
.toefl-exam-progress i { display: block; height: 100%; background: #6255d4; transition: width .2s; }
.toefl-exam-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 30px; max-width: 1080px; margin: 0 auto; padding: 46px 34px 70px; }
.toefl-exam-sidebar { padding: 6px 4px; }
.toefl-exam-sidebar h1 { margin: 10px 0 11px; font-size: 23px; line-height: 1.2; }
.toefl-exam-sidebar p { margin: 0; color: #90939e; font-size: 13px; line-height: 1.65; }
.toefl-exam-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; }
.toefl-exam-chip { width: 40px; height: 32px; border: 1px solid #dedfe7; border-radius: 7px; background: #fff; color: #626675; font-size: 10px; font-weight: 800; }
.toefl-exam-chip.active { border-color: #6255d4; background: #6255d4; color: #fff; }
.toefl-exam-chip.answered:not(.active) { border-color: #c3bdf2; color: #5145bb; }
.toefl-exam-card { min-width: 0; padding: 32px 34px 27px; border: 1px solid #e3e4eb; border-radius: 13px; background: #fff; box-shadow: 0 12px 28px rgba(38, 39, 66, .06); }
.toefl-exam-card h2 { margin: 23px 0 24px; font-size: 22px; line-height: 1.45; }
.toefl-audio-control { display: flex; align-items: center; gap: 12px; margin: 24px 0 -8px; padding: 13px 14px; border: 1px solid #e7e7ef; border-radius: 9px; background: #fafaff; }
.toefl-audio-play { width: 37px; height: 37px; flex: 0 0 37px; border-radius: 50%; background: #6255d4; color: #fff; font-size: 13px; }
.toefl-audio-control > div { display: grid; gap: 3px; flex: 1; min-width: 0; }
.toefl-audio-control strong { color: #3c3d49; font-size: 12px; }
.toefl-audio-control span { color: #9497a4; font-size: 10px; }
.toefl-audio-transcript { padding: 7px 9px; border: 1px solid #e0dff0; border-radius: 6px; background: #fff; color: #69628f; font-size: 10px; font-weight: 750; white-space: nowrap; }
.toefl-audio-transcript-text { margin: 15px 0 -4px; padding: 12px 14px; border-left: 3px solid #8277df; background: #f7f6ff; color: #626474; font-size: 13px; line-height: 1.6; }
.toefl-listening-question-locked { display: grid; justify-items: center; gap: 8px; min-height: 260px; margin-top: 22px; padding: 54px 24px; border: 1px dashed #c9cbea; border-radius: 12px; background: #fafaff; color: #74788a; text-align: center; }
.toefl-listening-question-locked > span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #eceafd; color: #665bd6; font-size: 27px; }
.toefl-listening-question-locked strong { color: #353746; font-size: 18px; }
.toefl-listening-question-locked p { margin: 0; font-size: 13px; }
.toefl-options { display: grid; gap: 10px; }
.toefl-option { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 15px; border: 1px solid #e1e2e9; border-radius: 9px; background: #fff; color: #3d404c; text-align: left; font-size: 14px; line-height: 1.45; }
.toefl-option:hover:not(:disabled) { border-color: #bcb6f0; background: #faf9ff; }
.toefl-option.selected { border-color: #7569dd; background: #f2f0ff; }
.toefl-option-key { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border: 1px solid #d9dae2; border-radius: 50%; color: #777b89; font-size: 11px; font-weight: 800; }
.toefl-option.selected .toefl-option-key { border-color: #7569dd; background: #7569dd; color: #fff; }
.toefl-text-answer { width: 100%; min-height: 130px; padding: 14px; border: 1px solid #dedfe7; border-radius: 9px; outline: none; resize: vertical; }
.toefl-text-answer:focus { border-color: #7569dd; box-shadow: 0 0 0 3px rgba(117, 105, 221, .12); }

@media (max-width: 900px) {
  .toefl-nav { gap: 12px; padding: 0 20px; }
  .toefl-brand { min-width: 160px; }
  .toefl-main-links { overflow-x: auto; }
  .toefl-main-link { padding: 9px 8px; font-size: 12px; }
  .toefl-hero, .toefl-workspace { padding-left: 24px; padding-right: 24px; }
  .toefl-reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toefl-hub-layout { padding-left: 22px; padding-right: 22px; }
  .toefl-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .toefl-nav { flex-wrap: wrap; padding: 12px 16px 9px; }
  .toefl-brand { min-width: 0; }
  .toefl-nav-actions { margin-left: auto; }
  .toefl-main-links { order: 3; flex-basis: 100%; }
  .toefl-hero { align-items: flex-start; flex-direction: column; padding: 37px 17px 27px; }
  .toefl-hero h1 { font-size: 34px; }
  .toefl-hero-stat { justify-items: start; }
  .toefl-workspace { padding: 0 17px 50px; }
  .toefl-tabs { display: flex; overflow-x: auto; }
  .toefl-tab { min-width: 184px; }
  .toefl-list-heading { align-items: flex-start; flex-direction: column; margin-top: 26px; }
  .toefl-reading-grid { grid-template-columns: 1fr; }
  .toefl-hub-layout { grid-template-columns: 1fr; gap: 11px; padding: 20px 16px 42px; }
  .toefl-hub-welcome { min-height: 150px; padding: 22px 20px; }
  .toefl-hub-welcome h1 { font-size: 23px; }
  .toefl-skill-grid { grid-column: auto; grid-template-columns: 1fr; }
  .toefl-skill-card { min-height: 72px; }
  .toefl-recent-panel { grid-column: auto; padding: 16px; }
  .toefl-recent-row { grid-template-columns: minmax(0, 1fr) 42px; gap: 6px 10px; padding: 9px 0; }
  .toefl-recent-row time { grid-column: 1 / -1; }
  .toefl-listening-head { flex-direction: column; gap: 7px; }
  .toefl-exam-header { padding: 10px 16px; gap: 11px; }
  .toefl-exam-back-actions { flex-wrap: wrap; }
  .toefl-exam-home-link { display: none; }
  .toefl-exam-layout { display: block; padding: 27px 17px 50px; }
  .toefl-exam-sidebar { margin-bottom: 24px; }
  .toefl-exam-card { padding: 24px 18px 20px; }
  .toefl-exam-card h2 { font-size: 19px; }
  .toefl-audio-control { gap: 9px; padding: 11px; }
}
/* TOEFL / teacher publishing additions */
.teacher-practice-panel { margin-top: 28px; }
.teacher-practice-actions { display:flex; flex-wrap:wrap; gap:8px; }
.teacher-search-toolbar { margin:0 0 16px; }
.teacher-search-field { display:grid; gap:7px; width:100%; max-width:440px; color:var(--ink-soft); font-size:13px; font-weight:700; }
.teacher-search-field input { box-sizing:border-box; width:100%; min-width:0; padding:11px 13px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font:inherit; font-weight:400; }
.teacher-search-field input:focus { border-color:#7569dd; outline:0; box-shadow:0 0 0 3px rgba(117,105,221,.12); }
.teacher-practice-notice { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:0 0 18px; padding:12px 16px; border:1px solid #dedbf3; border-radius:10px; background:#f5f3ff; color:#5145a0; font-size:13px; }
.teacher-sync-warning { padding:12px; border-radius:8px; background:#fff5dd; color:#805f1d; font-size:13px; }
.toefl-writing-page .toefl-workspace, .toefl-reading-library-page .toefl-workspace { max-width:1520px; }
.toefl-writing-library-toolbar, .toefl-reading-library-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:20px 0 14px; }
.toefl-writing-library-toolbar h2, .toefl-reading-library-toolbar h2 { margin:0; font-size:19px; }
.toefl-writing-library-frame, .toefl-reading-library-frame { display:block; width:100%; height:85vh; min-height:760px; border:1px solid #e1e2e9; border-radius:12px; background:#fff; }
.teacher-practice-heading, .admin-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.teacher-practice-heading h2, .admin-section-heading h2 { margin:8px 0 4px; color:#282a34; font-size:22px; }
.teacher-practice-heading p, .admin-section-heading p { margin:0; color:#858894; font-size:13px; }
.teacher-practice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.teacher-practice-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; padding:18px; border:1px solid #e2e3ea; border-radius:12px; background:#fff; text-align:left; box-shadow:0 8px 18px rgba(38,39,66,.04); cursor:pointer; }
.teacher-practice-card:hover { border-color:#bcb6f0; transform:translateY(-1px); }
.teacher-practice-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; background:#f2f0ff; color:#6255d4; font-size:10px; font-weight:850; letter-spacing:.08em; }
.teacher-practice-copy { display:grid; gap:4px; min-width:0; }
.teacher-practice-copy strong { color:#2c2e39; font-size:15px; }
.teacher-practice-copy small, .teacher-practice-copy em { color:#858894; font-size:12px; font-style:normal; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.toefl-reading-split { margin-top:0; }
.toefl-reading-room { min-height:100vh; background:#f7f8fb; color:#252631; display:flex; flex-direction:column; }
.toefl-reading-room .reading-split { flex:1; min-height:0; }
.toefl-reading-room .reading-pane { min-height:0; }
.toefl-reading-room .passage-pane { max-height:calc(100vh - 155px); overflow:auto; }
.toefl-reading-room .questions-pane { max-height:calc(100vh - 155px); overflow:auto; }
.toefl-speaking-room { min-height:100vh; background:#f7f8fb; color:#252631; display:flex; flex-direction:column; }
.speaking-repeat-content { width:min(1020px,calc(100% - 48px)); margin:0 auto; padding:42px 0 76px; }
.speaking-repeat-intro { margin-bottom:24px; }
.speaking-repeat-intro h1 { margin:8px 0; font-size:29px; }
.speaking-repeat-intro p { margin:0; color:#858894; }
.speaking-repeat-list { display:grid; gap:13px; }
.speaking-repeat-card { display:grid; grid-template-columns:52px 1fr; gap:16px; padding:20px; border:1px solid #e1e2e9; border-radius:12px; background:#fff; box-shadow:0 8px 18px rgba(38,39,66,.04); }
.speaking-repeat-number { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:#f2f0ff; color:#6255d4; font-weight:850; }
.speaking-repeat-body p { margin:5px 0 16px; font-size:18px; line-height:1.5; }
.speaking-repeat-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.speaking-repeat-actions audio { height:36px; max-width:230px; }
.speaking-repeat-status { display:block; margin-top:11px; color:#858894; font-size:12px; }
.toefl-writing-room { min-height:100vh; background:#f7f8fb; color:#252631; display:flex; flex-direction:column; }
.toefl-writing-layout { flex:1; display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); width:min(1180px,calc(100% - 48px)); margin:32px auto; border:1px solid #e1e2e9; border-radius:13px; background:#fff; overflow:hidden; box-shadow:0 12px 28px rgba(38,39,66,.06); }
.toefl-writing-prompt, .toefl-writing-answer { min-width:0; padding:30px; }
.toefl-writing-prompt { border-right:1px solid #e6e6ec; background:#fbfbfd; }
.toefl-writing-prompt h1 { margin:10px 0 22px; font-size:24px; }
.toefl-writing-context { margin-bottom:18px; padding:15px; border:1px solid #e4e5eb; border-radius:9px; background:#fff; color:#555966; line-height:1.65; white-space:pre-wrap; }
.toefl-writing-question { color:#333641; font-size:17px; line-height:1.7; white-space:pre-wrap; }
.toefl-writing-answer { display:flex; flex-direction:column; }
.toefl-writing-answer textarea { flex:1; min-height:430px; width:100%; box-sizing:border-box; padding:18px; border:1px solid #dedfe7; border-radius:9px; outline:0; resize:vertical; color:#252631; font:15px/1.7 inherit; }
.toefl-writing-answer textarea:focus { border-color:#7569dd; box-shadow:0 0 0 3px rgba(117,105,221,.12); }
.teacher-package-room { min-height:100vh; background:#f7f8fb; display:flex; flex-direction:column; }
.teacher-package-toolbar { display:flex; align-items:center; gap:20px; min-height:68px; padding:10px 30px; border-bottom:1px solid #e5e6ec; background:#fff; }
.teacher-package-toolbar > div { flex:1; min-width:0; display:grid; gap:3px; }
.teacher-package-toolbar span { color:#8b8e9b; font-size:10px; letter-spacing:.1em; }
.teacher-package-toolbar strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.teacher-package-info { display:flex; align-items:center; gap:12px; width:min(1200px,calc(100% - 48px)); margin:16px auto 0; color:#858894; font-size:12px; }
.teacher-package-frame { flex:1; width:min(1200px,calc(100% - 48px)); min-height:calc(100vh - 145px); margin:0 auto 24px; border:1px solid #e1e2e9; border-radius:12px; background:#fff; box-shadow:0 8px 22px rgba(38,39,66,.06); }
.admin-section { margin-top:26px; }
.teacher-upload-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:20px; border:1px solid #e2e3ea; border-radius:12px; background:#fff; }
.teacher-upload-form label { display:grid; gap:7px; color:#555966; font-size:12px; font-weight:700; }
.teacher-upload-form input, .teacher-upload-form select { width:100%; box-sizing:border-box; padding:11px 12px; border:1px solid #dedfe7; border-radius:8px; background:#fff; color:#333641; font:inherit; font-weight:500; }
.teacher-upload-form input:focus, .teacher-upload-form select:focus { border-color:#7569dd; outline:0; box-shadow:0 0 0 3px rgba(117,105,221,.12); }
.teacher-file-field { grid-column:1/-1; }
.teacher-upload-form > .primary-button { justify-self:start; }
.teacher-package-row { display:grid; grid-template-columns:1fr 100px 230px; gap:14px; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); }
.teacher-package-row:last-child { border-bottom:0; }
.teacher-package-row > div:first-child { display:grid; gap:5px; }
.teacher-package-row > div:first-child span { color:#858894; font-size:12px; }
@media (max-width: 760px) {
  .teacher-practice-heading { flex-wrap:wrap; }
  .toefl-writing-library-frame { min-height:640px; }
  .teacher-practice-grid { grid-template-columns:1fr; }
  .toefl-writing-layout { grid-template-columns:1fr; width:calc(100% - 30px); }
  .toefl-writing-prompt { border-right:0; border-bottom:1px solid #e6e6ec; }
  .toefl-reading-room .reading-split { display:block; }
  .toefl-reading-room .passage-pane, .toefl-reading-room .questions-pane { max-height:none; }
  .speaking-repeat-content, .teacher-package-info, .teacher-package-frame { width:calc(100% - 30px); }
  .teacher-package-toolbar { padding:10px 15px; gap:10px; flex-wrap:wrap; }
  .teacher-package-toolbar > div { order:3; flex-basis:100%; }
  .teacher-upload-form { grid-template-columns:1fr; }
  .teacher-file-field { grid-column:auto; }
  .teacher-package-row { grid-template-columns:1fr; gap:9px; }
}

/* Member management */
.member-row { display:grid; grid-template-columns:minmax(190px, .85fr) minmax(360px, 1.8fr) auto auto; gap:16px; align-items:center; padding:18px 22px; border-bottom:1px solid var(--line); }
.member-row:last-child { border-bottom:0; }
.member-identity { display:grid; gap:5px; min-width:0; }
.member-edit-form { display:grid; grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) auto; gap:9px; align-items:end; }
.member-edit-form label { display:grid; gap:6px; color:var(--ink-soft); font-size:12px; font-weight:750; }
.member-edit-form input { width:100%; box-sizing:border-box; min-width:0; padding:9px 10px; border:1px solid #dfe4ee; border-radius:8px; color:var(--ink); background:#fff; font:inherit; font-size:13px; outline:none; }
.member-edit-form input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(83,105,232,.12); }
.save-member { color:#3f4ba8; background:#eef0ff; white-space:nowrap; }
.field-hint { display:block; margin-top:6px; color:var(--ink-soft); font-size:12px; }

@media (max-width: 980px) {
  .member-row { grid-template-columns: 1fr auto; gap: 12px; }
  .member-edit-form { grid-column: 1 / -1; grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) auto; }
  .member-row .user-actions { grid-column: 1 / -1; justify-content:flex-start; }
}
@media (max-width: 620px) {
  .member-edit-form { grid-template-columns:1fr; }
  .member-edit-form .save-member { justify-self:start; }
}

/* Batch member registration */
.batch-register-form { grid-template-columns:minmax(0, 1fr) minmax(180px, .45fr); align-items:end; }
.batch-email-field { grid-row:span 3; }
.batch-register-form textarea { width:100%; box-sizing:border-box; min-height:138px; resize:vertical; padding:11px 12px; border:1px solid #dedfe7; border-radius:8px; background:#fff; color:#333641; font:inherit; font-weight:500; line-height:1.55; }
.batch-register-form textarea:focus { border-color:#7569dd; outline:0; box-shadow:0 0 0 3px rgba(117,105,221,.12); }
.batch-xlsx-field { grid-column:2; }
.batch-register-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; grid-column:2; }
@media (max-width: 760px) {
  .batch-register-form { grid-template-columns:1fr; }
  .batch-email-field { grid-row:auto; }
  .batch-xlsx-field { grid-column:auto; }
  .batch-register-actions { grid-column:auto; align-items:flex-start; flex-direction:column; }
}

/* Student email sign in */
.home-page .home-below { display: none !important; }
.form-field[hidden] { display: none; }
.student-login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #f7f9fc; }
.student-login-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 64px; padding: clamp(32px, 6vw, 88px); color: #fff; background: linear-gradient(145deg, #123d6b, #126d80); }
.student-login-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: #fff; font-size: 28px; font-weight: 800; text-decoration: none; }
.student-login-brand span { font-size: 17px; font-weight: 500; }
.student-login-intro h1 { font-size: clamp(28px, 3.3vw, 52px); line-height: 1.5; margin: 16px 0; }
.student-login-intro .panel-kicker, .student-login-intro small, .student-login-intro p { color: #d5edf6; }
.student-login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.student-login-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid #e3eaf2; border-radius: 24px; padding: clamp(24px, 4vw, 44px); box-shadow: 0 16px 56px #163e6810; }
.student-login-card h2 { font-size: 30px; margin: 10px 0 12px; }
.student-login-card > p { color: #607086; line-height: 1.8; }
.student-login-card form { margin-top: 30px; }
.student-login-card input { width: 100%; min-width: 0; font-size: 16px; }
.student-login-submit { width: 100%; margin-top: 12px; min-height: 48px; }
.student-login-submit:disabled { opacity: .65; cursor: wait; }
.student-login-help { font-size: 13px; margin-top: 22px; }
.student-login-staff { border-top: 1px solid #e8edf3; margin-top: 24px; padding-top: 20px; text-align: center; }
.student-login-card .form-error { min-height: 20px; margin-top: 10px; }
.staff-login-page .student-login-intro { background: linear-gradient(145deg, #192d4a, #31536d); }
.staff-login-page .form-field + .form-field { margin-top: 20px; }
.staff-student-link { display: block; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e8edf3; text-align: center; color: #5269b6; font-size: 14px; }
.admin-password-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.admin-password-form #adminPasswordMessage { grid-column: 1 / -1; margin: 0; }
.admin-password-form .form-success { color: #18744a; font-size: 14px; }
@media (max-width: 900px) { .admin-password-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .admin-password-form { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .student-login-page { grid-template-columns: 1fr; }
  .student-login-intro { padding: 26px 24px; gap: 24px; }
  .student-login-intro h1 { font-size: 28px; }
  .student-login-intro small { display: none; }
  .student-login-panel { padding: 24px 16px 40px; }
}
