/* ============================================================
   产检费用与医保报销计算器 · prenatal-checkup-cost-calc
   主题：紫藤紫 + 蜜黄 + 雾白（孕期时间轴）
   深色模式由导航 theme-toggle 控制（:root[data-theme="dark"]）
   ============================================================ */

.pcc-page {
    --pcc-wist: #7b68a8;           /* 主色 · 紫藤紫 */
    --pcc-wist-deep: #5d4a8a;
    --pcc-wist-soft: #efeaf8;
    --pcc-honey: #d9a441;          /* 辅色 · 蜜黄 */
    --pcc-honey-deep: #b3821f;
    --pcc-honey-soft: #faf1dc;
    --pcc-mist: #f7f5fb;           /* 页面底 · 雾白 */
    --pcc-card: #ffffff;
    --pcc-ink: #322b45;
    --pcc-ink-2: #726b85;
    --pcc-line: #e3ddef;
    --pcc-field: #fcfbfe;
    --pcc-danger: #b4522e;
    --pcc-shadow: 0 10px 30px rgba(80, 60, 130, 0.09);
    --pcc-radius: 18px;

    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 0 60px;
    color: var(--pcc-ink);
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.7;
}
.pcc-page *,
.pcc-page *::before,
.pcc-page *::after { box-sizing: border-box; }

:root[data-theme="dark"] .pcc-page {
    --pcc-wist: #9d8bc9;
    --pcc-wist-deep: #7f6bb0;
    --pcc-wist-soft: #322a45;
    --pcc-honey: #e5b45c;
    --pcc-honey-deep: #c9982f;
    --pcc-honey-soft: #38301d;
    --pcc-mist: #1d1926;
    --pcc-card: #282132;
    --pcc-ink: #efeaf8;
    --pcc-ink-2: #a89fc0;
    --pcc-line: #3f3654;
    --pcc-field: #2f2740;
    --pcc-danger: #e0764f;
    --pcc-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ============ 首屏 ============ */
.pcc-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 26px;
    align-items: stretch;
    background:
        radial-gradient(120% 140% at 90% 0%, var(--pcc-wist-soft) 0%, transparent 55%),
        radial-gradient(90% 110% at 2% 100%, var(--pcc-honey-soft) 0%, transparent 42%),
        var(--pcc-card);
    border: 1px solid var(--pcc-line);
    border-radius: calc(var(--pcc-radius) + 6px);
    box-shadow: var(--pcc-shadow);
    padding: 40px 42px 48px;
    overflow: hidden;
}
.pcc-rail {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 18px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--pcc-wist-soft), var(--pcc-wist) 55%, var(--pcc-honey));
    opacity: 0.5;
}
.pcc-dot {
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--pcc-wist);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px var(--pcc-card);
}
.pcc-dot:nth-child(5) { background: var(--pcc-honey); }
.pcc-dot:nth-child(6) { background: var(--pcc-honey); }
.pcc-kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--pcc-wist-deep);
    background: var(--pcc-wist-soft);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 14px;
}
.pcc-hero-copy h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.25;
    color: var(--pcc-ink);
}
.pcc-hero-sub {
    margin: 0 0 18px;
    font-size: 16px;
    color: var(--pcc-ink-2);
    max-width: 40em;
}
.pcc-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pcc-hero-chips li {
    font-size: 13px;
    color: var(--pcc-wist-deep);
    background: var(--pcc-wist-soft);
    border-radius: 999px;
    padding: 4px 12px;
}

