:root { font-family: Arial, "Helvetica Neue", ui-sans-serif, system-ui, sans-serif; color: #17202b; background: #edf1f5; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 1100px; }
body.is-resizing-workspace { cursor: col-resize; user-select: none; }
button { font: inherit; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: var(--surface, #fff); border-bottom: 1px solid var(--line, #dbe2e9); }
.topbar[hidden] { display: none !important; }
.loading-screen { position: fixed; z-index: 1000; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #f5f8fc; color: #52647a; font-size: 15px; }
.loading-screen[hidden] { display: none !important; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid #dbe5f2; border-top-color: #2454d8; border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.is-start-page .session-meta, .is-start-page .topbar-actions { display: none; }
.is-authenticated.is-start-page .topbar-actions { display: flex !important; }
.is-authenticated.is-start-page .topbar-actions > :not(#topbar-account-status):not(#account-btn):not(#admin-btn):not(#topbar-logout) { display: none; }
.is-start-page.is-library-page .topbar-actions { display: flex; }
.is-start-page.is-library-page .topbar-actions > :not(#back-btn):not(#account-btn):not(#topbar-account-status):not(#admin-btn):not(#topbar-logout) { display: none; }
.is-admin.is-start-page .topbar-actions #admin-btn { display: inline-flex !important; }
.brand, .session-meta, .panel-heading, .passage-tabs { display: flex; align-items: center; }
.brand { gap: 4px; color: inherit; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: #1d4ed8; }
.session-meta { gap: 24px; color: var(--muted, #5d6875); font-size: 13px; }
.session-label { color: var(--muted, #5d6875); font-size: 13px; }
.session-switcher { border: 0; padding: 6px 8px; border-radius: 6px; color: var(--muted, #5d6875); background: transparent; cursor: pointer; font-size: 13px; }
.session-switcher:hover, .session-switcher:focus-visible { color: #1d4ed8; background: #eff6ff; outline: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-account-status { max-width: 360px; overflow: hidden; color: #176b55; font-size: 13px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.topbar-admin-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.trial-notice-backdrop { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .32); }
.trial-notice-modal { width: min(470px, 100%); padding: 30px; border: 1px solid #bfdbfe; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); }
.trial-notice-modal h2 { margin: 8px 0 10px; color: #172033; font-size: 24px; }
.trial-notice-modal__lead { margin: 0; color: #475569; font-size: 14px; line-height: 1.65; }
.trial-notice-modal__expiry { display: block; margin-top: 5px; color: #1d4ed8; font-size: 17px; }
.trial-notice-modal__details { display: grid; gap: 8px; margin: 18px 0 22px; padding: 14px; border-radius: 10px; color: #334155; background: #eff6ff; font-size: 13px; line-height: 1.55; }
.trial-notice-modal__action { min-width: 150px; }
.review-toolbar { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 6px 16px; border-bottom: 1px solid #dbe2e9; color: #64748b; background: #f8fafc; font-size: 12px; }
.review-toolbar[hidden] { display: none; }
.review-toolbar button { border: 1px solid #cbd5e1; border-radius: 5px; padding: 5px 11px; color: #475569; background: #fff; cursor: pointer; font-size: 12px; }
.review-toolbar button:hover, .review-toolbar button.is-active { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.question-explanation-trigger { display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; border: 0; padding: 1px 3px; color: #2563eb; background: transparent; cursor: pointer; font-size: 12px; white-space: nowrap; }
.question-explanation-trigger:hover { color: #1d4ed8; text-decoration: underline; }
.review-modal-backdrop { position: fixed; z-index: 50; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 20px 24px; background: rgba(15, 23, 42, .22); }
.review-modal { width: min(460px, 34vw); max-height: calc(100vh - 112px); overflow: auto; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .26); }
.review-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 15px; border-bottom: 1px solid #e5e7eb; }
.review-modal__head h2 { margin: 0; color: #334155; font-size: 20px; }
.review-modal__head h2 span { color: #2563eb; font-size: 22px; }
.review-modal__close { border: 0; padding: 0 4px; color: #94a3b8; background: transparent; cursor: pointer; font-size: 25px; line-height: 1; }
.review-modal__close:hover { color: #334155; }
.review-modal__answer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 16px 24px 8px; color: #334155; font-size: 14px; }
.review-modal__answer a { margin-left: auto; color: #2563eb; font-size: 12px; }
.review-answer--correct { color: #16a34a; }
.review-answer--wrong { color: #dc2626; }
.review-answer--blank { color: #d49b00; }
.review-modal__tools { display: flex; gap: 16px; margin: 2px 24px 0; border-bottom: 1px solid #e5e7eb; }
.review-modal__tools button { border: 0; border-bottom: 2px solid transparent; padding: 9px 2px 8px; color: #64748b; background: transparent; cursor: pointer; font-size: 13px; }
.review-modal__tools button.is-active, .review-modal__tools button:hover { color: #2563eb; border-bottom-color: #2563eb; }
.review-modal__body { padding: 16px 24px 24px; }
.review-modal__panel { padding: 18px 20px; border-radius: 9px; color: #4b5563; background: #f3f6fa; font-size: 14px; line-height: 1.8; }
.review-modal__panel p { margin: 0 0 15px; }
.review-modal__panel p:last-child { margin-bottom: 0; }
.review-modal__panel b { color: #374151; }
.result-review-hint { color: #64748b; font-size: 12px; }
.answer-summary-strip { display: grid; gap: 9px; margin: 18px 0 4px; padding: 11px 13px; border: 1px solid #e5e7eb; background: #f8fafc; color: #475569; font-size: 13px; line-height: 1.55; }
.answer-summary-strip > div { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; }
.answer-summary-strip strong { color: #334155; flex: 0 0 auto; }
.answer-summary-strip span { white-space: nowrap; }
.answer-summary-strip b { color: #334155; font-weight: 600; }
.answer-summary-strip em { font-style: normal; }
.mock-score-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 13px 15px; border: 1px solid #93c5fd; border-radius: 10px; color: #1e3a8a; background: #eff6ff; }
.mock-score-summary span { font-weight: 700; }
.mock-score-summary strong { color: #1d4ed8; font-size: 28px; line-height: 1; }
.mock-score-summary em { color: #475569; font-size: 12px; }
.mock-passage-summary { display: flex !important; flex-wrap: wrap; gap: 8px 16px !important; color: #475569; font-size: 12px; }
.mock-passage-summary strong { color: #1e3a8a; }
.result-band { padding: 12px 14px; border: 1px solid #c4b5fd; border-radius: 10px; background: #faf5ff; }
.result-band__label { color: #6d28d9; font-weight: 700; }
.result-band strong { display: block; margin-top: 3px; color: #5b21b6; font-size: 30px; line-height: 1.05; }
.result-band p { margin: 5px 0 0; color: #64748b; font-size: 12px; }
.answer-summary__trigger { border: 0; padding: 0 2px; color: inherit; background: transparent; cursor: pointer; font: inherit; white-space: nowrap; }
.answer-summary__trigger:hover { text-decoration: underline; }
.answer-summary__trigger:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; border-radius: 3px; }
.answer-summary__correct { color: #16a34a; }
.answer-summary__actual { color: #dc2626; }
.answer-summary__actual--correct { color: #16a34a; }
.answer-summary__blank { color: #d49b00; }
.answer-summary__actions { align-items: center !important; padding-top: 4px; border-top: 1px solid #e2e8f0; }
body:has(.review-modal-backdrop) { overflow: hidden; }
@media (max-width: 800px) {
  .review-modal-backdrop { justify-content: center; padding: 16px; }
  .review-modal { width: min(760px, 94vw); max-height: calc(100vh - 32px); }
}
.topbar-actions #back-btn { order: -1; min-width: 104px; white-space: nowrap; }
.topbar-actions #home-btn { order: -1; min-width: 76px; white-space: nowrap; }
.brand-logo-wrap { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; line-height: 1; }
.brand-logo-wrap small { margin-top: 4px; color: #111827; font-size: 8px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.icon-button { border: 0; border-radius: 7px; padding: 7px 9px; color: var(--muted, #5d6875); background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button:hover, .icon-button:focus-visible { color: #1d4ed8; background: #eff6ff; outline: 0; }
.timer { min-width: 76px; color: #17202b; font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 700; }
.timer.warning { color: #c2410c; }
.button { border: 0; border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.button-primary { color: #fff; background: #1d4ed8; }
.button-quiet { color: #546170; background: #f2f5f8; }
.button.is-active { color: #1d4ed8; background: #eaf3ff; box-shadow: inset 0 0 0 1px #93c5fd; }
.workspace { --passage-width: 50%; display: grid; grid-template-columns: minmax(320px, var(--passage-width)) 12px minmax(320px, 1fr); gap: 0; height: calc(100vh - 130px); padding: 0; background: var(--page, #edf1f5); }
.panel { display: flex; min-height: 0; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--line, #dbe2e9); border-radius: 12px; overflow: hidden; }
.workspace .panel { border-radius: 0; border-top: 0; border-bottom: 0; }
.workspace .panel + .panel { border-left: 1px solid #cfd8e2; }
.workspace-splitter { position: relative; z-index: 3; width: 12px; border: 0; border-left: 1px solid #cfd8e2; border-right: 1px solid #cfd8e2; color: #64748b; background: #f3f6fa; cursor: col-resize; font-size: 13px; }
.workspace-splitter:hover, .workspace-splitter:focus-visible { color: #1d4ed8; background: #eaf3ff; outline: 0; }
.panel-heading { justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid #edf0f3; }
.eyebrow { color: #718096; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
h1, h2 { margin: 5px 0 0; letter-spacing: -.03em; }
h1 { font-size: 22px; } h2 { font-size: 18px; }
.passage-content, .question-content { min-height: 0; overflow: auto; padding: 22px 24px 60px; line-height: 1.75; color: var(--text, #17202b); font-size: 16px; }
.passage-content { font-family: Arial, "Helvetica Neue", ui-sans-serif, system-ui, sans-serif; font-size: 17px; }
.passage-content p { margin: 0 0 18px; }
.passage-content ::selection, .question-content ::selection { color: #17202b; background: #bfdbfe; }
.passage-highlight { padding: 0 .04em; color: inherit; background: #d6b98c; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.selection-menu { position: fixed; z-index: 30; display: flex; gap: 4px; padding: 5px; border: 1px solid #cbd5e1; border-radius: 8px; background: #17202b; box-shadow: 0 8px 24px rgba(15, 23, 42, .22); }
.selection-menu button { border: 0; border-radius: 5px; padding: 6px 10px; color: #fff; background: transparent; cursor: pointer; font-size: 13px; }
.selection-menu button:hover, .selection-menu button:focus-visible { background: #334155; outline: 0; }
.selection-menu__clear { display: inline-flex; align-items: center; gap: 6px; line-height: 1.05; text-align: left; }
.selection-menu__clear > span:first-child { font-size: 17px; opacity: .9; }
.question-group { margin-bottom: 28px; }
.question-group h3 { margin: 0 0 8px; font-size: 15px; }
.question-row { display: grid; grid-template-columns: minmax(44px, auto) minmax(0, 1fr); gap: 8px; margin: 12px 0; }
.question-number { color: #102a43; font-weight: 400; white-space: nowrap; }
.question-instructions { margin: 0 0 24px; padding: 0 0 14px; background: #fff; border-bottom: 1px solid #e5e7eb; color: #102a43; font-size: inherit; line-height: 1.65; }
.question-instructions p { margin: 0; }
.question-instructions__line { margin: 0 0 5px !important; }
.question-instructions__line:last-child { margin-bottom: 0 !important; }
.question-instructions__title { color: #102a43; font-weight: 700; }
.question-instructions__bullet { padding-left: 18px; }
.question-instructions__bullet::before { content: "•"; display: inline-block; width: 13px; margin-left: -18px; color: #102a43; font-weight: 700; }
.question-instructions strong { color: #102a43; font-weight: 700; }
.answer-input--blank { border-color: #d4a72c !important; color: #a16207 !important; background: #fff4b8 !important; font-weight: 600; }
.inline-answer-wrap { display: inline-flex; align-items: center; vertical-align: middle; margin: 0 5px 0 7px; border: 0; background: transparent; }
.inline-answer-number { display: inline-block; min-width: 0; height: auto; margin-right: 4px; color: inherit; background: transparent; border: 0; font-size: inherit; font-weight: 400; line-height: 1.35; }
.inline-answer-wrap > .inline-answer { margin: 0; border: 1px solid #7b8794 !important; border-radius: 2px; padding: 2px 5px; color: #102a43; background: #fff; font: inherit; line-height: 1.25; }
.structured-answer-slot > .inline-answer { width: 150px; min-height: 22px; box-sizing: border-box; }
.structured-answer-slot--wide > .inline-answer { width: 180px; }
.inline-answer-wrap--first > .inline-answer { width: 80px; }
.reference-question-group { margin: 0 0 30px; }
.interaction-notice { margin: 0 0 12px; padding: 8px 10px; border: 1px solid #fed7aa; border-radius: 6px; background: #fff7ed; color: #9a3412; font-size: 13px; line-height: 1.45; }
.interaction-notice[hidden] { display: none; }
.reference-question-group .group { width: 100%; }
.reference-question-group h4 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.reference-question-group .group > p { margin: 0 0 12px; line-height: 1.6; }
.reference-question-group .question-item { margin: 20px 0 26px; }
.reference-question-group .question-item > p { margin: 0 0 10px; line-height: 1.65; }
.reference-question-group .question-item > p strong { margin-right: 8px; color: #1d4ed8; }
.reference-question-group .question-item:has(.match-question-item) .match-question-item { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 14px; align-items: center; }
.reference-question-group .match-question-item > p { grid-column: 1; grid-row: 1; margin: 0; }
.reference-question-group .match-question-item > .match-dropzone { grid-column: 2; grid-row: 1; width: 100%; }
.reference-question-group .radio-options { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; }
.reference-question-group .radio-options label { display: flex; align-items: flex-start; gap: 8px; line-height: 1.55; cursor: pointer; }
.reference-question-group .radio-options input { flex: 0 0 auto; margin-top: 5px; }
.reference-question-group .summary-text { margin: 16px 0; padding: 14px 16px; background: #f8fafc; border: 1px solid #e1e7ef; line-height: 1.8; }
.reference-question-group .summary-text h5 { margin: 0 0 8px; font-size: 15px; }
.structured-completion__options { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #dbe6f1; color: #475569; background: #f8fafc; font-size: 13px; line-height: 1.6; }
.structured-completion__options strong { color: #1e3a8a; }
.structured-completion__title { margin: 8px 0 22px; text-align: center; font-size: inherit; }
.structured-question-group { margin-bottom: 24px; padding: 20px 22px; border: 1px solid #d6dde6; border-radius: 4px; background: #fff; }
.structured-completion-select { min-width: 190px; border: 1px solid #94a3b8 !important; border-radius: 4px; padding: 4px 24px 4px 7px !important; color: #1d4ed8; background: #fff; }
.structured-completion__line { margin: 0 0 10px; line-height: 1.75; }
.structured-completion--notes .structured-completion__line { padding-left: 18px; text-indent: -14px; }
.structured-completion--notes .structured-completion__line:last-child { margin-bottom: 0; }
.reference-question-group .options-pool, .reference-question-group .headings-pool { margin: 16px 0; padding: 14px; background: #f8fafc; border: 1px solid #e1e7ef; }
.reference-question-group .pool-items { display: grid; gap: 7px; margin-top: 8px; }
.reference-question-group .drag-item { padding: 7px 9px; border: 1px solid #d3dce7; border-radius: 5px; background: #fff; cursor: grab; }
.reference-question-group .drag-item--assigned { width: 100%; padding: 4px 8px; border-color: #b9cdfa; background: #eff6ff; color: #1d4ed8; text-align: center; font-weight: 700; cursor: grab; }
.reference-question-group .drag-item.is-dragging { opacity: .5; }
.matching-table { display: grid; gap: 1px; margin: 18px 0; overflow-x: auto; border: 1px solid #dbe2e9; background: #dbe2e9; }
.matching-row { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(var(--match-option-count, 4), minmax(74px, 1fr)); gap: 1px; min-width: 720px; background: #dbe2e9; }
.matching-prompt, .matching-option, .matching-cell { min-height: 48px; padding: 10px 9px; background: #fff; }
.matching-prompt { line-height: 1.45; }
.matching-option { display: flex; align-items: center; justify-content: center; color: #334155; font-size: 12px; font-weight: 700; text-align: center; }
.matching-cell { display: grid; place-items: center; border: 0; cursor: pointer; }
.matching-cell:hover, .matching-cell:focus-visible { background: #f4f8fc; outline: 2px solid #bfdbfe; outline-offset: -2px; }
.match-radio { width: 16px; height: 16px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.matching-cell.is-selected { background: #eaf3ff; box-shadow: inset 0 0 0 1px #93c5fd; }
.matching-cell.is-selected .match-radio { border-color: #2563eb; box-shadow: inset 0 0 0 3px #fff; background: #2563eb; }
.reference-question-group .drop-target-summary, .reference-question-group .match-dropzone, .reference-question-group .dropzone { display: inline-block; min-width: 110px; min-height: 27px; border-bottom: 1px solid #697789; vertical-align: middle; }
.reference-question-group .drop-target-summary.is-over, .reference-question-group .match-dropzone.is-over, .reference-question-group .dropzone.is-over { background: #e7f0ff; border-bottom-color: #1d4ed8; }
.heading-answer-list { display: grid; gap: 8px; margin: 18px 0 20px; }
.heading-answer-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 14px; align-items: center; min-height: 42px; }
.heading-answer-label { color: #17202b; font-weight: 600; }
.right-dropzone { display: flex; align-items: center; justify-content: center; min-height: 34px; border: 1px dashed #94a3b8; border-radius: 4px; background: #fff; color: #718096; font-family: Arial, "Helvetica Neue", ui-sans-serif, system-ui, sans-serif; font-size: 14px; }
.right-dropzone.is-over { border-color: #1d4ed8; background: #eff6ff; }
.right-dropzone[data-answer-value]:not([data-answer-value=""]) { color: #1d4ed8; font-weight: 700; }
.passage-content .paragraph-wrapper { margin: 0 0 18px; }
.passage-content .paragraph-wrapper > p { margin-bottom: 12px; }
.passage-content .paragraph-wrapper--standfirst { margin: 0 0 22px; }
.passage-content .paragraph-wrapper--standfirst > p.passage-standfirst { margin: 0; color: #17202b; font-style: italic; font-weight: 700; line-height: 1.55; }
.passage-content .paragraph-dropzone { display: none !important; }
.reference-question-group input[type="text"], .reference-question-group textarea { max-width: 240px; border: 0; border-bottom: 1px solid #718096; outline: 0; padding: 3px 4px; }
.question-prompt { margin-bottom: 8px; line-height: 1.65; }
.question-prompt strong { font-weight: 700; }
.inline-answer { width: 150px; margin: 0 5px; border: 0; border-bottom: 1px solid #536171; outline: 0; padding: 3px 4px; background: transparent; }
.inline-answer[data-over-limit="true"] { border-bottom-color: #dc2626; background: #fff1f2; }
.question-row input[type="text"] { border: 0; border-bottom: 1px solid #8491a0; outline: 0; padding: 4px 2px; }
.options { display: grid; gap: 9px; margin-top: 7px; }
.options label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.bottom-nav { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 22px; background: var(--surface, #fff); border-top: 1px solid var(--line, #dbe2e9); }
.bottom-left, .bottom-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bottom-right { color: var(--muted, #718096); font-size: 13px; white-space: nowrap; }
.question-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.question-nav button { min-width: 27px; border: 0; border-radius: 5px; padding: 5px 6px; color: var(--muted, #5d6875); background: transparent; cursor: pointer; font-size: 12px; }
.question-nav button:hover, .question-nav button:focus-visible { color: #1d4ed8; background: #eff6ff; outline: 0; }
.question-nav button.is-answered { color: #1d4ed8; border: 1px solid #bfdbfe; background: #f8fbff; font-weight: 700; }
.question-nav button.is-active { color: #1d4ed8; border: 1px solid #93c5fd; background: #eff6ff; box-shadow: inset 0 0 0 1px #dbeafe; }
.notes-panel { position: fixed; z-index: 15; top: 68px; right: 0; bottom: 62px; display: flex; width: min(340px, 35vw); flex-direction: column; padding: 18px; border-left: 1px solid var(--line, #dbe2e9); background: var(--surface, #fff); box-shadow: -12px 0 30px rgba(15, 23, 42, .12); }
.notes-panel[hidden], .option-menu[hidden], .option-submenu[hidden] { display: none; }
.notes-head, .option-menu-head { display: flex; align-items: center; justify-content: space-between; }
.notes-panel p { color: var(--muted, #718096); font-size: 13px; line-height: 1.5; }
.notes-panel textarea { min-height: 220px; resize: vertical; border: 1px solid var(--line, #dbe2e9); border-radius: 7px; padding: 10px; color: var(--text, #17202b); background: var(--surface, #fff); font: inherit; line-height: 1.5; outline: 0; }
.notes-panel textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.option-menu { position: fixed; z-index: 25; top: 68px; right: 18px; width: 300px; padding: 12px; border: 1px solid var(--line, #dbe2e9); border-radius: 10px; background: var(--surface, #fff); box-shadow: 0 18px 45px rgba(15, 23, 42, .18); }
.option-menu-head { margin: 2px 4px 10px; font-size: 16px; }
.option-row { display: grid; grid-template-columns: 24px 1fr 18px; align-items: center; width: 100%; border: 0; border-top: 1px solid var(--line, #edf0f3); padding: 12px 4px; color: var(--text, #17202b); background: transparent; cursor: pointer; text-align: left; }
.option-row:hover, .option-row:focus-visible { background: #f4f8fc; outline: 0; }
.option-submenu { display: grid; gap: 4px; margin: 0 4px 8px 28px; }
.option-submenu button { border: 1px solid var(--line, #dbe2e9); border-radius: 6px; padding: 7px 9px; color: var(--text, #17202b); background: var(--surface, #fff); cursor: pointer; text-align: left; }
.option-submenu button:hover, .option-submenu button.is-active { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.option-help { padding: 8px 4px 4px; color: var(--muted, #5d6875); font-size: 13px; line-height: 1.5; }
.result-validation { margin: 14px 0; border-left: 3px solid #f59e0b; padding: 10px 14px; background: #fffbeb; color: #92400e; }
.result-validation h3 { margin: 0 0 6px; font-size: 14px; }
.result-validation ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
:root[data-colour="white-on-black"] { --page: #050505; --surface: #111; --text: #f8fafc; --muted: #cbd5e1; --line: #475569; }
:root[data-colour="yellow-on-black"] { --page: #050505; --surface: #111; --text: #fff36b; --muted: #fde68a; --line: #a16207; }
:root[data-colour="black-on-white"] { --page: #edf1f5; --surface: #fff; --text: #17202b; --muted: #5d6875; --line: #dbe2e9; }
:root[data-colour="white-on-black"] .panel-heading,
:root[data-colour="yellow-on-black"] .panel-heading,
:root[data-colour="white-on-black"] .question-instructions,
:root[data-colour="yellow-on-black"] .question-instructions,
:root[data-colour="white-on-black"] .reference-question-group .options-pool,
:root[data-colour="yellow-on-black"] .reference-question-group .options-pool,
:root[data-colour="white-on-black"] .reference-question-group .headings-pool,
:root[data-colour="yellow-on-black"] .reference-question-group .headings-pool { background: #171717; color: var(--text); border-color: var(--line); }
:root[data-colour="white-on-black"] .reference-question-group .drag-item,
:root[data-colour="yellow-on-black"] .reference-question-group .drag-item,
:root[data-colour="white-on-black"] .right-dropzone,
:root[data-colour="yellow-on-black"] .right-dropzone,
:root[data-colour="white-on-black"] .option-submenu button,
:root[data-colour="yellow-on-black"] .option-submenu button { background: #111; color: var(--text); border-color: var(--line); }
:root[data-colour="white-on-black"] .passage-tab,
:root[data-colour="yellow-on-black"] .passage-tab,
:root[data-colour="white-on-black"] .button-quiet,
:root[data-colour="yellow-on-black"] .button-quiet { color: var(--text); background: #171717; border-color: var(--line); }
.passage-tabs { gap: 8px; }
.passage-tab { min-width: 106px; border: 1px solid #d6dee7; border-radius: 8px; padding: 8px 12px; color: #5d6875; background: #fff; cursor: pointer; }
.passage-tab.active { color: #1d4ed8; border-color: #1d4ed8; background: #eff6ff; }
.question-progress { color: #718096; font-size: 13px; }
.result-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .42); }
.result-modal { width: min(520px, 100%); padding: 22px; border: 1px solid #dbe2e9; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); }
.result-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #edf0f3; }
.result-modal__head h2 { margin-top: 4px; }
.result-score { display: grid; gap: 5px; padding: 22px 0; color: #5d6875; }
.result-score strong { color: #1d4ed8; font-size: 38px; line-height: 1; }
.result-band { display: grid; gap: 4px; margin-top: 12px; padding: 14px 16px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.result-band strong { color: #1d4ed8; font-size: 34px; line-height: 1; }
.result-band__label { color: #1e40af; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.result-band p { margin: 0; color: #5d6875; font-size: 12px; line-height: 1.45; }
.result-band--unavailable { border-color: #dbe2e9; background: #f7f9fb; }
.result-band--unavailable strong { color: #64748b; }
.result-band--unavailable .result-band__label { color: #475569; }
.result-wrong { margin-bottom: 22px; padding: 14px 16px; border-radius: 8px; background: #f7f9fb; }
.result-wrong h3 { margin: 0 0 8px; font-size: 15px; }
.result-wrong p { margin: 0; color: #5d6875; line-height: 1.6; }
.result-unanswered { margin: -10px 0 22px; padding: 14px 16px; border-radius: 8px; background: #fff7ed; }
.result-unanswered h3 { margin: 0 0 8px; font-size: 15px; color: #9a3412; }
.result-unanswered p { margin: 0; color: #9a3412; line-height: 1.6; }
.catalog-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: start center; padding: 90px 24px 24px; background: rgba(15, 23, 42, .42); }
.catalog-modal { width: min(620px, 100%); max-height: calc(100vh - 120px); overflow: auto; padding: 22px; border: 1px solid #dbe2e9; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); }
.catalog-intro { margin: 16px 0; color: #5d6875; font-size: 13px; line-height: 1.5; }
.catalog-list { display: grid; gap: 10px; }
.catalog-card { display: grid; gap: 10px; width: 100%; padding: 0; border: 1px solid #dbe2e9; border-radius: 9px; color: #17202b; background: #fff; text-align: left; overflow: hidden; }
.catalog-card.is-current { border-color: #93c5fd; background: #f8fbff; }
.catalog-card__main { display: grid; gap: 5px; width: 100%; padding: 14px 15px 8px; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.catalog-card__main:hover, .catalog-card__main:focus-visible { background: #f8fbff; outline: 0; }
.catalog-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 15px 12px; color: #718096; font-size: 12px; }
.catalog-card__actions .button { padding: 5px 8px; font-size: 12px; }
.catalog-card__title { font-size: 15px; font-weight: 700; }
.catalog-card__meta, .catalog-card__review { color: #718096; font-size: 12px; }
.catalog-card__review { color: #1d4ed8; }
:root[data-colour="white-on-black"] .catalog-modal,
:root[data-colour="yellow-on-black"] .catalog-modal { color: var(--text); background: #111; border-color: var(--line); }
:root[data-colour="white-on-black"] .catalog-card,
:root[data-colour="yellow-on-black"] .catalog-card { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .catalog-intro,
:root[data-colour="yellow-on-black"] .catalog-intro,
:root[data-colour="white-on-black"] .catalog-card__meta,
:root[data-colour="yellow-on-black"] .catalog-card__meta { color: var(--muted); }
.result-view-tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid #edf0f3; }
.result-view-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; color: #718096; background: transparent; cursor: pointer; font-size: 13px; }
.result-view-tabs button.is-active { color: #1d4ed8; border-bottom-color: #1d4ed8; font-weight: 700; }
.review-intro { margin: 0 0 12px; color: #5d6875; font-size: 13px; line-height: 1.5; }
.review-list { display: grid; gap: 10px; max-height: 400px; overflow: auto; padding-right: 3px; }
.review-card { padding: 12px 13px; border: 1px solid #dbe2e9; border-left: 3px solid #94a3b8; border-radius: 8px; background: #fff; }
.review-card--correct { border-left-color: #16a34a; }
.review-card--wrong { border-left-color: #dc2626; }
.review-card--blank { border-left-color: #f59e0b; }
.review-card__head, .review-card__answers { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-card__head { color: #17202b; font-size: 13px; }
.review-card__head span { color: #64748b; font-size: 12px; }
.review-card--correct .review-card__head span { color: #15803d; }
.review-card--wrong .review-card__head span { color: #b91c1c; }
.review-card--blank .review-card__head span { color: #b45309; }
.review-card__answers { justify-content: flex-start; flex-wrap: wrap; margin-top: 7px; color: #5d6875; font-size: 12px; }
.review-card__answers b { color: #17202b; font-weight: 700; }
.review-card p { margin: 8px 0 0; color: #4b5968; font-size: 13px; line-height: 1.55; }
.review-card__tools { display: flex; gap: 5px; margin-top: 12px; border-bottom: 1px solid #e2e8f0; }
.review-card__tools button { border: 0; border-bottom: 2px solid transparent; padding: 6px 7px; color: #64748b; background: transparent; cursor: pointer; font-size: 12px; }
.review-card__tools button.is-active, .review-card__tools button:hover { color: #1d4ed8; border-bottom-color: #2563eb; }
.review-detail { margin-top: 10px; padding: 10px 12px; border-radius: 6px; color: #334155; background: #f8fafc; font-size: 13px; line-height: 1.6; }
.review-detail__translation { display: inline-block; margin-top: 6px; color: #64748b; }
.review-card__missing { color: #9a3412 !important; }
.inline-result { display: grid; gap: 16px; margin: 28px 0 24px; padding: 22px; border: 1px solid #cbd8e6; border-radius: 12px; background: #f8fbff; }
.inline-result__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #dbe6f1; }
.inline-result__head h2 { margin: 4px 0 0; }
.inline-result__hint { color: #2563eb; font-size: 12px; }
.inline-result__review { display: grid; gap: 10px; padding-top: 6px; }
.inline-result__review h3 { margin: 0; }
.inline-result .review-list { max-height: none; overflow: visible; }
.review-switcher { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border: 1px solid #dbe6f1; border-radius: 9px; background: #fff; }
.review-switcher__button { min-width: 38px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 9px; color: #475569; background: #f8fafc; cursor: pointer; font-size: 12px; font-weight: 700; }
.review-switcher__button small { display: block; margin-top: 3px; color: currentColor; font-size: 10px; font-weight: 500; opacity: .82; }
.review-switcher__button:hover { border-color: #2563eb; color: #1d4ed8; }
.review-switcher__button.is-active { color: #fff; background: #2563eb; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .15); }
.review-switcher__button--correct:not(.is-active) { color: #15803d; border-color: #86efac; background: #f0fdf4; }
.review-switcher__button--wrong:not(.is-active) { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
.review-switcher__button--blank:not(.is-active) { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.review-card[hidden] { display: none; }
.question-nav button.is-reviewed.is-review-correct { color: #15803d; background: #dcfce7; border-color: #86efac; }
.question-nav button.is-reviewed.is-review-wrong { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
.question-nav button.is-reviewed.is-review-blank { color: #b45309; background: #fef3c7; border-color: #fcd34d; }
.passage-highlight--evidence { background: #ffe58a; box-shadow: 0 0 0 1px rgba(202, 138, 4, .18); }
.structured-completion { padding: 14px 0; line-height: 1.75; font-size: inherit; }
.structured-completion__text { color: #17202b; }
.structured-completion__text strong { font-weight: 700; }
.structured-completion-answer { min-width: 112px; margin: 0 4px; }
.structured-diagram { display: grid; gap: 14px; padding: 14px 0; }
.diagram-line { padding: 10px 12px; border-left: 3px solid #cbd5e1; color: #17202b; line-height: 1.8; }
.structured-diagram-answer { min-width: 112px; margin: 0 4px; }
:root[data-colour="white-on-black"] .inline-result,
:root[data-colour="yellow-on-black"] .inline-result { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .inline-result__head,
:root[data-colour="yellow-on-black"] .inline-result__head { border-color: var(--line); }
:root[data-colour="white-on-black"] .result-modal,
:root[data-colour="yellow-on-black"] .result-modal { color: var(--text); background: #111; border-color: var(--line); }
:root[data-colour="white-on-black"] .review-card,
:root[data-colour="yellow-on-black"] .review-card { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .review-card__head,
:root[data-colour="yellow-on-black"] .review-card__head,
:root[data-colour="white-on-black"] .review-card__answers b,
:root[data-colour="yellow-on-black"] .review-card__answers b { color: var(--text); }
:root[data-colour="white-on-black"] .review-modal,
:root[data-colour="yellow-on-black"] .review-modal { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .review-modal__head,
:root[data-colour="yellow-on-black"] .review-modal__head,
:root[data-colour="white-on-black"] .review-modal__tools,
:root[data-colour="yellow-on-black"] .review-modal__tools { border-color: var(--line); }
:root[data-colour="white-on-black"] .review-modal__panel,
:root[data-colour="yellow-on-black"] .review-modal__panel { color: var(--muted); background: #111; }
:root[data-colour="white-on-black"] .answer-summary-strip,
:root[data-colour="yellow-on-black"] .answer-summary-strip { color: var(--muted); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .answer-summary-strip strong,
:root[data-colour="yellow-on-black"] .answer-summary-strip strong,
:root[data-colour="white-on-black"] .answer-summary-strip b,
:root[data-colour="yellow-on-black"] .answer-summary-strip b { color: var(--text); }
/* 高对比深色主题下，正误色需要提亮才够看清（顺序不能调：--correct 必须在 --actual 之后） */
:root[data-colour="white-on-black"] .answer-summary__actual,
:root[data-colour="yellow-on-black"] .answer-summary__actual { color: #f87171; }
:root[data-colour="white-on-black"] .answer-summary__blank,
:root[data-colour="yellow-on-black"] .answer-summary__blank { color: #fbbf24; }
:root[data-colour="white-on-black"] .answer-summary__correct,
:root[data-colour="yellow-on-black"] .answer-summary__correct,
:root[data-colour="white-on-black"] .answer-summary__actual--correct,
:root[data-colour="yellow-on-black"] .answer-summary__actual--correct { color: #4ade80; }
:root[data-colour="white-on-black"] .review-switcher,
:root[data-colour="yellow-on-black"] .review-switcher { background: #111; border-color: var(--line); }
:root[data-colour="white-on-black"] .review-switcher__button,
:root[data-colour="yellow-on-black"] .review-switcher__button { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .review-card p,
:root[data-colour="yellow-on-black"] .review-card p,
:root[data-colour="white-on-black"] .review-intro,
:root[data-colour="yellow-on-black"] .review-intro { color: var(--muted); }
/* 高对比/暗色主题：题目卡片、输入框、匹配表等不再硬编码白底，避免“白底白字”不可见 */
:root[data-colour="white-on-black"] .structured-question-group,
:root[data-colour="yellow-on-black"] .structured-question-group { background: #171717; color: var(--text); border-color: var(--line); }
:root[data-colour="white-on-black"] .structured-completion__text,
:root[data-colour="yellow-on-black"] .structured-completion__text { color: var(--text); }
:root[data-colour="white-on-black"] .inline-answer-wrap > .inline-answer,
:root[data-colour="yellow-on-black"] .inline-answer-wrap > .inline-answer { color: var(--text); background: #111; border-color: var(--line) !important; }
:root[data-colour="white-on-black"] .structured-completion-select,
:root[data-colour="yellow-on-black"] .structured-completion-select { color: var(--text); background: #111; border-color: var(--line) !important; }
:root[data-colour="white-on-black"] .structured-completion__options,
:root[data-colour="yellow-on-black"] .structured-completion__options { color: var(--muted); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .structured-completion__options strong,
:root[data-colour="yellow-on-black"] .structured-completion__options strong { color: var(--text); }
:root[data-colour="white-on-black"] .reference-question-group .summary-text,
:root[data-colour="yellow-on-black"] .reference-question-group .summary-text { color: var(--text); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .diagram-line,
:root[data-colour="yellow-on-black"] .diagram-line { color: var(--text); border-left-color: var(--line); }
:root[data-colour="white-on-black"] .review-detail,
:root[data-colour="yellow-on-black"] .review-detail { color: var(--muted); background: #171717; border-color: var(--line); }
:root[data-colour="white-on-black"] .matching-table,
:root[data-colour="yellow-on-black"] .matching-table { background: var(--line); border-color: var(--line); }
:root[data-colour="white-on-black"] .matching-row,
:root[data-colour="yellow-on-black"] .matching-row { background: var(--line); }
:root[data-colour="white-on-black"] .matching-prompt,
:root[data-colour="yellow-on-black"] .matching-prompt,
:root[data-colour="white-on-black"] .matching-option,
:root[data-colour="yellow-on-black"] .matching-option { background: #111; color: var(--text); border-color: var(--line); }
:root[data-colour="white-on-black"] .matching-cell,
:root[data-colour="yellow-on-black"] .matching-cell { background: #111; color: var(--text); border-color: var(--line); }
:root[data-colour="white-on-black"] .matching-cell:hover,
:root[data-colour="yellow-on-black"] .matching-cell:hover { background: #1f2937; }
:root[data-colour="white-on-black"] .matching-cell.is-selected,
:root[data-colour="yellow-on-black"] .matching-cell.is-selected { background: #1e3a5f; box-shadow: inset 0 0 0 1px #60a5fa; }
:root[data-colour="white-on-black"] .matching-cell .match-radio,
:root[data-colour="yellow-on-black"] .matching-cell .match-radio { background: #111; border-color: var(--line); }
:root[data-colour="white-on-black"] .structured-question-group[data-group-type="matching_features"] .matching-option,
:root[data-colour="yellow-on-black"] .structured-question-group[data-group-type="matching_features"] .matching-option { background: #1f2937; color: var(--text); }
@media (max-width: 1150px) { body { min-width: 0; overflow-x: hidden; } .workspace { grid-template-columns: 1fr; height: auto; } .workspace-splitter { display: none; } .panel { min-height: 460px; } .bottom-nav { position: sticky; bottom: 0; min-height: 62px; height: auto; flex-wrap: wrap; padding: 8px 12px; overflow: hidden; } .bottom-left { width: 100%; min-width: 0; overflow: hidden; } .passage-tabs { flex: 0 0 auto; overflow-x: auto; } .question-nav { min-width: 0; flex: 1 1 auto; overflow-x: auto; } .bottom-right { width: 100%; justify-content: flex-end; gap: 6px; } .bottom-right > span { display: none; } .notes-panel { width: min(360px, 85vw); } }
:root { --start-bg: #f5f8fc; }
.is-member.is-start-page { background: #f7faff; }
.is-member.is-start-page::before { content: ""; position: fixed; z-index: 0; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, rgba(137, 166, 213, .34), transparent 27%), radial-gradient(ellipse at 8% 92%, rgba(224, 183, 177, .28), transparent 28%), radial-gradient(ellipse at 94% 82%, rgba(220, 193, 164, .30), transparent 30%), linear-gradient(120deg, #f2eeee, #eaf1fa 52%, #f5eee7); filter: blur(1px); }
.is-member.is-start-page > * { position: relative; z-index: 1; }
/* 顶栏层级修复：上面那条 `> *` 会把 body 的直接子元素（含顶栏 header.topbar）一并压到 z-index:1，
   main#start-root 同为 1 且 DOM 在后 → 后绘制会盖住顶栏；顶栏本体在页面最上方看不出来，
   但导航下拉是溢出到 hero 区域的，一伸出去就被大标题黑字压住。此处把顶栏重新抬到内容之上。 */
body.is-member.is-start-page > header.topbar,
body.is-member.is-start-page > header.site-header { position: sticky; z-index: 60; }
.is-member.is-start-page .start-page { background: transparent; }
.is-member.is-start-page .account-panel { border-color: #d7e6f2; background: rgba(255, 255, 255, .88); }
.is-member.is-start-page .start-pack { border-color: #d7e6f2; box-shadow: 0 10px 28px rgba(71, 111, 145, .06); }
.is-member.is-start-page .start-pack__badge { color: #176b55; background: #ecfdf5; }
.start-page { min-height: 100vh; padding: 46px clamp(20px, 6vw, 88px) 64px; background: var(--start-bg); color: #17202b; }
.start-page__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; max-width: 1180px; margin: 0 auto 42px; }
.start-page__brand { display: flex; align-items: center; gap: 4px; color: #17202b; font-size: 18px; font-weight: 750; }
.brand-logo { width: 40px; height: 32px; margin-left: 0; border-radius: 3px; object-fit: contain; clip-path: inset(0 0 0 1px); }
.start-page__logo { width: 154px; height: 58px; border-radius: 8px; object-fit: contain; }
.start-page__logo { margin-left: -13px; }
.start-page .start-page__brand + h1 { margin-left: 0; }
.start-overview { min-height: 100vh; padding: 40px 22px 78px; background: radial-gradient(circle at 50% 25%, rgba(87, 132, 206, .65), transparent 25%), radial-gradient(circle at 15% 95%, rgba(241, 91, 22, .75), transparent 27%), radial-gradient(circle at 90% 85%, rgba(221, 119, 61, .65), transparent 30%), linear-gradient(120deg, #dfbfc2, #c7d9f6 52%, #f2d9bf); color: #1e293b; }
.overview-nav { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1305px; margin: 0 auto 82px; padding: 4px; border: 1px solid rgba(255,255,255,.75); border-radius: 32px; background: rgba(255,255,255,.38); box-shadow: 0 14px 32px rgba(90, 62, 74, .1); backdrop-filter: blur(18px); }
.overview-nav__item { min-height: 42px; border: 0; border-radius: 25px; color: #60616b; background: transparent; cursor: pointer; font-size: 14px; }
.overview-nav__item.is-active { color: #17202b; background: rgba(255,255,255,.75); box-shadow: 0 2px 8px rgba(85, 73, 84, .08); font-weight: 700; }
.overview-panel { max-width: 1260px; margin: 0 auto; padding: 46px 46px 48px; border: 1px solid rgba(255,255,255,.65); border-radius: 28px; background: rgba(255,255,255,.28); box-shadow: 0 20px 45px rgba(77, 53, 65, .13); backdrop-filter: blur(22px); }
.overview-panel__head { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 54px; }
.overview-panel h1 { margin: 0 0 25px; font-size: 23px; letter-spacing: -.02em; }
.overview-panel h2 { margin: 0; font-size: 21px; }
.overview-mode { display: flex; gap: 9px; }
.overview-mode__button, .overview-button { border: 1px solid rgba(255,255,255,.85); border-radius: 18px; color: #27303d; background: rgba(255,255,255,.57); box-shadow: 0 4px 12px rgba(75, 60, 72, .08); cursor: pointer; }
.overview-mode__button { padding: 9px 20px; font-weight: 650; }
.overview-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.overview-card { min-height: 198px; display: grid; grid-template-columns: 42px 1fr; gap: 8px 14px; padding: 31px 34px 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: rgba(255,255,255,.52); box-shadow: 0 15px 26px rgba(81, 62, 77, .1); }
.overview-card__icon { grid-row: span 2; color: #525866; font-size: 34px; }
.overview-card__body h3 { margin: 3px 0 9px; font-size: 19px; }
.overview-card__body p { margin: 0; color: #576274; font-size: 13px; }
.overview-card__actions { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 14px; align-self: end; margin-top: 20px; }
.overview-button { min-width: 116px; padding: 10px 14px; font-size: 13px; }
@media (max-width: 900px) { .overview-nav { margin-bottom: 36px; } .overview-panel { padding: 28px 22px; } .overview-panel__head { display: grid; margin-bottom: 30px; } .overview-cards { grid-template-columns: 1fr; gap: 16px; } }
.start-page__mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: #2563eb; font-weight: 800; }
.start-page__eyebrow { margin: 0 0 9px; color: #2563eb; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.start-page h1 { max-width: 760px; margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; letter-spacing: -.04em; }
.start-page__intro { max-width: 660px; margin: 16px 0 0; color: #64748b; font-size: 16px; line-height: 1.7; }
.start-page__stats { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 10px; min-width: 245px; }
.start-stat { padding: 14px 16px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; }
.start-stat strong { display: block; color: #1d4ed8; font-size: 25px; }
.start-stat span { color: #718096; font-size: 12px; }
.start-page__section { max-width: 1180px; margin: 0 auto; }
.start-page__section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.start-page__section-head h2 { margin: 0; font-size: 21px; }
.start-page__section-head p { margin: 0; color: #718096; font-size: 13px; }
.overview-tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 5px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.overview-tab { flex: 1 1 0; border: 0; border-radius: 8px; padding: 10px 14px; color: #64748b; background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.overview-tab:hover, .overview-tab:focus-visible { color: #1d4ed8; background: #eff6ff; outline: 0; }
.overview-tab.is-active { color: #fff; background: #2563eb; box-shadow: 0 3px 8px rgba(37, 99, 235, .18); }
.homepage-library { width: 100%; max-width: 920px; box-sizing: border-box; }
.homepage-library .library-page__list { height: 560px; min-height: 560px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
body.is-authenticated.is-start-page:not(.is-library-page) .homepage-library .library-page__list { height: 834px; min-height: 834px; }
.homepage-library .library-page__item { min-width: 0; }
.homepage-library .library-page__title { min-width: 0; }
@media (max-width: 720px) { .homepage-library .library-page__list { height: 490px; min-height: 490px; } }
.start-library { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.start-pack { display: grid; gap: 16px; padding: 20px; border: 1px solid #dbe4ef; border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .05); }
.start-pack__top { display: flex; justify-content: space-between; gap: 12px; }
.start-pack h3 { margin: 0 0 6px; font-size: 17px; }
.start-pack__meta, .start-pack__review { margin: 0; color: #718096; font-size: 12px; line-height: 1.5; }
.start-pack__review { color: #2563eb; }
.start-pack__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.start-pack__actions .button { flex: 1 1 120px; }
.start-pack__passages { display: grid; gap: 7px; padding-top: 4px; border-top: 1px solid #edf1f5; }
.start-pack__passages button { padding: 7px 0; border: 0; color: #334155; background: transparent; cursor: pointer; text-align: left; }
.start-pack__passages button:hover { color: #1d4ed8; }
.brand > span { white-space: nowrap; font-size: 14px; }
.brand > .brand-wordmark { display: inline-flex; align-items: center; height: 38px; color: #111827; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.start-page__head { align-items: center; margin-bottom: 36px; }
.start-page__brand { line-height: 1.2; }
.start-page__brand > span { white-space: nowrap; }
.start-page__section-head { align-items: baseline; margin-bottom: 18px; }
.start-page__section-head h2 { line-height: 1.2; }
.start-library { gap: 20px; }
.start-library { align-items: stretch; }
.start-pack--access { height: 100%; min-width: 0; box-sizing: border-box; }
.start-pack--access .start-pack__actions { align-self: end; }
.start-pack { min-height: 192px; gap: 13px; padding: 22px; grid-template-rows: auto auto auto minmax(0, 1fr); align-content: stretch; }
.start-pack h3 { line-height: 1.25; }
.start-pack__meta, .start-pack__review { line-height: 1.35; }
.start-pack__actions { align-items: center; gap: 10px; margin-top: 0; }
.start-pack__actions .button { min-height: 38px; line-height: 1.2; }
.start-pack__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.start-pack__badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #1d4ed8; background: #eff6ff; font-size: 11px; font-weight: 700; }
.start-pack__articles { display: grid; gap: 0; min-height: 0; max-height: 240px; overflow: auto; border-top: 1px solid #edf1f5; }
.start-pack__article { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #edf1f5; padding: 9px 0; color: #334155; background: transparent; cursor: pointer; font-size: 12px; text-align: left; }
.start-pack__article:hover, .start-pack__article:focus-visible { color: #1d4ed8; outline: 0; }
.start-pack__article span:last-child { flex: 0 0 auto; color: #718096; font-size: 11px; }
.start-pack__review { min-height: 18px; }
.library-page { max-width: 920px; margin: 0 auto; }
.library-page__back { margin-bottom: 24px; }
.library-page__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 0 20px; }
.library-page__head h1 { margin: 4px 0 8px; font-size: 28px; }
.library-tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 5px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.library-tab { flex: 1 1 0; border: 0; border-radius: 8px; padding: 10px 14px; color: #64748b; background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.library-tab:hover, .library-tab:focus-visible { color: #1d4ed8; background: #eff6ff; outline: 0; }
.library-tab.is-active { color: #fff; background: #2563eb; box-shadow: 0 3px 8px rgba(37, 99, 235, .18); }
.library-page__list { display: grid; gap: 8px; padding: 16px; border: 1px solid #dbe4ef; border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .05); }
.library-page__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 15px 16px; border: 1px solid #e5ebf2; border-radius: 10px; color: #172033; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.library-page__item:hover, .library-page__item:focus-visible { border-color: #2563eb; color: #1d4ed8; outline: 0; }
.library-page__item span:last-child { color: #718096; font-size: 12px; }
.library-page__title { position: relative; display: grid; gap: 4px; min-width: 0; padding-left: 38px; }
.library-page__title .difficulty-badge { position: absolute; top: 0; left: 0; }
.library-page__title small { color: #718096; font-size: 12px; font-weight: 400; }
.library-page__item-tags { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.practice-entry-control { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; min-width: 0; }
.free-article-row .practice-entry-control { margin-left: auto; }
.difficulty-badge { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 700; }
.difficulty-badge--easy { color: #10b981; background: #ecfdf5; }
.difficulty-badge--medium { color: #f59e0b; background: #fff7ed; }
.difficulty-badge--hard { color: #f97316; background: #fff1eb; }
.library-page__item--locked .difficulty-badge { opacity: .78; }
.start-pack--access { min-height: 0; grid-template-rows: auto auto auto minmax(0, 1fr) auto; align-content: stretch; }
.free-article-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #f8fbff; }
.free-article-row > div:first-child { min-width: 0; flex: 1 1 auto; }
.free-article-row strong { overflow-wrap: anywhere; }
.free-article-row .practice-entry-button { flex: 0 0 118px; width: 118px; min-width: 118px; }
.free-article-row strong, .free-article-row small { display: block; }
.free-article-row strong { color: #1e40af; font-size: 13px; }
.free-article-row small { margin-top: 4px; color: #64748b; font-size: 11px; }
.locked-preview { display: grid; gap: 5px; padding: 10px 0 2px; border-top: 1px solid #edf1f5; }
.locked-preview__head { display: flex; justify-content: space-between; color: #64748b; font-size: 11px; }
.locked-preview__head strong { color: #b45309; font-weight: 700; }
.locked-preview__row { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; padding: 7px 9px; border-radius: 7px; color: #94a3b8; background: #f8fafc; cursor: pointer; font: inherit; font-size: 11px; text-align: left; }
.locked-preview__row:hover { color: #b45309; background: #fffbeb; }
.locked-preview--unlocked .locked-preview__row { cursor: default; color: #64748b; background: #fff; }
.locked-preview--unlocked .locked-preview__row:hover { color: #64748b; background: #fff; }
.locked-preview--unlocked { gap: 0; }
.locked-preview__row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.locked-preview__row > span:last-child { flex: 0 0 auto; white-space: nowrap; }
.frequency-badge { margin-left: auto; margin-right: 8px; padding: 2px 5px; border-radius: 4px; color: #b45309; background: #fef3c7; font-size: 10px; font-weight: 700; }
.locked-preview__blur, .library-page__blur { filter: blur(4px); user-select: none; }
.locked-preview__more { width: 100%; border: 0; padding: 4px 0; color: #2563eb; background: transparent; cursor: pointer; font: inherit; font-size: 11px; text-align: center; }
.locked-preview__more:hover, .locked-preview__more:focus-visible { color: #1d4ed8; text-decoration: underline; outline: 0; }
.membership-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 18px 20px; border: 1px solid #bfdbfe; border-radius: 14px; background: linear-gradient(100deg, #eff6ff, #f8fbff); }
.membership-cta strong { display: block; margin-top: 4px; color: #172033; font-size: 16px; }
.membership-cta p { margin: 6px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.membership-cta--library { margin: 18px 0 0; }
.button-paywall { border-color: #dc2626 !important; color: #fff !important; background: #dc2626 !important; box-shadow: 0 6px 14px rgba(220, 38, 38, .2); }
.button-paywall:hover, .button-paywall:focus-visible { border-color: #b91c1c !important; background: #b91c1c !important; box-shadow: 0 8px 18px rgba(185, 28, 28, .25); }
.random-mock-button { display: inline-flex; align-items: center; gap: 8px; border-color: #7c3aed !important; color: #fff !important; background: linear-gradient(135deg, #7c3aed, #2563eb) !important; box-shadow: 0 7px 18px rgba(99, 102, 241, .25); }
.random-mock-button small { font-size: 11px; font-weight: 700; opacity: .92; }
.paywall-message { color: #b91c1c !important; font-weight: 700; }
.library-page__item--locked { cursor: pointer; color: #94a3b8; background: #f8fafc; }
.library-page__item--locked:hover { border-color: #fcd34d; color: #b45309; background: #fffbeb; }
.library-page__item--locked span:last-child { color: #b45309; font-size: 11px; font-weight: 700; }
.library-page__locked-meta { color: #b45309 !important; font-size: 11px; font-weight: 700; }
.library-page__locked-meta em { margin-right: 5px; padding: 2px 5px; border-radius: 4px; color: #92400e; background: #fef3c7; font-style: normal; font-size: 10px; }
.paywall-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .42); }
.paywall-modal { position: relative; width: min(470px, 100%); padding: 28px; border: 1px solid #fecaca; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.25); }
.paywall-modal__close { position: absolute; top: 12px; right: 14px; border: 0; color: #64748b; background: transparent; cursor: pointer; font-size: 24px; line-height: 1; }
.paywall-modal h2 { margin: 7px 0 10px; color: #991b1b; }
.paywall-modal p { color: #475569; font-size: 13px; line-height: 1.6; }
.paywall-modal ul { display: grid; gap: 8px; margin: 16px 0; padding-left: 20px; color: #334155; font-size: 13px; line-height: 1.5; }
.paywall-modal__hint { padding: 10px 12px; border-radius: 8px; color: #991b1b !important; background: #fef2f2; }
.guest-auth-hint { margin: -2px 0 12px; color: #64748b !important; font-size: 12px !important; }
.auth-password-help { width: 100%; margin: 0 0 2px; color: #64748b; font-size: 12px; line-height: 1.5; }
.paywall-offer { display: grid; gap: 6px; margin: 14px 0; padding: 13px 14px; border: 1px solid #fed7aa; border-radius: 10px; color: #7c2d12; background: #fff7ed; font-size: 13px; line-height: 1.5; }
.paywall-offer strong { color: #9a3412; font-size: 18px; }
.paywall-contact { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.paywall-contact img { display: block; width: 152px; height: auto; flex: 0 0 auto; border-radius: 5px; }
.paywall-contact strong, .paywall-contact span { display: block; }
.paywall-contact strong { color: #172033; font-size: 14px; }
.paywall-contact span { margin-top: 5px; color: #64748b; font-size: 12px; line-height: 1.5; }
.paywall-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.review-upgrade-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 9px; background: #fff7f7; }
.review-upgrade-cta strong, .review-upgrade-cta span { display: block; }
.review-upgrade-cta strong { color: #991b1b; font-size: 13px; }
.review-upgrade-cta span { margin-top: 3px; color: #7f1d1d; font-size: 11px; line-height: 1.4; }
@media (max-width: 720px) { .review-upgrade-cta { align-items: stretch; flex-direction: column; } }
@media (max-width: 900px) { .start-library { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .free-article-row, .membership-cta { align-items: stretch; flex-direction: column; } .free-article-row .button, .membership-cta .button { width: 100%; } .free-article-row .practice-entry-button { flex-basis: auto; } }
@media (max-width: 720px) { .library-page__item { align-items: flex-start; } .practice-entry-control { align-items: flex-end; flex-direction: column; } .practice-mode-inline { max-width: min(100%, 300px); flex-wrap: wrap; } .practice-mode-inline .button { min-width: 88px; } }
@media (max-width: 720px) { .start-page { padding: 28px 18px 48px; } .start-page__head { display: grid; margin-bottom: 32px; } .start-page__stats { min-width: 0; } .start-page__section-head { display: grid; gap: 5px; } }
.account-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; align-items: center; max-width: 1180px; margin: 0 auto 18px; padding: 18px 20px; border: 1px solid #dbe4ef; border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .04); }
.account-panel strong { display: block; margin-top: 4px; color: #172033; font-size: 16px; }
.is-member.is-start-page .account-panel strong { color: #176b55; }
.account-panel p { margin: 6px 0 0; color: #64748b; font-size: 13px; }
.account-panel__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.auth-forms { display: block; }
.auth-form { position: relative; display: flex; max-width: 560px; flex-wrap: wrap; gap: 8px; align-content: start; padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.auth-form > strong { width: 100%; margin: 0 0 2px; color: #172033; font-size: 14px; }
.auth-form input { min-width: 170px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px 10px; color: #172033; background: #fff; font: inherit; }
.auth-username-hint { width: 100%; min-height: 16px; margin: -3px 0 0; color: #64748b; font-size: 12px; }
.auth-username-hint[data-tone="success"] { color: #15803d; }
.auth-username-hint[data-tone="error"] { color: #b91c1c; }
.auth-actions { display: flex; gap: 8px; align-items: center; }
.auth-actions .button { width: 122px; min-width: 122px; height: 38px; box-sizing: border-box; padding: 9px 10px; white-space: nowrap; text-align: center; }
.auth-register-link { border: 0; padding: 8px 2px; color: #2563eb; background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.auth-register-link:hover { color: #1d4ed8; text-decoration: underline; }
.account-panel__member-state { align-self: center; color: #15803d; font-size: 13px; font-weight: 700; }
.password-form { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 14px; border-top: 1px solid #edf1f5; }
.password-form strong { margin: 0 8px 0 0; font-size: 13px; }
.password-form input { width: 160px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; color: #172033; background: #fff; font: inherit; font-size: 12px; }
.password-form span { color: #b91c1c; font-size: 12px; }
.password-form span[data-tone="success"] { color: #15803d; }
[data-auth-message] { grid-column: 1 / -1; min-height: 18px; color: #b91c1c; font-size: 12px; }
[data-auth-message][data-tone="success"] { color: #15803d; }
/* Keep the original overview layout; only adjust text leading. */
body.is-start-page:not(.is-library-page) .start-page h1 { line-height: 1; }
body.is-start-page:not(.is-library-page) .start-page__intro { line-height: 1.45; }
body.is-start-page:not(.is-library-page) .account-panel p { line-height: 1.35; }
body.is-start-page:not(.is-library-page) .membership-cta p { line-height: 1.3; }
/* Only trim empty vertical gaps on the overview; keep all component geometry unchanged. */
body.is-start-page:not(.is-library-page) .start-page { padding-top: 24px; padding-bottom: 0; }
body.is-start-page:not(.is-library-page) .start-page { min-height: calc(100vh - 68px); }
body.is-start-page:not(.is-library-page) .start-page__head { margin-bottom: 22px; }
body.is-start-page:not(.is-library-page) .account-panel { margin-bottom: 18px; }
body.is-start-page:not(.is-library-page) .start-page__section-head { margin-bottom: 12px; }
body.is-start-page:not(.is-library-page) .membership-cta { margin-top: 16px; }
.account-panel__actions { width: auto; margin-left: auto; }
body.is-start-page:not(.is-library-page) { height: 100vh; overflow: hidden; }
body.is-start-page:not(.is-library-page) .start-page { height: calc(100vh - 68px); min-height: 0; box-sizing: border-box; overflow: hidden; }
body.is-start-page:not(.is-library-page) .homepage-hero { max-width: 920px; margin-bottom: 18px; }
body.is-start-page:not(.is-library-page) .homepage-hero--member { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; gap: 28px; }
body.is-start-page:not(.is-library-page) .homepage-hero h1 { font-size: clamp(30px, 4vw, 48px); }
body.is-start-page:not(.is-library-page) .account-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; max-width: 920px; box-sizing: border-box; }
body.is-start-page:not(.is-library-page) .homepage-hero--member .account-panel--member { grid-template-columns: minmax(0, 1fr) auto; width: 100%; max-width: none; margin: 20px 0 0; padding: 14px 16px; box-sizing: border-box; gap: 10px 14px; }
body.is-start-page:not(.is-library-page) .homepage-hero--member .account-panel__actions { align-items: center; justify-content: flex-start; }
body.is-start-page:not(.is-library-page) .account-panel .auth-forms { min-width: 0; margin-right: 12px; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; max-width: none; margin: 0; padding-bottom: 28px; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form input { min-width: 0; width: auto; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form input { font-size: 13px; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form .auth-username-hint { position: absolute; left: 14px; bottom: 5px; width: auto; min-height: 0; margin: 0; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form > .button { flex: 0 0 112px; width: 112px; min-width: 112px; height: 38px; box-sizing: border-box; padding: 9px 14px; font-size: 14px; line-height: 20px; white-space: nowrap; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form > .auth-actions { grid-column: 1 / -1; justify-content: flex-start; }
body.is-start-page:not(.is-library-page) .account-panel .auth-form > .button,
body.is-start-page:not(.is-library-page) .homepage-library .library-page__item > .button { font-family: inherit; font-size: 14px; font-weight: 400; letter-spacing: 0; line-height: 20px; }
body.is-start-page:not(.is-library-page) .homepage-library .random-mock-button { margin-right: 48px; }
body.is-start-page:not(.is-library-page) .homepage-library .library-page__item > .button { margin-right: -2px; }
@media (max-width: 720px) {
  body.is-start-page:not(.is-library-page) .account-panel .auth-forms { margin-right: 0; }
  body.is-start-page:not(.is-library-page) .account-panel .auth-form { grid-template-columns: 1fr; }
  body.is-start-page:not(.is-library-page) .homepage-library .random-mock-button { margin-right: 0; }
  body.is-start-page:not(.is-library-page) .homepage-library .library-page__item > .button { margin-right: 0; }
}

.admin-activity { margin-top: 24px; padding: 22px; border: 1px solid #dbe5f2; border-radius: 18px; background: #fff; }
.trial-benefit-copy { color: #1d5fc4 !important; font-size: 15px !important; font-weight: 700 !important; line-height: 1.55 !important; }
.admin-main-tabs { display: flex; gap: 4px; width: fit-content; margin: 20px 0 14px; padding: 4px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f4f7fb; }
.admin-main-tab { border: 0; border-radius: 9px; padding: 9px 20px; color: #64748b; background: transparent; font: inherit; cursor: pointer; }
.admin-main-tab.is-active { color: #173b78; background: #fff; box-shadow: 0 2px 8px rgba(42, 76, 125, .10); font-weight: 700; }
.admin-panel { padding: 18px; border: 1px solid #dbe5f2; border-radius: 18px; background: rgba(255,255,255,.72); }
.admin-panel--management { padding: 0; border: 0; background: transparent; }
.admin-panel .admin-table { margin: 0; }
.admin-panel--management .admin-table__row { min-width: 0; grid-template-columns: 100px 90px 150px 220px minmax(0, 1fr); white-space: nowrap; }
.admin-panel--management .admin-row-actions { gap: 4px; }
.admin-activity__head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.admin-activity__head h2 { margin: 5px 0 4px; }
.admin-activity__head p { margin: 0; color: #64748b; font-size: 13px; }
.admin-activity__retention { color: #2563eb; font-size: 13px; white-space: nowrap; }
.admin-activity__stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.admin-activity__stats span { padding: 10px 13px; border-radius: 10px; background: #f4f7fb; color: #526176; font-size: 13px; }
.admin-activity__stats strong { margin-left: 5px; color: #173b78; font-size: 17px; }
.admin-business-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 14px; margin: 0 0 18px; }
.admin-business-card { padding: 16px; border: 1px solid #e5ebf3; border-radius: 12px; background: #fbfcfe; }
.admin-business-card h3 { margin: 0 0 4px; color: #173b78; font-size: 16px; }
.admin-business-card > p { margin: 0 0 13px; color: #64748b; font-size: 12px; }
.admin-funnel { display: flex; align-items: stretch; gap: 5px; overflow-x: auto; }
.admin-funnel__step { position: relative; display: grid; min-width: 82px; flex: 1; gap: 2px; padding: 10px 8px; border-radius: 9px; background: #eef4ff; text-align: center; }
.admin-funnel__step strong { color: #173b78; font-size: 21px; }
.admin-funnel__step span { color: #526176; font-size: 12px; white-space: nowrap; }
.admin-funnel__step em { color: #2563eb; font-size: 11px; font-style: normal; }
.admin-funnel__step b { position: absolute; top: 27px; right: -8px; z-index: 1; color: #93a4bd; font-size: 13px; }
.admin-action-list { display: grid; gap: 7px; max-height: 184px; overflow-y: auto; }
.admin-action-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 9px; border-radius: 8px; background: #fff; font-size: 12px; }
.admin-action-row strong { color: #173b78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-action-row span { color: #526176; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-action-row small { color: #7a8799; white-space: nowrap; }
.admin-activity__table { overflow-x: auto; border: 1px solid #e5ebf3; border-radius: 12px; }
.admin-activity__row { display: grid; grid-template-columns: 1.1fr 1fr 1.6fr .8fr .9fr .8fr .6fr; min-width: 850px; gap: 12px; align-items: center; padding: 11px 13px; border-top: 1px solid #edf1f6; color: #536176; font-size: 13px; }
.admin-activity__row:first-child { border-top: 0; }
.admin-activity__row--head { border-top: 0; background: #f7f9fc; color: #34445c; font-weight: 700; }
.admin-activity__row strong { color: #173b78; }
@media (max-width: 720px) { .admin-activity { padding: 16px; } .admin-activity__head { display: block; } .admin-activity__retention { display: inline-block; margin-top: 8px; } }
@media (max-width: 900px) { .admin-business-grid { grid-template-columns: 1fr; } }
body.is-admin-page.is-start-page { height: auto; min-height: 100vh; overflow: auto; }
body.is-admin-page.is-start-page .start-page { height: auto; min-height: calc(100vh - 68px); overflow: visible; padding-bottom: 64px; }
body.is-admin-page.is-start-page .admin-activity { margin-top: 0; }
body.is-start-page:not(.is-library-page):has(.quick-grant-page) { height: auto; min-height: 100vh; overflow: auto; }
body.is-start-page:not(.is-library-page):has(.quick-grant-page) .start-page { height: auto; min-height: calc(100vh - 68px); overflow: visible; padding-bottom: 64px; }
@media (max-width: 720px) { .admin-main-tabs { width: 100%; } .admin-main-tab { flex: 1; } }
body.is-start-page:not(.is-library-page) .homepage-library .library-page__head { margin-top: 20px; }
body.is-start-page:not(.is-library-page) .homepage-membership-cta { border-color: #dbe4ef; background: #fff; }
body.is-start-page:not(.is-library-page) .homepage-membership-cta .button { color: #546170; background: #f2f5f8; box-shadow: none; }
/* The library page alone gets an independent scroll area. */
body.is-start-page.is-library-page { height: 100vh; overflow: hidden; }
body.is-start-page.is-library-page .start-page { height: calc(100vh - 68px); min-height: 0; overflow: hidden; }
body.is-start-page.is-library-page .library-page { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body.is-start-page.is-library-page .library-page__head { flex: 0 0 auto; }
body.is-start-page.is-library-page .library-page__head > .start-pack__badge { display: none; }
body.is-start-page.is-library-page .library-page__list { min-height: 0; flex: 0 0 834px; height: 834px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
@media (max-width: 720px) { body.is-start-page.is-library-page .library-page__list { flex: 1 1 auto; height: auto; } }
.admin-page { max-width: 1180px; margin: 0 auto; }
.admin-page__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 20px; }
.admin-page__head h1 { margin: 4px 0 0; }
.admin-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: #64748b; font-size: 13px; }
.admin-status-tabs { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid #dbe4ef; border-radius: 10px; background: #f8fafc; }
.admin-status-tab { border: 0; border-radius: 7px; padding: 8px 13px; color: #64748b; background: transparent; font: inherit; font-size: 13px; cursor: pointer; }
.admin-status-tab:hover { color: #1d4ed8; background: #eff6ff; }
.admin-status-tab.is-active { color: #172033; background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.1); font-weight: 700; }
.admin-table { height: 600px; max-height: calc(100vh - 480px); min-height: 280px; overflow-x: hidden; overflow-y: auto; border: 1px solid #dbe4ef; border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.04); }
.admin-table__row { display: grid; grid-template-columns: 100px 90px 150px 220px minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; min-height: 54px; padding: 8px 14px; border-bottom: 1px solid #edf1f5; color: #334155; font-size: 13px; }
.admin-table__row:last-child { border-bottom: 0; }
.admin-table__head { position: sticky; top: 0; z-index: 1; color: #64748b; background: #f8fafc; font-size: 12px; font-weight: 700; }
.admin-sort-button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; font-size: inherit; font-weight: inherit; text-align: left; cursor: pointer; }
.admin-sort-button:hover, .admin-sort-button:focus-visible { color: #1d4ed8; outline: 0; }
.admin-table__row > span:last-child, .admin-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.admin-table input { width: 78px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 7px; }
.admin-row-actions select, .admin-reset-input { width: 92px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 7px; color: #334155; background: #fff; font: inherit; font-size: 12px; }
.admin-row-actions .button { padding: 7px 9px; font-size: 12px; }
.admin-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.admin-status--member { color: #166534; background: #dcfce7; }
.admin-status--trial { color: #1d4ed8; background: #dbeafe; }
.admin-status--expired { color: #64748b; background: #f1f5f9; }
.admin-status--paused { color: #92400e; background: #fef3c7; }
.admin-row-actions { position: relative; min-width: 0; }
.admin-menu-button { min-width: 64px; }
.admin-row-menu { display: flex; align-items: center; min-width: 0; gap: 4px; padding: 0; border: 0; background: transparent; }
.admin-row-menu[hidden] { display: none; }
.admin-row-menu .button { width: auto; min-width: 0; text-align: left; }
.quick-grant-page { width: min(520px, calc(100% - 32px)); margin: 36px auto; }
body:has(.quick-grant-page) { min-width: 0; }
.quick-grant-card { padding: 28px; border: 1px solid #dbe4ef; border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 18px 50px rgba(15,23,42,.08); }
.quick-grant-card h1 { margin: 8px 0 10px; color: #172033; font-size: 28px; }
.quick-grant-intro { margin: 0 0 22px; color: #64748b; line-height: 1.7; }
.quick-grant-form { display: grid; gap: 14px; }
.quick-grant-form label { display: grid; gap: 7px; color: #475569; font-size: 13px; font-weight: 700; }
.quick-grant-form input { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 9px; padding: 12px; color: #172033; background: #fff; font: inherit; font-weight: 400; }
.quick-grant-form input:focus { border-color: #2563eb; outline: 3px solid rgba(37,99,235,.12); }
.quick-grant-result { margin-top: 18px; padding: 16px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.quick-grant-user { display: grid; gap: 8px; color: #475569; font-size: 13px; }
.quick-grant-user strong { color: #172033; font-size: 18px; }
.quick-grant-user p { margin: 0; }
.quick-grant-confirm { display: flex; align-items: center; gap: 8px; margin: 16px 0; color: #475569; font-size: 13px; }
.quick-grant-action { width: 100%; }
.quick-grant-action:disabled { opacity: 0.5; cursor: not-allowed; filter: saturate(0.45); }
.quick-grant-password-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #dbe4ef; color: #334155; }
.quick-grant-password-section > strong { display: block; margin-bottom: 10px; color: #172033; }
.quick-grant-verified { margin: 0 0 14px; color: #15803d; font-size: 13px; font-weight: 700; }
.quick-grant-message { min-height: 20px; margin: 12px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.quick-grant-message[data-tone="success"] { color: #15803d; font-weight: 700; }
.quick-grant-error { margin: 0; color: #b45309; line-height: 1.5; }
.quick-grant-help { margin: 12px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.quick-grant-match-summary { margin: 0 0 12px; color: #475569; font-size: 13px; font-weight: 700; }
.quick-grant-match-list { display: grid; gap: 8px; }
.quick-grant-match { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid #dbe4ef; border-radius: 9px; color: #172033; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.quick-grant-match:hover, .quick-grant-match:focus-visible { border-color: #2563eb; background: #eff6ff; outline: none; }
.quick-grant-match span { color: #64748b; font-size: 12px; white-space: nowrap; }
.quick-grant-back { display: block; margin-top: 18px; color: #2563eb; font-size: 13px; text-align: center; }
.quick-grant-card .button { min-height: 44px; }
@media (max-width: 520px) { .quick-grant-page { width: calc(100% - 20px); margin: 18px auto; } .quick-grant-card { padding: 22px 18px; border-radius: 14px; } .quick-grant-card h1 { font-size: 24px; } }
.admin-table__row[hidden] { display: none; }
.admin-audit { margin-top: 24px; padding: 18px 20px; border: 1px solid #dbe4ef; border-radius: 14px; background: rgba(255,255,255,.86); box-shadow: 0 10px 28px rgba(15,23,42,.04); }
.admin-audit h2 { margin: 0 0 12px; color: #172033; font-size: 16px; }
.admin-audit div { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid #edf1f5; color: #475569; font-size: 12px; }
.admin-audit div:last-child { border-bottom: 0; }
.admin-audit time { min-width: 150px; color: #94a3b8; }
.admin-empty, .admin-message { padding: 18px; color: #64748b; }
.admin-message { min-height: 20px; color: #15803d; }
@media (max-width: 720px) { .account-panel { grid-template-columns: 1fr; } .auth-form { justify-content: stretch; } .auth-form input { flex: 1 1 100%; } .auth-actions { width: 100%; } .auth-actions .button { flex: 1 1 0; min-width: 0; } .account-panel__actions { justify-content: flex-start; } .admin-page__head { align-items: flex-start; flex-direction: column; } body.is-start-page:not(.is-library-page) { overflow: auto; } body.is-start-page:not(.is-library-page) .start-page { height: auto; min-height: 100vh; overflow: visible; } }
@media (max-width: 720px) { .start-page__brand { align-items: flex-start; flex-wrap: wrap; gap: 0 6px; } .start-page__brand > span { max-width: 100%; white-space: normal; font-size: 16px; } .start-page__logo { width: 132px; height: 50px; } }

/* IELTS reference question layout: shared proportions and type-specific rhythm. */
.structured-question-group { padding: 22px 24px 24px; border-color: #d7dee7; border-radius: 3px; box-shadow: none; }
.structured-question-group > .question-instructions { margin-bottom: 22px; padding-bottom: 16px; }
.structured-question-group .question-instructions__title { font-size: inherit; }
.structured-question-group .question-row { margin: 20px 0 26px; }
.structured-question-group .question-row:last-child { margin-bottom: 4px; }
.structured-question-group .question-prompt { margin-bottom: 11px; font-size: inherit; line-height: 1.6; }
.structured-question-group .options { gap: 11px; margin-top: 0; }
.structured-question-group .options label { align-items: flex-start; gap: 10px; line-height: 1.55; }
.structured-question-group .options input { flex: 0 0 auto; width: 16px; height: 16px; margin: 4px 0 0; accent-color: #64748b; }
.structured-question-group .options label span { min-width: 0; }
.structured-question-group[data-group-type="true_false_not_given"] .question-row,
.structured-question-group[data-group-type="single_choice"] .question-row,
.structured-question-group[data-group-type="multi_choice"] .question-row { grid-template-columns: minmax(40px, auto) minmax(0, 1fr); }
.structured-question-group[data-group-type="true_false_not_given"] .question-number,
.structured-question-group[data-group-type="single_choice"] .question-number,
.structured-question-group[data-group-type="multi_choice"] .question-number { font-weight: 400; }

.structured-question-group[data-group-type="matching_information"] .matching-table,
.structured-question-group[data-group-type="matching_features"] .matching-table { margin-top: 8px; border-color: #d7dee7; background: #d7dee7; }
.structured-question-group[data-group-type="matching_information"] .matching-row,
.structured-question-group[data-group-type="matching_features"] .matching-row { min-width: 680px; }
.structured-question-group[data-group-type="matching_information"] .matching-option,
.structured-question-group[data-group-type="matching_features"] .matching-option { background: #f7f9fb; color: #102a43; font-size: 13px; }
.structured-question-group[data-group-type="matching_information"] .matching-prompt strong,
.structured-question-group[data-group-type="matching_features"] .matching-prompt strong { margin-right: 8px; font-weight: 400; }
.structured-question-group .matching-cell { min-height: 44px; }

.structured-drag-matching { padding-top: 4px; }
.structured-drag-matching .heading-answer-list { gap: 10px; margin: 8px 0 22px; }
.structured-drag-matching .heading-answer-row { grid-template-columns: minmax(0, 1fr) 132px; min-height: 44px; }
.structured-drag-matching .heading-answer-label { font-weight: 400; line-height: 1.55; }
.structured-drag-matching .heading-answer-label strong { display: inline-block; min-width: 34px; font-weight: 400; }
.structured-drag-matching .options-pool { margin: 18px 0 0; }
.structured-drag-matching .drag-item { line-height: 1.45; }

.structured-flow-chart { margin-top: 8px; padding: 18px 14px 10px; }
.flow-diagram h3 { margin: 0 0 18px; font-size: 19px; text-align: center; }
.flow-diagram__node { display: flex; align-items: center; justify-content: center; min-height: 70px; box-sizing: border-box; border: 2px solid #1f2937; padding: 18px 20px; color: #172033; font-size: 16px; line-height: 1.7; text-align: center; }
.flow-diagram__arrow { height: 48px; color: #111827; font-size: 42px; font-weight: 900; line-height: 48px; text-align: center; }
.flow-diagram__branch-arrows { display: grid; grid-template-columns: 1fr 1fr; height: 58px; color: #111827; font-size: 44px; font-weight: 900; line-height: 58px; text-align: center; }
.flow-diagram__branches { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; }
.flow-diagram__branches .flow-diagram__node { min-height: 112px; padding: 16px 10px; font-size: 14px; }
.flow-diagram__branch-node { display: block; text-align: center; }
.flow-diagram__branch-node > div + div { margin-top: 9px; }
.flow-diagram__branches .structured-flow-answer { width: 100px; }
@media (max-width: 700px) { .flow-diagram__branches { grid-template-columns: 1fr; gap: 10px; } .flow-diagram__branch-arrows { display: none; } }
.structured-diagram { gap: 0; margin-top: 8px; padding: 0; border: 1px solid #d7dee7; }
.structured-diagram .diagram-line { min-height: 42px; box-sizing: border-box; padding: 11px 14px; border-left: 0; border-bottom: 1px solid #e1e7ee; line-height: 1.65; }
.structured-diagram .diagram-line:last-child { border-bottom: 0; }

.structured-question-group[data-group-type="summary_completion"] .structured-completion__options,
.structured-question-group[data-group-type="table_completion"] .structured-completion__options { margin-top: 8px; }
.structured-question-group[data-group-type="summary_completion"] .structured-completion__text,
.structured-question-group[data-group-type="table_completion"] .structured-completion__text { line-height: 1.75; }
.structured-question-group[data-group-type="table_completion"] .structured-completion__line { padding: 10px 14px; border-bottom: 1px solid #e1e7ee; }
.structured-question-group[data-group-type="table_completion"] .structured-completion__line:first-child { border-top: 1px solid #e1e7ee; }
.structured-question-group[data-group-type="table_completion"] .structured-completion__line:last-child { border-bottom: 0; }
.practice-entry-button { flex: 0 0 auto; min-width: 118px; white-space: nowrap; }
.practice-mode-inline { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; animation: practice-mode-inline-in .16s ease-out; }
.practice-mode-inline[hidden] { display: none !important; }
.practice-mode-inline .button { min-height: 36px; padding: 7px 9px; font-size: 12px; white-space: nowrap; border: 1px solid transparent; box-sizing: border-box; }
.practice-mode-inline .button:hover, .practice-mode-inline .button:focus-visible { color: #fff !important; border-color: #1d4ed8 !important; background: #1d4ed8 !important; outline: 0; }
.practice-mode-inline .button.practice-mode-preview { color: #fff; border-color: #1d4ed8; background: #1d4ed8; }
.practice-mode-inline .button.practice-mode-preview:hover, .practice-mode-inline .button.practice-mode-preview:focus-visible { color: #fff; border-color: #1e40af; background: #1e40af; }
.practice-mode-inline .button.practice-mode-default:not(.practice-mode-preview) { color: #546170; border: 1px solid #1d4ed8; background: #f2f5f8; }
.start-pack--access .practice-mode-inline .button { color: #546170 !important; border: 1px solid transparent; background: #f2f5f8 !important; }
.start-pack--access .practice-mode-inline .button.practice-mode-preview { color: #fff !important; border-color: #1d4ed8 !important; background: #1d4ed8 !important; }
.start-pack--access .practice-mode-inline .button.practice-mode-default:not(.practice-mode-preview) { color: #546170 !important; border-color: #1d4ed8 !important; background: #f2f5f8 !important; }
@keyframes practice-mode-inline-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.free-article-row[data-practice-row], .library-page__item[data-practice-row] { cursor: pointer; }
.free-article-row[data-practice-row]:hover, .free-article-row[data-practice-row]:focus-visible { border-color: #2563eb; background: #f0f7ff; }
.library-page__item[data-practice-row]:hover, .library-page__item[data-practice-row]:focus-visible { border-color: #2563eb; color: #1d4ed8; outline: 0; }
.start-pack--access .start-pack__actions .button-primary { color: #fff; border-color: #1d4ed8; background: #1d4ed8; }
.start-pack--access .start-pack__actions .button-primary:hover,
.start-pack--access .start-pack__actions .button-primary:focus-visible { border-color: #1e40af; background: #1e40af; }
body.is-member .start-pack--access .start-pack__actions .button { color: #fff; border-color: #1d4ed8; background: #1d4ed8; }
body.is-member .start-pack--access .start-pack__actions .button:hover,
body.is-member .start-pack--access .start-pack__actions .button:focus-visible { border-color: #1e40af; background: #1e40af; }
.library-page__item-meta { margin-left: auto; color: #64748b; font-size: 12px; white-space: nowrap; }
.library-page__item > .button { flex: 0 0 auto; min-width: 112px; }
@media (max-width: 560px) {
  .practice-mode-inline { gap: 4px; }
  .practice-mode-inline .button { padding: 7px 6px; font-size: 11px; }
}

/* Mobile only: keep the five practice choices inside the article card. */
@media (max-width: 720px) {
  .library-page__item[data-practice-row],
  .free-article-row[data-practice-row] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .library-page__item[data-practice-row] .practice-entry-control,
  .free-article-row[data-practice-row] .practice-entry-control {
    width: 100%;
    max-width: none;
    align-items: stretch;
  }

  .library-page__item[data-practice-row] .practice-entry-button,
  .free-article-row[data-practice-row] .practice-entry-button {
    width: 100%;
    min-width: 0;
  }

  .practice-mode-inline {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
  }

  .practice-mode-inline .button {
    width: 100%;
    min-width: 0;
  }
}

/* Mobile only: let the authenticated header and practice toolbar use the full viewport. */
@media (max-width: 720px) {
  body { min-width: 0; }
  .topbar {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 10px 12px;
  }

  .topbar .brand { flex: 0 0 auto; }
  .session-meta { min-width: 0; flex: 1 1 auto; justify-content: flex-end; gap: 8px; }
  .session-label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { width: 100%; min-width: 0; flex: 1 0 100%; flex-wrap: wrap; justify-content: flex-end; }
  .topbar-actions .button { padding: 8px 10px; }
  .topbar-account-status { max-width: 150px; }

  body.is-start-page:not(.is-library-page) .homepage-hero--member {
    display: block;
  }

  body.is-start-page:not(.is-library-page) .account-panel {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.is-start-page:not(.is-library-page) .account-panel .auth-forms,
  body.is-start-page:not(.is-library-page) .account-panel .auth-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.is-start-page:not(.is-library-page) .account-panel .auth-form input {
    width: 100%;
    min-width: 0;
  }

  body.is-start-page:not(.is-library-page) .homepage-hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8vw, 42px);
    overflow-wrap: anywhere;
  }
}

/* Use the browser's single page scrollbar for library views. The library list
   remains a normal flow container so zoomed text and small screens cannot be
   trapped behind a fixed-height inner scroller. */
body.is-start-page { height: auto; min-height: 100vh; overflow: auto; }
body.is-start-page .start-page { height: auto; min-height: calc(100vh - 68px); overflow: visible; }
body.is-start-page:not(.is-library-page),
body.is-start-page.is-library-page { height: auto; min-height: 100vh; overflow: auto; }
body.is-start-page:not(.is-library-page) .start-page,
body.is-start-page.is-library-page .start-page { height: auto; min-height: calc(100vh - 68px); overflow: visible; }
body.is-start-page.is-library-page .library-page { height: auto; min-height: 0; overflow: visible; }
body.is-start-page .library-page__list,
body.is-start-page .homepage-library .library-page__list { display: grid; flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.is-start-page .library-page__list + .membership-cta--library { position: static; display: flex; clear: both; }

/* ===== 站点四项导航（纯展示，不跳转）：仅题库首页/登录页显示，考试界面自动隐藏 ===== */
.topbar-nav { display: none; align-items: center; gap: 6px; flex: 1 1 auto; justify-content: center; }
body.is-start-page .topbar-nav { display: flex; }
.topbar-nav__item { padding: 8px 14px; border-radius: 8px; color: #1f2937; font-size: 14px; white-space: nowrap; }
.topbar-nav__item--active { background: #1d4ed8; color: #fff; font-weight: 700; }
.topbar-nav__item--soon { color: #94a3b8; }
.topbar-nav__item--soon em { font-style: normal; font-size: 10px; background: #f1f5f9; color: #94a3b8; padding: 1px 5px; border-radius: 6px; margin-left: 5px; vertical-align: middle; }
@media (max-width: 720px) {
  .topbar-nav { order: 3; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar-nav__item { padding: 7px 9px; font-size: 13px; }
}
/* ===== 与主站顶栏视觉对齐（A 方案，全局；不动 HTML/JS） =====
   目标：让 .topbar 视觉上等于 marketing-v0 的 .site-header；
   机考专属 .session-meta（计时器 / Authentic Reading Passages）与 .topbar-actions
   （Home / 返回题库 / 笔记 / 菜单 / 提交 / 登录 / 管理 / 退出）保留功能与位置。 */
.topbar { gap: 16px; flex-wrap: nowrap; min-height: 68px; }
.topbar .brand-logo { clip-path: none; }
.topbar-nav { gap: 6px; }
.topbar-nav__item { transition: background .15s, color .15s; }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 60px; padding: 6px 12px; gap: 8px; flex-wrap: wrap; }
  .topbar-nav { flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar-nav__item { padding: 7px 9px; font-size: 13px; }
}
/* ===== 与主站顶栏视觉对齐（A 方案，全局；不动 HTML/JS） =====
   目标：让 .topbar 视觉上等于 marketing-v0 的 .site-header；
   机考专属 .session-meta（计时器 / Authentic Reading Passages）与 .topbar-actions
   （Home / 返回题库 / 笔记 / 菜单 / 提交 / 登录 / 管理 / 退出）保留功能与位置。 */
.topbar { gap: 16px; flex-wrap: nowrap; min-height: 68px; }
.topbar .brand-logo { clip-path: none; }
.topbar-nav { gap: 6px; }
.topbar-nav__item { transition: background .15s, color .15s; }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 60px; padding: 6px 12px; gap: 8px; flex-wrap: wrap; }
  .topbar-nav { flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar-nav__item { padding: 7px 9px; font-size: 13px; }
}
/* ===== 口语可跳转（顶栏 4 导航只让口语做 a 链接，其余保持 span） ===== */
.topbar-nav__item { text-decoration: none; }
.topbar-nav__item:not(.topbar-nav__item--soon):not(.topbar-nav__item--active):hover { background: #f1f5f9; color: #0f172a; }


/* ============================================================
   [机考顶栏与主站 100% 对齐] 100% 复制主站 styles.css 的 Unified top nav + mega-dropdown + theme-* 段。
   所有选择器改成双兼容（.topbar 与 .site-header 共用 / .topbar-nav 与 .site-nav 共用），
   保证机考保留 .topbar 类不被破坏（main.js 用 .topbar 选择器）。
   ============================================================ */
.topbar,.site-header{position:sticky;top:0;z-index:60;height:68px;min-height:68px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:nowrap;background:#fff;border-bottom:1px solid #dbe2e9}
.topbar .brand,.site-header .brand{display:flex;align-items:center;gap:4px;color:inherit;font-weight:700;letter-spacing:-.02em;text-decoration:none;flex:0 0 auto}
.topbar .brand:hover,.site-header .brand:hover{color:inherit}
.topbar .brand-logo-wrap,.site-header .brand-logo-wrap{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.topbar .brand-logo-wrap small,.site-header .brand-logo-wrap small{margin-top:4px;color:#111827;font-size:8px;font-weight:600;letter-spacing:.02em;white-space:nowrap}
.topbar .brand-logo,.site-header .brand-logo{width:40px;height:32px;border-radius:3px;object-fit:contain}
.topbar .brand-wordmark,.site-header .brand-wordmark{display:inline-flex;align-items:center;height:38px;color:#111827;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:28px;font-weight:600;letter-spacing:-.03em;line-height:1;white-space:nowrap}
.topbar .back-link,.site-header .back-link{flex:0 0 auto;margin-left:6px;color:#64748b;font-size:13px;text-decoration:none;white-space:nowrap}
.topbar .back-link:hover,.site-header .back-link:hover{color:#1d4ed8}
.topbar-nav,.site-nav{display:flex;align-items:center;gap:6px;flex:1 1 auto;justify-content:center}
.topbar-nav .nav-link,.site-nav .nav-link{position:relative;padding:8px 14px;border-radius:8px;color:#1f2937;font-size:14px;text-decoration:none;white-space:nowrap;transition:background .15s,color .15s}
.topbar-nav .nav-link:hover,.site-nav .nav-link:hover{background:#f1f5f9;color:#0f172a}
.topbar-nav .nav-link.active,.site-nav .nav-link.active{background:#1d4ed8;color:#fff;font-weight:700}
.topbar-nav .nav-link.active:hover,.site-nav .nav-link.active:hover{background:#1e40af;color:#fff}
.topbar-nav .nav-link.soon,.site-nav .nav-link.soon{color:#94a3b8;cursor:default}
.topbar-nav .nav-link.soon:hover,.site-nav .nav-link.soon:hover{background:none;color:#94a3b8}
.topbar-nav .nav-link.soon em,.site-nav .nav-link.soon em{font-style:normal;font-size:10px;background:#f1f5f9;color:#94a3b8;padding:1px 5px;border-radius:6px;margin-left:5px;vertical-align:middle}
.nav-cta{flex:0 0 auto;background:#16a34a;color:#fff;font-size:14px;font-weight:700;padding:8px 16px;border-radius:999px;white-space:nowrap;text-decoration:none;transition:background .15s}
.nav-cta:hover{background:#15803d}
/* ===== mega-dropdown ===== */
.nav-item{position:relative;display:inline-flex;align-items:center}
.nav-item .nav-dropdown{visibility:hidden;opacity:0;position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(-4px);min-width:224px;padding:8px;background:#fff;border:1px solid #dbe2e9;border-radius:12px;box-shadow:0 16px 36px rgba(15,23,42,.18);z-index:200;transition:visibility 0s linear .18s,opacity .18s ease,transform .18s ease}
.nav-item:hover .nav-dropdown,.nav-item:focus-within .nav-dropdown,.nav-item .nav-dropdown:hover{visibility:visible;opacity:1;transform:translateX(-50%) translateY(0);transition:visibility 0s linear 0s,opacity .18s ease,transform .18s ease}
.nav-dropdown::before{content:"";position:absolute;top:-6px;left:50%;transform:translateX(-50%) rotate(45deg);width:12px;height:12px;background:#fff;border-left:1px solid #dbe2e9;border-top:1px solid #dbe2e9}
.nav-dropdown a{display:flex;flex-direction:column;gap:2px;padding:10px 14px;font-size:14px;color:#17202b;text-decoration:none;border-radius:6px;white-space:nowrap;transition:background .15s,color .15s}
.nav-dropdown a:hover{background:#f1f5f9;color:#1d4ed8}
.nav-dropdown a small{font-size:11px;color:#475569;font-weight:500}
.nav-dropdown a.no-link{color:#94a3b8;cursor:default}
.nav-dropdown a.no-link:hover{background:none;color:#94a3b8}
.nav-dropdown a.no-link em{font-style:normal;font-size:10px;background:#f1f5f9;color:#94a3b8;padding:1px 5px;border-radius:6px;margin-left:4px;vertical-align:middle}
@media (max-width:760px){.nav-item .nav-dropdown{min-width:200px}}
@media (max-width:760px){
  .topbar,.site-header{height:auto;min-height:60px;padding:6px 12px;gap:8px;flex-wrap:wrap}
  .topbar .brand-wordmark,.site-header .brand-wordmark{font-size:22px;height:30px}
  .topbar .brand-logo,.site-header .brand-logo{width:32px;height:26px}
  .topbar-nav,.site-nav{order:3;flex:1 0 100%;justify-content:flex-start;overflow-x:auto;gap:0}
  .topbar-nav .nav-link,.site-nav .nav-link{padding:7px 9px;font-size:13px}
  .nav-cta{padding:7px 12px;font-size:13px}
}
/* ===== 主题色（与主站同步）===== */
:root{--brand:#1d4ed8;--brand-soft:#eff6ff;--brand-edge:#bfdbfe;--brand-hover:#1e40af}
body.theme-speaking{--brand:#dc2626;--brand-soft:#fef2f2;--brand-edge:#fecaca;--brand-hover:#b91c1c}
body.theme-reading{--brand:#1d4ed8;--brand-soft:#eff6ff;--brand-edge:#bfdbfe;--brand-hover:#1e40af}
body.theme-listening{--brand:#16a34a;--brand-soft:#f0fdf4;--brand-edge:#bbf7d0;--brand-hover:#15803d}
body.theme-writing{--brand:#7c3aed;--brand-soft:#f5f3ff;--brand-edge:#ddd6fe;--brand-hover:#6d28d9}
body.theme-speaking .topbar-nav .nav-link.active,body.theme-reading .topbar-nav .nav-link.active,body.theme-listening .topbar-nav .nav-link.active,body.theme-writing .topbar-nav .nav-link.active,
body.theme-speaking .site-nav .nav-link.active,body.theme-reading .site-nav .nav-link.active,body.theme-listening .site-nav .nav-link.active,body.theme-writing .site-nav .nav-link.active{background:var(--brand)}
.nav-item-speaking .nav-dropdown a:hover{background:#fef2f2;color:#dc2626}
.nav-item-reading .nav-dropdown a:hover{background:#eff6ff;color:#1d4ed8}
.nav-item-listening .nav-dropdown a:hover{background:#f0fdf4;color:#16a34a}
.nav-item-writing .nav-dropdown a:hover{background:#f5f3ff;color:#7c3aed}
body.theme-speaking .topbar .back-link:hover,body.theme-reading .topbar .back-link:hover,body.theme-listening .topbar .back-link:hover,body.theme-writing .topbar .back-link:hover,
body.theme-speaking .site-header .back-link:hover,body.theme-reading .site-header .back-link:hover,body.theme-listening .site-header .back-link:hover,body.theme-writing .site-header .back-link:hover{color:var(--brand)}
/* 全站「加微信」统一微信绿，不受主题色影响（与主站一致） */
.topbar .nav-cta,.site-header .nav-cta,
body.theme-speaking .topbar .nav-cta,body.theme-reading .topbar .nav-cta,body.theme-listening .topbar .nav-cta,body.theme-writing .topbar .nav-cta,
body.theme-speaking .site-header .nav-cta,body.theme-reading .site-header .nav-cta,body.theme-listening .site-header .nav-cta,body.theme-writing .site-header .nav-cta{background:#16a34a !important;color:#fff !important}
.topbar .nav-cta:hover,.site-header .nav-cta:hover,
body.theme-speaking .topbar .nav-cta:hover,body.theme-reading .topbar .nav-cta:hover,body.theme-listening .topbar .nav-cta:hover,body.theme-writing .topbar .nav-cta:hover,
body.theme-speaking .site-header .nav-cta:hover,body.theme-reading .site-header .nav-cta:hover,body.theme-listening .site-header .nav-cta:hover,body.theme-writing .site-header .nav-cta:hover{background:#15803d !important}

/* ===== 机考专属：考试专注模式（无 .is-start-page）自动隐藏 4 导航 + 加微信，露出 session-meta + actions ===== */
body:not(.is-start-page) .topbar-nav,
body:not(.is-start-page) .site-nav,
body:not(.is-start-page) .nav-cta{display:none !important}


/* ============================================================
   [机考顶栏品牌区 v2] 马上过图 + 雅思备考(黑) + By 齐哥
   对齐主站（同款 .brand-logo-msg / .brand-stack）
   ============================================================ */
.topbar .brand-logo-msg {
  height: 30px;
  width: auto;
  margin-right: 4px;
  border-radius: 0;
  clip-path: none;
  object-fit: contain;
}
.topbar .brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  gap: 2px;
}
.topbar .brand-stack .brand-wordmark {
  height: auto;
  font-family: "Microsoft YaHei","PingFang SC",sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #111827;
  line-height: 1;
  white-space: nowrap;
}
.topbar .brand-stack small {
  margin: 0;
  color: #111827;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .topbar .brand-logo-msg { height: 26px; }
  .topbar .brand-stack .brand-wordmark { font-size: 16px; }
  .topbar .brand-stack small { font-size: 7px; }
}


/* 目注：让机考顶栏「马上过雅思备考」旁的回首页 home 键与主站一致（圆形 30x30） */
.topbar .back-link-home {
  flex: 0 0 auto;
  margin-left: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe2e9;
  border-radius: 50%;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.topbar .back-link-home:hover {
  color: #1d4ed8;
  border-color: #1d4ed8;
  background-color: #eff6ff;
}
body.theme-speaking .topbar .back-link-home:hover,
body.theme-reading .topbar .back-link-home:hover,
body.theme-listening .topbar .back-link-home:hover,
body.theme-writing .topbar .back-link-home:hover { color: var(--brand); border-color: var(--brand); background-color: var(--brand-bg); }
@media (max-width: 760px) {
  .topbar .back-link-home { width: 26px; height: 26px; font-size: 14px; }
}
