/* ============================================================
   mid-accounting-plan · 中级会计备考规划
   算盘财报风（mac-）：深木纹棕 + 沉稳棕金 + 算盘珠/档杆纯 CSS 装饰
   财报式双线表头；与账本风(92)区分：木纹底、算盘而非账本页
   ============================================================ */
.mac-page {
    --mac-wood: #5a3a22;
    --mac-wood-deep: #3d2715;
    --mac-gold: #c9962e;
    --mac-gold-deep: #96691a;
    --mac-gold-soft: rgba(201, 150, 46, 0.15);
    --mac-paper: #f4ecdc;
    --mac-card: #fffaef;
    --mac-card-2: #efe4cc;
    --mac-line: #dcc9a2;
    --mac-line-strong: #c2a46f;
    --mac-text: #33241a;
    --mac-muted: #87705a;
    --mac-pass: #4f7a3a;
    --mac-pass-soft: rgba(79, 122, 58, 0.14);
    --mac-fail: #a4472f;
    --mac-fail-soft: rgba(164, 71, 47, 0.12);
    --mac-shadow: 0 6px 20px rgba(61, 39, 21, 0.14);

    color: var(--mac-text);
    font-size: 15px;
    line-height: 1.75;
}

[data-theme="dark"] .mac-page {
    --mac-wood: #2a1c10;
    --mac-wood-deep: #1a1108;
    --mac-gold: #d9ae57;
    --mac-gold-deep: #ecc884;
    --mac-gold-soft: rgba(217, 174, 87, 0.16);
    --mac-paper: #221a10;
    --mac-card: #2b2114;
    --mac-card-2: #352917;
    --mac-line: #4a3a24;
    --mac-line-strong: #6d5532;
    --mac-text: #eee2c8;
    --mac-muted: #a8947a;
    --mac-pass: #8db47a;
    --mac-pass-soft: rgba(141, 180, 122, 0.16);
    --mac-fail: #d98a6f;
    --mac-fail-soft: rgba(217, 138, 111, 0.14);
    --mac-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

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

/* ---------- 首屏：深木纹 + 财报横线 ---------- */
.mac-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: 14px;
    border-radius: 16px;
    border: 1px solid var(--mac-line-strong);
    background: linear-gradient(160deg, var(--mac-wood-deep) 0%, var(--mac-wood) 58%, #6b4626 100%);
    box-shadow: var(--mac-shadow);
    overflow: hidden;
}
/* 木纹拉丝 */
.mac-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 22px),
        repeating-linear-gradient(88deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 34px);
    opacity: 0.6;
    pointer-events: none;
}
/* 财报横线底纹 */
.mac-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0 27px, rgba(243, 231, 208, 0.07) 27px 28px);
    pointer-events: none;
}
.mac-hero > * { position: relative; z-index: 1; }

