/* =====================================================================
 * 03 事故快处取证清单 · FIELD CLIPBOARD
 * 独立设计：警示橙 + 石板灰；首屏是一块带金属夹的现场速记板，
 * 右半为可点选的 3×3 取景格；缺件用红/橙/灰三级色阶，报案顺序用
 * 带编号圆点的纵向时间线。与其它工具无共用布局类。
 * ===================================================================== */
.mae {
    --ag-bg: #f4f2ee;
    --ag-bg2: #e9e5dd;
    --ag-surface: #fffefa;
    --ag-surface2: #f8f5ef;
    --ag-ink: #25313a;
    --ag-ink2: #4e5a63;
    --ag-muted: #89939a;
    --ag-line: #dedad1;
    --ag-line2: #c8c2b6;
    --ag-accent: #d1612a;
    --ag-accent2: #3d5866;
    --ag-on: #fff8f2;
    --ag-ok: #1e7351;
    --ag-okbg: #e0f2e8;
    --ag-warn: #a26a14;
    --ag-warnbg: #fbf0d6;
    --ag-bad: #b23b33;
    --ag-badbg: #fae7e4;
    --ag-info: #2d6272;
    --ag-infobg: #e3f0f3;
    --ag-r: 6px;
    --ag-shadow: 0 3px 0 rgba(37, 49, 58, .06), 0 14px 32px rgba(37, 49, 58, .08);
    --ag-h: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --ag-b: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --ag-m: "JetBrains Mono", Consolas, monospace;
}
:root[data-theme="dark"] .mae {
    --ag-bg: #12161a;
    --ag-bg2: #1b2229;
    --ag-surface: #1b222a;
    --ag-surface2: #222b33;
    --ag-ink: #edf1f4;
    --ag-ink2: #b1bec7;
    --ag-muted: #84929c;
    --ag-line: #2e3943;
    --ag-line2: #3d4a56;
    --ag-accent: #f0915c;
    --ag-accent2: #8fb3c4;
    --ag-on: #1b1410;
    --ag-ok: #7fd0a4;
    --ag-okbg: #17362a;
    --ag-warn: #e6bb6e;
    --ag-warnbg: #382c17;
    --ag-bad: #f1998f;
    --ag-badbg: #3a221f;
    --ag-info: #8dc4d4;
    --ag-infobg: #1b313a;
    --ag-shadow: 0 12px 34px rgba(0, 0, 0, .4);
}
.mae { background: var(--ag-bg) repeating-linear-gradient(0deg, transparent 0 34px, rgba(61, 88, 102, .025) 34px 35px); }
.mae h1, .mae h2, .mae h3 { letter-spacing: -.025em; }
.mae input, .mae select, .mae textarea {
    width: 100%; background: var(--ag-surface2); color: var(--ag-ink);
    border: 1px solid var(--ag-line2); border-radius: 5px; padding: 8px 10px;
    font-size: 13.5px; line-height: 1.6; outline: none;
}
.mae input:focus, .mae select:focus, .mae textarea:focus { border-color: var(--ag-accent); }
.mae textarea { resize: vertical; }
.mae label { display: block; font-size: 12px; color: var(--ag-ink2); font-weight: 650; margin-bottom: 5px; }
.mae code { background: var(--ag-bg2); color: var(--ag-accent2); }

