:root {
    color-scheme: light;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-soft: #f0f3f8;
    --text: #182537;
    --muted: #5c6b7e;
    --border: #dce3ec;
    --accent: #2159dc;
    --accent-hover: #1745b4;
    --accent-soft: #eaf0ff;
    --success: #177044;
    --success-soft: #eaf7ef;
    --error: #b3313e;
    --error-soft: #fff0f1;
    --warning: #805c10;
    --warning-soft: #fff6df;
    --shadow: 0 8px 36px #18253708, 0 1px 3px #18253704;
    --dock: #f4f6faed;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #10151e;
    --surface: #19212d;
    --surface-soft: #202b3a;
    --text: #edf2fa;
    --muted: #a4b2c5;
    --border: #303d4f;
    --accent: #91b5ff;
    --accent-hover: #b1ccff;
    --accent-soft: #253650;
    --success: #8adead;
    --success-soft: #193c30;
    --error: #ffabb5;
    --error-soft: #462830;
    --warning: #e8c578;
    --warning-soft: #372f20;
    --shadow: 0 8px 36px #00000014;
    --dock: #10151ef0;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, select, input { touch-action: manipulation; }
#app { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--border); margin-bottom: 54px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { display: block; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; }
.brand-name { font-size: 21px; font-weight: 750; line-height: 1.15; letter-spacing: -.5px; }
.brand-name > span { display: block; font-size: 12px; font-weight: 450; letter-spacing: 0; color: var(--muted); margin-top: 5px; }
.theme-switch { display: flex; padding: 4px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; }
.theme-switch button { border: 0; border-radius: 10px; background: transparent; color: var(--muted); width: 44px; height: 40px; display: grid; place-items: center; }
.theme-switch button[aria-pressed="true"] { color: var(--accent); background: var(--surface); box-shadow: 0 1px 5px #0000000d; }
.theme-switch svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.screen { display: none; }
.screen.active { display: block; animation: arrive .2s ease-out; }
#start-screen.active { display: grid; grid-template-columns: 1fr 1.08fr; align-items: start; gap: 60px; }
.eyebrow { display: block; font-size: 11px; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.intro { padding: 18px 0; }
.intro > .eyebrow { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.intro h1 { font-size: clamp(34px, 4.2vw, 51px); font-weight: 700; letter-spacing: -.045em; line-height: 1.13; margin: 25px 0 22px; }
.intro h1 span { color: var(--accent); }
.intro-description { font-size: 16px; color: var(--muted); max-width: 370px; line-height: 1.8; }
.intro-stats { display: flex; gap: 36px; margin: 32px 0; }
.intro-stats strong { display: block; font-size: 25px; font-weight: 650; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.intro-stats span { color: var(--muted); font-size: 12px; }
.route-art { max-width: 360px; color: var(--accent); margin: 26px 0; }
.route-art svg { width: 100%; stroke: currentColor; }
.route-art .route-grid { stroke: var(--border); stroke-width: .7; }
.route-art .route-path { stroke-width: 1.6; stroke-dasharray: 5 6; }
.route-art span { color: var(--muted); font-size: 11px; }
.audit-details { max-width: 385px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
summary { cursor: pointer; min-height: 40px; align-content: center; }
.count-chip { display: inline-block; font-size: 11px; background: var(--surface-soft); padding: 0 6px; border-radius: 5px; margin-left: 4px; }
.audit-details p { line-height: 1.75; padding: 0 0 8px; }
.settings { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); min-width: 0; }
.settings-heading { margin-bottom: 26px; }
.progress-panel { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 24px; }
.progress-panel h2 { font-size: 19px; letter-spacing: -.4px; }
.progress-panel p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 10px 0; }
.progress-panel .btn { margin-top: 10px; }
.mistake-details { font-size: 13px; color: var(--muted); }
#mistake-list { max-height: 300px; overflow-y: auto; padding-left: 22px; margin: 8px 0; }
#mistake-list li { padding: 8px 5px; overflow-wrap: anywhere; }
#mistake-list strong { display: block; color: var(--text); font-weight: 500; }
#mistake-list span { display: block; font-size: 11px; margin-top: 5px; }
.storage-notice:empty { display: none; }
.storage-notice { color: var(--warning); background: var(--warning-soft); padding: 14px; border-radius: 10px; font-size: 13px; margin-bottom: 20px; }
.action-buttons > * + * { margin-top: 12px; }
.settings-heading .eyebrow { color: var(--accent); }
.settings-heading h2 { margin-top: 8px; font-size: 25px; letter-spacing: -.7px; font-weight: 650; }
.settings-heading p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.form-group { margin-bottom: 18px; min-width: 0; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.practice-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.practice-sizes button { min-height: 82px; padding: 12px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.practice-sizes strong { display: block; font-size: 23px; font-weight: 650; letter-spacing: -.6px; }
.practice-sizes span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.practice-sizes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.practice-summary { font-size: 12px; color: var(--muted); line-height: 1.7; margin: -4px 0 20px; }
@media (max-width: 360px) {
    .practice-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.selection-caption { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.selection-caption:empty { display: none; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.form-group select { display: block; width: 100%; min-width: 0; max-width: 100%; height: 50px; padding: 0 34px 0 13px; font-size: 16px; color: var(--text); background-color: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-overflow: ellipsis; }
.shuffle-setting { display: flex; align-items: center; gap: 18px; justify-content: space-between; padding: 7px 0 24px; cursor: pointer; }
.shuffle-setting strong { display: block; font-size: 13px; font-weight: 600; }
.shuffle-setting small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; max-width: 260px; }
.shuffle-setting input { appearance: none; flex: 0 0 42px; width: 42px; height: 26px; background: var(--border); border-radius: 20px; margin: 0; position: relative; cursor: pointer; }
.shuffle-setting input::after { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: var(--surface); border-radius: 50%; transition: transform .15s; }
.shuffle-setting input:checked { background: var(--accent); }
.shuffle-setting input:checked::after { transform: translateX(16px); }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 13px 20px; width: 100%; border: 1px solid transparent; border-radius: 11px; font-size: 15px; font-weight: 650; transition: background .15s, border-color .15s; }
.btn.primary { background: var(--accent); color: var(--surface); }
.btn.secondary { background: var(--surface-soft); color: var(--text); border-color: var(--border); }
.btn:disabled { background: var(--surface-soft); border-color: var(--border); color: var(--muted); opacity: .65; }
.settings-footnote { text-align: center; color: var(--muted); font-size: 11px; margin-top: 13px; }
#quiz-screen, #result-screen { max-width: 780px; margin: 0 auto; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.text-button { color: var(--muted); background: none; border: none; min-height: 44px; padding: 0 10px 0 0; font-size: 14px; }
.quiz-header { margin-bottom: 24px; }
.progress-bar { height: 5px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s; }
.quiz-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-badge { background: var(--success-soft); color: var(--success); padding: 4px 10px; border-radius: 7px; font-weight: 600; }
.question-container { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); }
.section-tag { color: var(--accent); font-size: 12px; font-weight: 550; line-height: 1.6; margin-bottom: 20px; overflow-wrap: anywhere; }
#question-text { font-size: clamp(20px, 2.3vw, 25px); font-weight: 600; line-height: 1.5; letter-spacing: -.35px; overflow-wrap: anywhere; }
#question-text:focus { outline: none; }
.source-details { color: var(--muted); font-size: 12px; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 6px; }
.source-details summary { min-height: 44px; width: fit-content; max-width: 100%; }
.source-details summary:hover { color: var(--accent); }
.source-content { padding: 0 0 4px; overflow-wrap: anywhere; }
.source-links, .source-note { font-size: 12px; line-height: 1.7; padding: 4px 0; }
.source-note:empty { display: none; }
#question-images img { display: block; max-width: 100%; height: auto; margin: 22px auto; background: #fff; border-radius: 8px; }
#answer-help { font-size: 13px; color: var(--muted); margin: 22px 0 14px; }
.audit-notice { background: var(--warning-soft); color: var(--warning); padding: 16px; border-radius: 10px; line-height: 1.7; font-size: 13px; margin-bottom: 18px; }
.options { display: grid; gap: 10px; }
.option { display: flex; gap: 14px; align-items: flex-start; width: 100%; min-height: 64px; padding: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-align: left; font-size: 16px; line-height: 1.65; transition: border-color .15s, background .15s; }
.option .letter { flex: 0 0 30px; height: 30px; display: grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 650; color: var(--muted); background: var(--surface-soft); border-radius: 7px; }
.option .text { align-self: center; overflow-wrap: anywhere; min-width: 0; }
.option.selected { border-color: var(--accent); background: var(--accent-soft); }
.option.selected .letter { background: var(--accent); color: var(--surface); }
.option.correct { border-color: var(--success); background: var(--success-soft); }
.option.correct .letter { background: var(--success); color: var(--surface); }
.option.wrong { border-color: var(--error); background: var(--error-soft); }
.option.wrong .letter { background: var(--error); color: var(--surface); }
.option:disabled { opacity: 1; }
#answer-feedback:not(:empty) { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 14px; font-weight: 600; }
.quiz-footer { position: sticky; bottom: 0; display: flex; gap: 12px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--dock); backdrop-filter: blur(14px); z-index: 2; }
.quiz-footer .btn { flex: 1; min-width: 0; }
.result-card { text-align: center; padding: 48px 30px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.result-icon { display: grid; place-items: center; margin: 0 auto 22px; width: 58px; height: 58px; border-radius: 50%; color: var(--success); background: var(--success-soft); font-size: 28px; }
.result-card h2 { font-size: 28px; letter-spacing: -.8px; margin-top: 8px; }
.final-score { font-size: clamp(40px, 8vw, 64px); font-variant-numeric: tabular-nums; letter-spacing: -2px; font-weight: 650; margin-top: 24px; }
#final-score-value { color: var(--accent); }
.result-caption { font-size: 13px; color: var(--muted); }
.result-message { color: var(--muted); margin: 22px 0 28px; }
.action-buttons { max-width: 320px; margin: 0 auto; }
.support-card { margin-top: 44px; padding: 28px 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.support-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.support-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.support-eyebrow { color: var(--muted); font-size: 11px; }
.support-card h2 { font-size: 19px; letter-spacing: -.4px; font-weight: 650; }
.support-card p { font-size: 13px; color: var(--muted); line-height: 1.8; max-width: 850px; }
.support-card p + p { margin-top: 8px; }
.support-payment { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 18px; margin-top: 20px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; }
.support-requisites { flex: 1 1 245px; min-width: 0; }
.support-requisites label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
#support-card-number, #support-phone-number { display: block; width: 100%; border: none; padding: 0; border-radius: 0; color: var(--text); background: transparent; font: 500 clamp(16px, 4.3vw, 20px)/1.5 ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.support-payment .btn { width: auto; background: var(--surface); font-size: 13px; }
.support-recipient { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.support-card .support-comment { margin-top: 12px; color: var(--text); }
.support-card .support-footer { margin-top: 16px; font-size: 11px; }
.support-copy-status:empty { display: none; }
.support-copy-status:not(:empty) { margin-top: 10px; }
.app-footer { max-width: 1120px; width: calc(100% - 64px); margin: 32px auto; font-size: 11px; color: var(--muted); }
.footer-contact { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); }
.footer-author { flex: 1 1 280px; max-width: 520px; }
.footer-author h2 { color: var(--text); font-size: 20px; font-weight: 650; margin: 7px 0 10px; letter-spacing: -.4px; }
.footer-author p { font-size: 13px; line-height: 1.8; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { display: block; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.footer-links a:hover { border-color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; border-top: 1px solid var(--border); }
#loading-screen { text-align: center; padding: 70px 0; }
#loading-screen h2 { font-size: 17px; }
.loader { height: 32px; width: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
    .btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
    .btn.secondary:hover:not(:disabled) { border-color: var(--muted); }
    .option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
    .theme-switch button:hover, .text-button:hover { color: var(--accent); }
}
@media (max-width: 900px) {
    #start-screen.active { gap: 28px; grid-template-columns: .9fr 1.1fr; }
    .settings { padding: 24px; }
    .intro h1 { font-size: 36px; }
    .intro-stats { gap: 22px; }
}
@media (max-width: 700px) {
    #app { width: calc(100% - 32px); }
    .app-header { padding: 18px 0; margin-bottom: 24px; gap: 8px; }
    .brand { gap: 9px; }
    .brand-icon { width: 38px; height: 38px; border-radius: 11px; }
    .brand-name { font-size: 19px; }
    .brand-name > span { font-size: 10px; }
    .theme-switch { padding: 2px; border-radius: 12px; }
    .theme-switch button { width: 40px; height: 42px; }
    #start-screen.active { display: flex; flex-direction: column; gap: 24px; }
    .intro { padding: 0 4px; width: 100%; }
    .intro > .eyebrow { font-size: 10px; }
    .intro h1 { font-size: clamp(28px, 7.8vw, 39px); margin: 14px 0; line-height: 1.16; }
    .intro h1 br:first-of-type { display: none; }
    .intro-description { font-size: 14px; line-height: 1.7; max-width: 440px; }
    .intro-stats { margin: 20px 0 14px; gap: 32px; }
    .intro-stats strong { font-size: 21px; }
    .intro-stats span { font-size: 11px; }
    .route-art { display: none; }
    .audit-details { max-width: none; font-size: 11px; padding-top: 4px; }
    .settings { width: 100%; padding: 22px 18px; border-radius: 18px; }
    .settings-heading { margin-bottom: 22px; }
    .settings-heading h2 { font-size: 22px; }
    .settings-heading p { font-size: 12px; }
    .form-group { margin-bottom: 17px; }
    .quiz-header { margin-bottom: 18px; }
    .quiz-topline { margin-bottom: 12px; }
    .question-container { border-radius: 18px; padding: 22px 18px; }
    .section-tag { margin-bottom: 16px; font-size: 11px; }
    #question-text { font-size: 20px; line-height: 1.5; }
    .option { font-size: 15px; padding: 14px 12px; gap: 11px; line-height: 1.65; }
    .option .letter { flex-basis: 27px; height: 27px; }
    .quiz-footer { padding-top: 12px; gap: 9px; }
    .quiz-footer .btn { padding: 12px 8px; font-size: 14px; }
    .result-card { padding: 32px 20px; border-radius: 18px; }
    .result-card h2 { font-size: 24px; }
    .support-card { margin-top: 24px; padding: 22px 18px; border-radius: 18px; }
    .support-heading { gap: 12px; }
    .support-card h2 { font-size: 18px; }
    .support-payment { padding: 14px; gap: 14px; }
    .support-payment .btn { width: 100%; }
    .app-footer { width: calc(100% - 40px); margin: 24px auto; font-size: 10px; }
    .footer-contact { gap: 18px; padding: 24px 0; }
    .footer-author { flex-basis: 100%; }
    .footer-links { width: 100%; }
    .footer-links a { flex: 1 1 200px; }
    .footer-bottom { flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Keep the wordmark and theme controls comfortable on narrow phones. */
@media (max-width: 420px) {
    .app-header { flex-wrap: wrap; row-gap: 16px; }
    .brand { flex: 1 0 100%; }
    .theme-switch { margin-left: auto; }
    .theme-switch button { width: 44px; min-height: 44px; }
}
:root .brand-home { color: var(--text); text-decoration: none; }
.brand-home { border-radius: 10px; }
.brand-home:hover .brand-name { color: var(--accent); }
.session-review { margin-top: 28px; }
.review-heading h2 { font-size: 20px; letter-spacing: -.4px; }
.review-count { font-size: 12px; color: var(--muted); margin-top: 5px; }
.review-filters { display: flex; gap: 8px; margin: 16px 0; }
.review-filters button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 13px; }
.review-filters button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.review-list { display: grid; gap: 10px; }
.review-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow-wrap: anywhere; }
.review-item > summary { padding: 16px; font-size: 14px; line-height: 1.65; }
.review-status { display: inline-block; padding: 2px 7px; border-radius: 5px; margin-right: 8px; font-size: 11px; font-weight: 600; }
.review-status.is-correct { color: var(--success); background: var(--success-soft); }
.review-status.is-wrong { color: var(--error); background: var(--error-soft); }
.review-body { padding: 0 16px 18px; font-size: 13px; }
.review-section, .review-empty { color: var(--muted); font-size: 13px; line-height: 1.7; }
.review-answer-label { margin: 14px 0 6px; color: var(--success); font-size: 12px; font-weight: 600; }
.review-answer { line-height: 1.7; margin-bottom: 10px; }
.review-body > a { display: inline-block; padding: 12px 0 0; min-height: 44px; }
.connection-notice { margin: 0 0 16px; color: var(--muted); font-size: 12px; text-align: center; }
.section-page { max-width: 960px; margin: auto; }
.section-page nav { font-size: 13px; }
.section-intro { margin: 32px 0; }
.section-intro h1 { font-size: clamp(26px, 4vw, 42px); line-height: 1.2; letter-spacing: -.03em; margin: 12px 0 20px; }
.section-page p { color: var(--muted); line-height: 1.8; margin: 12px 0; }
.section-start { display: inline-flex; width: auto; margin-top: 12px; text-decoration: none; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 16px; }
.section-tile { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); text-decoration: none; }
.section-tile h2 { color: var(--text); font-size: 19px; line-height: 1.5; }
.section-tile > span:last-child { margin-top: auto; font-size: 13px; }
.section-page section { margin-top: 36px; }
.section-page section h2, .section-related h2 { font-size: 23px; }
.section-topics { padding-left: 20px; line-height: 1.9; }
.section-topics span { color: var(--muted); font-size: 13px; }
.section-examples { list-style: none; padding: 0; display: grid; gap: 16px; }
.section-examples > li { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.section-examples h3 { font-size: 17px; line-height: 1.6; }
.section-examples ul { list-style: none; padding: 0; }
.section-examples ul li { margin-top: 12px; line-height: 1.7; font-size: 14px; }
.section-related { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 36px; }
.section-related h2 { flex-basis: 100%; }
.section-page { overflow-wrap: anywhere; }
.offline-card { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 26px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.offline-intro h2 { margin: 10px 0; font-size: 23px; line-height: 1.35; letter-spacing: -.6px; }
.offline-intro p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.offline-intro .offline-meta { margin-top: 14px; font-size: 12px; }
.offline-controls { min-width: 0; }
#offline-status { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 12px; }
#offline-progress { width: 100%; height: 6px; margin-top: 16px; accent-color: var(--accent); }
.offline-help { margin-top: 10px; font-size: 12px; color: var(--muted); }
.offline-help summary { min-height: 44px; }
.offline-help p { line-height: 1.7; margin-bottom: 10px; }
@media (max-width: 640px) {
    .offline-card { grid-template-columns: 1fr; gap: 20px; padding: 22px 20px; }
    .offline-intro h2 { font-size: 21px; }
}
.release-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; margin-top: 18px; color: var(--muted); font-size: 12px; text-decoration: none; }
.release-link > span:first-child { color: var(--accent); font-weight: 650; }
.release-link:hover, .back-to-practice:hover { text-decoration: underline; }
.back-to-practice { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
.updates-intro { padding: 32px 0 52px; max-width: 700px; }
.updates-intro h1 { font-size: clamp(34px, 4.5vw, 56px); line-height: 1.12; letter-spacing: -.045em; margin: 20px 0; }
.updates-intro h1 span { color: var(--accent); }
.updates-intro > p { color: var(--muted); max-width: 510px; font-size: 16px; line-height: 1.8; }
.updates-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 64px; padding-bottom: 40px; }
.updates-section-title { font-size: 15px; margin-bottom: 28px; }
.release-timeline { list-style: none; padding: 0; margin: 0; }
.release-entry { position: relative; border-left: 1px solid var(--border); padding: 0 0 44px 28px; margin-left: 6px; }
.release-entry:last-child { padding-bottom: 8px; }
.release-entry::before { content: ''; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--border); box-shadow: 0 0 0 5px var(--bg); }
.release-entry:first-child::before { background: var(--accent); }
.release-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; color: var(--muted); }
.release-badge { color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 3px 8px; font-weight: 650; }
.release-era { font-size: 11px; }
.release-entry h3 { font-size: 23px; letter-spacing: -.025em; line-height: 1.3; margin: 16px 0 12px; }
.release-entry p, .release-entry li { font-size: 14px; line-height: 1.8; color: var(--muted); }
.release-entry ul { padding-left: 19px; margin-top: 12px; }
.release-entry li + li { margin-top: 7px; }
.updates-aside { display: grid; gap: 20px; align-content: start; }
.updates-note { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px; }
.updates-note h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; margin: 14px 0 12px; }
.updates-note p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 12px 0; }
.updates-later { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 20px; }
.updates-later h3 { font-size: 14px; }
.updates-note .updates-fine-print { font-size: 12px; }
.updates-thanks { background: var(--accent-soft); }
.updates-action { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 10px 14px; margin-top: 20px; background: var(--surface); color: var(--accent); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 650; }
.updates-action:hover { text-decoration: underline; }
.updates-contact { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: 12px; color: var(--accent); }
.updates-signature { display: block; color: var(--muted); font-size: 11px; margin-top: 14px; }
@media (max-width: 850px) {
    .updates-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .updates-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .updates-intro { padding: 24px 0 36px; }
    .updates-aside { grid-template-columns: minmax(0, 1fr); }
    .release-entry { padding-left: 22px; }
    .release-entry h3 { font-size: 21px; }
    .updates-note { padding: 22px; }
}
.progress-transfer { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 12px; font-size: 13px; }
.progress-transfer summary { color: var(--accent); }
.progress-transfer p { color: var(--muted); line-height: 1.7; margin: 12px 0; }
.transfer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.transfer-actions .btn { flex: 1 1 150px; font-size: 13px; min-height: 44px; }
#import-preview { border: 1px solid var(--border); padding: 14px; border-radius: 12px; margin-top: 14px; }
.report-question { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 12px; }
.report-hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.release-entry .release-support { border-left: 2px solid var(--border); padding-left: 14px; margin-top: 20px; font-size: 13px; }

/* Installation stays inside the home screen and never overlays a question. */
.install-panel { border-top: 1px solid var(--border-color, #65758a); padding-top: 1rem; margin-top: 1.25rem; }
.install-offer { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .85rem; }
.install-offer[hidden], .install-panel[hidden] { display: none; }
.install-offer strong { font-size: 1rem; }
.install-offer p, .install-caption, #install-help p { font-size: .875rem; line-height: 1.5; margin: .5rem 0; }
.install-offer .text-button { flex-shrink: 0; min-height: 44px; }
.install-caption { color: var(--text-muted); }
