/* ============================================================
   junior-accounting-plan · 初级会计备考规划
   账本借贷风（jca-）：米黄账本纸底 + 红色栏线/借贷双栏 + 算盘珠点缀
   hero 装饰为纯 CSS 账本页（repeating-linear-gradient 横线 + 红栏线 + 印章角标）
   ============================================================ */
.jca-page {
    --jca-bg: #f3ead6;
    --jca-panel: #fbf6ea;
    --jca-panel2: #f1e7cf;
    --jca-ink: #3a2f22;
    --jca-sub: #8a7a5f;
    --jca-line: #d9c9a3;
    --jca-line-strong: #c3ad7e;
    --jca-accent: #b3402f;
    --jca-accent-deep: #8e2f21;
    --jca-accent-soft: rgba(179, 64, 47, 0.12);
    --jca-accent2: #c98a2b;
    --jca-accent2-deep: #96651a;
    --jca-accent2-soft: rgba(201, 138, 43, 0.16);
    --jca-good: #3f7d4e;
    --jca-good-soft: rgba(63, 125, 78, 0.14);
    --jca-shadow: 0 6px 20px rgba(120, 90, 40, 0.14);

    color: var(--jca-ink);
    font-size: 15px;
    line-height: 1.8;
}

[data-theme="dark"] .jca-page {
    --jca-bg: #241f14;
    --jca-panel: #2c2618;
    --jca-panel2: #342d1c;
    --jca-ink: #ece2c8;
    --jca-sub: #a89878;
    --jca-line: #4a4028;
    --jca-line-strong: #635534;
    --jca-accent: #e07a63;
    --jca-accent-deep: #f0957e;
    --jca-accent-soft: rgba(224, 122, 99, 0.16);
    --jca-accent2: #e0b45c;
    --jca-accent2-deep: #f0cb85;
    --jca-accent2-soft: rgba(224, 180, 92, 0.16);
    --jca-good: #7fbf72;
    --jca-good-soft: rgba(127, 191, 114, 0.16);
    --jca-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.jca-page h1, .jca-page h2, .jca-page h3 { line-height: 1.4; }
.jca-page b, .jca-page strong { color: var(--jca-accent-deep); }

/* ---------- 首屏 ---------- */
.jca-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.6fr) minmax(240px, 0.8fr);
    gap: 22px 26px;
    align-items: center;
    padding: 30px 32px 26px;
    margin-bottom: 24px;
    border-radius: 16px;
    border: 1px solid var(--jca-line-strong);
    background:
        radial-gradient(circle at 92% 4%, var(--jca-accent2-soft) 0, transparent 34%),
        linear-gradient(180deg, var(--jca-bg) 0%, var(--jca-panel) 100%);
    box-shadow: var(--jca-shadow);
    overflow: hidden;
}
/* 账本横线底饰 + 左侧红栏线 */
.jca-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(180deg, transparent 0 33px, var(--jca-line) 33px 34px),
        linear-gradient(90deg, transparent 0 26px, var(--jca-accent) 26px 28px, transparent 28px 34px, var(--jca-accent) 34px 35px, transparent 35px);
    opacity: 0.18;
    pointer-events: none;
}
.jca-hero > * { position: relative; z-index: 1; }

.jca-kicker {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    background: var(--jca-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}
.jca-hero h1 { margin: 0 0 10px; font-size: clamp(25px, 3.2vw, 36px); font-weight: 900; }
.jca-hero-sub { margin: 0 0 14px; max-width: 56ch; color: var(--jca-sub); font-size: 15px; }
.jca-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jca-hero-chips li {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--jca-line-strong);
    background: var(--jca-panel);
    color: var(--jca-sub);
    font-size: 12px;
    font-weight: 700;
}

