/* ==========================================================================
 * 商标注册费用计算器 /tool/trademark-fee-calc
 * 视觉主题：商标局打样台 · 油墨青 + 专色橙红
 *
 * 设计隐喻：商标的本质是「图样 + 颜色 + 类别」，所以整页按「印刷打样 / 色卡」
 * 来造：尼斯 45 类 = 45 个色卡卡位，规费明细 = 打样单，生命周期 = 印刷工单刻度，
 * 三种申请方式 = 三张并排小样，批量对比 = 拼版表。
 *
 * 色系与站内其它工具全部错开：不用朱砂红、不用黛青墨绿、不用翡翠金、不用靛紫。
 * 作用域限定在 .tf-page，变量前缀 --tfc-，不会污染其它页面。
 * 深浅双主题：浅色写在 .tf-page 上，深色覆盖用 :root[data-theme="dark"] .tf-page。
 * （站内主题按钮 light 时会移除 data-theme 属性，所以浅色=无属性是唯一基线）
 * ========================================================================== */

.tf-page {
    --tfc-paper: #f6f3ec;
    --tfc-surface: #fffefb;
    --tfc-surface-2: #fbf8f1;
    --tfc-ink: #1a1a18;
    --tfc-ink-2: #4b4842;
    --tfc-ink-3: #8a8479;
    --tfc-line: #e4ded1;
    --tfc-line-2: #d0c8b6;
    --tfc-cyan: #0d7c86;
    --tfc-cyan-2: #085f68;
    --tfc-cyan-3: #0a4a51;
    --tfc-cyan-soft: #e0f0f1;
    --tfc-red: #d9481f;
    --tfc-red-2: #b53a16;
    --tfc-red-soft: #fce9e1;
    --tfc-amber: #b9820f;
    --tfc-amber-soft: #fbf0d8;
    --tfc-green: #2f7a3e;
    --tfc-green-soft: #e4f2e6;
    --tfc-r: 12px;
    --tfc-r-sm: 8px;
    --tfc-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
    --tfc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --tfc-serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
    --tfc-shadow: 0 1px 3px rgba(26, 26, 24, .05), 0 8px 24px -16px rgba(26, 26, 24, .28);
    --tfc-shadow-lg: 0 2px 6px rgba(26, 26, 24, .06), 0 24px 56px -30px rgba(26, 26, 24, .45);
    --tfc-dot: rgba(13, 124, 134, .16);
}

/* ============================ 深色主题 ============================ */
:root[data-theme="dark"] .tf-page {
    --tfc-paper: #0f1115;
    --tfc-surface: #171a20;
    --tfc-surface-2: #1e222a;
    --tfc-ink: #eceef2;
    --tfc-ink-2: #b4b9c3;
    --tfc-ink-3: #7c828d;
    --tfc-line: #282d36;
    --tfc-line-2: #3a414c;
    --tfc-cyan: #3fbfcb;
    --tfc-cyan-2: #6ad6df;
    --tfc-cyan-3: #96e6ec;
    --tfc-cyan-soft: rgba(63, 191, 203, .13);
    --tfc-red: #ff8158;
    --tfc-red-2: #ffa07e;
    --tfc-red-soft: rgba(255, 129, 88, .13);
    --tfc-amber: #e3ae45;
    --tfc-amber-soft: rgba(227, 174, 69, .13);
    --tfc-green: #5cc074;
    --tfc-green-soft: rgba(92, 192, 116, .13);
    --tfc-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 10px 28px -18px rgba(0, 0, 0, .8);
    --tfc-shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 26px 60px -30px rgba(0, 0, 0, .9);
    --tfc-dot: rgba(63, 191, 203, .18);
}

