/* ==========================================================================
   家政保洁时薪与耗材成本计算器
   设计语言：上门服务工单 + 清洁喷壶 / 毛巾条纹
   作用域：.hk-page（变量 hk- 前缀）
   ========================================================================== */

.hk-page {
    --hk-bg: #eef5f1;
    --hk-card: #ffffff;
    --hk-ink: #10231c;
    --hk-ink-2: #4a6157;
    --hk-ink-3: #7d9089;
    --hk-line: #d8e6df;
    --hk-line-2: #eaf2ee;
    --hk-teal: #0f766e;
    --hk-teal-2: #17a58f;
    --hk-teal-soft: #e2f4ef;
    --hk-lime: #9ccc4a;
    --hk-lime-soft: #f1f8e3;
    --hk-amber: #c2761c;
    --hk-amber-soft: #fdf1de;
    --hk-red: #b4422f;
    --hk-paper: #fffdf6;
    --hk-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
    --hk-round: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    background:
        radial-gradient(620px 320px at 8% -4%, rgba(23, 165, 143, .12), transparent 64%),
        radial-gradient(560px 300px at 96% 4%, rgba(156, 204, 74, .14), transparent 62%),
        var(--hk-bg);
    color: var(--hk-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] .hk-page {
    --hk-bg: #0b1512;
    --hk-card: #121e1a;
    --hk-ink: #e8f2ed;
    --hk-ink-2: #a3b8af;
    --hk-ink-3: #71867d;
    --hk-line: #22332c;
    --hk-line-2: #1a2a24;
    --hk-teal: #4ecfb4;
    --hk-teal-2: #2fb79c;
    --hk-teal-soft: #12312b;
    --hk-lime: #b9e37a;
    --hk-lime-soft: #1d2a17;
    --hk-amber: #e3a75a;
    --hk-amber-soft: #2b2113;
    --hk-red: #ef8f76;
    --hk-paper: #16221d;
    background:
        radial-gradient(620px 320px at 8% -4%, rgba(78, 207, 180, .1), transparent 64%),
        radial-gradient(560px 300px at 96% 4%, rgba(185, 227, 122, .07), transparent 62%),
        var(--hk-bg);
}

.hk-page *, .hk-page *::before, .hk-page *::after { box-sizing: border-box; }
.hk-wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.hk-page a { color: inherit; text-decoration: none; }

/* ---------- 首屏 ---------- */
.hk-hero {
    position: relative;
    padding: 26px 0 54px;
    overflow: hidden;
    background: linear-gradient(180deg, #e9f6f0 0%, #f6fbf8 62%, transparent 100%);
    border-bottom: 1px solid var(--hk-line);
}

.hk-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 78%, rgba(23, 165, 143, .12) 0 6px, transparent 7px),
        radial-gradient(circle at 22% 88%, rgba(156, 204, 74, .16) 0 4px, transparent 5px),
        radial-gradient(circle at 84% 26%, rgba(23, 165, 143, .1) 0 8px, transparent 9px),
        radial-gradient(circle at 92% 66%, rgba(194, 118, 28, .1) 0 5px, transparent 6px);
    pointer-events: none;
}

:root[data-theme="dark"] .hk-hero {
    background: linear-gradient(180deg, #0f201b 0%, #0c1714 70%, transparent 100%);
}

.hk-hero > .hk-wrap { position: relative; z-index: 1; }

.hk-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hk-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hk-ink-3); }
.hk-crumb a:hover { color: var(--hk-teal); }
.hk-crumb i { font-style: normal; opacity: .5; }
.hk-crumb b { color: var(--hk-ink); font-weight: 600; }

.hk-modes { display: inline-flex; padding: 3px; border: 1px solid var(--hk-line); border-radius: 999px; background: rgba(255, 255, 255, .66); }
.hk-modes button { border: 0; background: transparent; color: var(--hk-ink-2); font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all .18s ease; }
.hk-modes button.is-on { background: var(--hk-teal); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .hk-modes { background: rgba(255, 255, 255, .04); }

.hk-hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 44px; align-items: start; }

.hk-kicker { margin: 0 0 14px; font-family: var(--hk-mono); font-size: 11.5px; letter-spacing: .2em; color: var(--hk-teal); font-weight: 700; }