.mac-kicker {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    background: var(--mac-gold);
    color: #2b1c0c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}
.mac-hero h1 { margin: 0 0 10px; font-size: clamp(25px, 3.2vw, 36px); font-weight: 900; color: #f6ecd8; }
.mac-hero-sub { margin: 0 0 14px; max-width: 56ch; color: rgba(243, 231, 208, 0.78); font-size: 15px; }
.mac-hero-sub b { color: var(--mac-gold); }
.mac-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mac-hero-chips li {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid rgba(243, 231, 208, 0.35);
    background: rgba(243, 231, 208, 0.08);
    color: rgba(243, 231, 208, 0.85);
    font-size: 12px;
    font-weight: 700;
}

/* hero 算盘装饰 */
.mac-hero-abacus { display: grid; justify-items: center; gap: 10px; }
.mac-abacus {
    position: relative;
    width: 156px;
    height: 172px;
    margin-top: 12px;
    border: 9px solid #2c1a0c;
    border-radius: 10px;
    background: linear-gradient(170deg, #7a5228 0%, #4a2f16 100%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(201, 150, 46, 0.35);
}
.mac-rod {
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.mac-rod:nth-child(1) { left: 8px; }
.mac-rod:nth-child(2) { left: 42px; }
.mac-rod:nth-child(3) { left: 76px; }
.mac-rod:nth-child(4) { left: 110px; }
.mac-rod::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, #8a6a34, #3f2817);
}
.mac-bead {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #f2d493 0%, #c9962e 48%, #6d4a1c 100%);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.25);
    transition: margin 0.3s;
}
.mac-bead--moved { margin-top: 12px; }
.mac-rod-gap { position: relative; z-index: 1; height: 16px; flex-shrink: 0; }
.mac-deck {
    position: absolute;
    left: -9px;
    right: -9px;
    top: 58px;
    height: 16px;
    z-index: 2;
    background: linear-gradient(180deg, #8a6a34 0%, #4a2f16 100%);
    border-top: 2px solid rgba(242, 212, 147, 0.4);
    border-bottom: 2px solid rgba(0, 0, 0, 0.35);
}
.mac-abacus-cap {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(243, 231, 208, 0.8);
    border-top: 1px dashed rgba(243, 231, 208, 0.35);
    padding-top: 6px;
}

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

/* 官方口径提示条 */
.mac-notice {
    margin: 0 0 22px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px dashed var(--mac-line-strong);
    background: var(--mac-gold-soft);
    color: var(--mac-text);
    font-size: 13px;
    line-height: 1.7;
}
.mac-notice b { color: var(--mac-gold-deep); }

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

.mac-panel {
    padding: 20px 22px;
    border: 1px solid var(--mac-line);
    border-radius: 14px;
    background: var(--mac-card);
    box-shadow: var(--mac-shadow);
}
.mac-panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.mac-panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.mac-panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--mac-muted); }
.mac-step {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(160deg, var(--mac-gold) 0%, var(--mac-gold-deep) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

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

/* 所需年限自动行 */
.mac-need-line {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--mac-gold);
    background: var(--mac-gold-soft);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.7;
}
.mac-need-line b { color: var(--mac-gold-deep); }

/* 三科卡 */
.mac-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mac-subject {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--mac-line);
    border-left: 3px solid var(--mac-gold);
    border-radius: 10px;
    background: var(--mac-card-2);
    min-width: 0;
}
.mac-subject-name { font-size: 13.5px; font-weight: 800; }
.mac-stars { font-size: 11.5px; font-weight: 700; color: var(--mac-gold-deep); }
.mac-subject b { font-size: 20px; font-weight: 900; color: var(--mac-text); font-variant-numeric: tabular-nums; }
.mac-subject small { font-size: 11.5px; color: var(--mac-muted); line-height: 1.6; }

/* 学习顺序流 */
.mac-order { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.mac-order-chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--mac-wood);
    color: #f3e7d0;
    font-size: 13px;
    font-weight: 800;
}
.mac-order-arrow { color: var(--mac-gold-deep); font-size: 16px; font-weight: 900; }

/* 错误与操作 */
.mac-error {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--mac-fail);
    background: var(--mac-fail-soft);
    color: var(--mac-fail);
    font-size: 13px;
    line-height: 1.7;
}
.mac-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--mac-line-strong);
    border-radius: 10px;
    background: var(--mac-card-2);
    color: var(--mac-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.mac-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(61, 39, 21, 0.2); }
.mac-btn--primary {
    border-color: var(--mac-gold-deep);
    background: linear-gradient(170deg, var(--mac-gold) 0%, var(--mac-gold-deep) 100%);
    color: #fff;
}
.mac-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* 结果列 */
.mac-result-col { display: grid; gap: 14px; position: sticky; top: 16px; }

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

.mac-mini-card {
    padding: 16px 18px;
    border: 1px solid var(--mac-line);
    border-radius: 12px;
    background: var(--mac-card);
}
.mac-mini-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--mac-gold-deep); }
.mac-period { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--mac-text); line-height: 1.7; }