/* ============================ 基础 ============================ */
.tf-page {
    font-family: var(--tfc-sans);
    color: var(--tfc-ink);
    line-height: 1.78;
    font-size: 15px;
    padding-bottom: 56px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.tf-page * { box-sizing: border-box; }
.tf-page b { font-weight: 700; }
.tf-page h1, .tf-page h2, .tf-page h3, .tf-page h4 {
    text-wrap: balance;
}
.tf-page p { text-wrap: pretty; }

/* ============================ 首屏：打样台 ============================ */
.tf-hero {
    position: relative;
    margin: 16px 0 24px;
    padding: 0;
    border-radius: 20px;
    background: var(--tfc-surface);
    border: 1px solid var(--tfc-line);
    box-shadow: var(--tfc-shadow-lg);
    overflow: hidden;
}
/* 顶部：油墨青打样台横条 */
.tf-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--tfc-cyan) 0 38%, var(--tfc-red) 38% 52%, var(--tfc-amber) 52% 62%, var(--tfc-ink-3) 62% 100%);
}
.tf-hero > * { position: relative; }

.tf-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    gap: 0;
    align-items: stretch;
}

.tf-hero-left {
    padding: 34px 34px 28px;
    min-width: 0;
}
.tf-hero-copy {
    min-width: 0;
}
.tf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tfc-cyan-2);
    padding: 5px 12px;
    border: 1px solid var(--tfc-cyan-soft);
    background: var(--tfc-cyan-soft);
    border-radius: 4px;
}
.tf-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--tfc-cyan);
}
.tf-hero h1 {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.02em;
    margin: 16px 0 12px;
    color: var(--tfc-ink);
}
/* 一句话副标题：首屏 3 秒内说清用途 */
.tf-lead {
    font-size: 16.5px;
    line-height: 1.82;
    color: var(--tfc-ink-2);
    max-width: 34em;
    margin: 0 0 20px;
}
.tf-lead b { color: var(--tfc-cyan-2); font-weight: 700; }
:root[data-theme="dark"] .tf-page .tf-lead b { color: var(--tfc-cyan-2); }

.tf-seals {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 8px;
    margin: 0;
    padding: 0;
}
.tf-seals li {
    font-size: 12.5px;
    color: var(--tfc-ink-2);
    padding: 5px 12px;
    border-radius: 4px;
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
    white-space: nowrap;
}
.tf-seals li::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    vertical-align: 1px;
    background: var(--tfc-cyan);
    border-radius: 1px;
}

/* ============================ 色卡格：尼斯分类 ============================ */
.tf-picker {
    position: relative;
    margin-top: 24px;
    padding: 20px 20px 18px;
    border-radius: 10px;
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
}
.tf-picker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-bottom: 14px;
}
.tf-picker-head > b {
    font-size: 15px;
    font-weight: 800;
    color: var(--tfc-ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tf-picker-head > b::before {
    content: "";
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: var(--tfc-red);
}
.tf-picker-tip {
    font-size: 13px;
    color: var(--tfc-cyan-2);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--tfc-cyan-soft);
}
.tf-inline-num {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 13px;
    color: var(--tfc-ink-2);
    font-weight: 600;
}
.tf-inline-num input {
    width: 74px;
    padding: 6px 9px;
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface);
    color: var(--tfc-ink);
    font-family: var(--tfc-mono);
    font-size: 14px;
    font-weight: 600;
}
.tf-inline-num input:focus {
    outline: none;
    border-color: var(--tfc-cyan);
    box-shadow: 0 0 0 3px var(--tfc-cyan-soft);
}