.hk-intro h1 { margin: 0 0 16px; font-family: var(--hk-round); font-size: clamp(32px, 3.9vw, 50px); line-height: 1.18; font-weight: 800; letter-spacing: -.015em; }
.hk-intro h1 em { font-style: normal; color: var(--hk-teal); background: linear-gradient(180deg, transparent 68%, rgba(156, 204, 74, .5) 68%); }

.hk-lede { margin: 0 0 20px; max-width: 33em; font-size: 15px; line-height: 1.95; color: var(--hk-ink-2); }
.hk-lede strong { color: var(--hk-ink); font-weight: 700; }

.hk-chips { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.hk-chips li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--hk-ink-2); }
.hk-chips b { flex: none; min-width: 34px; padding: 1px 7px; border-radius: 4px; background: var(--hk-teal-soft); color: var(--hk-teal); font-size: 11.5px; text-align: center; letter-spacing: .04em; }

.hk-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hk-presets > span { font-size: 12.5px; color: var(--hk-ink-3); }
.hk-presets button {
    font: inherit; font-size: 12.5px; padding: 7px 12px; border-radius: 6px;
    border: 1px solid var(--hk-line); background: var(--hk-card); color: var(--hk-ink-2); cursor: pointer;
    transition: all .16s ease;
}
.hk-presets button:hover { border-color: var(--hk-teal); color: var(--hk-teal); }
.hk-presets button.is-on { border-color: var(--hk-teal); background: var(--hk-teal-soft); color: var(--hk-teal); font-weight: 600; }

/* ---------- 工单票 ---------- */
.hk-slip {
    position: relative;
    padding: 20px 22px 18px;
    border-radius: 8px;
    background: var(--hk-paper);
    border: 1px solid #e4e0cf;
    box-shadow: 0 26px 50px -38px rgba(16, 35, 28, .55);
}

:root[data-theme="dark"] .hk-slip { border-color: #2a3a33; }

.hk-slip::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -7px;
    height: 7px;
    background-image: radial-gradient(circle at 5px 7px, transparent 4px, var(--hk-paper) 4px);
    background-size: 10px 7px;
    background-repeat: repeat-x;
}

.hk-slip-pin {
    position: absolute;
    right: 22px; top: -13px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--hk-teal);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 4px 10px rgba(15, 118, 110, .35);
}
.hk-slip-pin::after { content: ""; position: absolute; left: 10px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .35); }

.hk-slip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed #d9d3bf; }
.hk-slip-head h2 { margin: 0; font-size: 16px; letter-spacing: .02em; }
.hk-slip-head span { display: block; margin-top: 2px; font-family: var(--hk-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--hk-ink-3); }
.hk-slip-no { font-family: var(--hk-mono); font-size: 10px; color: var(--hk-ink-3); text-align: right; }
.hk-slip-no b { display: block; margin-top: 2px; font-size: 13px; color: var(--hk-ink); letter-spacing: .04em; }

.hk-slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; padding: 13px 0 14px; }