.pcc-hero-readout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(160deg, var(--pcc-wist) -14%, var(--pcc-wist-deep) 118%);
    color: #fff;
    border-radius: var(--pcc-radius);
    padding: 24px 26px;
    position: relative;
    z-index: 1;
}
.pcc-readout-label { font-size: 13px; opacity: 0.92; letter-spacing: 0.08em; }
.pcc-readout-num {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.pcc-readout-sub { font-size: 14px; opacity: 0.95; }
.pcc-readout-meta { font-size: 12px; opacity: 0.8; }
.pcc-readout-tip {
    font-size: 12px;
    opacity: 0.72;
    border-top: 1px dashed rgba(255, 255, 255, 0.4);
    padding-top: 8px;
    margin-top: 6px;
}

/* ============ 布局 ============ */
.pcc-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 22px;
    margin-top: 22px;
    align-items: start;
}
.pcc-input-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pcc-result-col { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

.pcc-panel {
    background: var(--pcc-card);
    border: 1px solid var(--pcc-line);
    border-radius: var(--pcc-radius);
    box-shadow: var(--pcc-shadow);
    padding: 24px 26px;
}
.pcc-panel-head { display: flex; gap: 14px; margin-bottom: 16px; }
.pcc-step {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(150deg, var(--pcc-wist), var(--pcc-wist-deep));
}
.pcc-panel-head h2 { margin: 0; font-size: 18px; }
.pcc-panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--pcc-ink-2); }

.pcc-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--pcc-mist);
    border: 1px solid var(--pcc-line);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 16px;
}
.pcc-seg-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--pcc-ink-2);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    padding: 10px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.pcc-seg-btn:hover { color: var(--pcc-ink); }
.pcc-seg-btn.is-on {
    background: var(--pcc-card);
    color: var(--pcc-wist-deep);
    box-shadow: 0 3px 10px rgba(80, 60, 130, 0.16);
}

.pcc-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.pcc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcc-label { font-size: 13px; font-weight: 700; }
.pcc-hint { font-size: 12px; color: var(--pcc-ink-2); }
.pcc-select-wrap { position: relative; display: block; }
.pcc-select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--pcc-ink-2);
    border-bottom: 2px solid var(--pcc-ink-2);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.pcc-input-wrap { position: relative; display: block; }
.pcc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--pcc-ink-2);
    pointer-events: none;
}
.pcc-input {
    width: 100%;
    appearance: none;
    border: 1.5px solid var(--pcc-line);
    background: var(--pcc-field);
    color: var(--pcc-ink);
    font-size: 15px;
    font-weight: 600;
    border-radius: 11px;
    padding: 10px 12px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pcc-input:focus { outline: none; border-color: var(--pcc-wist); box-shadow: 0 0 0 3px rgba(123, 104, 168, 0.16); }
.pcc-input.is-invalid { border-color: var(--pcc-danger); box-shadow: 0 0 0 3px rgba(180, 82, 46, 0.12); }
select.pcc-input { padding-right: 34px; }
input.pcc-input { padding-right: 44px; }

/* ---------- 孕周阶段项目清单 ---------- */
.pcc-items { display: flex; flex-direction: column; gap: 14px; }
.pcc-stage { border: 1px solid var(--pcc-line); border-radius: 14px; overflow: hidden; }
.pcc-stage-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    background: var(--pcc-wist-soft);
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--pcc-wist-deep);
}
.pcc-stage-head .pcc-weeks {
    font-size: 12px;
    font-weight: 700;
    color: var(--pcc-honey-deep);
    background: var(--pcc-honey-soft);
    border-radius: 999px;
    padding: 2px 10px;
}
.pcc-stage-body { display: flex; flex-direction: column; }
.pcc-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid var(--pcc-line);
    cursor: pointer;
    transition: background 0.14s;
}
.pcc-item:first-child { border-top: 0; }
.pcc-item:hover { background: var(--pcc-mist); }
.pcc-item input { position: absolute; opacity: 0; pointer-events: none; }
.pcc-item-mark {
    width: 19px;
    height: 19px;
    border: 2px solid var(--pcc-line);
    border-radius: 6px;
    position: relative;
    background: var(--pcc-card);
    transition: background 0.15s, border-color 0.15s;
}
.pcc-item input:checked ~ .pcc-item-mark { background: var(--pcc-wist); border-color: var(--pcc-wist); }
.pcc-item input:checked ~ .pcc-item-mark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border-right: 2.2px solid #fff;
    border-bottom: 2.2px solid #fff;
    transform: rotate(42deg);
}
.pcc-item-name { font-size: 14px; font-weight: 600; min-width: 0; }
.pcc-item-name small { display: block; font-size: 12px; font-weight: 400; color: var(--pcc-ink-2); }
.pcc-item-tag {
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}
.pcc-item-tag.is-out { color: var(--pcc-honey-deep); background: var(--pcc-honey-soft); }
.pcc-item-tag.is-in { color: var(--pcc-wist-deep); background: var(--pcc-wist-soft); }
.pcc-item-price { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pcc-ink-2); white-space: nowrap; }
.pcc-item-price input {
    width: 78px;
    border: 1.5px solid var(--pcc-line);
    background: var(--pcc-card);
    color: var(--pcc-ink);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}
