/* ==========================================================================
   油烟机安装费计算器 /tool/range-hood-install-fee-calc
   独立设计「烟道工程图纸」：炭黑 + 炉火橙，图纸网格首屏、切角卡片、
   验收单式收费明细；数字全部等宽，层级靠分割线与色块区分
   深浅主题由导航栏主题按钮（data-theme）驱动
   ========================================================================== */

.rhi-page {
    --rhi-ink: #22292f;
    --rhi-ink-d: #14191d;
    --rhi-steel: #5d6b7a;
    --rhi-steel-d: #46525e;
    --rhi-steel-l: #ebf0f4;
    --rhi-steel-line: rgba(93, 107, 122, 0.3);
    --rhi-ember: #e2571f;
    --rhi-ember-d: #c2440f;
    --rhi-ember-l: #fdece2;
    --rhi-ember-line: rgba(226, 87, 31, 0.3);
    --rhi-green: #2e7d4f;
    --rhi-green-l: #e6f4ec;
    --rhi-red: #c44536;
    --rhi-red-l: #fbeae7;
    --rhi-bg: #f4f3f1;
    --rhi-card: #ffffff;
    --rhi-card-2: #f7f6f4;
    --rhi-sub: #4c5761;
    --rhi-mute: #8b959e;
    --rhi-line: #dddad4;
    --rhi-line-2: #e9e7e2;
    --rhi-r: 8px;
    --rhi-r-md: 6px;
    --rhi-r-sm: 4px;
    --rhi-shadow: 0 3px 12px rgba(34, 41, 47, 0.08);
    --rhi-shadow-lg: 0 16px 34px rgba(20, 25, 29, 0.2);
    --rhi-ring: 0 0 0 3px rgba(226, 87, 31, 0.2);
    --rhi-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --rhi-num: "DIN Alternate", "Bahnschrift", ui-monospace, "SFMono-Regular", Consolas, monospace;
    padding-bottom: 10px;
    color: var(--rhi-ink);
    font-family: var(--rhi-font);
    line-height: 1.7;
}

[data-theme="dark"] .rhi-page {
    --rhi-ink: #e9ecef;
    --rhi-ink-d: #f6f8f9;
    --rhi-steel: #9fb0c0;
    --rhi-steel-d: #c3d0dc;
    --rhi-steel-l: rgba(159, 176, 192, 0.13);
    --rhi-steel-line: rgba(159, 176, 192, 0.32);
    --rhi-ember: #f27a45;
    --rhi-ember-d: #f79a6e;
    --rhi-ember-l: rgba(242, 122, 69, 0.14);
    --rhi-ember-line: rgba(242, 122, 69, 0.34);
    --rhi-green: #5cc08c;
    --rhi-green-l: rgba(92, 192, 140, 0.13);
    --rhi-red: #ef8b7e;
    --rhi-red-l: rgba(239, 139, 126, 0.13);
    --rhi-bg: #121417;
    --rhi-card: #1a1e23;
    --rhi-card-2: #20252b;
    --rhi-sub: #aab5bf;
    --rhi-mute: #75808a;
    --rhi-line: #2b323a;
    --rhi-line-2: #23282e;
    --rhi-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    --rhi-shadow-lg: 0 18px 38px rgba(0, 0, 0, 0.58);
    --rhi-ring: 0 0 0 3px rgba(242, 122, 69, 0.26);
}

.rhi-page *,
.rhi-page *::before,
.rhi-page *::after { box-sizing: border-box; }
.rhi-page [hidden] { display: none !important; }
.rhi-page h1, .rhi-page h2, .rhi-page h3, .rhi-page h4 { font-family: var(--rhi-font); }
.rhi-page a { color: var(--rhi-ember-d); text-decoration: none; }
.rhi-page a:hover { color: var(--rhi-ember); }

/* ============================ 面包屑 ============================ */
.rhi-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--rhi-mute);
}
.rhi-crumb a { color: var(--rhi-sub); }
.rhi-crumb a:hover { color: var(--rhi-ember); }
.rhi-crumb .sep { opacity: 0.45; }
.rhi-crumb .cur { color: var(--rhi-ink); font-weight: 700; }

