/* ==========================================================================
   工具页底部套件 · tool-station-bottom
   ------------------------------------------------------------------
   结构：口径说明表 → 标签页（简介/用法/更新/问答/留言）→ 相关工具
   作用域：全部规则挂在 .tskb 之下，不触碰站内其它工具页的样式。
   配色：跟随导航栏 #themeToggle 的浅色 / 深色两套主题。
   ========================================================================== */

.tskb {
    /* 浅色 */
    --tskb-bg: #ffffff;
    --tskb-soft: #f6f8fc;
    --tskb-ink: #16202f;
    --tskb-ink2: #4a5668;
    --tskb-ink3: #8b95a7;
    --tskb-line: #e6eaf2;
    --tskb-line2: #f0f3f8;
    --tskb-accent: #4f46e5;
    --tskb-accent-soft: #eef0fe;

    margin-top: 34px;
    color: var(--tskb-ink);
}

:root[data-theme="dark"] .tskb {
    --tskb-bg: #151d2e;
    --tskb-soft: #1b2437;
    --tskb-ink: #e8ecf4;
    --tskb-ink2: #b3bccd;
    --tskb-ink3: #7c8798;
    --tskb-line: #26314a;
    --tskb-line2: #202a3f;
    --tskb-accent: #8b93ff;
    --tskb-accent-soft: rgba(139, 147, 255, .14);
}

/* ---------- 卡片 ---------- */
.tskb-card {
    background: var(--tskb-bg);
    border: 1px solid var(--tskb-line);
    border-radius: 16px;
    padding: 20px 24px 22px;
    box-shadow: 0 2px 10px rgba(21, 31, 51, .04);
}

.tskb-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--tskb-ink);
}
.tskb-card-title .tskb-ic {
    width: 30px;
    height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 15px;
    background: var(--tskb-accent-soft);
}
.tskb-card-title .tskb-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--tskb-ink3);
    margin-left: auto;
}

/* ---------- 口径说明表 ---------- */
.tskb-legend {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    line-height: 1.75;
}
.tskb-legend th {
    width: 92px;
    text-align: left;
    font-weight: 700;
    color: var(--tskb-ink);
    padding: 11px 14px 11px 0;
    vertical-align: top;
    white-space: nowrap;
    border-bottom: 1px solid var(--tskb-line2);
}
.tskb-legend td {
    color: var(--tskb-ink2);
    padding: 11px 0;
    vertical-align: top;
    border-bottom: 1px solid var(--tskb-line2);
}
.tskb-legend tr:last-child th,
.tskb-legend tr:last-child td { border-bottom: 0; }
.tskb-legend b { color: var(--tskb-ink); }

/* ---------- 标签页 ---------- */
.tskb-tabs {
    display: flex;
    gap: 4px;
    margin: 26px 0 14px;
    border-bottom: 1px solid var(--tskb-line);
    flex-wrap: wrap;
}
.tskb-tab {
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--tskb-ink2);
    padding: 10px 16px;
    position: relative;
    transition: color .18s;
}
.tskb-tab:hover { color: var(--tskb-ink); }
.tskb-tab.active { color: var(--tskb-accent); }
.tskb-tab.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--tskb-accent);
}

/* ---------- 面板 ---------- */
.tskb-panel {
    display: none;
    background: var(--tskb-bg);
    border: 1px solid var(--tskb-line);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(21, 31, 51, .04);
}
.tskb-panel.active { display: block; animation: tskb-fade .28s ease; }
@keyframes tskb-fade { from { opacity: 0; } to { opacity: 1; } }

.tskb-panel h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--tskb-ink);
}
.tskb-panel h3:not(:first-child) { margin-top: 22px; }
.tskb-panel p,
.tskb-panel li {
    font-size: 14px;
    line-height: 1.85;
    color: var(--tskb-ink2);
}
.tskb-panel p { margin: 0 0 10px; }
.tskb-panel b { color: var(--tskb-ink); font-weight: 700; }
.tskb-panel ul { margin: 0; padding-left: 20px; }
.tskb-panel li { margin-bottom: 8px; }

/* 步骤列表 */
.tskb-steps { list-style: none; margin: 0; padding: 0; counter-reset: tskb-step; }
.tskb-steps li {
    position: relative;
    padding-left: 38px;
    margin-bottom: 12px;
}
.tskb-steps li::before {
    counter-increment: tskb-step;
    content: counter(tskb-step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--tskb-accent);
    background: var(--tskb-accent-soft);
}
.tskb-steps b { color: var(--tskb-ink); }

/* 更新记录 */
.tskb-timeline { list-style: none; margin: 0; padding: 0; }
.tskb-timeline li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px dashed var(--tskb-line2);
}
.tskb-timeline li:last-child { border-bottom: 0; }
.tskb-timeline .ver {
    flex: none;
    font-weight: 800;
    font-size: 13px;
    color: var(--tskb-accent);
}
.tskb-timeline .date {
    flex: none;
    width: 88px;
    font-size: 12.5px;
    color: var(--tskb-ink3);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.tskb-timeline .txt { flex: 1; font-size: 13.5px; line-height: 1.75; color: var(--tskb-ink2); }

/* 问答 */
.tskb-faq details {
    border: 1px solid var(--tskb-line);
    border-radius: 12px;
    padding: 0 16px;
    margin-bottom: 10px;
    background: var(--tskb-soft);
}
.tskb-faq summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 0;
    list-style: none;
    color: var(--tskb-ink);
}
.tskb-faq summary::-webkit-details-marker { display: none; }
.tskb-faq summary::after {
    content: "＋";
    float: right;
    color: var(--tskb-accent);
    font-weight: 700;
}
.tskb-faq details[open] summary::after { content: "－"; }
.tskb-faq .a {
    padding: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--tskb-ink2);
}
.tskb-faq .a p { margin: 0; }

/* 留言面板内不留多余内边距 */
.tskb-panel .cm-wrap { gap: 20px; }

/* ---------- 相关工具 ---------- */
.tskb-related { margin-top: 26px; }
.tskb-related > h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--tskb-ink);
}
.tskb-rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.tskb-rel {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    background: var(--tskb-bg);
    border: 1px solid var(--tskb-line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--tskb-ink);
    box-shadow: 0 2px 8px rgba(21, 31, 51, .04);
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.tskb-rel:hover {
    transform: translateY(-3px);
    border-color: var(--tskb-accent);
    box-shadow: 0 8px 20px -10px var(--tskb-accent);
}
.tskb-rel .ri { font-size: 22px; flex: none; }
.tskb-rel b { font-size: 14px; display: block; font-weight: 700; }
.tskb-rel small { font-size: 12px; color: var(--tskb-ink3); display: block; margin-top: 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .tskb { margin-top: 26px; }
    .tskb-card,
    .tskb-panel { padding: 16px 16px 18px; border-radius: 14px; }
    .tskb-card-title { font-size: 15px; }
    .tskb-card-title .tskb-sub { display: none; }
    .tskb-legend th { width: 76px; font-size: 13px; }
    .tskb-legend td { font-size: 13px; }
    .tskb-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tskb-tab { padding: 9px 12px; font-size: 13.5px; white-space: nowrap; }
    .tskb-timeline li { flex-wrap: wrap; gap: 4px 12px; }
    .tskb-timeline .date { width: auto; }
}