/* 45 个色卡卡位 */
.tf-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px;
}
.tf-class-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    aspect-ratio: 1 / 1.3;
    min-height: 54px;
    border-radius: 4px;
    border: 1px solid var(--tfc-line-2);
    background:
        radial-gradient(circle at 1px 1px, var(--tfc-dot) 1px, transparent 1.4px) 0 0 / 6px 6px,
        var(--tfc-surface);
    color: var(--tfc-ink-2);
    cursor: pointer;
    padding: 5px 3px;
    overflow: hidden;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.tf-class-cell b {
    font-family: var(--tfc-mono);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tfc-ink);
}
.tf-class-cell span {
    font-size: 9.5px;
    line-height: 1.25;
    color: var(--tfc-ink-3);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tf-class-cell:hover {
    transform: translateY(-2px);
    border-color: var(--tfc-cyan);
    box-shadow: 0 6px 14px -10px rgba(13, 124, 134, .9);
}
.tf-class-cell:hover b { color: var(--tfc-cyan-2); }
.tf-class-cell.is-on {
    color: #fff;
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .2) 1px, transparent 1.4px) 0 0 / 6px 6px,
        linear-gradient(160deg, var(--tfc-cyan-2), var(--tfc-cyan-3));
    border-color: var(--tfc-cyan-2);
    box-shadow: 0 8px 16px -9px rgba(13, 124, 134, .95);
}
.tf-class-cell.is-on b { color: #fff; }
.tf-class-cell.is-on span { color: rgba(255, 255, 255, .82); }
:root[data-theme="dark"] .tf-page .tf-class-cell.is-on {
    background:
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, .16) 1px, transparent 1.4px) 0 0 / 6px 6px,
        linear-gradient(160deg, var(--tfc-cyan-3), var(--tfc-cyan));
}
:root[data-theme="dark"] .tf-page .tf-class-cell.is-on b { color: #0b1416; }
:root[data-theme="dark"] .tf-page .tf-class-cell.is-on span { color: rgba(11, 20, 22, .74); }
.tf-class-cell.is-on::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    border-width: 0 9px 9px 0;
    border-style: solid;
    border-color: transparent var(--tfc-red) transparent transparent;
}
.tf-picker-hint {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--tfc-ink-3);
}
.tf-picker-hint b { color: var(--tfc-ink-2); }

/* ============================ 预置案例 ============================ */
.tf-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 30px;
    background: var(--tfc-surface);
}
.tf-presets-label {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tfc-ink-3);
    margin-right: 2px;
}
.tf-presets button {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tfc-ink-2);
    padding: 6px 14px;
    border-radius: 4px;
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
    cursor: pointer;
    transition: all .15s ease;
}
.tf-presets button:hover {
    color: #fff;
    background: var(--tfc-cyan);
    border-color: var(--tfc-cyan);
    transform: translateY(-1px);
}
:root[data-theme="dark"] .tf-page .tf-presets button:hover { color: #0b1416; }

/* ============================ 首屏右栏：打样单 ============================ */
.tf-stamp-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 30px 30px 26px;
    background:
        linear-gradient(180deg, var(--tfc-surface-2), var(--tfc-surface));
    border-left: 1px solid var(--tfc-line);
    min-width: 0;
}
.tf-stamp {
    position: relative;
    padding: 20px 20px 18px;
    border-radius: 10px;
    background: var(--tfc-surface);
    border: 1px solid var(--tfc-line-2);
    box-shadow: var(--tfc-shadow);
    overflow: hidden;
}
.tf-stamp::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--tfc-cyan);
}
.tf-stamp-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tfc-ink-3);
}
.tf-stamp strong {
    display: block;
    font-family: var(--tfc-mono);
    font-size: clamp(30px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--tfc-cyan-2);
    margin: 4px 0 3px;
    word-break: break-all;
}
:root[data-theme="dark"] .tf-page .tf-stamp strong { color: var(--tfc-cyan-2); }
.tf-stamp-sub {
    display: block;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--tfc-ink-2);
    padding-top: 8px;
    border-top: 1px dashed var(--tfc-line-2);
}

/* 堆叠条形 */
.tf-bar-block { display: flex; flex-direction: column; gap: 8px; }
.tf-bar {
    display: flex;
    height: 12px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--tfc-line);
    border: 1px solid var(--tfc-line-2);
}
.tf-bar i {
    display: block;
    height: 100%;
    transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.tf-bar i.is-official { background: var(--tfc-cyan); }
.tf-bar i.is-agent { background: var(--tfc-red); }
.tf-bar i.is-urgent { background: var(--tfc-amber); }
.tf-bar i.is-review { background: var(--tfc-ink-3); }
.tf-bar-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.tf-bar-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tfc-ink-2);
}
.tf-bar-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex: none;
}
.tf-bar-legend i.is-official { background: var(--tfc-cyan); }
.tf-bar-legend i.is-agent { background: var(--tfc-red); }
.tf-bar-legend i.is-urgent { background: var(--tfc-amber); }
.tf-bar-legend i.is-review { background: var(--tfc-ink-3); }
.tf-bar-legend b { font-family: var(--tfc-mono); color: var(--tfc-ink); }

