/* ======================================================================
 * LW12 · 生活气象台 · 全新 UI 设计基座 v1
 * ----------------------------------------------------------------------
 * 设计语言：「纸感中性底 + 每页一枚主色 + 数据感刻度」
 *   · 字体层级：展示级 46 / 主标题 42 / 小节 20 / 正文 15 / 注释 12.5，
 *     数字统一 tabular-nums，行距 1.85，段间距收放降低阅读阻力
 *   · 布局：1160px 单栏 + 四种首屏构图（split / stack / rail / wide），
 *     首屏内直接放「速算卡」，不滚动即可完成第一次操作
 *   · 主题：只读公共导航 #themeToggle 写入的 <html data-theme>；
 *     默认 auto 跟随系统，手动切换由 localStorage.theme 记忆
 *   · 零外链图片、零外链字体、零第三方 JS；图形全部由 CSS / 内联 SVG 绘制
 * 具体配色、构图与视觉母题由每个工具独立的 css/lw12/{slug}.css 决定，
 * 12 个工具互不复用视觉方案；本文件只提供跨页成立的原子件。
 * ====================================================================== */

.lw12 {
    /* ---------- 中性令牌（浅色） ---------- */
    --paper: #f5f7f6;
    --paper-2: #eef2f1;
    --card: #ffffff;
    --card-2: #f7f9f8;
    --card-3: #eff3f2;
    --ink: #16211f;
    --ink-2: #3b4a48;
    --muted: #6e7d7b;
    --line: #dfe6e4;
    --line-2: #ecf0ef;
    --shadow-xs: 0 1px 2px rgba(18, 38, 34, .05);
    --shadow: 0 2px 8px rgba(18, 38, 34, .05), 0 14px 36px rgba(18, 38, 34, .055);
    --shadow-lg: 0 8px 24px rgba(18, 38, 34, .09), 0 36px 80px rgba(18, 38, 34, .12);

    /* ---------- 每页主色（由 {slug}.css 覆盖） ---------- */
    --a: #16798c;
    --a2: #5fb7bd;
    --a-soft: #e6f3f3;
    --a-ink: #ffffff;

    /* ---------- 语义色 ---------- */
    --ok: #17734f;   --ok-bg: #e4f4ec;
    --warn: #96600c; --warn-bg: #fcf1d9;
    --bad: #b23b34;  --bad-bg: #fbe9e7;
    --info: #1c6a88; --info-bg: #e5f2f7;

    /* ---------- 形状 / 字体 ---------- */
    --r: 18px;
    --r-sm: 11px;
    --r-pill: 999px;
    --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

    display: block;
    position: relative;
    isolation: isolate;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.85;
    letter-spacing: .002em;
    padding: 0 0 76px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 深色主题：只消费公共导航栏主题开关写入的 <html data-theme="dark"> */
:root[data-theme="dark"] .lw12 {
    --paper: #0d1416;
    --paper-2: #111b1e;
    --card: #162125;
    --card-2: #1b282c;
    --card-3: #223136;
    --ink: #e9f1ef;
    --ink-2: #bdccc9;
    --muted: #8ba09d;
    --line: #2b3b3f;
    --line-2: #223136;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 10px rgba(0, 0, 0, .42), 0 16px 40px rgba(0, 0, 0, .3);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, .5), 0 40px 88px rgba(0, 0, 0, .4);
    --ok: #69c697;   --ok-bg: #173027;
    --warn: #e0b35f; --warn-bg: #332a17;
    --bad: #e88a80;  --bad-bg: #37201e;
    --info: #69bcd8; --info-bg: #16303a;
}

.lw12 *, .lw12 *::before, .lw12 *::after { box-sizing: border-box; }
.lw12 [hidden] { display: none !important; }
.lw12 ::selection { background: var(--a); color: var(--a-ink); }

/* ---------- 容器 ---------- */
.lw-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.lw12 .lw-wrap > section, .lw12 .lw-wrap > header { position: relative; z-index: 1; }

/* ---------- 字体层级 ---------- */
.lw12 h1, .lw12 h2, .lw12 h3, .lw12 h4 {
    font-family: var(--font);
    color: var(--ink);
    margin: 0;
    font-weight: 800;
    letter-spacing: -.022em;
    line-height: 1.28;
}
.lw12 h1 { font-size: clamp(29px, 3.7vw, 43px); }
.lw12 h2 { font-size: clamp(19px, 2vw, 23px); letter-spacing: -.014em; }
.lw12 h3 { font-size: 16.5px; letter-spacing: -.008em; }
.lw12 h4 { font-size: 14.5px; }
.lw12 p { margin: 0 0 13px; }
.lw12 p:last-child { margin-bottom: 0; }
.lw12 b, .lw12 strong { font-weight: 750; color: var(--ink); }
.lw12 .kw { font-weight: 750; color: var(--a); box-shadow: inset 0 -.36em 0 var(--a-soft); }
.lw12 small { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.lw12 .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- 首屏骨架 ---------- */
.lw-hero { padding: 34px 0 26px; }
.lw-hero-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(1100px 420px at 88% -18%, var(--a-soft), transparent 62%),
        linear-gradient(150deg, var(--card) 0%, var(--card-2) 100%);
    box-shadow: var(--shadow);
    padding: 34px 36px 32px;
}
.lw-hero-box::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
    background: linear-gradient(180deg, var(--a), var(--a2));
}
.lw-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 750; letter-spacing: .08em;
    color: var(--a); background: var(--a-soft);
    border: 1px solid color-mix(in srgb, var(--a) 22%, transparent);
    padding: 5px 13px; border-radius: var(--r-pill); margin: 0 0 16px;
}
.lw-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.lw-hero h1 { margin: 0 0 10px; max-width: 20em; }
.lw-hero h1 em { font-style: normal; color: var(--a); }
.lw-hero .lw-lede { font-size: 16.5px; font-weight: 650; color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; }
.lw-hero .lw-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; max-width: 62em; margin: 0; }
.lw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.lw-tags li {
    font-size: 12.5px; font-weight: 650; color: var(--ink-2);
    background: var(--card); border: 1px solid var(--line);
    padding: 5px 12px; border-radius: var(--r-pill);
    box-shadow: var(--shadow-xs);
}
.lw-tags li::before { content: "✓"; color: var(--a); font-weight: 800; margin-right: 6px; }
.lw-hero-metrics { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.lw-hero-metrics div { display: flex; flex-direction: column; gap: 1px; }
.lw-hero-metrics b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 800; color: var(--a); line-height: 1.3; }
.lw-hero-metrics span { font-size: 12px; color: var(--muted); }