/* ============================ 首屏 ============================ */
.rhi-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: center;
    padding: 30px 32px;
    margin-bottom: 20px;
    border-radius: var(--rhi-r);
    overflow: hidden;
    color: #f1f4f6;
    background: linear-gradient(118deg, #171b1f 0%, #242b31 62%, #2c343b 100%);
    box-shadow: var(--rhi-shadow-lg);
}
.rhi-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
    mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.08));
    -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.08));
    pointer-events: none;
}
.rhi-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 40%, rgba(226, 87, 31, 0.4), rgba(226, 87, 31, 0) 62%);
    pointer-events: none;
}
.rhi-hero > * { position: relative; z-index: 1; }

.rhi-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 11px;
    border: 1px solid rgba(242, 122, 69, 0.55);
    border-radius: var(--rhi-r-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #ffb48d;
    background: rgba(226, 87, 31, 0.14);
}
.rhi-hero h1 {
    margin: 14px 0 0;
    font-size: 27px;
    line-height: 1.36;
    letter-spacing: 0.01em;
}
.rhi-hero h1 b { color: #ff9c5f; }
.rhi-lead {
    margin: 13px 0 0;
    max-width: 560px;
    font-size: 13.5px;
    line-height: 1.95;
    color: rgba(241, 244, 246, 0.86);
}
.rhi-lead b { color: #fff; font-weight: 700; }
.rhi-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.rhi-points li {
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--rhi-r-sm);
    font-size: 12px;
    background: rgba(255, 255, 255, 0.07);
}
.rhi-points b { font-family: var(--rhi-num); font-size: 13px; color: #ff9c5f; }

/* ---------- 首屏速算面板 ---------- */
.rhi-quick {
    padding: 18px 18px 14px;
    border-radius: var(--rhi-r);
    background: rgba(251, 250, 248, 0.97);
    box-shadow: 0 14px 34px rgba(6, 9, 12, 0.4);
    color: var(--rhi-ink);
}
[data-theme="dark"] .rhi-quick { background: rgba(22, 26, 30, 0.97); }
.rhi-quick-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rhi-ink);
}
.rhi-quick-head b { font-size: 15px; }
.rhi-quick-head span { font-size: 11.5px; color: var(--rhi-mute); }
.rhi-quick-row { margin-bottom: 11px; }
.rhi-quick-row > label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rhi-sub);
    text-transform: none;
    letter-spacing: 0.02em;
}
.rhi-quick-row > label::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    background: var(--rhi-ember);
    vertical-align: 1px;
}

/* ---------- 分段选择 ---------- */
.rhi-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    overflow: hidden;
    background: var(--rhi-card);
}
.rhi-seg button {
    padding: 5px 13px;
    border: 0;
    border-right: 1px solid var(--rhi-line);
    background: transparent;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rhi-sub);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.rhi-seg button:last-child { border-right: 0; }
.rhi-seg button:hover { color: var(--rhi-ink); background: var(--rhi-steel-l); }
.rhi-seg button.on {
    background: var(--rhi-ink);
    color: #fff;
}
[data-theme="dark"] .rhi-seg button.on { background: var(--rhi-ember); color: #1a0d05; }
.rhi-seg button:focus-visible { outline: none; box-shadow: inset var(--rhi-ring); }

/* ---------- 输入 ---------- */
.rhi-unit-wrap { position: relative; display: inline-flex; align-items: center; }
.rhi-input {
    width: 108px;
    padding: 8px 40px 8px 13px;
    border: 1.5px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--rhi-num);
    color: var(--rhi-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rhi-input:focus { outline: none; border-color: var(--rhi-ember); box-shadow: var(--rhi-ring); }
.rhi-input.is-bad { border-color: var(--rhi-red); box-shadow: 0 0 0 3px rgba(196, 69, 54, 0.16); }
.rhi-unit {
    position: absolute;
    right: 11px;
    font-size: 12px;
    color: var(--rhi-mute);
    pointer-events: none;
}
.rhi-textarea {
    width: 100%;
    min-height: 64px;
    padding: 9px 12px;
    border: 1.5px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    font: inherit;
    font-size: 13px;
    color: var(--rhi-ink);
    resize: vertical;
}
.rhi-textarea:focus { outline: none; border-color: var(--rhi-ember); box-shadow: var(--rhi-ring); }
.rhi-counter { margin: 4px 2px 0; font-size: 11px; color: var(--rhi-mute); text-align: right; }

/* ---------- 开关 ---------- */
.rhi-switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.rhi-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rhi-switch i {
    position: absolute;
    inset: 0;
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-line);
    transition: background 0.18s;
    pointer-events: none;
}
.rhi-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s;
}
.rhi-switch input:checked + i { background: var(--rhi-ember); }
.rhi-switch input:checked + i::after { transform: translateX(18px); }
.rhi-switch input:focus-visible + i { box-shadow: var(--rhi-ring); }