/* ============================ 错误条 ============================ */
.tf-errbar {
    margin: 0 0 20px;
    padding: 15px 20px;
    border-radius: var(--tfc-r);
    background: var(--tfc-red-soft);
    border: 1px solid var(--tfc-red);
    border-left-width: 4px;
    color: var(--tfc-red-2);
    font-size: 14px;
    line-height: 1.75;
}
:root[data-theme="dark"] .tf-page .tf-errbar { color: var(--tfc-red-2); }
.tf-errbar b { display: block; margin-bottom: 3px; font-size: 14.5px; }
.tf-errbar ul { margin: 4px 0 0; padding-left: 20px; }
.tf-errbar li { margin: 2px 0; }

.tf-result.is-blocked .tf-ledger, .tf-result.is-blocked .tf-panel { opacity: .55; filter: grayscale(.4); }

/* ============================ 面板通用 ============================ */
.tf-panel {
    position: relative;
    margin: 0 0 20px;
    padding: 26px 28px 24px;
    border-radius: var(--tfc-r);
    background: var(--tfc-surface);
    border: 1px solid var(--tfc-line);
    box-shadow: var(--tfc-shadow);
}
.tf-panel-head { margin-bottom: 18px; }
.tf-panel-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tfc-red);
}
.tf-panel-head h2 {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.42;
    letter-spacing: -.01em;
    margin: 7px 0 0;
    color: var(--tfc-ink);
}
.tf-panel-head p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.85;
    color: var(--tfc-ink-2);
    max-width: 62em;
}
.tf-panel-head p b { color: var(--tfc-cyan-2); }

/* ============================ 表单区 ============================ */
.tf-config-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 26px;
    align-items: start;
}
.tf-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.tf-field { display: block; min-width: 0; }
.tf-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tfc-ink-2);
    margin-bottom: 6px;
    letter-spacing: .01em;
}
.tf-unit { font-weight: 500; color: var(--tfc-ink-3); }
.tf-input, .tf-select {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface-2);
    color: var(--tfc-ink);
    font-family: inherit;
    font-size: 14.5px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.tf-input:focus, .tf-select:focus {
    outline: none;
    border-color: var(--tfc-cyan);
    background: var(--tfc-surface);
    box-shadow: 0 0 0 3px var(--tfc-cyan-soft);
}
.tf-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--tfc-ink-3);
}
.tf-err-tip {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--tfc-red);
    font-weight: 600;
}
.tf-err-tip:empty { display: none; }
.tf-err-tip.is-on { display: block; }
.tf-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--tfc-ink-2);
    cursor: pointer;
    padding: 11px 13px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
}
.tf-check input {
    margin: 3px 0 0;
    width: 16px;
    height: 16px;
    accent-color: var(--tfc-cyan);
    flex: none;
}
.tf-check b { color: var(--tfc-cyan-2); }

/* 首屏右栏：三步出账 */
.tf-steps-mini {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    counter-reset: tfstep;
}
.tf-steps-mini li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface);
    border: 1px solid var(--tfc-line);
}
.tf-steps-mini li::before {
    counter-increment: tfstep;
    content: counter(tfstep);
    flex: none;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tfc-cyan);
    color: #fff;
    font-family: var(--tfc-mono);
    font-size: 11px;
    font-weight: 800;
}
:root[data-theme="dark"] .tf-page .tf-steps-mini li::before { color: #0b1416; }
.tf-steps-mini b { font-size: 13px; font-weight: 700; color: var(--tfc-ink); }
.tf-steps-mini span { font-size: 12px; color: var(--tfc-ink-3); }

/* 参数区要点卡 */
.tf-why {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding: 14px 16px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
    border-left: 3px solid var(--tfc-cyan);
}
.tf-why > b {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--tfc-ink);
    margin-bottom: 9px;
}
.tf-why ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tf-why li {
    position: relative;
    padding-left: 16px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--tfc-ink-2);
}
.tf-why li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--tfc-cyan);
}
.tf-why li b { color: var(--tfc-ink); }