/* ---------- 首屏速算卡（操作入口直接置于首屏） ---------- */
.lw-quick {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r); box-shadow: var(--shadow-lg);
    padding: 20px 20px 18px; position: relative; overflow: hidden;
}
.lw-quick::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--a), var(--a2)); }
.lw-quick-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lw-quick-h h2 { font-size: 17px; }
.lw-quick-h span { font-size: 12px; color: var(--muted); }
.lw-quick-grid { display: grid; gap: 11px; }
.lw-quick-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.lw-quick-hint { font-size: 12.5px; color: var(--muted); margin: 11px 0 0; line-height: 1.65; }

/* ---------- 卡片 / 面板 ---------- */
.lw-card, .lw-panel {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r); box-shadow: var(--shadow);
    padding: 24px 26px; margin: 0 0 18px;
}
.lw-card-h, .lw-panel-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.lw-card-h h2, .lw-panel-h h2 { font-size: 19px; display: flex; align-items: center; gap: 9px; }
.lw-step-no {
    display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px;
    border-radius: 8px; background: var(--a-soft); color: var(--a);
    font-family: var(--mono); font-size: 13px; font-weight: 800;
}
.lw-card-h small, .lw-panel-h small { font-size: 12.5px; color: var(--muted); }
.lw-sub-h { font-size: 13px; font-weight: 750; color: var(--ink-2); margin: 18px 0 9px; letter-spacing: .01em; }

