/* ==========================================================================
   选址参谋 · 示例报告（下载版 / 打印）
   为什么要单独一份：app.css 是深色屏幕阅读风格，下载下来是要打印/转 PDF 的，
   必须在独立页面内整套覆盖成白底黑字；不这么做，打印出来是一整页深灰底，墨盒先受不了。

   字号体系里的角色：示例报告的屏幕预览。白底长文用 --fs-base 配 --lh-loose，
   表注与页脚用 --fs-xs；纸张水印那个 116px 是装饰字，不参与令牌（见下文说明）。
   ========================================================================== */

body.sample-print {
    --bg: #fff;
    --bg-soft: #f7f9fb;
    --panel: #fff;
    --panel-2: #f6f8fa;
    --line: #dfe4ea;
    --line-soft: #e8edf2;
    --text: #16202e;
    --text-2: #34404e;
    --muted: #5c6a7a;
    --brand: #1f6fdb;
    background: #fff;
    color: #16202e;
    font-size: var(--fs-sm, 14px);
}

/* 顶部工具条：只在屏幕上出现，打印时隐藏 */
.sample-toolbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 10px 20px; background: #111927; color: #dbe4ef; font-size: var(--fs-xs, 13px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.sample-toolbar-l { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sample-toolbar strong { font-size: var(--fs-sm, 14px); color: #fff; letter-spacing: 1px; }
.sample-toolbar span { color: #9fb0c4; }
.sample-toolbar button {
    flex: none; padding: 8px 18px; border: 1px solid transparent; border-radius: 7px; cursor: pointer;
    background: linear-gradient(135deg, #3d8cf8, #2472e0); color: #fff; font-size: var(--fs-sm, 14px); font-weight: 600;
}
.sample-toolbar button:hover { filter: brightness(1.06); }

/* 纸张 */
.sample-paper {
    position: relative; max-width: 940px; margin: 22px auto 64px; padding: 28px 30px 44px;
    background: #fff; border: 1px solid #dfe4ea; border-radius: 10px;
    box-shadow: 0 14px 40px rgba(16, 24, 37, .10);
}
.sample-paper::before {
    content: "示例数据"; position: absolute; right: 10px; top: 210px; z-index: 0;
    /* 这是纸面上的斜向水印（4 个字撑满半页、透明度 3.5%），不是正文层级，
       所以故意不参与 --fs-* 令牌：按 40px 排只会缩成一行小字，起不到水印作用。 */
    font-size: 116px; font-weight: 800; letter-spacing: 10px;
    color: rgba(22, 32, 46, .035); transform: rotate(-18deg); pointer-events: none;
}
.sample-paper > * { position: relative; z-index: 1; }

.sample-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid #16202e;
}
.sample-head h1 { font-size: var(--fs-xl, 26px); font-weight: 800; margin-top: 6px; color: #16202e; }
.sample-eyebrow {
    display: inline-block; padding: 2px 9px; border-radius: 20px;
    background: #fdf3e2; color: #a8720f; font-size: var(--fs-xs, 13px); font-weight: 700; letter-spacing: 1px;
}
.sample-head-r { text-align: right; font-size: var(--fs-xs, 13px); color: #5c6a7a; line-height: 1.8; }

.sample-note {
    margin-bottom: 18px; padding: 10px 13px; border-radius: 7px;
    border: 1px dashed #e2c48c; background: #fdf8ee; color: #7a5a12;
    font-size: var(--fs-xs, 13px); line-height: var(--lh-loose, 1.9);
}

.sample-foot {
    margin-top: 24px; padding-top: 12px; border-top: 1px solid #e8edf2;
    font-size: var(--fs-xs, 13px); color: #7b8794; line-height: var(--lh-loose, 1.9);
}

/* ---------- 报告正文：把深色主题整体翻成浅色 ---------- */
body.sample-print .card,
body.sample-print .score-strip,
body.sample-print .ring-card,
body.sample-print .rec-item,
body.sample-print .risk-item { background: #fff !important; border-color: #dfe4ea !important; }

body.sample-print .score-cell { background: #fff !important; color: #16202e; }
body.sample-print .score-cell span,
body.sample-print .kv span,
body.sample-print .r-sub,
body.sample-print .muted,
body.sample-print .card-head .sub { color: #5c6a7a !important; }
body.sample-print .score-cell b,
body.sample-print .r-n,
body.sample-print .kv b,
body.sample-print .rep-title h2,
body.sample-print h2,
body.sample-print h3,
body.sample-print strong { color: #16202e !important; }
body.sample-print .risk-item { border-left-color: #b8c2ce !important; color: #34404e; }
body.sample-print .risk-item.sev-high { border-left-color: #d9534f !important; }
body.sample-print .rep-top .meta span { color: #5c6a7a; }
body.sample-print .mini-bar { background: #eef1f5; }
body.sample-print .chip { background: #f2f5f8; border-color: #dfe4ea; color: #34404e; }
body.sample-print .kv-list .kv { border-bottom-color: #eef1f5; }

/* 标签在浅底上重新配色，保证打印也能分辨 */
body.sample-print .tag-warn { background: #fdf3e2; color: #a8720f; }
body.sample-print .tag-gray { background: #eef1f5; color: #5c6a7a; }
body.sample-print .tag-blue { background: #e8f1fe; color: #1f6fdb; }
body.sample-print .tag-teal { background: #e5f7f4; color: #0e9488; }
body.sample-print .tag-danger { background: #fdecee; color: #c9302c; }

@media (max-width: 760px) {
    .sample-paper { margin: 12px; padding: 16px; }
    .sample-paper::before { display: none; }
    .sample-toolbar { padding: 9px 12px; }
    .sample-toolbar span { display: none; }
}