/* hero 装饰：纯 CSS 账本页 + 算盘珠 */
.jca-hero-book { display: grid; justify-items: center; gap: 12px; }
.jca-book {
    position: relative;
    width: 158px;
    height: 168px;
    border: 2px solid var(--jca-line-strong);
    border-radius: 6px;
    background:
        repeating-linear-gradient(180deg, transparent 0 26px, var(--jca-line) 26px 27px),
        var(--jca-panel);
    box-shadow: var(--jca-shadow);
    overflow: hidden;
}
/* 红色双栏线 */
.jca-book::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 34px;
    width: 2px;
    background: var(--jca-accent);
    box-shadow: 5px 0 0 -1px var(--jca-accent);
}
/* 页眉红双细线 */
.jca-book::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 8px;
    right: 8px;
    height: 0;
    border-top: 2px solid var(--jca-accent);
    box-shadow: 0 3px 0 -1px var(--jca-accent);
    opacity: 0.75;
}
.jca-book-row {
    position: absolute;
    left: 48px;
    font-size: 12.5px;
    font-weight: 900;
    color: var(--jca-ink);
    letter-spacing: 0.04em;
}
.jca-book-row--debit { top: 34px; color: var(--jca-accent-deep); }
.jca-book-row--credit { top: 88px; color: var(--jca-accent2-deep); }
.jca-book-seal {
    position: absolute;
    right: 8px;
    bottom: 10px;
    transform: rotate(-10deg);
    padding: 5px 8px;
    border: 2px solid var(--jca-accent);
    border-radius: 6px;
    color: var(--jca-accent);
    background: var(--jca-accent-soft);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
    letter-spacing: 0.1em;
    opacity: 0.85;
}
.jca-abacus { display: grid; gap: 4px; width: 150px; }
.jca-rod {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 15px;
    border-bottom: 2px solid var(--jca-accent2-deep);
    padding: 0 4px;
}
.jca-rod b {
    width: 15px;
    height: 11px;
    border-radius: 50%/45%;
    background: linear-gradient(180deg, var(--jca-accent2) 0%, var(--jca-accent2-deep) 100%);
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.28);
}
.jca-rod b + b { margin-left: 2px; }

/* hero 读数 */
.jca-hero-readout, .jca-result-hero {
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--jca-line-strong);
    background: var(--jca-panel);
    display: grid;
    gap: 4px;
    justify-items: start;
    box-shadow: var(--jca-shadow);
}
.jca-hero-readout { position: relative; z-index: 1; }
.jca-readout-label, .jca-rh-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--jca-sub);
}
.jca-readout-num, .jca-rh-num {
    font-size: 25px;
    font-weight: 900;
    color: var(--jca-accent-deep);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.jca-readout-meta, .jca-rh-sub { font-size: 13px; font-weight: 700; color: var(--jca-accent2-deep); }
.jca-readout-tip, .jca-rh-tip { margin-top: 4px; font-size: 12px; color: var(--jca-sub); opacity: 0.9; }

/* ---------- 测算区两栏 ---------- */
.jca-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 28px;
}
.jca-input-col { display: grid; gap: 16px; min-width: 0; }

.jca-panel {
    padding: 20px 22px;
    border: 1px solid var(--jca-line);
    border-radius: 14px;
    background: var(--jca-panel);
    box-shadow: var(--jca-shadow);
}
.jca-panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.jca-panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.jca-panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--jca-sub); }
.jca-step {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--jca-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

/* 条件自查 */
.jca-cond-bar-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.jca-cond-bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: var(--jca-panel2);
    border: 1px solid var(--jca-line);
    overflow: hidden;
}
.jca-cond-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--jca-accent2) 0%, var(--jca-accent) 100%);
    transition: width 0.3s;
}
.jca-cond-bar-wrap b { font-size: 13px; color: var(--jca-accent-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jca-cond-list { display: grid; gap: 8px; }
.jca-cond-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--jca-line);
    border-radius: 10px;
    background: var(--jca-panel2);
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.14s;
}
.jca-cond-item:hover { border-color: var(--jca-accent); }
.jca-cond-item input {
    margin: 5px 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--jca-accent);
    cursor: pointer;
}
.jca-cond-item span { color: var(--jca-sub); }
.jca-cond-item span b { color: var(--jca-ink); }
.jca-cond-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    border: 1.5px solid var(--jca-line-strong);
    background: var(--jca-panel2);
    color: var(--jca-sub);
}
.jca-cond-result.is-pass {
    border-color: var(--jca-good);
    background: var(--jca-good-soft);
    color: var(--jca-good);
}
.jca-cond-result.is-miss {
    border-color: var(--jca-accent);
    background: var(--jca-accent-soft);
    color: var(--jca-accent-deep);
}

