:root {
  --bg: #f6f7fb;
  --text: #1c2333;
  --muted: #687286;
  --brand: #2f5597;
  --line: #dce3ee;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif; line-height: 1.65; }
a { color: inherit; }
button, select, textarea { font: inherit; }
.site-wrap { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; text-decoration: none; letter-spacing: -.5px; }
.brand span { margin-left: -9px; color: var(--muted); font-weight: 400; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { padding: 8px 0; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; transition: color .18s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
.course-intro { background: #fff; padding: 55px 0 43px; }
.eyebrow { margin: 0 0 15px; color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; }
.course-intro h1 { margin: 0; font-size: clamp(46px, 7vw, 76px); line-height: 1.1; letter-spacing: -3.5px; font-weight: 700; }
.course-intro h1 span { color: var(--brand); font-weight: 400; }
.intro-copy { margin: 20px 0 0; color: var(--muted); font-size: 17px; }
.portal-list { display: grid; grid-template-columns: 1fr 1fr; margin: 34px 0 42px; background: #fff; }
.portal-choice { display: flex; flex-direction: column; position: relative; padding: 30px 34px; border-top: 3px solid var(--brand); text-decoration: none; transition: background .2s; }
.portal-choice + .portal-choice { border-left: 1px solid var(--line); }
.portal-choice:hover { background: #edf2fa; }
.portal-number { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.portal-choice h2 { margin: 10px 0 8px; font-size: 36px; line-height: 1.2; letter-spacing: -1px; }
.portal-choice h2 span { font-size: 17px; font-weight: 400; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.portal-choice p { margin: 0 0 10px; font-size: 15px; }
.portal-detail { color: var(--muted); font-size: 13px; }
.portal-action { display: flex; align-items: center; gap: 14px; margin-top: 32px; color: var(--brand); font-size: 14px; font-weight: 600; }
.portal-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s; }
.portal-choice:hover .portal-action svg { transform: translateX(5px); }
.site-footer { padding: 0 0 28px; color: var(--muted); font-size: 12px; }
.portal-main { padding-block: 38px 48px; }
.breadcrumbs { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { text-underline-offset: 3px; }
.page-title { margin: 0; font-size: 44px; line-height: 1.2; letter-spacing: -1.5px; }
.page-title span { display: inline-block; margin-left: 12px; color: var(--muted); font-size: 20px; font-weight: 400; letter-spacing: 0; }
.page-description { margin: 12px 0 28px; color: var(--muted); font-size: 15px; }
.audio-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.audio-toolbar h2 { margin: 0; font-size: 17px; }
.speed-control { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.speed-control select { border: 1px solid var(--line); padding: 5px 10px; border-radius: 5px; background: #fff; color: var(--text); }
.audio-list { margin: 0; padding: 0; list-style: none; }
.audio-row { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.audio-number { padding-top: 3px; color: var(--muted); font-size: 13px; }
.audio-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.audio-heading h3 { margin: 0; font-size: 18px; font-weight: 600; }
.audio-download { color: var(--brand); font-size: 13px; text-underline-offset: 3px; }
.audio-meta { margin: 5px 0 14px; color: var(--muted); font-size: 12px; }
.audio-row audio { display: block; width: min(100%, 720px); height: 45px; }
.audio-row.is-playing .audio-number, .audio-row.is-playing h3 { color: var(--brand); }
.audio-error { margin: 10px 0 0; color: #a5372c; font-size: 13px; }
.audio-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.practice-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 32px; color: var(--brand); font-size: 14px; }
.question-bank h2 { margin: 0; font-size: 24px; }
.bank-summary, .bank-note { color: var(--muted); font-size: 13px; }
.bank-note a { color: var(--brand); text-underline-offset: 3px; }
.bank-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 12px; }
.bank-filters label { font-size: 13px; }
.bank-search { grid-column: 1 / -1; }
.bank-filters input, .bank-filters select { display: block; width: 100%; margin-top: 6px; padding: 10px; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 5px; color: var(--text); }
.bank-question { padding: 24px 0; border-top: 1px solid var(--line); }
.question-meta { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.bank-question h3 { margin: 0 0 8px; font-size: 18px; color: var(--brand); }
.question-prompt, .question-answer .answer-text { margin: 0 0 14px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.question-scenario { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.question-answer { padding: 12px 16px; background: #edf2fa; border-radius: 5px; }
.question-answer summary, .question-scenario summary { cursor: pointer; font-size: 13px; }
.question-answer .answer-text { margin: 12px 0; }
.use-voice-text { padding: 7px 10px; font-size: 13px; color: var(--brand); background: #fff; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.answer-pending { color: var(--muted); font-size: 13px; }
.bank-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 24px 0; font-size: 13px; }
.bank-pagination button { padding: 7px 12px; border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 4px; cursor: pointer; }
.bank-pagination button:disabled { opacity: .45; cursor: default; }
.bank-downloads { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 13px; color: var(--brand); }
.voice-practice { margin: 44px 0; padding: 24px 0; border-block: 1px solid var(--line); }
.voice-count { margin: -7px 0 15px; color: var(--muted); font-size: 12px; text-align: right; }
#questionBank, #voicePractice, #audioTitle { scroll-margin-top: 20px; }
.voice-practice h2 { margin: 0; font-size: 21px; }
.voice-practice > p { color: var(--muted); font-size: 14px; }
.voice-practice textarea { display: block; width: 100%; margin: 8px 0 15px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; resize: vertical; font-size: 15px; }
.voice-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 24px; }
.voice-actions label { font-size: 14px; }
.voice-actions input { width: 110px; margin-left: 8px; padding: 7px; font: inherit; border: 1px solid var(--line); border-radius: 5px; }
.voice-button { padding: 9px 15px; border: 0; border-radius: 5px; background: var(--brand); color: #fff; cursor: pointer; }
.voice-button:disabled { opacity: .6; cursor: wait; }
.voice-message { font-size: 13px; }
#generatedAudio { width: min(100%, 720px); margin: 15px 0 10px; }
[hidden] { display: none !important; }
a:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid #80a8e8; outline-offset: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .course-intro .site-wrap, .portal-main { animation: arrive .45s ease-out both; }
  .portal-choice { animation: arrive .45s ease-out .08s both; }
  .portal-choice + .portal-choice { animation-delay: .15s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 640px) {
  .site-wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 66px; gap: 16px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand span { margin-left: -7px; }
  .brand img { width: 26px; height: 26px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 13px; }
  .course-intro { padding: 34px 0 30px; }
  .course-intro h1 { letter-spacing: -2px; }
  .intro-copy { margin-top: 15px; font-size: 15px; }
  .portal-list { grid-template-columns: 1fr; margin: 24px 0 28px; }
  .portal-choice { padding: 22px 24px; }
  .portal-choice + .portal-choice { border-left: 0; border-top: 1px solid var(--line); }
  .portal-choice h2 { font-size: 30px; }
  .portal-action { margin-top: 20px; }
  .portal-main { padding-top: 26px; }
  .page-title { font-size: 38px; }
  .audio-toolbar { gap: 12px; }
  .bank-filters { grid-template-columns: 1fr; }
  .audio-row { grid-template-columns: 25px 1fr; gap: 12px; padding: 23px 0; }
}
