/* ======================================================================
 * 23 装修报价模糊词核对 · 文档审校台（独立版式）
 * 靛蓝编辑台 + 红色波浪线标注 + 左右分栏命中清单 + 转义面板 + AI 复核区
 * ====================================================================== */
.h3-p23 {
    --h3-accent: #4b4f9c;
    --h3-accent-d: #a9aef2;
    --h3-accent-2: #b4485e;
    --h3-accent-2-d: #eda0b0;
}
.qw { max-width: 1180px; margin: 0 auto; padding: 0 26px 64px; }

/* ---------- 首屏：编辑台 ---------- */
.qw-hero {
    position: relative; margin-top: 22px; padding: 32px 34px 30px;
    border: 1px solid var(--h3-line); border-radius: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--h3-accent) 9%, var(--h3-card)) 0%, var(--h3-card) 56%);
    box-shadow: var(--h3-shadow);
    overflow: hidden;
}
.qw-hero::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--h3-accent);
}
.qw-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; }
.qw-hero .h3-title em { color: var(--h3-accent); }

/* 报价单示意（纯 CSS，无图片） */
.qw-slip {
    background: var(--h3-card); border: 1px solid var(--h3-line);
    border-radius: 8px; box-shadow: 0 8px 26px rgba(38,44,70,.12);
    padding: 16px 18px; transform: rotate(2deg);
}
.qw-slip-h { font-size: 11px; letter-spacing: .14em; color: var(--h3-faint); border-bottom: 1px solid var(--h3-line-2); padding-bottom: 8px; margin-bottom: 10px; font-family: var(--h3-num); }
.qw-slip p { margin: 0 0 9px; font-size: 12.5px; line-height: 1.9; color: var(--h3-sub); }
.qw-slip p:last-child { margin-bottom: 0; }
.qw-slip mark { background: color-mix(in srgb, var(--h3-accent-2) 16%, transparent); color: var(--h3-accent-2); border-bottom: 2px wavy var(--h3-accent-2); padding: 0 1px; font-weight: 700; }
.qw-slip-f { margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--h3-line); font-family: var(--h3-num); font-size: 11px; color: var(--h3-faint); display: flex; justify-content: space-between; }

/* 首屏输入 */
.qw-quick { margin-top: 24px; }
.qw-editor {
    border: 1px solid var(--h3-line); border-radius: 10px; overflow: hidden;
    background: var(--h3-card-2);
}
.qw-editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--h3-line); background: var(--h3-card); font-size: 12px; color: var(--h3-faint); }
.qw-editor-bar b { color: var(--h3-accent); font-family: var(--h3-num); letter-spacing: .08em; }
.qw-quick .h3-textarea {
    border: 0; border-radius: 0; background: transparent; min-height: 118px;
    font-size: 14px; line-height: 2; padding: 14px 16px;
}
:root[data-theme="dark"] .h3-p23 .qw-quick .h3-textarea { background: transparent; }
.qw-quick .h3-btns { margin-top: 14px; }

/* ---------- 分栏 ---------- */
.qw-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 20px; margin-top: 22px; }
.qw-doc { font-size: 13.5px; line-height: 2; }
.qw-line { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--h3-line-2); }
.qw-line:last-child { border-bottom: 0; }
.qw-line-no { font-family: var(--h3-num); font-size: 11.5px; color: var(--h3-faint); text-align: right; padding-top: 3px; user-select: none; }
.qw-line-tx { color: var(--h3-ink); word-break: break-word; }
.qw-line-tx mark { background: color-mix(in srgb, var(--h3-accent-2) 18%, transparent); color: var(--h3-accent-2); border-bottom: 2px wavy var(--h3-accent-2); border-radius: 2px; padding: 0 2px; font-weight: 700; }
.qw-line-tx mark.lv-中 { background: color-mix(in srgb, var(--h3-warn) 17%, transparent); color: var(--h3-warn); border-bottom-color: var(--h3-warn); }
.qw-line-tx mark.lv-低 { background: color-mix(in srgb, var(--h3-accent) 13%, transparent); color: var(--h3-accent); border-bottom-color: var(--h3-accent); }
.qw-line.is-hit { background: color-mix(in srgb, var(--h3-accent) 3%, transparent); }

