/* Section styles — shared by the app and the PDF export. */
:root {
  --surface: #ffffff;
  --surface-2: #f6f6f3;
  --line: #e6e5e0;
  --ink: #1b1b1a;
  --ink-2: #52514e;
  --ink-3: #8a8984;
  --accent: #2a78d6;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --good: #0ca30c;
  --ok: #2a78d6;
  --warn: #eda100;
  --bad: #d03b3b;
  --neutral: #b4b3ad;
  --track: #efeee9;
  --radius: 12px;
  --font: Inter, ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", "DejaVu Sans", sans-serif;
}

.report { font-family: var(--font); color: var(--ink); font-size: 14px; line-height: 1.45; }
.report .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; margin: 0 0 16px; break-inside: avoid-page; }
.report .card > header { margin-bottom: 12px; }
.report h3 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.report h4 { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 8px; }
.report .sub { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; }
.report .note { color: var(--ink-3); font-size: 12px; margin: 8px 0 0; }
.report .empty { color: var(--ink-3); font-style: italic; margin: 6px 0; }
.report .muted-txt { color: var(--ink-3); font-weight: 400; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0; }
.tile { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.tile-label { font-size: 12px; color: var(--ink-2); }
.tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.hbars { display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; background: var(--track); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 0; }
.hbar-value { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; white-space: nowrap; }
.hbar:hover .hbar-fill { filter: brightness(0.9); }

.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .muted { background: var(--neutral); }
.st-good { background: var(--good); } .st-ok { background: var(--ok); } .st-warn { background: var(--warn); } .st-bad { background: var(--bad); } .st-neutral { background: var(--neutral); }

svg.cols { width: 100%; height: 150px; display: block; overflow: visible; }
svg.cols .grid { stroke: var(--line); stroke-width: 1; }
svg.cols .axis { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
svg.cols .val { fill: var(--ink-2); font-size: 9.5px; font-family: var(--font); }
svg.cols .bar.s1 { fill: var(--s1); } svg.cols .bar.s2 { fill: var(--s2); } svg.cols .bar.s3 { fill: var(--s3); }
svg.cols .bar { background: none; }
svg.cols .hit { fill: transparent; }
svg.cols g:hover .bar { filter: brightness(0.88); }
svg.cols g:hover .hit { fill: rgba(0,0,0,0.035); }
.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; }
.multiples h4 { margin-top: 4px; }

.stack { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.stack-seg { min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend b { color: var(--ink); font-weight: 600; margin-left: 2px; }
.legend em { color: var(--ink-3); font-style: normal; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl.compact td { padding: 5px 8px; }
.minibar { display: inline-block; width: 48px; height: 6px; background: var(--track); border-radius: 0 3px 3px 0; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.minibar > span { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.pill { display: inline-block; min-width: 34px; text-align: center; padding: 1px 7px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 12px; }
.pill.st-warn { color: #3a2a00; }

.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.insights li { display: grid; gap: 2px; padding: 10px 12px 10px 14px; background: var(--surface-2); border-radius: 8px; border-left: 3px solid var(--ok); }
.insights li.ins-good { border-left-color: var(--good); }
.insights li.ins-warn { border-left-color: var(--warn); }
.insights b { font-weight: 600; }
.insights span { color: var(--ink-2); font-size: 13px; }

.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.quote { margin: 0; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; break-inside: avoid; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.quote blockquote { margin: 0; font-size: 14px; line-height: 1.5; }
.quote blockquote::before { content: "“"; } .quote blockquote::after { content: "”"; }
.quote figcaption { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.quote .ctx { color: var(--ink-3); }
.quote .who { color: var(--ink-2); font-style: italic; }
.quote mark { background: #fde7a6; padding: 0 1px; border-radius: 2px; }
.stars { color: #e6a700; letter-spacing: 1px; } .stars .off { color: #d9d8d2; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; text-transform: capitalize; }
.chip.st-warn { color: #3a2a00; } .chip.st-neutral { color: #2b2b2a; }

.kw { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.kw span { color: var(--ink); }
.kw em { font-style: normal; color: var(--ink-3); font-size: 11px; }
.qlist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.qlist .who { color: var(--ink-3); font-size: 12px; font-style: italic; }

/* ---------- print / PDF ---------- */
.report.print { margin: 0; padding: 0; background: #fff; font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.report.print .card { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 12px; }
.report.print .tile-value { font-size: 22px; }
.report.print .quotes { grid-template-columns: 1fr 1fr; }
.report.print .two { grid-template-columns: 1fr 1fr; }
.report.print .tbl-wrap { overflow: visible; }
.report.print .tbl tr { break-inside: avoid; }
.report-head { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.report-head .brand { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.report-head h1 { font-size: 26px; margin: 6px 0 4px; letter-spacing: -0.02em; }
.report-head .lede { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.report-head .meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin: 10px 0 0; font-size: 11px; }
.report-head dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.report-head dd { margin: 2px 0 0; color: var(--ink); }
.report-note { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; font-size: 12.5px; white-space: pre-wrap; }
.report-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }
.tbl td:has(.minibar) { white-space: nowrap; }
