/*
 * 按考点练习 (papers-practice-topics) and 我的收藏 / 错题 (papers-notebook) in the paper page's app look
 * (2026-11-18; paper-app.css): a white page, a kicker + big title, the start card (pale orange, icon tile, ›),
 * grouped rows on light grey, questions flat with outlined options, light grey borderless buttons, orange for
 * the one main action. body.pl-app. Dark mode: tools/dark-css/gen.py twins its colours into dark.css.
 */
body.pl-app { --pl-ink: #23232b; --pl-text: #33333d; --pl-muted: #8a8a93; --pl-soft: #f6f6f7; --pl-line: #e8e8ea; }
body.pl-app .chat-main,
body.pl-app .chat-scroll,
body.pl-app .nb-header { background: #fff; }

/* ---------- The start card (as the paper page's 练习模式 card) ---------- */
body.pl-app .pl-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 76px;
    margin: 0 0 18px;
    padding: 12px 12px 12px 14px;
    border: 0;
    border-radius: 18px;
    background: #fff3ea;
    color: var(--pl-ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pl-app .pl-card:hover { background: #ffecdf; }
body.pl-app .pl-card:active { background: #ffe4d2; transform: scale(0.98); }
body.pl-app .pl-card-icon { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #ffe0cc; color: #f26a1b; --icon-size: 24px; font-size: 24px; font-variation-settings: 'FILL' 1; }
body.pl-app .pl-card-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
body.pl-app .pl-card-text strong { color: var(--pl-ink); font-size: 16px; font-weight: 800; }
body.pl-app .pl-card-text small { color: var(--pl-muted); font-size: 13px; line-height: 1.4; }
body.pl-app .pl-card-go { flex: none; color: #b8b8c0; --icon-size: 22px; font-size: 22px; transition: transform 0.15s ease; }
body.pl-app .pl-card:hover .pl-card-go { transform: translateX(2px); }

/* ======================= 按考点练习 ======================= */
/* Intro: subject as a kicker, the big title, one grey line (no icon tile). */
body.pl-app .tp-intro { display: block; margin: 6px 0 20px; }
body.pl-app .tp-intro-icon { display: none; }
body.pl-app .pl-kicker { display: block; color: var(--pl-muted); font-size: 13px; font-weight: 700; }
body.pl-app .tp-intro h1 { margin: 2px 0 6px; color: var(--pl-ink); font-size: 26px; font-weight: 800; line-height: 1.25; }
body.pl-app .tp-intro p { color: var(--pl-muted); font-size: 14px; line-height: 1.55; }
body.pl-app .tp-flash { border-radius: 14px; background: #fff3ea; color: #8a4116; }
/* The old continue line's own look gives way to the card. */
body.pl-app .tp-continue.pl-card { font-weight: inherit; }

/* Chapters: a section label, then one grouped list per form. */
body.pl-app .tp-form-title { margin: 24px 4px 8px; color: var(--pl-muted); font-size: 13px; font-weight: 700; letter-spacing: 0; }
body.pl-app .tp-form-title:first-of-type { margin-top: 6px; }
body.pl-app .tp-list { gap: 0; overflow: hidden; border-radius: 16px; background: var(--pl-soft); }
body.pl-app .tp-topic {
    gap: 12px;
    padding: 14px 14px 14px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease;
}
body.pl-app .tp-topic + .tp-topic { box-shadow: inset 0 1px 0 var(--pl-line); }
body.pl-app .tp-topic:hover { background: #efeff1; }
body.pl-app .tp-topic:has(input:checked) { background: #fff3ea; }
body.pl-app .tp-topic + .tp-topic:has(input:checked),
body.pl-app .tp-topic:has(input:checked) + .tp-topic { box-shadow: none; }
/* The tick: a round box that fills orange. */
body.pl-app .tp-check { width: 24px; height: 24px; border: 2px solid #d6d6da; border-radius: 50%; background: #fff; transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.2s cubic-bezier(0.34, 1.6, 0.6, 1); }
body.pl-app .tp-topic:has(input:checked) .tp-check { border-color: #f26a1b; background: #f26a1b; color: #fff; transform: scale(1.06); font-variation-settings: 'wght' 700; }
body.pl-app .tp-topic:has(input:focus-visible) { outline: 2px solid #f9b48a; outline-offset: -2px; }
body.pl-app .tp-main strong { color: var(--pl-ink); font-size: 15px; font-weight: 700; }
body.pl-app .tp-main small { color: var(--pl-muted); font-size: 12.5px; }
body.pl-app .tp-progress-text { color: var(--pl-muted); font-size: 12px; }
body.pl-app .tp-bar { height: 6px; background: #e4e4e7; }
body.pl-app .tp-bar i { background: #f9b48a; }
body.pl-app .tp-wrong { background: #fbe9ec; color: #b0485f; }

/* The start bar: white with a fade above, the size as a segmented control, 开始练习 orange (grey until a chapter is picked). */
body.pl-app .tp-dock { gap: 10px; padding: 10px 0; border-radius: 0; background: #fff; outline: 0; }
body.pl-app .tp-size { padding: 4px; border-radius: 14px; background: #f2f2f3; }
body.pl-app .tp-size span { height: 38px; padding: 0 16px; border-radius: 11px; color: #6b6b74; font-size: 14px; font-weight: 700; line-height: 38px; }
body.pl-app .tp-size input:checked + span { background: #fff; color: var(--pl-ink); box-shadow: 0 1px 2px rgba(20, 20, 30, 0.06); }
body.pl-app .tp-start {
    justify-content: center;
    height: 50px;
    padding: 0 22px;
    border-radius: 16px;
    background: #f26a1b;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.12s ease, background-color 0.15s ease;
}
body.pl-app .tp-start:hover:not(:disabled) { background: #ee6412; }
body.pl-app .tp-start:active:not(:disabled) { background: #e35d10; transform: scale(0.98); }
body.pl-app .tp-start:disabled { opacity: 1; background: #ececec; color: #ababab; }
body.pl-app .tp-start small { font-weight: 700; opacity: 0.85; }
@media (max-width: 720px) {
    body.pl-app .tp-dock { left: 0; right: 0; padding: 10px 14px; }
    body.pl-app .tp-topic { padding: 13px 12px; }
}

/* ======================= 我的收藏 / 错题 ======================= */
/* Tabs: a grey track, the one on in white. */
body.pl-app .nb-tabs { background: #f2f2f3; border-radius: 14px; }
body.pl-app .nb-tab { border-radius: 11px; color: #6b6b74; font-weight: 700; }
body.pl-app .nb-tab.is-on { background: #fff; color: var(--pl-ink); box-shadow: 0 1px 2px rgba(20, 20, 30, 0.06); }
/* Switching: a white pill slides to the tab tapped, then the page changes (papers-notebook.js). */
body.pl-app .nb-tabs.has-pill .nb-tab { position: relative; z-index: 1; transition: color 0.2s ease; }
body.pl-app .nb-tabs.has-pill .nb-tab.is-on { background: transparent; box-shadow: none; }
body.pl-app .nb-tab-pill { position: absolute; top: 4px; bottom: 4px; left: 0; z-index: 0; border-radius: 11px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 30, 0.06); transition: transform 0.26s cubic-bezier(0.3, 0.9, 0.3, 1), width 0.26s cubic-bezier(0.3, 0.9, 0.3, 1); }
body.pl-app .nb-switching .nb-tab-pill ~ .nb-tab.is-on { color: #6b6b74; }
body.pl-app .nb-switching .nb-tab.is-going { color: var(--pl-ink); }
body.pl-app .notebook-container { transition: opacity 0.18s ease, transform 0.18s ease; }
body.pl-app.nb-leaving .notebook-container { opacity: 0; transform: translateY(6px); }
body.pl-app .notebook-container { animation: pl-in 0.24s ease backwards; }
@keyframes pl-in { from { opacity: 0; transform: translateY(6px); } }
/* Subjects: light grey pills, the one picked in peach. */
body.pl-app .notebook-subject { height: 34px; padding: 0 14px; background: #f2f2f3; color: #55555e; font-weight: 700; line-height: 34px; }
body.pl-app .notebook-subject:hover { background: #ececee; }
body.pl-app .notebook-subject.is-active { background: #ffe0cc; color: #8a4116; }
body.pl-app .notebook-flash { border-radius: 14px; background: #fff3ea; color: #8a4116; }
/* The practice call-out is the start card now. */
body.pl-app .notebook-practice { display: block; margin: 0; padding: 0; border-radius: 0; background: none; }
/* 收藏的试卷: a grouped list (as 更多试卷 on the paper page). */
body.pl-app .nb-papers { margin: 0 0 18px; padding: 0; border-radius: 0; background: none; }
body.pl-app .nb-papers-title { margin: 0 4px 8px; color: var(--pl-muted); }
body.pl-app .nb-papers-list { overflow: hidden; border-radius: 16px; background: var(--pl-soft); }
body.pl-app .nb-papers-list a { position: relative; gap: 12px; min-height: 56px; padding: 8px 10px 8px 12px; border-top: 0; color: var(--pl-ink); }
body.pl-app .nb-papers-list li + li a::before { content: ""; position: absolute; top: 0; right: 0; left: 56px; height: 1px; background: var(--pl-line); }
body.pl-app .nb-papers-list a:hover { background: #efeff1; color: var(--pl-ink); }
body.pl-app .nb-papers-list .pa-row-icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #ffe9db; color: #f26a1b; --icon-size: 18px; font-size: 18px; font-variation-settings: 'FILL' 1; }
body.pl-app .nb-paper-name { flex: 1; }
body.pl-app .pl-row-chev { flex: none; color: #b8b8c0; --icon-size: 20px; font-size: 20px; }

/* Questions: flat on the white page, one under another with a hairline between (as 考试模式). */
body.pl-app {
    --pa-bg: #ffffff;
    --pa-soft: #ffffff;
    --pa-soft-hover: #f7f7f7;
    --pa-line: #ececec;
    --pa-chip: #f2f2f2;
    --pa-chip-ink: #5a5a5a;
}
body.pl-app .notebook-list { gap: 0; }
body.pl-app .paper-question.notebook-card { padding: 22px 16px; border-radius: 0; background: none; box-shadow: none; }
body.pl-app .paper-question.notebook-card + .notebook-card { border-top: 1px solid #efefef; }
/* Chapter chips + where it's from, one row; each chip opens on tap to show its full name. */
body.pl-app .notebook-card .paper-chapter-badge { cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.pl-app .notebook-card .paper-chapter-badge.is-expanded .paper-chapter-badge-title { max-width: min(260px, 70vw); }
body.pl-app .nb-source-chip { --icon-size: 14px; }
body.pl-app .nb-source-chip .material-symbols-outlined { margin-right: 4px; font-size: 14px; }
body.pl-app .nb-source-chip .nb-source { display: block; margin-top: 0; margin-bottom: 0; color: inherit; line-height: 16px; text-decoration: none; }
body.pl-app .nb-option:not(.is-correct):not(.is-wrong):not(.is-picked) { background: #fff; box-shadow: inset 0 0 0 1.5px #e8e8e8; }
body.pl-app .nb-option .paper-option-letter { box-shadow: inset 0 0 0 1.5px #e8e8e8; }
body.pl-app .nb-option.is-correct .paper-option-letter,
body.pl-app .nb-option.is-wrong .paper-option-letter { box-shadow: none; }
body.pl-app button.nb-option:active:not(:disabled) { transform: scale(0.99); }
body.pl-app button.nb-option.is-picked { background: #fff3ea; box-shadow: inset 0 0 0 1.5px #f9b48a; }
body.pl-app .notebook-card .paper-answer { padding: 16px 18px; border-radius: 16px; background: var(--pl-soft); }
/* 错题: the option picked last time in pale pink with a 上次选的 tag on the right; the eye at the top right hides both. */
body.pl-app:not(.nb-hide-last) .nb-option.is-last:not(.is-correct):not(.is-wrong):not(.is-picked) { background: #fff7f8; box-shadow: inset 0 0 0 1.5px #f3c9d2; }
body.pl-app:not(.nb-hide-last) .nb-option.is-last:not(.is-correct):not(.is-wrong):not(.is-picked) .paper-option-letter { background: #fbe9ec; box-shadow: none; color: #b0485f; }
body.pl-app .nb-last-badge { background: #fbe9ec; color: #b0485f; white-space: nowrap; }
body.pl-app.nb-hide-last .nb-last-badge { display: none; }
body.pl-app .nb-last-toggle { position: absolute; top: 50%; right: 14px; color: #6b6b74; transform: translateY(-50%); }
body.pl-app .nb-last-toggle .nb-last-off,
body.pl-app.nb-hide-last .nb-last-toggle .nb-last-on { display: none; }
body.pl-app.nb-hide-last .nb-last-toggle .nb-last-off { display: inline-block; }
body.pl-app.nb-hide-last .nb-last-toggle { color: #ababb3; }
/* Redo line: the status, and 看答案 as a light grey button. */
body.pl-app .nb-redo-status { color: var(--pl-muted); }
body.pl-app .nb-reveal { height: 36px; padding: 0 14px; border-radius: 10px; background: #f2f2f3; color: var(--pl-text); font-weight: 700; }
body.pl-app .nb-reveal:hover { background: #ececee; }
body.pl-app .notebook-empty-state { color: var(--pl-muted); }

/* Phones: questions as wide as in 练习模式 (12px from the screen edge, the card's own 16px inside). */
@media (max-width: 720px) {
    body.pl-app .notebook-list { margin-right: -12px; margin-left: -12px; }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-app .nb-tab-pill, body.pl-app .notebook-container { transition: none !important; animation: none !important; }
    body.pl-app .pl-card, body.pl-app .tp-check, body.pl-app .pl-card-go { transition: none !important; }
}