.qw-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--h3-line); margin-bottom: 16px; flex-wrap: wrap; }
.qw-tab { border: 0; background: transparent; color: var(--h3-sub); font-size: 13px; font-weight: 650; padding: 9px 13px; cursor: pointer; border-bottom: 2px solid transparent; font-family: var(--h3-font); }
.qw-tab.is-on { color: var(--h3-accent); border-bottom-color: var(--h3-accent); }
.qw-panel { display: none; }
.qw-panel.is-on { display: block; }

.qw-score { display: flex; gap: 16px; align-items: center; padding: 15px 16px; border-radius: 10px; background: var(--h3-card-2); border: 1px solid var(--h3-line); margin-bottom: 16px; }
.qw-score b { font-family: var(--h3-num); font-size: 34px; line-height: 1; color: var(--h3-accent); }
.qw-score span { font-size: 12.5px; color: var(--h3-sub); line-height: 1.7; }
.qw-hits { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.qw-hit { padding: 12px 14px; border: 1px solid var(--h3-line); border-left: 3px solid var(--h3-accent-2); border-radius: 0 9px 9px 0; background: var(--h3-card); }
.qw-hit.lv-中 { border-left-color: var(--h3-warn); }
.qw-hit.lv-低 { border-left-color: var(--h3-accent); }
.qw-hit-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.qw-hit-w { font-size: 14px; font-weight: 750; color: var(--h3-ink); }
.qw-hit-n { font-family: var(--h3-num); font-size: 11px; color: var(--h3-faint); }
.qw-hit p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--h3-sub); }
.qw-hit .qw-fix { color: var(--h3-accent); }
.qw-hit-clause { font-size: 12px; color: var(--h3-faint); background: var(--h3-card-2); padding: 6px 9px; border-radius: 6px; margin-top: 7px; word-break: break-word; }

.qw-dict { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.qw-dict div { font-size: 12px; padding: 7px 10px; border: 1px solid var(--h3-line); border-radius: 7px; display: flex; justify-content: space-between; gap: 8px; color: var(--h3-sub); }
.qw-dict b { color: var(--h3-accent); font-family: var(--h3-num); }

/* 转义面板 */
.qw-esc-out { display: grid; gap: 12px; }
.qw-esc-out label { font-size: 12px; font-weight: 700; color: var(--h3-sub); }
.qw-esc-out pre { margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; font-family: var(--h3-num); font-size: 12px; line-height: 1.75; padding: 10px 12px; background: var(--h3-card-2); border: 1px solid var(--h3-line); border-radius: 8px; color: var(--h3-ink); }
.qw-esc-select { width: 100%; padding: 9px 11px; border: 1px solid var(--h3-line); border-radius: 8px; background: var(--h3-card-2); color: var(--h3-ink); font-size: 13px; }
:root[data-theme="dark"] .h3-p23 .qw-esc-select { background: #131b17; }

/* AI 区 */
.qw-ai {
    margin-top: 18px; padding: 18px; border: 1px dashed var(--h3-accent);
    border-radius: 12px; background: color-mix(in srgb, var(--h3-accent) 5%, var(--h3-card));
}
.qw-ai-h { font-size: 14.5px; font-weight: 750; color: var(--h3-ink); margin-bottom: 6px; }
.qw-ai-h span { font-size: 11.5px; font-weight: 600; color: var(--h3-faint); margin-left: 6px; }
.qw-ai-b { font-size: 12.5px; line-height: 1.85; color: var(--h3-sub); padding: 12px; background: var(--h3-card-2); border-radius: 8px; min-height: 58px; white-space: pre-wrap; word-break: break-word; }
.qw-ai-b.is-empty { color: var(--h3-faint); }
.qw-ai .h3-btns { margin-top: 12px; }
.qw-ai-status { font-size: 11.5px; color: var(--h3-faint); }

.qw-export { display: grid; gap: 10px; }
.qw-prose-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

@media (max-width: 1000px) {
    .qw-hero-grid, .qw-layout, .qw-prose-cols { grid-template-columns: 1fr; }
    .qw-slip { max-width: 320px; }
}
@media (max-width: 620px) {
    .qw { padding: 0 16px 48px; }
    .qw-hero { padding: 22px 18px; margin-top: 14px; }
    .qw-dict { grid-template-columns: 1fr; }
}
