/* =====================================================================
 * 工具 20 · 避孕套尺寸对照 —— 独立视觉「临床测量尺 / 规格瓦片」
 * 母题：横向毫米刻度尺 + 大号等宽数字瓦片 + 冷蓝灰临床配色，
 * 信息密度高但留白充足，不使用任何装饰性插画。
 * ===================================================================== */
.fl9.cs {
    --cs-blue: #2f6b8f;
    --cs-blue2: #1f4d6b;
    --cs-soft: #eaf3f8;
    --cs-steel: #64798c;
    --cs-line: #cadbe6;
    --cs-gold: #b98a34;
}
:root[data-theme="dark"] .fl9.cs {
    --cs-blue: #7fb9db;
    --cs-blue2: #a9d4ec;
    --cs-soft: #1a2c3a;
    --cs-steel: #93a8bb;
    --cs-line: #33495a;
    --cs-gold: #e5bb72;
}

.cs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 26px;
    align-items: stretch;
    padding: 14px 0 6px;
}
.cs-ruler-side h1 { color: var(--cs-blue2); margin: 12px 0 14px; font-size: clamp(31px, 4vw, 44px); }
.fl9.cs .fl9-kicker, .fl9.cs b, .fl9.cs .fl9-lede b { color: var(--cs-blue2); }
.cs-ruler-box { margin-top: 20px; border: 1px solid var(--cs-line); border-radius: 12px; background: var(--fl-card); padding: 12px 14px 10px; box-shadow: var(--fl-sh); }
.cs-ruler-hd, .cs-ruler-ft { display: flex; justify-content: space-between; gap: 10px; font-family: var(--fl-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--cs-steel); text-transform: uppercase; }
.cs-ruler-box svg { width: 100%; display: block; margin: 6px 0 2px; }
.cs-svg-axis { stroke: var(--cs-blue); stroke-width: 2; }
.cs-svg-tick { stroke: var(--cs-steel); stroke-width: 1; }
.cs-svg-tick.is-major { stroke: var(--cs-blue2); stroke-width: 1.6; }
.cs-svg-tick-label { fill: var(--fl-muted); font-family: var(--fl-mono); font-size: 9px; }
.cs-svg-marker { stroke: var(--cs-gold); stroke-width: 2.5; }
.cs-svg-marker-dot { fill: var(--cs-gold); }
.cs-svg-label { fill: var(--cs-blue2); font-family: var(--fl-mono); font-size: 11px; font-weight: 700; }
.cs-ruler-ft { border-top: 1px dashed var(--cs-line); padding-top: 8px; text-transform: none; letter-spacing: 0; }

.cs-form { background: var(--fl-card); border: 1px solid var(--cs-line); border-top: 4px solid var(--cs-blue); border-radius: 16px; box-shadow: var(--fl-sh); align-self: start; overflow: hidden; }
.cs-form-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--cs-soft); border-bottom: 1px solid var(--cs-line); }
.cs-form-hd h2 { font-size: 18px; color: var(--cs-blue2); }
.cs-form-body { padding: 16px 18px 18px; }
.cs-form-body .fl9-row { margin-bottom: 12px; }
.cs-form-body .fl9-field > span { font-size: 12px; }
.cs-form-body input { font-family: var(--fl-mono); }
.cs-form .fl9-btn-main { background: var(--cs-blue); border-color: var(--cs-blue); }
.cs-form .fl9-btn-main:hover { background: var(--cs-blue2); border-color: var(--cs-blue2); }

/* ---------- 结果 ---------- */
.fl9.cs .fl9-kpi { border-left: 3px solid var(--cs-blue); }
.fl9.cs .fl9-kpi .v { color: var(--cs-blue2); }
.fl9.cs .fl9-kpi.is-gold { border-left-color: var(--cs-gold); }
.fl9.cs .fl9-kpi.is-gold .v { color: var(--cs-gold); }
.cs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.cs-tile { position: relative; border: 1px solid var(--cs-line); border-radius: 14px; padding: 16px 14px; background: var(--fl-card); text-align: center; transition: transform .16s, border-color .16s; }
.cs-tile .n { display: block; font-family: var(--fl-mono); font-size: 30px; font-weight: 700; color: var(--cs-blue2); line-height: 1.2; font-variant-numeric: tabular-nums; }
.cs-tile .n small { font-size: 13px; font-weight: 500; }
.cs-tile .d { display: block; font-size: 11.5px; color: var(--fl-muted); margin-top: 4px; }
.cs-tile .p { display: inline-block; margin-top: 9px; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--cs-soft); color: var(--cs-steel); }
.cs-tile.is-pick { border-color: var(--cs-blue); background: var(--cs-soft); transform: translateY(-3px); box-shadow: var(--fl-sh); }
.cs-tile.is-pick .n { color: var(--cs-blue2); }
.cs-tile.is-pick .p { background: var(--cs-blue); color: #fff; }
.cs-tile.is-alt { border-style: dashed; border-color: var(--cs-gold); }
.cs-tile.is-alt .p { background: var(--fl-warnbg); color: var(--fl-warn); }
:root[data-theme="dark"] .fl9.cs .cs-tile.is-pick .p { color: #0b111f; }

.fl9.cs .cs-cols { margin-top: 14px; }
.cs-note-row { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--cs-line); font-size: 13px; line-height: 1.85; color: var(--fl-ink2); }
.cs-note-row:last-child { border-bottom: 0; }
.cs-note-row i { font-style: normal; flex: 0 0 auto; width: 19px; height: 19px; border-radius: 4px; display: grid; place-items: center; background: var(--cs-soft); color: var(--cs-blue2); font-family: var(--fl-mono); font-size: 10px; }
.cs-guide { margin-top: 10px; padding: 10px 12px; background: var(--cs-soft); border-radius: 8px; font-size: 12.5px; line-height: 1.85; color: var(--fl-ink2); }
.cs-guide b { color: var(--cs-blue2); }
.cs-table-panel { margin-top: 14px; }
.fl9.cs .fl9-scroll th { color: var(--cs-blue2); }
.fl9.cs .fl9-scroll td .fl9-num { color: var(--cs-blue2); }
.cs-table-panel tr.is-pick { background: var(--cs-soft); }

/* ---------- 批量 / 清洗 ---------- */
.cs-clean { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 13px; border: 1px dashed var(--cs-line); border-radius: 10px; background: var(--fl-card2); font-size: 12.5px; }
.cs-clean > b { color: var(--cs-blue2); }
.cs-clean code { margin-left: auto; max-width: 100%; overflow-wrap: anywhere; }
.fl9.cs #csBatchWrap { margin-top: 14px; }

@media (max-width: 960px) {
    .cs-hero { grid-template-columns: 1fr; }
    .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-clean code { margin-left: 0; width: 100%; }
}