/* ---------- 表单 ---------- */
.lw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 14px; }
.lw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lw-field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.lw-field > span i { font-style: normal; color: var(--bad); margin-left: 3px; }
.lw-field input, .lw-field select, .lw-field textarea, .lw12 input[type="text"], .lw12 input[type="number"], .lw12 input[type="date"], .lw12 input[type="time"], .lw12 select, .lw12 textarea {
    width: 100%; font-family: var(--font); font-size: 14.5px; color: var(--ink);
    background: var(--card-2); border: 1px solid var(--line);
    border-radius: var(--r-sm); padding: 9px 12px; line-height: 1.5;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    outline: none;
}
.lw12 input:focus, .lw12 select:focus, .lw12 textarea:focus {
    border-color: var(--a); background: var(--card);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 16%, transparent);
}
.lw12 input[type="number"] { font-variant-numeric: tabular-nums; }
.lw12 textarea { resize: vertical; min-height: 96px; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.lw12 input::placeholder, .lw12 textarea::placeholder { color: var(--muted); opacity: .8; }
.lw-unit { position: relative; }
.lw-unit input { padding-right: 48px !important; }
.lw-unit::after { content: attr(data-unit); position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.lw-inline-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.lw-check {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    font-size: 13px; font-weight: 650; color: var(--ink-2);
    background: var(--card-2); border: 1px solid var(--line);
    border-radius: var(--r-pill); padding: 6px 13px; user-select: none;
    transition: all .15s ease;
}
.lw-check:hover { border-color: var(--a); }
.lw-check input { width: 15px; height: 15px; accent-color: var(--a); margin: 0; cursor: pointer; }
.lw-check:has(input:checked) { background: var(--a-soft); border-color: var(--a); color: var(--a); }
.lw-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.lw-seg label { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 5px 13px; border-radius: var(--r-pill); transition: all .16s ease; white-space: nowrap; }
.lw-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lw-seg input:checked + span { color: var(--a-ink); }
.lw-seg label:has(input:checked) { background: var(--a); color: var(--a-ink); box-shadow: var(--shadow-xs); }
.lw-seg label:hover { color: var(--ink); }
.lw12 .lw-seg label:has(input:checked):hover { color: var(--a-ink); }

/* ---------- 按钮 ---------- */
.lw-btn {
    appearance: none; border: 1px solid var(--line); background: var(--card);
    color: var(--ink-2); font-family: var(--font); font-size: 13.5px; font-weight: 750;
    padding: 10px 18px; border-radius: var(--r-sm); cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.4;
}
.lw-btn:hover { border-color: var(--a); color: var(--a); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.lw-btn:active { transform: translateY(0); }
.lw-btn:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.lw-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--a) 40%, transparent); outline-offset: 2px; }
.lw-btn-main {
    background: linear-gradient(135deg, var(--a), var(--a2));
    color: var(--a-ink); border-color: transparent;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--a) 30%, transparent);
    font-size: 14.5px; padding: 11px 22px;
}
.lw-btn-main:hover { color: var(--a-ink); filter: brightness(1.06); box-shadow: 0 7px 20px color-mix(in srgb, var(--a) 38%, transparent); }
.lw-btn-ghost { background: transparent; border-style: dashed; }
.lw-btn-sm { font-size: 12.5px; padding: 7px 13px; }
.lw-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.lw12 .lw-msg { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; min-height: 1.4em; }
.lw12 .lw-msg.is-err { color: var(--bad); font-weight: 650; }
.lw12 .lw-msg.is-ok { color: var(--ok); font-weight: 650; }

/* ---------- 空态 / 结果 ---------- */
.lw-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 8px; padding: 54px 24px;
    background: var(--card); border: 1px dashed var(--line);
    border-radius: var(--r); color: var(--muted); margin-bottom: 18px;
}
.lw-empty .ic { font-size: 34px; line-height: 1; opacity: .75; }
.lw-empty b { font-size: 15.5px; color: var(--ink-2); }
.lw-empty em { font-style: normal; font-size: 13px; max-width: 44em; line-height: 1.8; }
.lw-out { animation: lw-in .34s ease both; }
@keyframes lw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- KPI ---------- */
.lw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 13px; margin-bottom: 18px; }
.lw-kpi {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow); padding: 18px 19px 16px; display: flex; flex-direction: column; gap: 3px;
    position: relative; overflow: hidden;
}
.lw-kpi::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line); }
.lw-kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.lw-kpi .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(25px, 2.8vw, 33px); font-weight: 800; color: var(--ink); line-height: 1.28; letter-spacing: -.035em; }
.lw-kpi .s { font-size: 11.5px; color: var(--muted); }
.lw-kpi.is-hero { background: linear-gradient(145deg, var(--a-soft), var(--card) 72%); border-color: color-mix(in srgb, var(--a) 24%, var(--line)); }
.lw-kpi.is-hero::before { background: linear-gradient(180deg, var(--a), var(--a2)); }
.lw-kpi.is-hero .v { color: var(--a); }
.lw-kpi.is-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.lw-kpi.is-warn .v { color: var(--warn); }
.lw-kpi.is-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.lw-kpi.is-bad .v { color: var(--bad); }
.lw-kpi.is-ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.lw-kpi.is-ok .v { color: var(--ok); }