/* ============================ 打样单（费用明细） ============================ */
.tf-bill-wrap { min-width: 0; }
.tf-bill {
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface-2);
    overflow: hidden;
}
.tf-bill-group { border-bottom: 1px solid var(--tfc-line); }
.tf-bill-group:last-of-type { border-bottom: none; }
.tf-bill-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--tfc-ink-2);
    background: var(--tfc-surface);
    border-bottom: 1px solid var(--tfc-line);
}
.tf-bill-group h4::before {
    content: "";
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--tfc-ink-3);
}
.tf-bill-group.is-official h4::before { background: var(--tfc-cyan); }
.tf-bill-group.is-agent h4::before { background: var(--tfc-red); }
.tf-bill-group.is-urgent h4::before { background: var(--tfc-amber); }
.tf-bill-group.is-review h4::before { background: var(--tfc-ink-3); }
.tf-bill table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tf-bill td {
    padding: 10px 14px;
    border-bottom: 1px dashed var(--tfc-line);
    color: var(--tfc-ink-2);
    vertical-align: top;
}
.tf-bill tr:last-child td { border-bottom: none; }
.tf-bill-name { font-weight: 600; color: var(--tfc-ink); }
.tf-bill-name em {
    display: block;
    font-style: normal;
    font-size: 11.5px;
    font-family: var(--tfc-mono);
    font-weight: 500;
    color: var(--tfc-ink-3);
    margin-top: 2px;
}
.tf-bill-amt {
    font-family: var(--tfc-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--tfc-ink);
    text-align: right;
    white-space: nowrap;
    vertical-align: middle !important;
}
/* 合计：双线 + 青底 */
.tf-bill-total {
    padding: 13px 14px 14px;
    background: var(--tfc-cyan-soft);
    border-top: 3px double var(--tfc-cyan);
}
.tf-bill-total span {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--tfc-ink-2);
}
.tf-bill-total b {
    display: block;
    font-family: var(--tfc-mono);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--tfc-cyan-2);
    margin: 2px 0 3px;
    word-break: break-all;
}
.tf-bill-sub {
    display: block !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    color: var(--tfc-ink-3) !important;
    font-family: var(--tfc-mono);
}

.tf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0 0;
}
.tf-btn {
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 17px;
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface);
    color: var(--tfc-ink-2);
    cursor: pointer;
    transition: all .15s ease;
}
.tf-btn:hover { border-color: var(--tfc-cyan); color: var(--tfc-cyan-2); transform: translateY(-1px); }
.tf-btn.is-primary {
    background: var(--tfc-cyan);
    border-color: var(--tfc-cyan);
    color: #fff;
}
:root[data-theme="dark"] .tf-page .tf-btn.is-primary { color: #0b1416; }
.tf-btn.is-primary:hover { background: var(--tfc-cyan-2); border-color: var(--tfc-cyan-2); color: #fff; }
.tf-btn.is-ghost { background: transparent; }

.tf-quick-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 16px;
    background: var(--tfc-line);
    border: 1px solid var(--tfc-line);
    border-radius: var(--tfc-r-sm);
    overflow: hidden;
}
.tf-quick-metrics > div { padding: 11px 13px; background: var(--tfc-surface-2); }
.tf-quick-metrics span { display: block; font-size: 11.5px; color: var(--tfc-ink-3); }
.tf-quick-metrics b {
    font-family: var(--tfc-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--tfc-ink);
}
.tf-type-desc {
    margin: 14px 0 0;
    padding: 11px 14px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-amber-soft);
    border-left: 3px solid var(--tfc-amber);
    font-size: 13px;
    line-height: 1.8;
    color: var(--tfc-ink-2);
}