/* ---------- 首屏夹板 ---------- */
.mae-board { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--ag-surface); border: 1px solid var(--ag-line2); border-radius: 4px 4px 10px 10px; box-shadow: var(--ag-shadow); margin-top: 22px; }
.mae-clip { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 132px; height: 22px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #9aa6ae, #5f6d76); box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5); }
.mae-clip::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 4px; height: 5px; border-radius: 3px; background: #46535c; }
.mae-board-left { padding: 30px 30px 28px; border-right: 1px dashed var(--ag-line2); }
.mae-kicker { display: inline-block; font-family: var(--ag-m); font-size: 10px; letter-spacing: .16em; color: var(--ag-accent); border-left: 3px solid var(--ag-accent); padding-left: 9px; margin-bottom: 14px; }
.mae-board h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 850; margin-bottom: 12px; }
.mae-lede { font-size: 14px; line-height: 1.98; color: var(--ag-ink2); max-width: 40em; }
.mae-lede b { color: var(--ag-accent); border-bottom: 2px solid var(--ag-warnbg); }
.mae-quick { margin-top: 20px; padding: 16px 17px; background: var(--ag-surface2); border: 1px solid var(--ag-line); border-left: 4px solid var(--ag-accent2); border-radius: 5px; }
.mae-quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mae-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mae-flags .ag-check { border-radius: 4px; }
.mae-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mae-quick-note { font-size: 11.5px; line-height: 1.75; color: var(--ag-muted); margin: 12px 0 0; padding-top: 10px; border-top: 1px dotted var(--ag-line2); }
.mae-board-right { padding: 26px 26px 20px; background: linear-gradient(180deg, var(--ag-surface2), var(--ag-surface)); }
.mae-grid-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 2px solid var(--ag-ink); }
.mae-grid-hd b { font-size: 16px; }
.mae-grid-hd span { font-family: var(--ag-m); font-size: 11.5px; color: var(--ag-accent); font-weight: 700; }
.mae-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mae-cell { position: relative; min-height: 82px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; text-align: center; padding: 8px 5px; background: var(--ag-surface); border: 2px dashed var(--ag-line2); border-radius: 4px; cursor: pointer; user-select: none; transition: background .15s, border-color .15s, transform .15s; }
.mae-cell:hover { border-color: var(--ag-accent); transform: scale(1.02); }
.mae-cell .n { position: absolute; top: 5px; left: 7px; font-family: var(--ag-m); font-size: 10px; color: var(--ag-muted); }
.mae-cell .ic { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .55; }
.mae-cell b { font-size: 12px; line-height: 1.4; font-weight: 700; }
.mae-cell small { font-size: 10px; color: var(--ag-muted); line-height: 1.35; }
.mae-cell.is-shot { border-style: solid; border-color: var(--ag-ok); background: var(--ag-okbg); }
.mae-cell.is-shot .ic { filter: none; opacity: 1; }
.mae-cell.is-shot::after { content: "✓"; position: absolute; top: 4px; right: 7px; font-size: 13px; font-weight: 800; color: var(--ag-ok); }
.mae-cell.is-shot .n { color: var(--ag-ok); }
.mae-art { display: block; width: 100%; max-width: 300px; height: auto; margin: 14px auto 0; opacity: .8; }

/* ---------- 按钮 ---------- */
.mae-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 750; transition: transform .13s, box-shadow .13s, background .13s; }
.mae-btn:hover { transform: translateY(-1px); }
.mae-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.mae-btn-main { background: var(--ag-accent); color: #fff; box-shadow: 0 5px 14px rgba(209, 97, 42, .22); }
.mae-btn-soft { background: var(--ag-accent2); color: #fff; }
.mae-btn-line { background: transparent; color: var(--ag-ink2); border-color: var(--ag-line2); }
.mae-btn-line:hover { border-color: var(--ag-accent); color: var(--ag-accent); }
.mae-btn-warm { background: var(--ag-warnbg); color: var(--ag-warn); border-color: var(--ag-warn); }
.mae-btn-mini { padding: 4px 10px; font-size: 11.5px; }

/* ---------- 区块 / 卡片 ---------- */
.mae-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 44px 0 16px; }
.mae-sec-hd h2 { font-size: 21px; display: flex; align-items: center; gap: 11px; }
.mae-sec-hd h2 i { font-family: var(--ag-m); font-style: normal; font-size: 11px; letter-spacing: .08em; color: #fff; background: var(--ag-accent2); border-radius: 4px; padding: 3px 8px; }
.mae-sec-hd span { font-size: 12px; color: var(--ag-muted); }
.mae-cond { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mae-card { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: 6px; padding: 18px 20px; box-shadow: var(--ag-shadow); min-width: 0; }
.mae-card-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--ag-line); }
.mae-card-hd h3 { font-size: 16px; }
.mae-card-hd small { font-size: 11px; color: var(--ag-muted); }
.mae-card > label { margin-top: 10px; }
.mae-clean { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: 11.5px; }
.mae-clean > b { color: var(--ag-ink2); }
.mae-clean .ag-check { border-radius: 4px; }
.mae-clean #maePreview { flex: 1 1 100%; font-family: var(--ag-m); font-size: 11px; color: var(--ag-muted); background: var(--ag-surface2); border-left: 2px solid var(--ag-accent); padding: 6px 9px; overflow-wrap: anywhere; white-space: normal; }
.mae-evidence { display: grid; gap: 7px; }
.mae-ev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ag-line); border-radius: 4px; background: var(--ag-surface2); font-size: 12.5px; cursor: pointer; }
.mae-ev input { width: 16px; height: 16px; flex: none; accent-color: var(--ag-accent); }
.mae-ev.is-on { border-color: var(--ag-ok); background: var(--ag-okbg); }
.mae-ev small { margin-left: auto; color: var(--ag-muted); font-size: 10.5px; }
.mae-meter { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; color: var(--ag-ink2); }
.mae-meter-bar { flex: 1; height: 9px; border-radius: 99px; background: var(--ag-bg2); overflow: hidden; }
.mae-meter-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ag-accent), var(--ag-ok)); transition: width .3s; }
.mae-meter b { font-family: var(--ag-m); color: var(--ag-accent); }
.mae-err { margin-top: 14px; padding: 10px 13px; background: var(--ag-badbg); color: var(--ag-bad); border-left: 3px solid var(--ag-bad); font-size: 12.5px; }
.mae-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