/* ---------- 首屏 CTA 与实时合计 ---------- */
.rhi-quick-cta {
    width: 100%;
    margin-top: 4px;
    padding: 11px 0;
    border: 0;
    border-radius: var(--rhi-r-sm);
    background: linear-gradient(118deg, var(--rhi-ember), #f4762f);
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(226, 87, 31, 0.4);
    transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.rhi-quick-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.rhi-quick-cta:active { transform: translateY(0); }
.rhi-quick-cta:focus-visible { outline: none; box-shadow: var(--rhi-ring); }
.rhi-quick-live {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed var(--rhi-line);
}
.rhi-quick-live span { font-size: 12px; color: var(--rhi-sub); }
.rhi-quick-live b {
    font-family: var(--rhi-num);
    font-size: 24px;
    color: var(--rhi-ember-d);
    letter-spacing: 0.01em;
}

.rhi-hint { margin: 5px 2px 0; font-size: 11.5px; line-height: 1.7; color: var(--rhi-mute); }
.rhi-hint b { color: var(--rhi-ember-d); }

/* ---------- 错误提示 ---------- */
.rhi-err {
    display: none;
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: var(--rhi-r-sm);
    border-left: 3px solid var(--rhi-red);
    background: var(--rhi-red-l);
    font-size: 12.5px;
    color: var(--rhi-red);
}
.rhi-err.is-on { display: block; }
.rhi-row-err { font-size: 11.5px; color: var(--rhi-red); }

/* ============================ KPI 仪表横带 ============================ */
.rhi-kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
    border: 1px solid var(--rhi-line);
    border-top: 3px solid var(--rhi-ink);
    border-radius: var(--rhi-r);
    overflow: hidden;
    background: var(--rhi-card);
    box-shadow: var(--rhi-shadow);
}
.rhi-kpi-item {
    position: relative;
    padding: 15px 20px 13px 22px;
    border-left: 1px solid var(--rhi-line-2);
}
.rhi-kpi-item:first-child { border-left: 0; }
.rhi-kpi-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    background: var(--rhi-ink);
}
.rhi-kpi-item.is-steel::before { background: var(--rhi-steel); }
.rhi-kpi-item.is-ember::before { background: var(--rhi-ember); }
.rhi-kpi-item.is-green::before { background: var(--rhi-green); }
.rhi-kpi-item span { display: block; font-size: 11.5px; color: var(--rhi-mute); }
.rhi-kpi-item b {
    display: block;
    margin-top: 3px;
    font-family: var(--rhi-num);
    font-size: 22px;
    line-height: 1.25;
    color: var(--rhi-ink);
}
.rhi-kpi-item em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: 11px;
    color: var(--rhi-mute);
}

/* ============================ 主体布局 ============================ */
.rhi-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 352px;
    gap: 20px;
    align-items: start;
}
.rhi-sticky { position: sticky; top: 72px; }

/* ---------- 卡片（切角标头） ---------- */
.rhi-card {
    border: 1px solid var(--rhi-line);
    border-radius: var(--rhi-r);
    background: var(--rhi-card);
    box-shadow: var(--rhi-shadow);
    overflow: hidden;
}
.rhi-card-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--rhi-line);
    background:
        linear-gradient(135deg, transparent 10px, var(--rhi-ink) 10px) no-repeat left top / 22px 22px,
        linear-gradient(225deg, transparent 10px, var(--rhi-ink) 10px) no-repeat right top / 22px 22px,
        var(--rhi-card-2);
}
[data-theme="dark"] .rhi-card-head {
    background:
        linear-gradient(135deg, transparent 10px, var(--rhi-ember) 10px) no-repeat left top / 22px 22px,
        linear-gradient(225deg, transparent 10px, var(--rhi-ember) 10px) no-repeat right top / 22px 22px,
        var(--rhi-card-2);
}
.rhi-card-head .no {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
    background: var(--rhi-ember);
    font-family: var(--rhi-num);
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
}
.rhi-card-head h2 {
    margin: 0;
    font-size: 15.5px;
    letter-spacing: 0.01em;
}
.rhi-card-head .tip {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--rhi-mute);
}
.rhi-card-body { padding: 17px 20px 19px; }

