/* The public test platform: home page, test catalogues and sign-in. Colours come from the tokens in styles.css. */

/* ---------- top bar ---------- */
.pf-menu { min-width: 170px; }
.pf-menu a { padding: 9px 12px; font-size: .88rem; font-weight: 550; }

/* ---------- home: hero ---------- */
.lp-hero { position: relative; overflow: hidden; background: var(--grad-night); color: #fff; padding: clamp(56px, 9vw, 104px) 0 0; text-align: center; }
.lp-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, .22), transparent 70%); pointer-events: none; }
.lp-hero .container { position: relative; }
.lp-hero h1 { max-width: 860px; margin: 0 auto; color: #fff; font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
@media (max-width: 560px) { .lp-hero h1 { font-size: 1.9rem; line-height: 1.15; } .lp-hero-lead { font-size: 1rem; } }
.lp-hero h1 em { display: block; font-style: normal; color: #bfe0ff; }
.lp-hero-lead { max-width: 560px; margin: 18px auto 0; color: rgba(255, 255, 255, .86); font-size: clamp(1rem, 2vw, 1.15rem); }
.lp-hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 clamp(36px, 6vw, 60px); }
.lp-btn-light { background: #fff; color: var(--primary); border: 0; box-shadow: 0 12px 30px rgba(10, 30, 90, .28); }
.lp-btn-light:hover { background: #f3f7ff; color: var(--primary); }
.lp-btn-line { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.lp-btn-line:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.lp-hero-window { max-width: 980px; margin: 0 auto; transform: translateY(1px); text-align: left; }
.lp-hero-window .lp-window { border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -10px 60px rgba(8, 24, 80, .35); }

/* ---------- home: the little windows ---------- */
.lp-window { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; color: var(--text); }
.lp-window-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: linear-gradient(180deg, #24418f, #1b3372); color: #fff; font-size: .82rem; }
.lp-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b5e; }
.lp-window-bar i:nth-child(2) { background: #f7bd45; }
.lp-window-bar i:nth-child(3) { background: #4ccb6a; }
.lp-window-bar b { margin-left: 8px; font-weight: 650; }
.lp-window-body { padding: 16px; font-size: .84rem; pointer-events: none; user-select: none; }
.lp-window-body:has(.lp-exam) { padding: 0; }
.lp-clock { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; background: var(--danger-50, #fde8e8); color: var(--danger); font-weight: 650; font-size: .78rem; }
.lp-clock svg { width: 13px; height: 13px; }

.lp-exam-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: .76rem; color: var(--muted); }
.lp-exam-part { margin: 10px 14px; padding: 9px 12px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; }
.lp-exam-part b { display: block; }
.lp-exam-split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); min-height: 210px; }
.lp-passage { padding: 14px 16px; border-right: 2px solid var(--border-strong); font-family: var(--font-serif); line-height: 1.55; }
.lp-passage h4 { margin: 0 0 8px; font-family: var(--font-display); }
.lp-passage p { margin: 0 0 9px; }
.lp-passage mark { background: #fff0a8; }
.lp-questions { padding: 14px 16px; }
.lp-questions > p { margin: 0 0 10px; color: var(--muted); }
.lp-q { margin-bottom: 12px; }
.lp-q em { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; border-radius: 5px; background: var(--primary-50); color: var(--primary); font-style: normal; font-weight: 700; font-size: .72rem; }
.lp-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.lp-opts u { padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 6px; text-decoration: none; font-size: .72rem; }
.lp-opts u.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lp-exam-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--border); font-size: .74rem; font-weight: 650; }
.lp-exam-nav small { color: var(--muted); font-weight: 500; }
.lp-exam-nav .open { flex: 1; min-width: 200px; text-align: center; }
.lp-exam-nav u { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-left: 3px; border: 1px solid var(--border-strong); border-radius: 5px; text-decoration: none; font-weight: 500; }
.lp-exam-nav u.done { background: var(--primary-50); border-color: var(--primary); }

.lp-audio { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.lp-play { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; }
.lp-play svg { width: 14px; height: 14px; }
.lp-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 34px; }
.lp-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--border-strong); }
.lp-wave i.on { background: var(--primary); }
.lp-time { color: var(--muted); font-size: .76rem; }
.lp-form { padding: 14px 4px 2px; }
.lp-form h4 { margin: 0 0 8px; }
.lp-form p { margin: 0 0 8px; }
.lp-gap { display: inline-block; min-width: 84px; padding: 2px 8px; border-radius: 5px; border: 1px solid var(--border-strong); }
.lp-gap.ok { border-color: var(--success); background: #e6f7f0; }
.lp-gap.bad { border-color: var(--danger); background: #fdecec; text-decoration: line-through; }
.lp-form b { color: var(--success); }

.lp-write-q { padding: 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; }
.lp-write-q small { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 500; }
.lp-write-a { min-height: 104px; margin-top: 10px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-family: var(--font-serif); line-height: 1.55; }
.lp-caret { display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; background: var(--primary); vertical-align: -2px; }
.lp-write-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); }
.lp-write-foot b { color: var(--text); }

.lp-speak { display: flex; align-items: center; gap: 16px; }
.lp-cue { flex: 1; padding: 13px 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.lp-cue small { display: block; color: var(--muted); margin-bottom: 4px; }
.lp-cue p { margin: 7px 0 3px; color: var(--muted); }
.lp-cue ul { margin: 0; padding-left: 18px; }
.lp-ring { flex: none; }

.lp-steps { list-style: none; display: grid; gap: 9px; margin: 0; padding: 0; }
.lp-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.lp-steps svg { flex: none; width: 19px; height: 19px; }
.lp-steps b { display: block; color: var(--text); }
.lp-steps span { font-size: .78rem; }
.lp-steps .done { background: #e6f7f0; border-color: #bfe8d6; }
.lp-steps .done svg { color: var(--success); }
.lp-steps .now { border-color: var(--primary); background: var(--primary-50); }
.lp-steps .now svg { color: var(--primary); }

.lp-result { display: flex; align-items: center; gap: 18px; }
.lp-result > div:last-child { flex: 1; min-width: 0; }
.lp-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 7px 0 0; padding: 6px 9px; border-radius: 7px; font-size: .8rem; }
.lp-mark svg { width: 14px; height: 14px; flex: none; }
.lp-mark.ok { background: #e6f7f0; color: #0b7a54; }
.lp-mark.bad { background: #fdecec; color: var(--danger); }
.lp-mark span { margin-left: auto; font-weight: 650; }

/* ---------- home: sections ---------- */
.lp-section { padding-top: clamp(56px, 8vw, 96px); }
.lp-head { max-width: 640px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.lp-eyebrow { display: block; margin-bottom: 8px; color: var(--primary); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.lp-head h2 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -.015em; }
.lp-head p { margin: 10px 0 0; color: var(--muted); }

.lp-features { display: grid; gap: clamp(20px, 3vw, 32px); }
.lp-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(22px, 3.4vw, 44px); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.lp-feature.flip .lp-feature-text { order: 2; }
.lp-count { color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: .06em; }
.lp-feature h3 { margin: 6px 0 8px; font-size: clamp(1.4rem, 2.8vw, 1.9rem); letter-spacing: -.01em; }
.lp-feature p { margin: 0 0 14px; color: var(--text-2); }
.lp-feature ul { list-style: none; display: grid; gap: 8px; margin: 0 0 20px; padding: 0; }
.lp-feature li { display: flex; gap: 9px; align-items: flex-start; font-size: .94rem; }
.lp-feature li svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.lp-feature-visual { min-width: 0; }

.lp-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lp-why .card { padding: 22px; }
.lp-why h4 { margin: 12px 0 6px; }
.lp-why p { margin: 0; color: var(--muted); font-size: .9rem; }

.lp-choose { margin-top: clamp(56px, 8vw, 96px); padding: clamp(48px, 7vw, 84px) 0; background: var(--grad-night); color: #fff; }
.lp-choose .lp-head h2 { color: #fff; }
.lp-choose .lp-head p { color: rgba(255, 255, 255, .82); }
.lp-choose .lp-eyebrow { color: #bfe0ff; }
.lp-sections { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.lp-section-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; color: #fff; transition: background .18s var(--ease), transform .18s var(--ease); }
.lp-section-card:hover { background: rgba(255, 255, 255, .18); transform: translateY(-3px); color: #fff; text-decoration: none; }
.lp-section-card .icon-tile { background: #fff; }
.lp-section-card strong { margin-top: 12px; font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.lp-section-card small { font-size: .9rem; font-weight: 600; opacity: .85; }
.lp-section-card h3 { margin: 4px 0 0; color: #fff; }
.lp-section-card p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .86rem; }
.lp-section-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .88rem; font-weight: 650; }
.lp-section-go svg { width: 16px; height: 16px; }
.lp-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding: 24px 28px; background: rgba(255, 255, 255, .12); border-radius: 18px; }
.lp-cta h3 { margin: 0; color: #fff; }

/* ---------- catalogues ---------- */
.pf-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: clamp(20px, 3vw, 30px); border-radius: 20px; background: var(--grad-night); color: #fff; box-shadow: var(--shadow); }
.pf-banner-ic { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 14px; background: rgba(255, 255, 255, .16); }
.pf-banner-ic svg { width: 28px; height: 28px; }
.pf-banner-text { flex: 1 1 320px; min-width: 0; }
.pf-banner h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.pf-banner p { margin: 6px 0 0; color: rgba(255, 255, 255, .86); max-width: 620px; }
.pf-banner-side { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pf-progress { min-width: 200px; font-size: .84rem; }
.pf-progress > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pf-progress i { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.pf-progress u { display: block; height: 100%; background: #fff; border-radius: 99px; }
.pf-pick { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.pf-pick:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.pf-banner-stats { gap: 24px; }
.pf-banner-stats strong { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.pf-banner-stats span { font-size: .8rem; opacity: .85; }
.pf-toolbar { margin: 18px 0; }
.pf-tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.pf-test { display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--text); }
.pf-test:hover { text-decoration: none; }
.pf-test-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pf-kicker { color: var(--tone, var(--primary)); font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.pf-test h3 { margin: 4px 0 0; font-size: 1.04rem; line-height: 1.3; }
.pf-test p { margin: 0; font-size: .84rem; }
.pf-test-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; font-size: .82rem; }
.pf-go { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 650; white-space: nowrap; }
.pf-go svg { width: 15px; height: 15px; }
.pf-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.pf-how > div { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.pf-how svg { grid-row: span 2; width: 22px; height: 22px; color: var(--primary); }
.pf-how span { color: var(--muted); font-size: .82rem; }
.pf-row-band { margin-right: 6px; text-align: right; line-height: 1.2; }
.pf-row-band small { display: block; color: var(--muted); font-size: .74rem; }
.pf-score-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- sign-in, privacy ---------- */
.pf-auth { display: grid; place-items: center; min-height: 62vh; }
.pf-auth-card { width: min(440px, 100%); padding: clamp(22px, 4vw, 34px); }
.pf-auth-card h1 { margin: 0; font-size: 1.6rem; }
.pf-auth-card > .muted { margin: 6px 0 18px; }
.pf-auth-alt { margin: 16px 0 0; text-align: center; font-size: .9rem; }
.pf-auth-alt a { font-weight: 650; }
.pf-auth-note { margin: 8px 0 0; text-align: center; font-size: .78rem; }
.pf-prose { max-width: 720px; }
.pf-prose p { color: var(--text-2); }

@media (max-width: 960px) {
  .lp-feature { grid-template-columns: minmax(0, 1fr); }
  .lp-feature.flip .lp-feature-text { order: 0; }
  .lp-why, .lp-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .lp-why, .lp-sections, .pf-how { grid-template-columns: minmax(0, 1fr); }
  .lp-exam-split { grid-template-columns: minmax(0, 1fr); }
  .lp-passage { border-right: 0; border-bottom: 2px solid var(--border-strong); }
  .lp-exam-nav > span:not(.open) { display: none; }
  .lp-speak, .lp-result { flex-wrap: wrap; }
  .pf-banner-side { width: 100%; }
  .pf-progress { flex: 1 1 100%; }
}

/* ---------- full mock: three sections ---------- */
.fm-page .fm-bands, .fm-page .fm-steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Narrow screens: the filter buttons scroll sideways inside their own row instead of widening the page. */
.pf-toolbar > * { min-width: 0; max-width: 100%; }
.pf-toolbar .seg { overflow-x: auto; scrollbar-width: none; }
.pf-toolbar .seg button { flex: none; white-space: nowrap; }

/* The page-in animation tilts the page for a moment: it must not make phones zoom out to fit it. */
#main { overflow-x: clip; }

/* ---------- home: Telegram channel ---------- */
.lp-cta-tg { margin-top: 14px; }
.lp-cta-tg p { margin: 2px 0 0; color: rgba(255, 255, 255, .82); }

/* Catalogue filters, the result's question types and the student's progress */
.pf-select { width: auto; flex: none; max-width: 210px; }
.pf-score-kinds .weak { background: var(--danger-50); color: var(--danger); }
.pf-advice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--primary-50); }
.pf-advice > svg { width: 20px; height: 20px; flex: none; color: var(--primary); }
.pf-advice > div:first-of-type { flex: 1; min-width: 220px; }
.pf-advice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-kinds { display: grid; gap: 2px; }
.pf-kind { display: grid; grid-template-columns: minmax(150px, 230px) 1fr 44px 50px; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 8px; color: var(--text); font-size: .88rem; }
.pf-kind:hover { background: var(--surface-2); text-decoration: none; }
.pf-kind small { display: block; color: var(--muted); font-size: .74rem; }
.pf-kind > span b { font-weight: 600; }
.pf-kind i { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pf-kind u { display: block; height: 100%; border-radius: 99px; text-decoration: none; }
.pf-kind > b { text-align: right; }
.pf-trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.pf-trend { margin: 0; max-width: 520px; }
.pf-trend figcaption { font-size: .84rem; font-weight: 600; margin-bottom: 4px; }
.pf-trend svg { width: 100%; height: auto; display: block; }
@media (max-width: 640px) {
  .pf-select { flex: 1 1 140px; max-width: none; }
  .pf-kind { grid-template-columns: minmax(0, 1fr) 44px 46px; }
  .pf-kind i { grid-column: 1 / -1; grid-row: 2; }
}
.pf-advice-actions { max-width: 100%; min-width: 0; }
.pf-advice-actions .btn { white-space: normal; text-align: left; height: auto; min-height: 34px; max-width: 100%; }
@media (max-width: 640px) {
  .pf-toolbar { flex-wrap: wrap; }
  .pf-toolbar .pf-select { flex: 1 1 calc(50% - 5px); min-width: 0; width: calc(50% - 5px); max-width: none; }
  .pf-toolbar .search { flex: 1 1 100%; width: 100%; }
}
.pf-auth-seg { display: flex; margin: 4px 0 16px; }
.pf-auth-seg button { flex: 1; }

/* Students added by staff: the sign-in code, choosing students, assignments, a student's tasks */
.st-code { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-code > div { padding: 14px 16px; border-radius: 12px; background: var(--primary-50); }
.st-code small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 2px; }
.st-code b { font-size: 1.15rem; }
.st-code .num { font-size: 1.6rem; letter-spacing: .08em; }
.as-people { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
.as-people label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.as-people label:last-child { border-bottom: 0; }
.as-people label:hover { background: var(--surface-2); }
.as-people label[hidden] { display: none; }
.as-people small { display: block; color: var(--muted); font-size: .76rem; }
.as-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.as-head small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.as-head > svg { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; flex: none; }
.as-head[aria-expanded="true"] > svg { transform: rotate(180deg); }
.as-progress { display: grid; gap: 4px; width: 90px; flex: none; text-align: right; }
.as-progress i { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.as-progress u { display: block; height: 100%; background: var(--success); }
.pf-tasks { margin-bottom: 16px; }
.pf-tasks .card-head h3 { display: flex; align-items: center; gap: 8px; }
.pf-tasks .card-head h3 svg { width: 18px; height: 18px; color: var(--primary); }
@media (max-width: 640px) {
  .st-code { grid-template-columns: 1fr; }
  .as-head { flex-wrap: wrap; }
  .as-progress { width: 70px; }
}

/* The Grammar test in exam mode, and its picture on the home page */
body.cdi-mode .test-bar { top: 0; }
.lp-grammar { display: grid; gap: 14px; padding: 18px; }
.lp-grammar-tabs { display: flex; gap: 6px; }
.lp-grammar-tabs u { flex: 1; padding: 6px 0; border-radius: 8px; border: 1px solid var(--border); text-align: center; text-decoration: none; font-weight: 700; font-size: .78rem; color: var(--muted); }
.lp-grammar-tabs u.done { background: var(--success-50); border-color: transparent; color: var(--success); }
.lp-grammar-tabs u.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.lp-grammar-q { margin: 0; font-weight: 600; font-size: 1.02rem; }
.lp-grammar-q small { display: block; color: var(--muted); font-weight: 600; font-size: .74rem; margin-bottom: 4px; }
.lp-grammar-opts { display: grid; gap: 8px; }
.lp-grammar-opts span { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: .9rem; }
.lp-grammar-opts b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); font-size: .75rem; }
.lp-grammar-opts .on { border-color: var(--primary); background: var(--primary-50); }
.lp-grammar-opts .on b { background: var(--primary); color: #fff; }
@media (max-width: 640px) {
  /* The five Grammar sections in one row that scrolls sideways, so the question stays near the top */
  .gt-shell .section-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px 2px; }
  .gt-shell .section-tabs::-webkit-scrollbar { display: none; }
  .gt-shell .section-tabs button { flex: 0 0 auto; min-width: 104px; padding: 8px 10px; }
}

/* Level Test result */
.lt-score { font-size: 1.5rem; margin-top: 4px; }
.lt-score b { font-size: 2rem; }
.lt-passage { font-family: var(--font-serif); line-height: 1.7; max-height: 360px; overflow-y: auto; padding-right: 8px; margin-bottom: 16px; color: var(--text-2); }
.pf-banner + .lt-parts { margin-top: 18px; }
@media (max-width: 640px) {
  /* The three part scores side by side, also on phones */
  .lt-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lt-parts .card-pad { padding: 12px 10px; }
  .lt-parts .muted { font-size: .7rem !important; line-height: 1.3; }
  .lt-score { font-size: 1.1rem; }
  .lt-score b { font-size: 1.4rem; }
  .lt-score .badge { font-size: .66rem; white-space: normal; }
}