.pcc-item-price input:focus { outline: none; border-color: var(--pcc-wist); }
.pcc-item-times { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pcc-ink-2); }
.pcc-item-times input {
    width: 52px;
    border: 1.5px solid var(--pcc-line);
    background: var(--pcc-card);
    color: var(--pcc-ink);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.pcc-item-times input:focus { outline: none; border-color: var(--pcc-wist); }

.pcc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pcc-btn {
    appearance: none;
    border: 1.5px solid var(--pcc-line);
    background: var(--pcc-field);
    color: var(--pcc-ink);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 12px;
    padding: 11px 22px;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.15s, color 0.15s;
}
.pcc-btn:hover { border-color: var(--pcc-wist); color: var(--pcc-wist-deep); }
.pcc-btn:active { transform: translateY(1px); }
.pcc-btn-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(150deg, var(--pcc-wist), var(--pcc-wist-deep));
    box-shadow: 0 6px 16px rgba(93, 74, 138, 0.32);
}
.pcc-btn-primary:hover { color: #fff; }

/* ============ 账单 ============ */
.pcc-bill {
    background: var(--pcc-card);
    border: 1.5px solid var(--pcc-line);
    border-top: 5px solid var(--pcc-wist);
    border-radius: var(--pcc-radius);
    box-shadow: var(--pcc-shadow);
    padding: 22px 24px;
}
.pcc-bill-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pcc-bill-title { font-size: 16px; font-weight: 800; }
.pcc-bill-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--pcc-wist-deep);
    background: var(--pcc-wist-soft);
    border-radius: 999px;
    padding: 3px 10px;
}
.pcc-net { text-align: center; padding: 12px 0 14px; border-bottom: 1px dashed var(--pcc-line); margin-bottom: 12px; }
.pcc-net-label { display: block; font-size: 13px; color: var(--pcc-ink-2); }
.pcc-net-num {
    display: block;
    font-size: 40px;
    font-weight: 800;
    color: var(--pcc-wist-deep);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.pcc-net-note { font-size: 12px; color: var(--pcc-ink-2); }
.pcc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pcc-split-item {
    border: 1px solid var(--pcc-line);
    background: var(--pcc-mist);
    border-radius: 11px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12.5px;
    color: var(--pcc-ink-2);
}
.pcc-split-item b { font-size: 16px; color: var(--pcc-ink); font-variant-numeric: tabular-nums; }
.pcc-split-item-out { background: var(--pcc-honey-soft); border-color: transparent; }
.pcc-split-item-out b { color: var(--pcc-honey-deep); }
.pcc-bill-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.pcc-bill-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.pcc-bill-list .pcc-li-name { min-width: 0; }
.pcc-bill-list .pcc-li-sub { display: block; font-size: 11.5px; color: var(--pcc-ink-2); }
.pcc-bill-list .pcc-li-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcc-bill-list .pcc-li-num.is-out { color: var(--pcc-honey-deep); }
.pcc-bill-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    font-weight: 800;
    border-top: 1.5px solid var(--pcc-line);
    padding-top: 10px;
}
.pcc-bill-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pcc-bill-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pcc-bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--pcc-ink-2);
    background: var(--pcc-mist);
    border-radius: 9px;
    padding: 8px 12px;
}
.pcc-bill-row b { font-variant-numeric: tabular-nums; color: var(--pcc-ink); }
.pcc-bill-row-strong { background: var(--pcc-wist-soft); }
.pcc-bill-row-strong b { color: var(--pcc-wist-deep); font-size: 16px; }
.pcc-bill-warn {
    margin-top: 12px;
    font-size: 13px;
    color: var(--pcc-danger);
    background: rgba(180, 82, 46, 0.08);
    border: 1px dashed var(--pcc-danger);
    border-radius: 10px;
    padding: 9px 12px;
}
.pcc-bill-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pcc-mini {
    appearance: none;
    border: 1.5px solid var(--pcc-line);
    background: var(--pcc-field);
    color: var(--pcc-ink);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 9px;
    padding: 7px 13px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.pcc-mini:hover { border-color: var(--pcc-wist); color: var(--pcc-wist-deep); }
.pcc-mini.is-ok { border-color: var(--pcc-wist); color: var(--pcc-wist-deep); background: var(--pcc-wist-soft); }

/* ============ 对比 ============ */
.pcc-compare {
    background: var(--pcc-card);
    border: 1px solid var(--pcc-line);
    border-radius: var(--pcc-radius);
    box-shadow: var(--pcc-shadow);
    padding: 20px 22px;
}
.pcc-compare-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pcc-compare-head h3 { margin: 0; font-size: 16px; }
.pcc-compare-table-wrap { overflow-x: auto; }
.pcc-compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pcc-compare-table th,
.pcc-compare-table td {
    border-bottom: 1px solid var(--pcc-line);
    padding: 8px 10px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pcc-compare-table th:first-child,
.pcc-compare-table td:first-child { text-align: left; }
.pcc-compare-table thead th { font-size: 12.5px; color: var(--pcc-ink-2); font-weight: 700; border-bottom-width: 2px; }
.pcc-compare-table td.is-hot { color: var(--pcc-wist-deep); font-weight: 800; }
.pcc-compare-note { margin: 10px 0 0; font-size: 12px; color: var(--pcc-ink-2); }

/* ============ 图文说明 ============ */
.pcc-guide { margin-top: 30px; }
.pcc-guide h2 { font-size: 22px; margin: 0 0 16px; }
.pcc-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pcc-guide-card {
    background: var(--pcc-card);
    border: 1px solid var(--pcc-line);
    border-radius: var(--pcc-radius);
    padding: 18px 20px;
}
.pcc-guide-card h3 { margin: 0 0 8px; font-size: 15.5px; }
.pcc-guide-card h3 b { color: var(--pcc-wist-deep); }
.pcc-guide-card p { margin: 0; font-size: 14px; color: var(--pcc-ink-2); }
.pcc-guide-card p b { color: var(--pcc-ink); }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .pcc-hero { grid-template-columns: 1fr; padding: 28px 24px 40px; }
    .pcc-calc { grid-template-columns: 1fr; }
    .pcc-result-col { position: static; }
    .pcc-hero-copy h1 { font-size: 28px; }
    .pcc-seg { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .pcc-page { padding-top: 14px; }
    .pcc-grid2 { grid-template-columns: 1fr; }
    .pcc-guide-grid { grid-template-columns: 1fr; }
    .pcc-panel { padding: 18px 16px; }
    .pcc-net-num { font-size: 34px; }
    .pcc-item { grid-template-columns: 22px minmax(0, 1fr); grid-auto-flow: row; }
    .pcc-item-price { grid-column: 2; }
    .pcc-item-times { grid-column: 2; }
}

/* ============ A4 打印 ============ */
@media print {
    .pcc-page { padding: 0; color: #222; }
    .pcc-rail,
    .pcc-hero-chips,
    .pcc-calc .pcc-input-col,
    .pcc-actions,
    .pcc-bill-tools,
    .pcc-compare,
    .pcc-guide,
    .detail-breadcrumb { display: none !important; }
    .pcc-hero,
    .pcc-panel,
    .pcc-bill {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: #fff !important;
        break-inside: avoid;
    }
    .pcc-hero { grid-template-columns: 1fr; }
    .pcc-readout-num,
    .pcc-readout-label,
    .pcc-readout-sub,
    .pcc-net-num,
    .pcc-bill-row-strong b,
    .pcc-bill-total b { color: #111 !important; }
}