/* ---------- 表单字段 ---------- */
.rhi-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 18px;
}
.rhi-field.is-full { grid-column: 1 / -1; }
.rhi-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.rhi-label small {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--rhi-mute);
}

/* ---------- 按钮 ---------- */
.rhi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px dashed var(--rhi-line);
}
.rhi-btn {
    padding: 8px 15px;
    border: 1.5px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rhi-sub);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.12s;
}
.rhi-btn:hover { border-color: var(--rhi-ink); color: var(--rhi-ink); }
.rhi-btn:focus-visible { outline: none; box-shadow: var(--rhi-ring); }
.rhi-btn:active { transform: scale(0.98); }
.rhi-btn.is-primary {
    border-color: transparent;
    background: var(--rhi-ink);
    color: #fff;
}
[data-theme="dark"] .rhi-btn.is-primary { background: var(--rhi-ember); color: #1a0d05; }
.rhi-btn.is-primary:hover { background: var(--rhi-ember); color: #fff; }
.rhi-btn.is-ember {
    border-color: transparent;
    background: var(--rhi-ember-l);
    color: var(--rhi-ember-d);
}
.rhi-btn.is-ember:hover { background: var(--rhi-ember); color: #fff; }

/* ============================ 收费项目清单 ============================ */
.rhi-items { display: grid; gap: 11px; }
.rhi-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid var(--rhi-line-2);
    border-left: 3px solid var(--rhi-steel-line);
    border-radius: var(--rhi-r-md);
    background: var(--rhi-card-2);
    transition: opacity 0.15s, border-color 0.15s;
}
.rhi-item.is-material { border-left-color: var(--rhi-steel); }
.rhi-item.is-extra { border-left-color: var(--rhi-ember); }
.rhi-item.is-off { opacity: 0.55; }
.rhi-item.is-off .rhi-item-name { text-decoration: line-through; text-decoration-color: var(--rhi-mute); }
.rhi-item-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-top: 2px;
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-steel-l);
    color: var(--rhi-steel-d);
}
.rhi-item.is-material .rhi-item-ico { background: var(--rhi-steel-l); color: var(--rhi-steel-d); }
.rhi-item.is-extra .rhi-item-ico { background: var(--rhi-ember-l); color: var(--rhi-ember); }
.rhi-item-ico svg { width: 21px; height: 21px; }
.rhi-item-name { font-size: 13.5px; font-weight: 700; }
.rhi-item-desc {
    margin: 4px 0 8px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--rhi-sub);
}
.rhi-item-ctl {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rhi-qty {
    width: 66px;
    padding: 5px 8px;
    border: 1.5px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--rhi-num);
    color: var(--rhi-ink);
    text-align: center;
}
.rhi-qty:focus { outline: none; border-color: var(--rhi-ember); box-shadow: var(--rhi-ring); }
.rhi-item-rate { font-size: 11.5px; color: var(--rhi-mute); font-family: var(--rhi-num); }
.rhi-item-sum {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 74px;
}
.rhi-item-sum b { font-family: var(--rhi-num); font-size: 16px; color: var(--rhi-ink); }
.rhi-item-sum span { font-size: 10.5px; color: var(--rhi-mute); }

/* ============================ 批量表格 ============================ */
.rhi-table-wrap { overflow-x: auto; border: 1px solid var(--rhi-line-2); border-radius: var(--rhi-r-md); }
.rhi-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 12.5px;
}
.rhi-table th, .rhi-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--rhi-line-2);
    text-align: left;
    white-space: nowrap;
}
.rhi-table thead th {
    background: var(--rhi-card-2);
    font-size: 11.5px;
    color: var(--rhi-sub);
    font-weight: 700;
    border-bottom: 2px solid var(--rhi-ink);
}
[data-theme="dark"] .rhi-table thead th { border-bottom-color: var(--rhi-ember); }
.rhi-table .num { text-align: right; font-family: var(--rhi-num); }
.rhi-table tbody tr:hover { background: var(--rhi-steel-l); }
.rhi-table tfoot th { background: var(--rhi-card-2); color: var(--rhi-ink); }
.rhi-table select, .rhi-table input {
    padding: 5px 7px;
    border: 1.5px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    font: inherit;
    font-size: 12px;
    color: var(--rhi-ink);
}
.rhi-table input[type="number"] { width: 68px; font-family: var(--rhi-num); }
.rhi-table select:focus, .rhi-table input:focus { outline: none; border-color: var(--rhi-ember); }
.rhi-table tr.is-bad { background: var(--rhi-red-l); }
.rhi-table tr.is-bad .rhi-row-err { display: block; }
.rhi-table .rhi-row-err { display: none; }
.rhi-del {
    padding: 3px 9px;
    border: 1px solid var(--rhi-line);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card);
    color: var(--rhi-mute);
    font-size: 12px;
    cursor: pointer;
}
.rhi-del:hover { border-color: var(--rhi-red); color: var(--rhi-red); }

