/*
 * 输入题, app version (papers-written-app, js/paper-written-app.js; 2026-11-18, the preview accounts only).
 * Loaded after paper-app.css (the K1 page's look: header, start screen, timer, settings sheet, result rings) and
 * paper-written.css (the written page's own parts). This file makes the written parts match K1's app look:
 * a white page, no cards, grey borderless buttons, orange for the one main action, small quick motion.
 * The page uses K1's body states — gate-open (start), pa-exam (writing), pa-result (result) — plus
 * wp-is-grading (AI marking after 交卷) and wp-review (looking back at a question after handing in).
 */

/* ---------- 1 · white everywhere (K1 makes each state white; grading and looking back too) ---------- */
:root:not([data-theme="dark"]) body.pw-app {
    --pa-bg: #ffffff;
    --pa-card: #ffffff;
    --pa-line: #ececec;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
body.pw-app .wp { gap: 0; padding-bottom: 110px; }
body.pw-app.pa-result .wp,
body.pw-app.gate-open .wp { padding-bottom: 24px; }

/* ---------- 2 · header: K1's 考试模式 header (✕ · ⚙ · progress · timer); the result keeps ✕ · title · ⚙ ---------- */
body.pw-app.pa-exam .content-header h1 { display: none; }
body.pw-app.pa-result .pa-exam-progress { display: none; }
/* The language button lives in the ⚙ sheet in this version, in every state. */
body.pw-app .translate-btn { display: none !important; }
body.pw-app.pa-exam .pa-settings-btn,
body.pw-app.pa-result .pa-settings-btn { order: 0; }
/* While looking back the bar counts pages, plainly (no pace band, no timer). */
body.pw-app.wp-review .pa-exam-progress i { background: #e4e4e7; }
body.pw-app.wp-review .pa-exam-progress span { color: #55555e; }
/* The settings sheet: 音效 too (K1 shows it only while practising). */
body.pw-app .wp-sound-row { display: none; }
body.pw-app.gate-open .wp-sound-row,
body.pw-app.pa-exam .wp-sound-row { display: flex; padding: 12px 20px; margin-bottom: 6px; border-bottom: 1px solid var(--pa-line); }
body.pw-app.pa-exam .pa-haptic-row { margin-bottom: 0; }

/* ---------- 3 · the start screen (K1's gate: kicker, title, one line, the card) ---------- */
body.pw-app .wp-gate { padding-bottom: 32px; }
.wp-gate-sections { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.wp-gate-sections li { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f4f4f5; color: #55555e; font-size: 13px; font-weight: 600; }
.wp-gate-sections b { color: #23232b; font-weight: 800; }
body.pw-app .wp-mode { width: 100%; margin-top: 24px; }
body.pw-app .wp-mode .paper-mode-opt { width: 100%; }
.wp-gate-note { display: block; max-width: 460px; margin: 14px 0 0; color: #8a8a93; font-size: 13px; line-height: 1.5; text-align: center; }
.wp-gate-note .material-symbols-outlined { margin-right: 4px; vertical-align: -3px; --icon-size: 16px; font-size: 16px; }
.wp-gate-note.wp-note-test { color: #c2510a; }
/* 历次成绩: a grouped list, as K1's "更多试卷". */
body.pw-app .wp-gate .wp-history { width: 100%; max-width: 460px; margin: 26px 0 0; gap: 0; text-align: left; }
body.pw-app .wp-history[hidden] { display: none; }
body.pw-app .wp-history-title { margin: 0 4px 8px; color: #8a8a93; font-size: 13px; font-weight: 700; }
body.pw-app .wp-history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 10px 0 16px;
    border: 0;
    border-radius: 0;
    background: #f6f6f7;
    color: #33333d;
    font: inherit;
    font-size: 14.5px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
body.pw-app .wp-history-row + .wp-history-row { box-shadow: inset 0 1px 0 #ebebee; }
body.pw-app .wp-history-row:first-of-type { border-radius: 16px 16px 0 0; }
body.pw-app .wp-history-row:last-of-type { border-radius: 0 0 16px 16px; }
body.pw-app .wp-history-row:only-of-type { border-radius: 16px; }
body.pw-app .wp-history-row:active { background: #efeff1; }
body.pw-app .wp-history-date { flex: 1; min-width: 0; }
body.pw-app .wp-history-row b { color: #23232b; font-variant-numeric: tabular-nums; }
body.pw-app .wp-history-row small { min-width: 40px; color: #8a8a93; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
body.pw-app .wp-history-row.is-current { background: #fff3ea; }
.wp-row-chev { color: #b8b8c0; --icon-size: 22px; font-size: 22px; }

/* ---------- 4 · a question page ---------- */
/* The paper's card above question 1 (K1 Step 63's look); hidden on the other pages. */
body.pui-app.pa-exam .paper-info[hidden] { display: none; }
body.pw-app.pa-exam .paper-info { margin: 4px 0 18px; }
body.pw-app .paper-info-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The language note while reading in a language the answers can't be in. */
body.pw-app .wp-lang-note { margin: 0 0 14px; padding: 9px 12px; border-radius: 12px; background: #f4f4f5; color: #55555e; font-size: 13px; }

/* Section: one quiet line — name · rule · 已选 n/3. */
body.pw-app .wp-section { gap: 0; }
body.pw-app .wp-section-head { flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 2px 4px 10px; }
body.pw-app .wp-section-title { color: #8a8a93; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
body.pw-app .wp-section-rule { color: #a3a3ab; font-size: 13px; }
body.pw-app .wp-section-rule::before { content: "·"; margin-right: 8px; }
body.pw-app .wp-choose-note { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: #f4f4f5; color: #55555e; font-size: 12.5px; font-weight: 600; }
body.pw-app .wp-choose-note b { color: #c2510a; }

/* The main question: flat on the white page, like K1's exam questions. */
body.pw-app .wp-group { gap: 16px; padding: 4px 4px 8px; border-radius: 0; background: none; }
body.pw-app .wp-group-head { gap: 8px; min-height: 34px; }
body.pw-app .wp-qnum {
    width: auto;
    min-width: 0;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f2f2f2;
    color: #5a5a5a;
    font-size: 12.5px;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease;
}
body.pw-app .wp-qnum::before { content: "Q"; margin-right: 1px; }
body.pw-app .wp-group.is-answered .wp-qnum { background: #ffe0cc; color: #8a4116; }
body.pw-app .wp-group-marks { color: #8a8a93; font-size: 13px; font-weight: 600; }
body.pw-app .wp-group-score { padding: 3px 10px; border-radius: 999px; background: #fff0e6; color: #c2510a; font-size: 12.5px; font-weight: 800; }
body.pw-app .wp-group-score.is-full { background: #e3f4ea; color: #2e8a57; }
body.pw-app .wp-group-score.is-zero { background: #fbe9ec; color: #b0485f; }
body.pw-app .wp-choose { height: 32px; padding: 0 13px; border-radius: 10px; background: #f2f2f3; color: #33333d; font-size: 13px; transition: transform 0.12s ease, background-color 0.15s ease; }
body.pw-app .wp-choose:active { transform: scale(0.96); }
body.pw-app .wp-choose[aria-pressed="true"] { background: #ffe0cc; color: #8a4116; }
body.pw-app .wp-more-btn { width: 34px; height: 34px; color: #b5b3ad; }
body.pw-app .wp-more-btn .material-symbols-outlined { --icon-size: 21px; font-size: 21px; }
body.pw-app .wp-more-menu { top: 38px; border-color: #ececee; border-radius: 16px; box-shadow: 0 8px 24px rgba(20, 20, 30, 0.08); }

/* Text: a little bigger than the card version, as on K1's question page. */
body.pw-app .wp-stimulus,
body.pw-app .wp-lead { color: #33333d; font-size: 16px; line-height: 1.7; }
body.pw-app .wp-part-q { color: #23232b; font-size: 16px; line-height: 1.65; }
body.pw-app .wp-stimulus blockquote,
body.pw-app .wp-part-text blockquote { border-left-color: #e4e4e7; background: #f6f6f7; }
body.pw-app .wp-rich table { border-color: #ececee; }
body.pw-app .wp-rich th { background: #f6f6f7; }
body.pw-app .wp-figure { border-radius: 12px; }
body.pw-app .wp-parts { gap: 22px; }
body.pw-app .wp-marks { color: #a3a3ab; font-size: 12.5px; }
/* The ruled lines: K1's hairline grey; the line being written on turns pale orange. */
body.pw-app .wp-answer { --wp-rule: #ececec; font-size: 16px; }
body.pw-app .wp-answer:focus { --wp-rule: #f9b48a; }
body.pw-app .wp-group.is-optional:not(.is-chosen) .wp-answer { opacity: 0.4; }

/* AI 批改这题: a light grey button, no border (the ✦ orange) — on the right, bigger (owner 2026-11-18). */
body.pw-app .wp-group-foot { justify-content: flex-end; padding-top: 8px; padding-bottom: 16px; }
/* Room under it (a little — owner: "多一点点就好") so it scrolls well clear of the bottom bar (owner 2026-11-18). */
body.pw-app.pa-exam .wp-group.is-current .wp-group-foot { margin-bottom: 72px; }
body.pw-app .wp-grade {
    gap: 8px;
    height: 50px;
    padding: 0 22px 0 18px;
    border: 0;
    border-radius: 14px;
    background: #f2f2f3;
    color: #33333d;
    font-size: 15.5px;
    font-weight: 700;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pw-app .wp-grade:hover { background: #ececee; }
body.pw-app .wp-grade:active { transform: scale(0.97); }
body.pw-app .wp-grade .material-symbols-outlined { color: #f26a1b; --icon-size: 21px; font-size: 21px; }
body.pw-app .wp-group.is-optional:not(.is-chosen) .wp-group-foot { display: none; }

/* A graded part: K1's light grey answer panel. */
body.pw-app .wp-feedback { padding: 14px 16px; border-radius: 16px; background: #f6f6f7; animation: wp-fb-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
body.pw-app .wp-fb-score.is-full { background: #e3f4ea; color: #2e8a57; }
body.pw-app .wp-fb-score.is-some { background: #ffe9db; color: #c2510a; }
body.pw-app .wp-fb-score.is-zero { background: #fbe9ec; color: #b0485f; }
body.pw-app .wp-fb-comment { color: #33333d; }
body.pw-app .wp-fb-scheme summary { color: #6b6b74; }
@keyframes wp-fb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Page to page: the new main question comes in from the side it's on. */
body.pw-app .wp-group.is-in-next { animation: wp-in-next 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
body.pw-app .wp-group.is-in-prev { animation: wp-in-prev 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes wp-in-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes wp-in-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* ---------- 5 · the bottom bar: AI · ← grey squares, 下一题 / 交卷 orange across the rest ---------- */
body.pw-app .wp-bar .paper-bar-save { display: none !important; }
body.pw-app.pa-exam .wp-bar .wp-prev { width: 46px; padding: 0; }
body.pw-app.pa-exam .wp-bar .wp-prev:disabled { opacity: 0.4; cursor: default; transform: none; }
body.pw-app.pa-exam .wp-bar .wp-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 168px;
    padding: 0 20px;
    background: #f26a1b;
    color: #fff;
}
body.pw-app.pa-exam .wp-bar .wp-next:hover { background: #ee6412; opacity: 1; }
body.pw-app.pa-exam .wp-bar .wp-next:active { background: #e35d10; }
body.pw-app .wp-bar .wp-next .material-symbols-outlined { --icon-size: 20px; font-size: 20px; }
body.pw-app .wp-bar .wp-next.is-submit .wp-next-icon { display: none; }
body.pw-app .wp-bar .wp-next.is-busy { opacity: 0.6; pointer-events: none; }
@media (max-width: 520px) {
    body.pw-app.pa-exam .wp-bar .wp-next { flex: 1; min-width: 0; }
}
body.pw-app.pa-result .paper-bar { display: none !important; }

/* ---------- 6 · the question sheet ---------- */
body.pw-app .wp-nav-sheet .paper-nav-panel { background: #fff; }
body.pw-app .wp-nav-sheet .paper-nav-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
body.pw-app .wp-nav-sec { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 6px 2px 0; color: #23232b; font-size: 13.5px; font-weight: 800; }
body.pw-app .wp-nav-sec:first-child { margin-top: 0; }
body.pw-app .wp-nav-sec small { color: #8a8a93; font-size: 12.5px; font-weight: 600; }
body.pw-app .wp-nav-sheet .paper-nav-cell { height: 46px; border: 0; border-radius: 14px; background: #f4f4f5; color: #33333d; font-weight: 700; transition: transform 0.12s ease; }
body.pw-app .wp-nav-sheet .paper-nav-cell:active { transform: scale(0.95); }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="answered"] { background: #ffe0cc; color: #8a4116; }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="off"] { background: #f7f7f8; color: #b8b8c0; }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="correct"] { background: #e3f4ea; color: #2e8a57; }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="part"] { background: #ffe9db; color: #c2510a; }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="wrong"] { background: #fbe9ec; color: #b0485f; }
body.pw-app .wp-nav-sheet .paper-nav-cell[data-state="blank"] { background: #f7f7f8; color: #a3a3ab; box-shadow: inset 0 0 0 1.5px #dcdce0; }
body.pw-app .wp-nav-sheet .paper-nav-cell.is-here { box-shadow: inset 0 0 0 2px #23232b; }
body.pw-app .wp-nav-sheet .paper-nav-key i { border: 0; border-radius: 4px; background: #f4f4f5; }
body.pw-app .wp-nav-sheet .paper-nav-key[data-state="answered"] i { background: #ffe0cc; }
body.pw-app .wp-nav-sheet .paper-nav-key[data-state="correct"] i { background: #c9ecd7; }
body.pw-app .wp-nav-sheet .paper-nav-key[data-state="part"] i { background: #ffd2b8; }
body.pw-app .wp-nav-sheet .paper-nav-key[data-state="wrong"] i { background: #f6ccd5; }
body.pw-app .wp-nav-sheet .paper-nav-key[data-state="blank"] i { background: #fff; box-shadow: inset 0 0 0 1.5px #dcdce0; }
body.pw-app .wp-nav-sheet .paper-nav-note { border-radius: 14px; background: #fff3ea; color: #8a4116; }
body.pw-app .wp-nav-sheet .paper-nav-actions[hidden] { display: none; }
body.pw-app .wp-nav-sheet .paper-nav-action { flex: 1; height: 50px; border: 0; border-radius: 14px; background: #f2f2f3; color: #33333d; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
body.pw-app .wp-nav-sheet .paper-nav-action[hidden] { display: none; }
body.pw-app .wp-nav-sheet .paper-nav-action.is-primary { background: #f26a1b; color: #fff; }
body.pw-app .wp-nav-sheet .paper-nav-action:active { transform: scale(0.98); }

/* ---------- 7 · AI 正在批改 (after 交卷) ---------- */
.wp-grading { display: none; }
body.pw-app.wp-is-grading .wp-result > :not(.wp-grading) { display: none !important; }
body.pw-app.wp-is-grading .wp-grading {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - var(--header-height, 64px) - 60px);
    text-align: center;
}
.wp-grading-mascot img { display: block; width: 170px; height: 170px; animation: pa-cheer-pop 0.55s cubic-bezier(0.34, 1.6, 0.6, 1) both, pa-cheer-bob 2.4s ease-in-out 0.6s infinite; }
.wp-grading h2 { margin: 14px 0 4px; color: #23232b; font-size: 24px; font-weight: 800; }
.wp-grading p { margin: 0; color: #7a7a85; font-size: 15px; font-variant-numeric: tabular-nums; }
.wp-grading-bar { position: relative; width: min(280px, 80%); height: 12px; margin: 18px 0 14px; overflow: hidden; border-radius: 999px; background: #f2f2f2; }
.wp-grading-bar i { position: absolute; inset: 0 auto 0 0; width: 4%; border-radius: inherit; background: #f9b48a; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.wp-grading .wp-grading-note { color: #a3a3ab; font-size: 13px; }

/* ---------- 8 · the result (K1's: kancil, rings, 完成 / 再做一次), then a row per question ---------- */
body.pw-app.pa-result .wp-result { gap: 0; border-radius: 0; }
body.pw-app .wp-res-of::after { content: attr(data-total); color: #9a9aa2; font-size: 11px; font-weight: 700; }
body.pw-app .wp-result-warn { order: 2; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: #b0485f; font-size: 13.5px; }
body.pw-app .wp-result-warn[hidden],
body.pw-app .wp-result-viewing[hidden] { display: none; }
body.pw-app .wp-retry { margin: 0; padding: 5px 12px; border: 0; border-radius: 999px; background: #fbe9ec; color: #b0485f; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
body.pw-app .wp-result-viewing { order: 2; margin: 12px 0 0; color: #8a8a93; font-size: 13px; }
body.pw-app.pa-result .pa-result-actions .pa-result-finish { grid-column: 1 / -1; }
body.pw-app.pa-result .pa-result-actions .paper-retry-btn { grid-column: 1 / -1; }
body.pw-app .wp-result-list { order: 8; margin: 30px 0 0; padding-bottom: 66px; text-align: left; } /* room under it: about one bottom bar (owner 2026-11-18) */
body.pw-app .wp-result-list-title { margin: 0 4px 8px; color: #8a8a93; font-size: 13px; font-weight: 700; }
body.pw-app .wp-result-rows { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #f6f6f7; }
body.pw-app .wp-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 10px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #33333d;
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
body.pw-app .wp-result-row + .wp-result-row { box-shadow: inset 0 1px 0 #ebebee; }
body.pw-app .wp-result-row:hover { background: #f0f0f2; }
body.pw-app .wp-result-row:active { background: #ebebee; }
body.pw-app .wp-row-num { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 9px; border-radius: 999px; background: #fff; color: #5a5a5a; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
body.pw-app .wp-row-num::before { content: "Q"; margin-right: 1px; }
/* How much of the question's marks were got, as a short bar in the row's colour. */
body.pw-app .wp-row-bar { position: relative; flex: 1; min-width: 0; height: 8px; overflow: hidden; border-radius: 999px; background: #e9e9ec; }
body.pw-app .wp-row-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: #f9b48a; }
body.pw-app .wp-result-row.is-full .wp-row-bar i { background: #3fb27f; }
body.pw-app .wp-result-row.is-zero .wp-row-bar i { background: transparent; }
body.pw-app .wp-result-row b { min-width: 58px; text-align: center; }
body.pw-app .wp-result-row b { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.pw-app .wp-result-row.is-full b { background: #e3f4ea; color: #2e8a57; }
body.pw-app .wp-result-row.is-some b { background: #ffe9db; color: #c2510a; }
body.pw-app .wp-result-row.is-zero b { background: #fbe9ec; color: #b0485f; }
body.pw-app .wp-result-row.is-blank b { background: transparent; color: #a3a3ab; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    body.pw-app .wp-group.is-in-next, body.pw-app .wp-group.is-in-prev, body.pw-app .wp-feedback,
    .wp-grading-mascot img { animation: none !important; }
}

/* 历次成绩 in the paper's card above Q1 (no start screen since 2026-11-18): white rows on the card's grey. */
body.pw-app .paper-info .wp-history { margin: 16px 0 0; gap: 0; }
body.pw-app .paper-info .wp-history-title { margin: 0 2px 8px; }
body.pw-app .paper-info .wp-history-row { background: #fff; }
body.pw-app .paper-info .wp-history-row + .wp-history-row { box-shadow: inset 0 1px 0 #efeff1; }

/* BM Kertas 2 (2026-11-19): small notes in the feedback (isi · gramatis, the 120-word cut) and the Rumusan word count. */
body.pw-app .wp-fb-note { margin: 4px 0 6px; color: #8a8a93; font-size: 12.5px; line-height: 1.5; }
body.pw-app .wp-words { margin: 6px 4px 0; color: #8a8a93; font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
body.pw-app .wp-words.is-over { color: #c2510a; font-weight: 700; }
/* 评分标准: why a point the answer tried was not given (the examiner's check). */
body.pw-app .wp-points .wp-fb-why { display: block; margin-top: 3px; color: #8a6d3b; font-size: 12.5px; font-style: normal; line-height: 1.5; }
:root[data-theme="dark"] body.pw-app .wp-points .wp-fb-why { color: #d8b56f; }

/* 分栏 (js/wp-split.js, owner 2026-11-27): on computers, passage left / answers right, each scrolling on its own. */
.wp-split-left, .wp-split-right { display: contents; }
.wp-split-btn[hidden] { display: none !important; }
@media (max-width: 1023px) { .wp-split-btn { display: none !important; } }
body.pw-app .content-header .icon-btn.wp-split-btn { opacity: 1; color: #5c5a55; background: #f2f2f2; }
body.pw-app .content-header .icon-btn.wp-split-btn:hover { background: #e9e9e9; }
body.pw-app .content-header .icon-btn.wp-split-btn.is-on { background: #1f1d1a; color: #fff; }
:root[data-theme="dark"] body.pw-app .content-header .icon-btn.wp-split-btn { background: #2a2a2e; color: #d6d6db; }
:root[data-theme="dark"] body.pw-app .content-header .icon-btn.wp-split-btn.is-on { background: #f2f2f2; color: #1f1d1a; }
@media (min-width: 1024px) {
    body.wp-split-on .paper-content-wrap.wp { max-width: min(1500px, calc(100% - 48px)); }
    body.wp-split-on .content-scroll { overflow: hidden; }
    /* The paper's info card (first page) would sit above the columns where it cannot be scrolled to: hidden while split. */
    body.wp-split-on #paperInfo { display: none !important; }
    body.wp-split-on .wp-group.has-split.is-current {
        display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 0;
        height: var(--wp-split-h, calc(100dvh - 160px)); padding: 0;
    }
    body.wp-split-on .wp-group.has-split .wp-split-left,
    body.wp-split-on .wp-group.has-split .wp-split-right {
        display: flex; flex-direction: column; gap: 16px; min-height: 0;
        overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
        padding: 4px 22px 24px 4px;
    }
    body.wp-split-on .wp-group.has-split .wp-split-left { border-right: 1px solid #ececec; padding-right: 32px; }
    body.wp-split-on .wp-group.has-split .wp-split-right { padding-left: 32px; }
    :root[data-theme="dark"] body.wp-split-on .wp-group.has-split .wp-split-left { border-right-color: #2e2e33; }
    body.wp-split-on .wp-group.has-split .wp-stimulus { max-width: none; }
}