/* ---------- 结果 ---------- */
.mae-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.mae-stat { background: var(--ag-surface); border: 1px solid var(--ag-line); border-top: 3px solid var(--ag-accent2); padding: 12px 15px; border-radius: 5px; }
.mae-stat small { display: block; font-size: 11px; color: var(--ag-muted); }
.mae-stat b { display: block; font-family: var(--ag-m); font-size: 21px; line-height: 1.5; }
.mae-stat.lv1 { border-top-color: var(--ag-bad); }
.mae-stat.lv1 b { color: var(--ag-bad); }
.mae-stat.lv2 { border-top-color: var(--ag-warn); }
.mae-result-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.mae-missing { display: grid; gap: 8px; }
.mae-miss { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: 4px; background: var(--ag-surface2); border-left: 4px solid var(--ag-line2); font-size: 12.5px; line-height: 1.8; }
.mae-miss.lv1 { border-left-color: var(--ag-bad); background: var(--ag-badbg); }
.mae-miss.lv2 { border-left-color: var(--ag-warn); background: var(--ag-warnbg); }
.mae-miss.lv3 { border-left-color: var(--ag-ok); background: var(--ag-okbg); }
.mae-miss i { font-family: var(--ag-m); font-style: normal; font-size: 10.5px; color: var(--ag-muted); flex: none; padding-top: 2px; }
.mae-steps { list-style: none; counter-reset: ms; margin: 0; padding: 0; }
.mae-steps li { counter-increment: ms; position: relative; padding: 0 0 16px 38px; font-size: 12.8px; line-height: 1.85; color: var(--ag-ink2); border-left: 2px solid var(--ag-line); margin-left: 12px; }
.mae-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.mae-steps li::before { content: counter(ms); position: absolute; left: -13px; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--ag-accent2); color: #fff; font-family: var(--ag-m); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.mae-steps li b { color: var(--ag-ink); }
.mae-ai-card { margin-top: 14px; }
.mae-prose-sm { font-size: 12.8px; line-height: 1.95; color: var(--ag-ink2); }
.mae-prose-sm b { color: var(--ag-accent); }
.mae-scroll { overflow-x: auto; margin-top: 16px; }
.mae-table { width: 100%; min-width: 680px; font-size: 12.5px; }
.mae-table th { text-align: left; background: var(--ag-bg2); color: var(--ag-ink2); font-size: 11px; padding: 8px 10px; border-bottom: 2px solid var(--ag-line2); white-space: nowrap; }
.mae-table td { padding: 8px 10px; border-bottom: 1px dotted var(--ag-line); line-height: 1.7; }

.mae-read { margin-top: 46px; padding: 26px 28px; background: var(--ag-surface); border: 1px solid var(--ag-line); border-top: 4px solid var(--ag-accent); }
.mae-read h2 { font-size: 21px; margin-bottom: 16px; }
.mae-read p { font-size: 14px; line-height: 2.05; color: var(--ag-ink2); margin-bottom: 14px; }
.mae-read p:last-child { margin-bottom: 0; }
.mae-read b { color: var(--ag-accent); font-weight: 750; }

@media (max-width: 1080px) {
    .mae-board { grid-template-columns: 1fr; }
    .mae-board-left { border-right: 0; border-bottom: 1px dashed var(--ag-line2); }
    .mae-art { display: none; }
    .mae-result-grid, .mae-cond { grid-template-columns: 1fr; }
    .mae-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .mae-board-left, .mae-board-right { padding: 22px 16px; }
    .mae-grid { gap: 5px; }
    .mae-cell { min-height: 72px; }
    .mae-cell small { display: none; }
    .mae-quick-row { grid-template-columns: 1fr; }
    .mae-read { padding: 20px 18px; }
}