/* ============================ 三方式小样对比 ============================ */
.tf-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}
.tf-cmp-card {
    position: relative;
    padding: 18px 18px 16px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
    overflow: hidden;
}
.tf-cmp-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--tfc-line-2);
}
.tf-cmp-card.is-best::before { background: var(--tfc-cyan); }
.tf-cmp-card h4 {
    font-size: 16.5px;
    font-weight: 800;
    margin: 6px 0 10px;
    color: var(--tfc-ink);
}
.tf-cmp-flag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 2px 9px;
    border-radius: 3px;
    background: var(--tfc-cyan);
    color: #fff;
}
:root[data-theme="dark"] .tf-page .tf-cmp-flag { color: #0b1416; }
.tf-cmp-card.is-err { border-color: var(--tfc-red); background: var(--tfc-red-soft); }
.tf-cmp-card.is-err h4 { color: var(--tfc-red-2); }
.tf-cmp-card.is-err p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--tfc-red-2); }
.tf-cmp-price {
    font-family: var(--tfc-mono);
    font-size: 25px;
    font-weight: 800;
    color: var(--tfc-ink);
    line-height: 1.25;
    margin-bottom: 4px;
}
.tf-cmp-price span { font-size: 11.5px; font-weight: 500; color: var(--tfc-ink-3); font-family: var(--tfc-sans); margin-left: 6px; }
.tf-cmp-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.tf-cmp-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--tfc-ink-3);
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--tfc-line);
}
.tf-cmp-list li:last-child { border-bottom: none; padding-bottom: 0; }
.tf-cmp-list b { color: var(--tfc-ink); font-family: var(--tfc-mono); font-weight: 700; }
.tf-cmp-note {
    margin: 11px 0 0;
    font-size: 12px;
    line-height: 1.75;
    color: var(--tfc-ink-3);
}

/* ============================ 生命周期：工单刻度 ============================ */
.tf-life-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tf-life-item {
    position: relative;
    padding: 13px 0 13px 26px;
    border-bottom: 1px dashed var(--tfc-line);
}
.tf-life-item:last-child { border-bottom: none; }
.tf-life-item::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tfc-line);
}
.tf-life-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tfc-surface);
    border: 2px solid var(--tfc-cyan);
}
.tf-life-item.is-first::after { background: var(--tfc-cyan); }
.tf-life-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.tf-life-stage {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--tfc-cyan-2);
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--tfc-cyan-soft);
    white-space: nowrap;
}
.tf-life-label { font-size: 14.5px; font-weight: 700; color: var(--tfc-ink); }
.tf-life-amt {
    margin-left: auto;
    font-family: var(--tfc-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--tfc-ink);
    white-space: nowrap;
}
.tf-life-bar {
    height: 7px;
    margin: 9px 0 7px;
    border-radius: 999px;
    background: var(--tfc-line);
    overflow: hidden;
}
.tf-life-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tfc-cyan), var(--tfc-cyan-3));
}
.tf-life-note { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--tfc-ink-3); }
.tf-life-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 18px;
    background: var(--tfc-line);
    border: 1px solid var(--tfc-line);
    border-radius: var(--tfc-r-sm);
    overflow: hidden;
}
.tf-life-summary > div { padding: 13px 15px; background: var(--tfc-surface-2); }
.tf-life-summary span { display: block; font-size: 12px; color: var(--tfc-ink-3); }
.tf-life-summary b {
    font-family: var(--tfc-mono);
    font-size: 19px;
    font-weight: 800;
    color: var(--tfc-ink);
}
.tf-life-summary > div:last-child b { color: var(--tfc-cyan-2); }

/* ============================ 规费速查 ============================ */
.tf-rates-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 22px;
    align-items: start;
}
.tf-table-wrap { overflow-x: auto; border-radius: var(--tfc-r-sm); border: 1px solid var(--tfc-line); }
.tf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.tf-table th, .tf-table td {
    padding: 10px 13px;
    text-align: left;
    border-bottom: 1px solid var(--tfc-line);
    color: var(--tfc-ink-2);
}
.tf-table thead th {
    background: var(--tfc-surface-2);
    color: var(--tfc-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--tfc-line-2);
    white-space: nowrap;
}
.tf-table tbody tr:last-child td { border-bottom: none; }
.tf-table tbody tr:hover { background: var(--tfc-surface-2); }
.tf-rate-num { font-family: var(--tfc-mono); font-weight: 700; color: var(--tfc-ink); white-space: nowrap; }
.tf-rate-table td:nth-child(2) { font-family: var(--tfc-mono); font-weight: 700; color: var(--tfc-ink); white-space: nowrap; }
.tf-rate-table td:last-child { font-size: 12.5px; color: var(--tfc-ink-3); }