.hk-field { display: grid; gap: 3px; min-width: 0; }
.hk-field > span { font-size: 11px; color: var(--hk-ink-3); }
.hk-field .hk-input {
    display: flex; align-items: center; gap: 5px;
    padding: 0 9px;
    border: 1px solid #dcdfd2;
    border-radius: 6px;
    background: #f8f8f0;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
:root[data-theme="dark"] .hk-field .hk-input { border-color: #2c3b34; background: #101a16; }
.hk-field .hk-input:focus-within { border-color: var(--hk-teal); box-shadow: 0 0 0 3px rgba(23, 165, 143, .14); }
.hk-field input {
    width: 100%; min-width: 0; border: 0; outline: none; background: transparent;
    color: #12241d; font: inherit; font-family: var(--hk-mono); font-size: 13.5px; padding: 7px 0;
    font-variant-numeric: tabular-nums;
}
.hk-page .hk-field .hk-input input { background: transparent; color: #12241d; -webkit-text-fill-color: #12241d; caret-color: #12241d; }
:root[data-theme="dark"] .hk-field .hk-input input { color: #e8f2ed; -webkit-text-fill-color: #e8f2ed; caret-color: #e8f2ed; }
.hk-field .hk-input em { flex: none; font-style: normal; font-size: 10.5px; color: var(--hk-ink-3); }
.hk-field input::-webkit-outer-spin-button,
.hk-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hk-slip-result { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 13px 0 10px; border-top: 1px dashed #d9d3bf; }
.hk-slip-main > span { display: block; font-size: 11.5px; color: var(--hk-ink-3); }
.hk-slip-main b { display: flex; align-items: baseline; gap: 2px; font-family: var(--hk-round); font-size: clamp(32px, 4vw, 42px); font-weight: 800; line-height: 1.1; color: var(--hk-teal); font-variant-numeric: tabular-nums; }
.hk-slip-main b small { font-size: 15px; font-weight: 700; }
.hk-slip-side { display: grid; gap: 5px; text-align: right; font-size: 11px; color: var(--hk-ink-3); }
.hk-slip-side b { display: block; font-family: var(--hk-mono); font-size: 13.5px; color: var(--hk-ink); font-variant-numeric: tabular-nums; }

.hk-slip-note { margin: 0; font-size: 11.5px; color: var(--hk-ink-3); line-height: 1.6; }

/* ---------- 正文 ---------- */
.hk-body { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 30px; padding: 38px 0 30px; align-items: start; }
.hk-main { display: grid; gap: 20px; min-width: 0; }
.hk-main > *, .hk-split > * { min-width: 0; }

.hk-card {
    background: var(--hk-card);
    border: 1px solid var(--hk-line);
    border-radius: 12px;
    padding: 24px 26px;
    box-shadow: 0 18px 40px -42px rgba(16, 35, 28, .5);
}

.hk-card-head { margin-bottom: 10px; }
.hk-card-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-card-head h2 i {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
    background: var(--hk-teal-soft); color: var(--hk-teal);
    font-style: normal; font-family: var(--hk-mono); font-size: 11px; font-weight: 700;
}
.hk-card-head p { margin: 7px 0 0; font-size: 13px; color: var(--hk-ink-3); }

.hk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 14px; }
.hk-sub { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hk-ink-3); font-weight: 700; }

.hk-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--hk-line-2); }
.hk-seg { height: 100%; width: 0; transition: width .4s ease; }
.hk-seg.seg-net { background: linear-gradient(180deg, var(--hk-teal-2), var(--hk-teal)); }
.hk-seg.seg-comm { background: var(--hk-amber); }
.hk-seg.seg-mat { background: var(--hk-lime); }
.hk-seg.seg-tra { background: #94a3a0; }
.hk-seg.seg-work { background: linear-gradient(180deg, var(--hk-teal-2), var(--hk-teal)); }
.hk-seg.seg-road { background: var(--hk-amber); }
.hk-seg.seg-prep { background: var(--hk-lime); }

.hk-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 11.5px; color: var(--hk-ink-3); }
.hk-legend li { display: flex; align-items: center; gap: 6px; }
.hk-legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.hk-legend b { margin-left: auto; font-family: var(--hk-mono); font-size: 12px; color: var(--hk-ink); }
.hk-tip { margin: 10px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--hk-ink-3); }

.hk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.hk-stats > div { border: 1px solid var(--hk-line); border-radius: 10px; padding: 12px 13px; background: linear-gradient(180deg, var(--hk-teal-soft), transparent 140%); }
.hk-stats > div > span { display: block; font-size: 11px; color: var(--hk-ink-3); }
.hk-stats b { display: block; margin-top: 2px; font-family: var(--hk-mono); font-size: 19px; font-variant-numeric: tabular-nums; }
.hk-stats b span { display: inline; font: inherit; color: inherit; }

.hk-cap-row { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr); gap: 12px; margin-top: 14px; align-items: end; }
.hk-field-inline > span { font-size: 11px; }
.hk-field-inline .hk-input { background: var(--hk-bg); border-color: var(--hk-line); }
.hk-target { border-left: 3px solid var(--hk-lime); padding: 6px 0 6px 12px; }
.hk-target > span { display: block; font-size: 11.5px; color: var(--hk-ink-3); }
.hk-target b { display: block; font-family: var(--hk-mono); font-size: 22px; color: var(--hk-teal); font-variant-numeric: tabular-nums; }
.hk-target em { font-style: normal; font-size: 11px; color: var(--hk-ink-3); }

