/* QA 보고서 샘플 (/qa/sample-report/). 문서처럼 보이게, 인쇄(PDF 저장)도 깔끔하게 */
:root {
  --bg: #f2efe8; --paper: #ffffff; --ink: #1b1d1f; --ink-2: #4a4f55; --muted: #7a7f86;
  --line: #e4e0d6; --accent: #1f5f4a; --accent-soft: #e3efe9;
  --pass: #1f7a52; --pass-bg: #e3efe9; --fail: #b3261e; --fail-bg: #fbe4e1;
  --before: #c2410c; --after: #1f5f4a;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Pretendard Variable", Pretendard, -apple-system, sans-serif; font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: nowrap; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(251,250,247,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar > a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn { display: inline-block; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.doc { max-width: 980px; margin: 24px auto 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 40px 48px; }
.notice { margin: 0 0 28px; padding: 12px 16px; border-radius: 10px; background: #fff7e0; border: 1px solid #f0dca0; font-size: 14px; }
.cover { border-bottom: 2px solid var(--accent); padding-bottom: 24px; margin-bottom: 8px; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 800; font-size: 13px; }
h1 { margin: 6px 0 18px; font-size: 28px; letter-spacing: -.02em; line-height: 1.3; }
h2 { margin: 40px 0 10px; font-size: 22px; letter-spacing: -.02em; }
h3 { margin: 28px 0 8px; font-size: 17px; }
.lead { margin: 0 0 16px; color: var(--ink-2); }

table { border-collapse: collapse; width: 100%; }
.meta th { width: 120px; text-align: left; color: var(--muted); font-weight: 600; padding: 6px 12px 6px 0; vertical-align: top; }
.meta td { padding: 6px 0; }
.meta { margin: 8px 0 4px; }

.kpis { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpis li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpis strong { display: block; font-size: 22px; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpis span { color: var(--ink-2); font-size: 13px; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 14px 18px; }
.callout p { margin: 6px 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.cases, .perf { font-size: 13px; }
.cases th, .perf th { background: #f7f5ef; color: var(--ink-2); font-weight: 700; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cases td, .perf td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cases tbody tr:last-child td, .perf tbody tr:last-child td { border-bottom: 0; }
.cases { min-width: 860px; }
.perf { min-width: 560px; }
.perf td, .perf th { text-align: right; font-variant-numeric: tabular-nums; }
.perf td:first-child, .perf th:first-child { text-align: left; }
.perf thead tr:first-child th { text-align: center; }

.st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st.pass { color: var(--pass); background: var(--pass-bg); }
.st.pass::before { content: "✓ "; }
.st.fail { color: var(--fail); background: var(--fail-bg); }
.st.fail::before { content: "✕ "; }

.bug { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 12px 0; scroll-margin-top: 70px; }
.bug:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bug header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bug h4 { margin: 0; font-size: 16px; flex-basis: 100%; }
.sev { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 6px; border: 1px solid currentColor; }
.sev.s1 { color: #b3261e; } .sev.s2 { color: #c2410c; } .sev.s3 { color: #8a6d00; } .sev.s4 { color: var(--muted); }
.bug dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: 14px; }
.bug dt { color: var(--muted); font-weight: 600; }
.bug dd { margin: 0; }
.bug ol { margin: 0; padding-left: 18px; }

.fig { margin: 18px 0; }
.fig figcaption { font-weight: 700; margin-bottom: 6px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend .k { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--muted); }
.legend .k.s-before { background: var(--before); } .legend .k.s-after { background: var(--after); }
.legend .k.goal { background: none; border-top: 2px dashed var(--muted); height: 0; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #ece8de; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .goal { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .goal-t { fill: var(--muted); font-size: 11px; font-weight: 700; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.chart .line.s-before { stroke: var(--before); } .chart .line.s-after { stroke: var(--after); }
.chart .dot { stroke: #fff; stroke-width: 2; }
.chart .dot.s-before { fill: var(--before); } .chart .dot.s-after { fill: var(--after); }
.chart .lbl { font-size: 12px; font-weight: 800; fill: var(--ink-2); }

.findings, .checks { padding-left: 20px; }
.findings li, .checks li { margin: 6px 0; }
.doc-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .actions { justify-content: flex-start; }
  .doc { margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 24px 16px; }
  h1 { font-size: 22px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .bug dl { grid-template-columns: 1fr; gap: 2px; }
  .bug dt { margin-top: 6px; }
}
@media print {
  body { background: #fff; font-size: 12px; }
  .no-print { display: none !important; }
  .doc { margin: 0; border: 0; padding: 0; max-width: none; }
  .table-wrap { overflow: visible; border: 0; }
  .cases, .perf { min-width: 0; }
  .bug, .fig, .callout, tr { break-inside: avoid; }
  h2 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}