.tf-per-class {
    padding: 18px 20px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
}
.tf-per-class table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tf-per-class th, .tf-per-class td {
    padding: 9px 0;
    text-align: left;
    border-bottom: 1px dashed var(--tfc-line);
    color: var(--tfc-ink-2);
}
.tf-per-class thead th {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--tfc-ink-3);
    border-bottom: 1px solid var(--tfc-line-2);
}
.tf-per-class td.tf-rate-num { text-align: right; }
.tf-per-class tr.tf-per-total td {
    border-bottom: none;
    border-top: 2px solid var(--tfc-cyan);
    padding-top: 11px;
    font-weight: 800;
    color: var(--tfc-ink);
}
.tf-per-class tr.tf-per-total td.tf-rate-num { color: var(--tfc-cyan-2); font-size: 16px; }

/* ============================ 批量拼版表 ============================ */
.tf-batch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 15px;
}
.tf-batch-best { margin: 0; font-size: 13.5px; color: var(--tfc-ink-2); }
.tf-batch-best b { color: var(--tfc-cyan-2); }
.tf-table tbody tr.is-best { background: var(--tfc-cyan-soft); }
.tf-empty { text-align: center; color: var(--tfc-ink-3); padding: 22px 0 !important; }
.tf-mini-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    margin-right: 5px;
    border-radius: 4px;
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface);
    color: var(--tfc-ink-2);
    cursor: pointer;
}
.tf-mini-btn:hover { border-color: var(--tfc-cyan); color: var(--tfc-cyan-2); }
.tf-mini-btn.is-del:hover { border-color: var(--tfc-red); color: var(--tfc-red); }
.tf-mini-flag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--tfc-green-soft);
    color: var(--tfc-green);
}

/* ============================ CSV 预览 ============================ */
.tf-pre {
    margin: 0;
    padding: 16px 18px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
    font-family: var(--tfc-mono);
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--tfc-ink-2);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 420px;
    overflow: auto;
}

/* ============================ FAQ ============================ */
.tf-faq { display: flex; flex-direction: column; gap: 8px; }
.tf-faq-item {
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line);
    background: var(--tfc-surface-2);
    overflow: hidden;
}
.tf-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 13px 44px 13px 16px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--tfc-ink);
    position: relative;
}
.tf-faq-item summary::-webkit-details-marker { display: none; }
.tf-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--tfc-mono);
    font-size: 19px;
    font-weight: 700;
    color: var(--tfc-cyan);
}
.tf-faq-item[open] summary { color: var(--tfc-cyan-2); }
.tf-faq-item[open] summary::after { content: "−"; }
.tf-faq-a {
    padding: 13px 16px 15px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--tfc-ink-2);
    border-top: 1px solid var(--tfc-line);
}
.tf-faq-a b { color: var(--tfc-ink); font-weight: 700; }

/* ============================ 留言板 ============================ */
.tf-comments {
    padding: 24px 26px;
    border-radius: var(--tfc-r);
    background: var(--tfc-surface);
    border: 1px solid var(--tfc-line);
    box-shadow: var(--tfc-shadow);
}
.tf-comments .cm-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--tfc-line);
}
.tf-comments .cm-title {
    display: inline-flex;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--tfc-ink);
}
.tf-comments .cm-title::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    margin-right: 9px;
    background: var(--tfc-cyan);
}
.tf-comments .cm-count {
    font-size: 12.5px;
    color: #fff;
    background: var(--tfc-cyan);
    border-radius: 999px;
    padding: 1px 9px;
    margin-left: 8px;
}
.tf-comments .cm-note {
    font-size: 12px;
    color: var(--tfc-ink-3);
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--tfc-surface-2);
    border: 1px solid var(--tfc-line);
}
.tf-comments .cm-item {
    padding: 14px 16px;
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line);
    background: var(--tfc-surface-2);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tf-comments .cm-item:hover { transform: translateY(-2px); box-shadow: var(--tfc-shadow); }