/* 财报式表格：双线表头 + 虚线行线 */
.mac-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mac-table th, .mac-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px dashed var(--mac-line);
    vertical-align: top;
}
.mac-table thead th {
    border-top: 3px double var(--mac-line-strong);
    border-bottom: 2px solid var(--mac-line-strong);
    font-size: 12px;
    font-weight: 800;
    color: var(--mac-muted);
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.mac-table td { font-variant-numeric: tabular-nums; line-height: 1.7; }
.mac-table tbody tr:last-child td { border-bottom: 2px solid var(--mac-line-strong); }
.mac-table--wide th, .mac-table--wide td { padding: 10px 12px; }
.mac-table-note { margin: 10px 0 0; font-size: 12px; color: var(--mac-muted); }

/* ---------- 通用 section ---------- */
.mac-section { margin-bottom: 28px; }
.mac-sec-head { margin-bottom: 14px; }
.mac-sec-head h2 { margin: 0 0 4px; font-size: 21px; font-weight: 900; }
.mac-sec-head p { margin: 0; font-size: 13.5px; color: var(--mac-muted); }
.mac-sec-head b { color: var(--mac-gold-deep); }

/* 两年过三科 */
.mac-plan-rec {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--mac-line-strong);
    background: var(--mac-gold-soft);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
}
.mac-plan-rec b { color: var(--mac-gold-deep); }
.mac-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mac-plan {
    position: relative;
    padding: 20px 18px 16px;
    border: 1.5px solid var(--mac-line-strong);
    border-radius: 14px;
    background: var(--mac-card);
    box-shadow: var(--mac-shadow);
    display: grid;
    gap: 8px;
    align-content: start;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mac-plan::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--mac-gold) 0 14px, var(--mac-wood) 14px 28px);
    opacity: 0.65;
}
.mac-plan.is-rec {
    border-color: var(--mac-gold);
    box-shadow: 0 0 0 2px var(--mac-gold-soft), var(--mac-shadow);
}
.mac-plan.is-rec::after {
    content: "推荐";
    position: absolute;
    top: 14px;
    right: -30px;
    transform: rotate(45deg);
    padding: 4px 34px;
    background: var(--mac-gold);
    color: #2b1c0c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2em;
}
.mac-plan-tag {
    justify-self: start;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--mac-wood);
    color: #f3e7d0;
    font-size: 12px;
    font-weight: 800;
}
.mac-plan h3 { margin: 0; font-size: 15.5px; font-weight: 800; padding-right: 34px; }
.mac-plan-sub { margin: 0; font-size: 12.5px; font-weight: 800; color: var(--mac-gold-deep); }
.mac-plan-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.mac-plan-list li {
    position: relative;
    padding-left: 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mac-muted);
    line-height: 1.7;
}
.mac-plan-list li::before { content: "·"; position: absolute; left: 2px; font-weight: 900; color: var(--mac-gold); }
.mac-plan-list li b { color: var(--mac-gold-deep); }
.mac-plan-foot {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px dashed var(--mac-line-strong);
    font-size: 12px;
    color: var(--mac-muted);
    line-height: 1.7;
}

/* 初级衔接 */
.mac-bridge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.mac-bridge-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mac-bridge-list li {
    padding: 10px 14px;
    border: 1px solid var(--mac-line);
    border-left: 3px solid var(--mac-gold);
    border-radius: 10px;
    background: var(--mac-card-2);
    font-size: 13px;
    color: var(--mac-muted);
    line-height: 1.75;
}
.mac-bridge-list li b { color: var(--mac-text); }

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

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

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

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

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

@media (max-width: 720px) {
    .mac-hero { grid-template-columns: 1fr; padding: 24px 20px 20px; }
    .mac-panel { padding: 16px 16px; }
    .mac-grid2, .mac-subjects, .mac-plans, .mac-bridge-grid, .mac-kpis { grid-template-columns: 1fr; }
    .mac-actions { display: grid; grid-template-columns: 1fr; }
    .mac-actions .mac-btn { width: 100%; }
    .mac-sec-head h2 { font-size: 18px; }
    .mac-table--wide { font-size: 12.5px; }
    .mac-table--wide th, .mac-table--wide td { padding: 8px 8px; }
    .mac-top { right: 14px; bottom: 18px; }
}