/* 字段 */
.jca-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jca-field { display: grid; gap: 6px; margin-top: 12px; }
.jca-panel .jca-field:first-of-type { margin-top: 0; }
.jca-label { font-size: 13px; font-weight: 700; }
.jca-select-wrap { position: relative; display: block; }
.jca-select-wrap::after {
    content: "▾";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--jca-sub);
    pointer-events: none;
    font-size: 12px;
}
.jca-input {
    width: 100%;
    height: 44px;
    padding: 0 30px 0 12px;
    border: 1.5px solid var(--jca-line-strong);
    border-radius: 10px;
    background: var(--jca-panel2);
    color: var(--jca-ink);
    font-size: 14px;
    font-weight: 700;
    outline: none;
    appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.jca-input:focus { border-color: var(--jca-accent); box-shadow: 0 0 0 3px var(--jca-accent-soft); }
.jca-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--jca-sub); }

/* 滑块 + 数字 */
.jca-slider-row { display: flex; align-items: center; gap: 12px; }
.jca-range {
    flex: 1;
    min-width: 0;
    height: 6px;
    accent-color: var(--jca-accent);
    cursor: pointer;
}
.jca-input--num { width: 92px; flex-shrink: 0; padding: 0 10px; text-align: center; }
.jca-unit { font-style: normal; font-size: 12px; font-weight: 800; color: var(--jca-accent2-deep); white-space: nowrap; }

/* 口径切换 */
.jca-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1.5px solid var(--jca-line-strong);
    border-radius: 10px;
    overflow: hidden;
    height: 44px;
}
.jca-toggle-btn {
    border: none;
    background: var(--jca-panel2);
    color: var(--jca-sub);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.14s;
}
.jca-toggle-btn + .jca-toggle-btn { border-left: 1.5px solid var(--jca-line-strong); }
.jca-toggle-btn.is-active { background: var(--jca-accent); color: #fff; }

.jca-error {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--jca-accent);
    background: var(--jca-accent-soft);
    color: var(--jca-accent-deep);
    font-size: 13px;
    font-weight: 700;
}
.jca-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jca-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--jca-line-strong);
    border-radius: 10px;
    background: var(--jca-panel2);
    color: var(--jca-ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.jca-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(142, 47, 33, 0.18); }
.jca-btn--primary {
    border-color: var(--jca-accent-deep);
    background: linear-gradient(170deg, var(--jca-accent) 0%, var(--jca-accent-deep) 100%);
    color: #fff;
}

/* 结果列 */
.jca-result-col { display: grid; gap: 14px; position: sticky; top: 16px; }
.jca-verdict {
    margin-top: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 900;
    border: 1.5px solid var(--jca-line-strong);
    background: var(--jca-panel2);
    color: var(--jca-sub);
}
.jca-verdict.is-ok { border-color: var(--jca-good); background: var(--jca-good-soft); color: var(--jca-good); }
.jca-verdict.is-tight { border-color: var(--jca-accent2-deep); background: var(--jca-accent2-soft); color: var(--jca-accent2-deep); }
.jca-verdict.is-late { border-color: var(--jca-accent); background: var(--jca-accent-soft); color: var(--jca-accent-deep); }
.jca-rh-tip { color: var(--jca-sub); }

.jca-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.jca-kpi {
    padding: 12px 14px;
    border: 1px solid var(--jca-line);
    border-radius: 12px;
    background: var(--jca-panel);
    display: grid;
    gap: 2px;
}
.jca-kpi span { font-size: 12px; color: var(--jca-sub); font-weight: 700; }
.jca-kpi b { font-size: 19px; font-weight: 900; color: var(--jca-ink); line-height: 1.25; font-variant-numeric: tabular-nums; }
.jca-kpi small { font-size: 11px; color: var(--jca-sub); }

.jca-mini-card {
    padding: 16px 18px;
    border: 1px solid var(--jca-line);
    border-radius: 12px;
    background: var(--jca-panel);
}
.jca-mini-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--jca-accent-deep); }
.jca-ratio {
    margin: 0 0 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--jca-accent2-soft);
    color: var(--jca-accent2-deep);
    font-size: 13.5px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.jca-rhythm { margin: 10px 0 0; font-size: 12.5px; color: var(--jca-sub); }

.jca-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.jca-table th, .jca-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px dashed var(--jca-line);
    vertical-align: top;
}
.jca-table th { font-size: 12px; font-weight: 800; color: var(--jca-sub); letter-spacing: 0.06em; white-space: nowrap; }
.jca-table td { font-variant-numeric: tabular-nums; }
.jca-table tr:last-child td { border-bottom: none; }
.jca-empty { text-align: center; color: var(--jca-sub); padding: 14px 0 !important; }