/* ---------- 表格 ---------- */
.lw-tw { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.lw-tb { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.lw-tb th, .lw-tb td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.lw-tb th { background: var(--card-2); color: var(--ink-2); font-size: 12.5px; font-weight: 750; position: sticky; top: 0; z-index: 1; }
.lw-tb tbody tr:nth-child(even) { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.lw-tb tbody tr:hover { background: var(--a-soft); }
.lw-tb tbody tr:last-child td { border-bottom: none; }
.lw-tb td.num, .lw-tb th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lw-tb .wrap { white-space: normal; min-width: 150px; }
.lw-tb tr.is-bad td { background: var(--bad-bg); }
.lw-tb tr.is-warn td { background: var(--warn-bg); }
.lw-tb tr.is-ok td { background: var(--ok-bg); }

/* ---------- 标签 / 提示 ---------- */
.lw-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 750; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid transparent; white-space: nowrap; }
.lw-chip.ok { color: var(--ok); background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.lw-chip.warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 24%, transparent); }
.lw-chip.bad { color: var(--bad); background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 24%, transparent); }
.lw-chip.info { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 24%, transparent); }
.lw-chip.mute { color: var(--muted); background: var(--card-3); border-color: var(--line); }
.lw-note {
    font-size: 13px; line-height: 1.8; color: var(--ink-2);
    background: var(--card-2); border-left: 3px solid var(--a);
    border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 11px 15px; margin: 14px 0 0;
}
.lw-note.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.lw-note.bad { border-left-color: var(--bad); background: var(--bad-bg); }
.lw-note.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.lw-note b { color: inherit; }

/* ---------- 通用图形原语 ---------- */
.lw-track { height: 10px; border-radius: var(--r-pill); background: var(--card-3); overflow: hidden; border: 1px solid var(--line); }
.lw-track > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--a), var(--a2)); transition: width .5s ease; }
.lw-cols { display: flex; align-items: flex-end; gap: 4px; height: 148px; padding: 8px 0 0; }
.lw-col { flex: 1 1 0; min-width: 6px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.lw-col > i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--a2), var(--a)); min-height: 2px; transition: height .5s ease; }
.lw-col > span { font-size: 10px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.lw-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 7px; margin-top: 6px; }
.lw12 svg { display: block; max-width: 100%; }
.lw-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.lw-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- 结果操作条 ---------- */
.lw-final { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 4px 0 0; }