.tf-comments .cm-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--tfc-cyan-soft);
    color: var(--tfc-cyan-2);
    font-size: 16px;
}
.tf-comments .cm-content { font-size: 14px; line-height: 1.85; color: var(--tfc-ink-2); }
.tf-comments .cm-form {
    padding: 20px;
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line);
    background: var(--tfc-surface-2);
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.tf-comments .cm-form-title { font-size: 15px; font-weight: 800; color: var(--tfc-ink); }
.tf-comments .cm-input, .tf-comments .cm-textarea {
    border-radius: var(--tfc-r-sm);
    border: 1px solid var(--tfc-line-2);
    background: var(--tfc-surface);
    color: var(--tfc-ink);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
}
.tf-comments .cm-input:focus, .tf-comments .cm-textarea:focus {
    outline: none;
    border-color: var(--tfc-cyan);
    box-shadow: 0 0 0 3px var(--tfc-cyan-soft);
}
.tf-comments .cm-submit {
    align-self: flex-start;
    border-radius: var(--tfc-r-sm);
    padding: 11px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    border: none;
    background: var(--tfc-cyan);
    color: #fff;
    cursor: pointer;
}
:root[data-theme="dark"] .tf-page .tf-comments .cm-submit { color: #0b1416; }
.tf-comments .cm-submit:hover { background: var(--tfc-cyan-2); }
.tf-comments .cm-success {
    padding: 26px;
    border-radius: var(--tfc-r-sm);
    background: var(--tfc-green-soft);
    border: 1px dashed var(--tfc-green);
    text-align: center;
}

/* ============================ Toast ============================ */
.tf-toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    transform: translate(-50%, 16px);
    z-index: 9999;
    max-width: min(90vw, 480px);
    padding: 12px 22px;
    border-radius: 6px;
    background: var(--tfc-ink);
    color: var(--tfc-paper);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .65);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.tf-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tf-toast.is-err { background: var(--tfc-red); color: #fff; }

/* ============================ A4 打印单 ============================ */
.tf-sheet { display: none; }
@media print {
    @page { size: A4; margin: 14mm 12mm; }
    body { background: #fff !important; }
    .tf-hero, .tf-picker, .tf-presets, .tf-errbar, .tf-config, .tf-compare,
    .tf-life, .tf-batch, .tf-rates, .tf-csv, .tf-faq, .tf-comments, .tf-toast,
    .detail-breadcrumb, .nav-header, .footer, .back-to-top {
        display: none !important;
    }
    .tf-sheet { display: block !important; }
    .tf-sheet .tf-sheet-head h3 {
        font-size: 22px;
        font-weight: 800;
        margin: 0 0 4px;
        color: #1a1a18;
    }
    .tf-sheet .tf-sheet-head span { font-size: 13px; color: #8a8479; }
    .tf-sheet .tf-sheet-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
    .tf-sheet .tf-sheet-table th, .tf-sheet .tf-sheet-table td {
        border: 1px solid #cfc7b6;
        padding: 7px 10px;
        text-align: left;
    }
    .tf-sheet .tf-sheet-table th { background: #f6f3ec; color: #4b4842; font-weight: 700; }
    .tf-sheet .tf-sheet-hero td { font-size: 17px; font-weight: 800; color: #0d7c86; }
    .tf-sheet .tf-sheet-life thead th { background: #f6f3ec; }
    .tf-sheet .tf-sheet-note { font-size: 11.5px; color: #8a8479; line-height: 1.75; margin-top: 14px; }
}

/* ============================ 响应式 ============================ */
@media (max-width: 1100px) {
    .tf-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .tf-stamp-wrap { border-left: none; border-top: 1px solid var(--tfc-line); }
    .tf-config-grid { grid-template-columns: minmax(0, 1fr); }
    .tf-rates-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .tf-page { font-size: 14.5px; }
    .tf-hero-left { padding: 26px 18px 22px; }
    .tf-picker { padding: 16px 14px 14px; margin-top: 18px; }
    .tf-presets { padding: 14px 16px; }
    .tf-stamp-wrap { padding: 22px 18px 20px; }
    .tf-panel { padding: 20px 16px 18px; }
    .tf-comments { padding: 18px 16px; }
    .tf-fields { grid-template-columns: minmax(0, 1fr); }
    .tf-quick-metrics, .tf-life-summary { grid-template-columns: minmax(0, 1fr); }
    .tf-class-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 5px; }
    .tf-life-item { padding-left: 22px; }
    .tf-life-head { flex-wrap: wrap; }
    .tf-life-amt { margin-left: 0; }
    .tf-actions .tf-btn { flex: 1 1 auto; }
}