/* ============================ 验收单式收据 ============================ */
.rhi-receipt {
    position: relative;
    padding: 20px 20px 18px;
    border: 1px solid var(--rhi-line);
    border-top: 4px double var(--rhi-ink);
    border-radius: var(--rhi-r);
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(93, 107, 122, 0.06) 27px 28px),
        var(--rhi-card);
    box-shadow: var(--rhi-shadow);
}
[data-theme="dark"] .rhi-receipt { border-top-color: var(--rhi-ember); }
.rhi-receipt .lb {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--rhi-mute);
}
.rhi-receipt .big {
    display: block;
    margin-top: 2px;
    font-family: var(--rhi-num);
    font-size: 34px;
    line-height: 1.2;
    color: var(--rhi-ember-d);
    letter-spacing: 0.01em;
}
.rhi-receipt .rng { display: block; margin-top: 3px; font-size: 11.5px; color: var(--rhi-mute); }
.rhi-receipt-rows { margin-top: 13px; padding-top: 4px; }
.rhi-rrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 5.5px 0;
    border-bottom: 1px dashed var(--rhi-line);
    font-size: 12.5px;
}
.rhi-rrow span { color: var(--rhi-sub); }
.rhi-rrow span em {
    display: block;
    font-style: normal;
    font-size: 10.5px;
    color: var(--rhi-mute);
    font-family: var(--rhi-num);
}
.rhi-rrow b { flex: none; font-family: var(--rhi-num); font-size: 13.5px; color: var(--rhi-ink); }
.rhi-rrow.is-total {
    margin-top: 4px;
    padding-top: 9px;
    border-bottom: 0;
    border-top: 2px solid var(--rhi-ink);
    font-weight: 700;
}
[data-theme="dark"] .rhi-rrow.is-total { border-top-color: var(--rhi-ember); }
.rhi-rrow.is-total span { color: var(--rhi-ink); }
.rhi-rrow.is-total b { font-size: 17px; color: var(--rhi-ember-d); }

.rhi-bar-wrap { margin-top: 13px; }
.rhi-bar {
    display: flex;
    height: 10px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--rhi-line-2);
}
.rhi-bar i { display: block; }
.rhi-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 7px;
    font-size: 10.5px;
    color: var(--rhi-mute);
}
.rhi-bar-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-radius: 2px;
}

/* ---------- 提醒与场景 ---------- */
.rhi-warn-list { margin: 0; padding: 0 0 0 2px; list-style: none; }
.rhi-warn-list li {
    position: relative;
    padding: 0 0 0 16px;
    margin-bottom: 9px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--rhi-sub);
}
.rhi-warn-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--rhi-ember);
    transform: rotate(45deg);
}
.rhi-warn-list b { color: var(--rhi-ink); }
.rhi-scenes { display: grid; gap: 9px; }
.rhi-scene {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--rhi-line);
    border-left: 3px solid var(--rhi-ember);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card-2);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.rhi-scene:hover { border-color: var(--rhi-ember); background: var(--rhi-ember-l); transform: translateY(-1px); }
.rhi-scene:focus-visible { outline: none; box-shadow: var(--rhi-ring); }
.rhi-scene b { display: block; font-size: 13px; color: var(--rhi-ink); }
.rhi-scene span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--rhi-mute); }