/* ---------- 底部内容套件 ---------- */
.lw-bottom { margin-top: 34px; }
.lw-bottom .lw-card { padding: 28px 30px; }
.lw-bottom h2 { margin-bottom: 14px; }
.lw-bottom p { color: var(--ink-2); font-size: 14.5px; line-height: 1.92; }
.lw-points { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.lw-points li { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 15px; font-size: 13.5px; line-height: 1.82; color: var(--ink-2); }
.lw-points b { color: var(--a); }
.lw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; counter-reset: lwstep; }
.lw-steps li { list-style: none; position: relative; padding: 15px 15px 14px 16px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.lw-steps li::before { counter-increment: lwstep; content: "0" counter(lwstep); display: block; font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--a); margin-bottom: 5px; letter-spacing: .08em; }
.lw-steps b { display: block; font-size: 14px; margin-bottom: 3px; }
.lw-steps span { font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.lw-legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.lw-legend-grid > div { border: 1px solid var(--line); border-top: 3px solid var(--a); border-radius: var(--r-sm); padding: 14px 16px; background: var(--card-2); }
.lw-legend-grid b { display: block; font-size: 14px; margin-bottom: 5px; }
.lw-legend-grid p { font-size: 12.8px; line-height: 1.82; color: var(--ink-2); margin: 0; }
.lw-faq { display: grid; gap: 0; }
.lw-faq details { border-bottom: 1px solid var(--line-2); padding: 2px 0; }
.lw-faq details:last-child { border-bottom: none; }
.lw-faq summary { cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--ink); padding: 13px 30px 13px 2px; position: relative; list-style: none; }
.lw-faq summary::-webkit-details-marker { display: none; }
.lw-faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--a); font-size: 19px; font-weight: 500; }
.lw-faq details[open] summary::after { content: "−"; }
.lw-faq summary:hover { color: var(--a); }
.lw-faq details > p { font-size: 13.5px; line-height: 1.9; color: var(--ink-2); padding: 0 22px 15px 2px; margin: 0; }
.lw-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.lw-related a { display: flex; gap: 11px; align-items: flex-start; text-decoration: none; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 14px; transition: all .16s ease; }
.lw-related a:hover { border-color: var(--a); transform: translateY(-2px); box-shadow: var(--shadow-xs); }
.lw-related .ic { font-size: 20px; line-height: 1.3; }
.lw-related b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.lw-related span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.lw-updates { font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* ---------- Toast（仅用户操作后触发） ---------- */
.lw-toast-host { position: fixed; right: 22px; bottom: 24px; z-index: 9990; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.lw-toast {
    min-width: 200px; max-width: 340px; padding: 11px 16px; border-radius: var(--r-sm);
    background: var(--ink); color: var(--card); font-size: 13px; font-weight: 650;
    box-shadow: var(--shadow-lg); animation: lw-toast-in .22s ease both; line-height: 1.6;
}
.lw-toast.ok { background: var(--ok); color: #fff; }
.lw-toast.err { background: var(--bad); color: #fff; }
@keyframes lw-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 结果弹层：只在用户完成一次操作之后由业务脚本调用 ---------- */
.lw-modal-mask { position: fixed; inset: 0; z-index: 9995; background: rgba(10, 20, 20, .58); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.lw-modal { width: min(620px, 100%); max-height: min(78vh, 760px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px 28px 24px; }
.lw-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lw-modal-h h3 { font-size: 18px; }
.lw-modal-x { border: 1px solid var(--line); background: var(--card-2); color: var(--ink-2); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1; }
.lw-modal-x:hover { border-color: var(--a); color: var(--a); }
.lw-modal pre { white-space: pre-wrap; word-break: break-word; font-family: var(--font); font-size: 13.5px; line-height: 1.9; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin: 0 0 16px; max-height: 46vh; overflow: auto; }
.lw-modal .lw-actions { margin-top: 0; }

/* ---------- AI 面板 ---------- */
.lw-ai { border: 1px solid color-mix(in srgb, var(--a) 30%, var(--line)); background: linear-gradient(140deg, var(--a-soft), var(--card) 70%); border-radius: var(--r); padding: 22px 24px; margin-bottom: 18px; }
.lw-ai h3 { font-size: 16px; margin-bottom: 6px; }
.lw-ai > p { font-size: 13px; color: var(--ink-2); line-height: 1.8; margin-bottom: 12px; }
.lw-ai-out { font-size: 13.5px; line-height: 1.92; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; margin-top: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .lw-wrap { padding: 0 16px; }
    .lw-hero { padding: 22px 0 18px; }
    .lw-hero-box { padding: 26px 22px 24px; border-radius: 20px; }
    .lw-hero h1 { font-size: clamp(26px, 6.6vw, 34px); }
    .lw-hero .lw-lede { font-size: 15px; }
    .lw-card, .lw-panel { padding: 20px 17px; }
    .lw-bottom .lw-card { padding: 22px 18px; }
    .lw-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
    .lw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lw-hero-metrics { gap: 16px; }
    .lw-btn { padding: 9px 14px; }
}
@media (max-width: 520px) {
    .lw-kpis { grid-template-columns: 1fr; }
    .lw-hero-metrics b { font-size: 17px; }
    .lw-steps, .lw-legend-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .lw12 *, .lw12 *::before, .lw12 *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