/* 账本式口径表：左列红栏线分隔 */
.jca-table--rule td:first-child {
    position: relative;
    width: 84px;
    font-weight: 800;
    color: var(--jca-accent-deep);
    white-space: nowrap;
    padding-right: 14px;
}
.jca-table--rule td:first-child::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 6px;
    width: 2px;
    background: var(--jca-accent);
    opacity: 0.55;
}
.jca-table--rule td:last-child { color: var(--jca-sub); }

/* ---------- 通用 section ---------- */
.jca-section { margin-bottom: 28px; }
.jca-sec-head { margin-bottom: 14px; }
.jca-sec-head h2 { margin: 0 0 4px; font-size: 21px; font-weight: 900; }
.jca-sec-head p { margin: 0; font-size: 13.5px; color: var(--jca-sub); }
.jca-grid2-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* 通过率卡 */
.jca-rate-cards { display: grid; gap: 10px; }
.jca-rate {
    display: grid;
    gap: 2px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px dashed var(--jca-line-strong);
    background: var(--jca-panel2);
}
.jca-rate b { font-size: 15px; color: var(--jca-accent-deep); }
.jca-rate span { font-size: 12.5px; color: var(--jca-sub); line-height: 1.7; }

/* 阶段清单 */
.jca-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.jca-stage {
    position: relative;
    padding: 16px 16px 14px;
    border: 1px solid var(--jca-line);
    border-radius: 14px;
    background: var(--jca-panel);
    box-shadow: var(--jca-shadow);
    overflow: hidden;
    display: grid;
    gap: 6px;
    align-content: start;
}
/* 顶部红栏线 */
.jca-stage::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--jca-accent) 0 12px, var(--jca-accent2) 12px 24px);
    opacity: 0.65;
}
.jca-stage-no {
    justify-self: start;
    padding: 2px 10px;
    border-radius: 4px;
    background: var(--jca-accent-soft);
    color: var(--jca-accent-deep);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}
.jca-stage h3 { margin: 0; font-size: 15px; font-weight: 800; }
.jca-stage p { margin: 0; font-size: 12.5px; color: var(--jca-sub); line-height: 1.7; }

/* 误区 */
.jca-traps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jca-trap {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--jca-line);
    border-left: 4px solid var(--jca-accent);
    background: var(--jca-panel);
}
.jca-trap b { display: block; font-size: 14px; color: var(--jca-accent-deep); margin-bottom: 2px; }
.jca-trap p { margin: 0; font-size: 12.5px; color: var(--jca-sub); line-height: 1.7; }

/* FAQ */
.jca-faq { display: grid; gap: 10px; }
.jca-faq .faq-item {
    border: 1px solid var(--jca-line);
    border-radius: 12px;
    background: var(--jca-panel);
    overflow: hidden;
}
.jca-faq .faq-item summary {
    padding: 13px 16px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.jca-faq .faq-item summary::-webkit-details-marker { display: none; }
.jca-faq .faq-item summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--jca-accent);
    font-weight: 900;
    font-size: 16px;
}
.jca-faq .faq-item[open] summary::after { content: "−"; }
.jca-faq .faq-a { padding: 0 16px 13px; font-size: 13.5px; color: var(--jca-sub); }

/* 留言 */
.jca-comments { margin-bottom: 30px; }

/* 返回顶部 */
.jca-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--jca-line-strong);
    background: var(--jca-panel);
    color: var(--jca-accent-deep);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s;
    box-shadow: var(--jca-shadow);
    z-index: 50;
}
.jca-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.jca-top:hover { background: var(--jca-accent); color: #fff; }

/* toast */
.jca-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--jca-accent-deep);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 60;
}
.jca-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .jca-hero { grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.8fr); }
    .jca-hero-book { display: none; }
    .jca-calc { grid-template-columns: 1fr; }
    .jca-result-col { position: static; }
    .jca-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jca-grid2-panels { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .jca-hero { grid-template-columns: 1fr; padding: 24px 20px 20px; }
    .jca-panel { padding: 16px 16px; }
    .jca-grid2, .jca-traps, .jca-kpis, .jca-stages { grid-template-columns: 1fr; }
    .jca-actions { display: grid; grid-template-columns: 1fr; }
    .jca-actions .jca-btn { width: 100%; }
    .jca-sec-head h2 { font-size: 18px; }
    .jca-table { font-size: 12.5px; }
    .jca-table th, .jca-table td { padding: 8px 8px; }
    .jca-slider-row .jca-input--num { width: 80px; }
    .jca-top { right: 14px; bottom: 18px; }
}