.hk-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--hk-line); border-radius: 10px; }
.hk-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.hk-table th, .hk-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--hk-line-2); white-space: nowrap; }
.hk-table th { background: var(--hk-bg); color: var(--hk-ink-2); font-size: 12px; font-weight: 600; }
.hk-table th:first-child, .hk-table td:first-child { text-align: left; }
.hk-table td { font-family: var(--hk-mono); font-variant-numeric: tabular-nums; }
.hk-table tbody tr:last-child td { border-bottom: 0; }
.hk-table tr.is-on { background: var(--hk-teal-soft); }
.hk-table tr.is-on td { color: var(--hk-teal); font-weight: 700; }

.hk-notes { display: grid; gap: 10px; margin-top: 14px; }
.hk-notes > div { padding: 12px 14px; border-radius: 8px; background: var(--hk-bg); border-left: 3px solid var(--hk-teal); font-size: 13px; color: var(--hk-ink-2); }
.hk-notes b { color: var(--hk-ink); }

.hk-formula {
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px dashed var(--hk-line);
    border-radius: 8px;
    background: var(--hk-bg);
    font-family: var(--hk-mono);
    font-size: 12.5px;
    line-height: 2;
    color: var(--hk-ink-2);
    overflow-x: auto;
}

.hk-faq details { border-bottom: 1px solid var(--hk-line-2); }
.hk-faq details:last-child { border-bottom: 0; }
.hk-faq summary { position: relative; list-style: none; cursor: pointer; padding: 12px 30px 12px 0; font-size: 14.5px; font-weight: 600; }
.hk-faq summary::-webkit-details-marker { display: none; }
.hk-faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--hk-mono); font-size: 18px; color: var(--hk-teal); transition: transform .2s ease; }
.hk-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.hk-faq p { margin: 0; padding: 0 8px 14px 0; font-size: 13.5px; line-height: 1.95; color: var(--hk-ink-2); }

/* ---------- 侧栏 ---------- */
.hk-rail { position: sticky; top: 24px; display: grid; gap: 14px; }
.hk-rail-card { background: var(--hk-card); border: 1px solid var(--hk-line); border-radius: 12px; padding: 18px; box-shadow: 0 18px 40px -42px rgba(16, 35, 28, .5); }
.hk-rail-card h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hk-ink-3); font-weight: 700; }
.hk-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hk-rail-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--hk-ink-2); }
.hk-rail-list b { font-family: var(--hk-mono); color: var(--hk-ink); }
.hk-links { display: grid; gap: 8px; }
.hk-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid var(--hk-line); border-radius: 8px; font-size: 13px; color: var(--hk-ink-2); transition: all .16s ease; }
.hk-links a:hover { border-color: var(--hk-teal); color: var(--hk-teal); background: var(--hk-teal-soft); }
.hk-links a::after { content: "→"; font-family: var(--hk-mono); opacity: .5; }
.hk-rail-note { margin: 0; font-size: 12px; line-height: 1.8; color: var(--hk-ink-3); }

@media (max-width: 1020px) {
    .hk-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .hk-body { grid-template-columns: minmax(0, 1fr); }
    .hk-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hk-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .hk-wrap { width: calc(100% - 28px); }
    .hk-hero { padding-top: 18px; padding-bottom: 38px; }
    .hk-intro h1 { font-size: 31px; }
    .hk-lede { font-size: 14px; }
    .hk-slip { padding: 16px 14px 16px; }
    .hk-slip-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .hk-card { padding: 20px 16px; }
    .hk-stats { grid-template-columns: 1fr 1fr; }
    .hk-cap-row { grid-template-columns: 1fr 1fr; }
    .hk-target { grid-column: 1 / -1; }
    .hk-rail { grid-template-columns: minmax(0, 1fr); }
    .hk-legend { grid-template-columns: 1fr; }
    .hk-slip-result { flex-wrap: wrap; }
    .hk-slip-side { text-align: left; }
}