/* ---------- 使用方法 / FAQ ---------- */
.rhi-prose ol { margin: 0; padding-left: 20px; }
.rhi-prose li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--rhi-sub);
}
.rhi-prose b { color: var(--rhi-ink); }
.rhi-faq details {
    padding: 9px 0;
    border-bottom: 1px dashed var(--rhi-line);
}
.rhi-faq details:last-child { border-bottom: 0; }
.rhi-faq summary {
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    list-style-position: outside;
}
.rhi-faq summary::marker { color: var(--rhi-ember); }
.rhi-faq .a {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--rhi-sub);
}
.rhi-faq .a b { color: var(--rhi-ember-d); }

/* ---------- 相关工具 ---------- */
.rhi-rel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rhi-rel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--rhi-line-2);
    border-left: 3px solid var(--rhi-steel);
    border-radius: var(--rhi-r-sm);
    background: var(--rhi-card-2);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rhi-sub);
    transition: border-color 0.15s, color 0.15s, transform 0.12s;
}
.rhi-rel a:hover { border-color: var(--rhi-ember); color: var(--rhi-ember-d); transform: translateY(-1px); }
.rhi-rel .ico { font-size: 17px; }

.rhi-foot {
    margin: 22px 4px 14px;
    font-size: 11.5px;
    line-height: 1.9;
    color: var(--rhi-mute);
}
.rhi-foot b { color: var(--rhi-sub); }

/* ============================ Toast ============================ */
.rhi-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 9999;
    padding: 10px 20px;
    border-radius: var(--rhi-r-sm);
    background: rgba(34, 41, 47, 0.95);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
    opacity: 0;
    transform: translate(-50%, 14px);
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
}
.rhi-toast.show { opacity: 1; transform: translate(-50%, 0); }
.rhi-toast.ok { background: rgba(46, 125, 79, 0.96); }
.rhi-toast.err { background: rgba(196, 69, 54, 0.96); }

/* ============================ A4 打印稿 ============================ */
.rhi-printzone { display: none; }

@media print {
    @page { size: A4 portrait; margin: 12mm; }
    .nav-header, .footer, .rhi-toast { display: none !important; }
    body { background: #fff !important; }
    .container > *:not(.rhi-printzone) { display: none !important; }
    .rhi-page { color: #22292f; font-size: 12px; }
    .rhi-printzone { display: block !important; }
    .rhi-pz-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        border-bottom: 2.5px solid #22292f;
        padding-bottom: 8px;
    }
    .rhi-pz-head h2 { margin: 0; font-size: 20px; letter-spacing: 0.06em; }
    .rhi-pz-head .meta { font-size: 10.5px; color: #555; }
    .rhi-pz-title {
        margin: 16px 0 6px;
        padding-left: 8px;
        border-left: 3.5px solid #e2571f;
        font-size: 13.5px;
        font-weight: 700;
    }
    .rhi-pz-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11.5px;
    }
    .rhi-pz-table th, .rhi-pz-table td {
        padding: 6px 8px;
        border: 1px solid #b9bcb6;
        text-align: left;
        vertical-align: top;
    }
    .rhi-pz-table thead th { background: #f0efec; font-weight: 700; }
    .rhi-pz-table .num { text-align: right; font-family: var(--rhi-num); }
    .rhi-pz-sign {
        display: flex;
        gap: 40px;
        margin-top: 26px;
        font-size: 11.5px;
    }
    .rhi-pz-note { margin-top: 18px; font-size: 10px; line-height: 1.8; color: #555; }
}

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
    .rhi-hero { grid-template-columns: minmax(0, 1fr); }
    .rhi-main { grid-template-columns: minmax(0, 1fr); }
    .rhi-sticky { position: static; }
}
@media (max-width: 760px) {
    .rhi-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rhi-kpi-item:nth-child(3) { border-left: 0; }
    .rhi-kpi-item:nth-child(n+3) { border-top: 1px solid var(--rhi-line-2); }
    .rhi-hero { padding: 26px 20px; }
    .rhi-hero h1 { font-size: 22px; }
    .rhi-fields { grid-template-columns: minmax(0, 1fr); }
    .rhi-card-body { padding: 15px 16px 17px; }
    .rhi-item { grid-template-columns: 34px minmax(0, 1fr); }
    .rhi-item-sum { grid-column: 2; flex-direction: row; align-items: baseline; gap: 7px; justify-content: flex-start; }
    .rhi-rel { grid-template-columns: minmax(0, 1fr); }
    .rhi-receipt .big { font-size: 29px; }
}
