/* The shared report page (/r/<id>) and the site's copy of the sample report. The same class names as reco/report.css, which the local report and the
   macOS app still use (they carry the earlier palette until the app is rebranded: macos/app SMLCore/Card.swift and ReportHTML.swift mirror it, and the
   Swift parity fixtures pin the page's bytes). This copy reads only tokens.css; tests/site/test_report_parity.py keeps the two selector sets equal. */
.rp { max-width: calc(1280px + 2 * var(--pad)); margin: 0 auto; padding: var(--sp32) var(--pad) var(--sp96); color: var(--ink); font-weight: var(--w-regular); font-size: var(--fs-body); font-family: var(--font); letter-spacing: -0.01em; background: var(--bg); }
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }
:where(.rp) h1, :where(.rp) h2, :where(.rp) h3, :where(.rp) p, :where(.rp) ul, :where(.rp) figure { margin: 0; padding: 0; }
.rp a { color: var(--accent); }
.rp p a, .rp li a { text-decoration: underline; text-underline-offset: 0.2em; }
.rp a.rp-btn, .rp .rp-btn { text-decoration: none; }
.rp-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp16); flex-wrap: wrap; padding-bottom: var(--sp24); }
.rp a.rp-brand, .rp-brand { color: var(--ink); text-decoration: none; font-weight: var(--w-semi); font-size: var(--fs-body); letter-spacing: -0.03em; }
.rp-machine { color: var(--g2); font-size: var(--fs-body); }
.rp-verdict { padding: var(--sp96) 0 var(--sp8); }
.rp-answer { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--w-regular); letter-spacing: var(--ls-display); text-wrap: balance; }   /* the serif is always 400 (R2) */
.rp-sub { margin-top: var(--sp24); font-size: var(--fs-lead); line-height: 1.4; color: var(--g2); max-width: 52ch; text-wrap: pretty; }
.rp-meta { margin-top: var(--sp24); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: var(--fs-body); color: var(--g2); }
.rp-chip { display: inline-block; padding: 4px 12px; border-radius: var(--r999); background: var(--g1); color: var(--ink); font-size: var(--fs-small); font-weight: var(--w-semi); }
.rp-chip.sample { color: var(--ink); background: var(--bg); }
.rp details { margin-top: var(--sp16); font-size: var(--fs-body); color: var(--g2); }
.rp summary { cursor: pointer; color: var(--accent); }
.rp details > :not(summary) { margin-top: 8px; }
.rp-sec { margin-top: var(--sp64); }
@media (min-width: 1000px) {
  .rp-sec { margin-top: var(--sp96); }
}
.rp-sec > h2 { font-size: var(--fs-title); line-height: 1.1; font-weight: var(--w-regular); letter-spacing: -0.04em; margin-bottom: var(--sp24); text-wrap: balance; }
.rp-tiles { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp16); }
.rp-tile { background: var(--g1); border-radius: var(--r16); padding: var(--sp24); min-width: 0; }
.rp-tile .v { font-size: var(--fs-title); line-height: 1.1; font-weight: var(--w-semi); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rp-tile .l { margin-top: var(--sp8); font-size: var(--fs-body); font-weight: var(--w-semi); line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.rp-tile .t { margin-top: var(--sp8); font-size: var(--fs-small); color: var(--g2); }
.rp-note { margin-top: 16px; font-size: var(--fs-body); color: var(--ink); }
.rp-figs { display: grid; gap: var(--sp32) var(--sp32); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .rp-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-figs > .rp-fig:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.rp-fig { container-type: inline-size; }
.rp-sec > details { margin-bottom: var(--sp24); }
.rp-fig figcaption { margin-top: var(--sp8); font-size: var(--fs-body); color: var(--g2); max-width: 64ch; }
.rp-fig h3 { font-size: var(--fs-lead); font-weight: var(--w-semi); margin-bottom: var(--sp8); letter-spacing: -0.02em; }
.ch { display: block; width: 100%; height: auto; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-t { fill: var(--g2); font-weight: var(--w-regular); font-size: var(--fs-small); font-family: var(--font); }
@container (min-width: 1000px) {
  .ch-t { font-size: var(--fs-small); }
}
@container (max-width: 760px) {
  .ch-t { font-size: var(--fs-body); }
}
/* the chart is a 640-unit drawing: in a 342 px phone column it scales by 0,53, so its labels are drawn in the heading step to render at about 13 px (check-design G5: nothing under 11 px) */
@container (max-width: 480px) {
  .ch-t { font-size: var(--fs-heading); }
}
.ch-g { fill: var(--line); }
.ch-y { fill: var(--accent); }
.ch-r { fill: var(--ink); }
.ch-bar { fill: var(--accent); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.ch-thr { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ch-thr-t { fill: var(--ink); }
.rp-ladder { margin: 0; max-width: 520px; }
.lr-list { list-style: none; margin: 0; padding: 0; }
.lr-rung { position: relative; padding: var(--sp8) var(--sp16) var(--sp16) var(--sp48); }
.lr-rung::before { content: ""; position: absolute; left: var(--sp16); top: var(--sp16); width: 12px; height: 12px; border-radius: var(--r999); background: var(--g2); }
.lr-rung::after { content: ""; position: absolute; left: 21px; top: 30px; bottom: -6px; width: 2px; background: var(--g1); }
.lr-rung:last-child::after { display: none; }
.lr-t { margin: 0; font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: var(--ls-lead); }
.lr-l { color: var(--g2); }
.lr-g { color: var(--ink); font-weight: var(--w-semi); white-space: nowrap; }
.lr-c { margin: 2px 0 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--g2); }
.lr-mine { background: var(--g1); border-radius: var(--r16); }
.lr-mine::before { background: var(--accent); width: 16px; height: 16px; left: 14px; }
.lr-mine::after { display: none; }
.lr-mine .lr-l { color: var(--ink); }
.rp-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp32); margin-top: var(--sp32); }
.rp-split h3 { font-size: var(--fs-lead); font-weight: var(--w-semi); margin-bottom: var(--sp8); letter-spacing: -0.02em; }
.rp-split ul { list-style: none; }
.rp-split li, .rp-split p { margin-top: 14px; font-size: var(--fs-body); color: var(--g2); }
@media (max-width: 999px) { .rp-split { grid-template-columns: minmax(0, 1fr); } }
.rp-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: var(--fs-small); color: var(--g2); }
.rp-legend svg { display: inline-block; margin-right: 6px; vertical-align: -1px; }
.rp table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.rp th, .rp td { text-align: right; padding: 6px 8px; }
.rp th:first-child, .rp td:first-child { text-align: left; }
.rp th { color: var(--g2); font-weight: var(--w-semi); }
.rp-scroll { overflow-x: auto; }
.rp-recs { list-style: none; }
.rp-rec { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto; gap: 4px var(--sp32); padding: var(--sp32) 0; align-items: baseline; }
.rp-rec .n { font-weight: var(--w-semi); font-size: var(--fs-lead); letter-spacing: -0.02em; }
.rp-rec .m { color: var(--g2); font-size: var(--fs-body); grid-column: 1; }
.rp-rec .p { font-size: var(--fs-body); text-align: left; grid-row: 1; grid-column: 2; font-variant-numeric: tabular-nums; }
.rp-rec .k { grid-column: 3; grid-row: 1; text-align: right; font-size: var(--fs-body); white-space: nowrap; }
.rp-fine { margin-top: var(--sp16); font-size: var(--fs-body); color: var(--g2); max-width: 72ch; }
.rp-share { background: var(--g1); border-radius: var(--r16); padding: var(--sp32); }
.rp-share h2 { font-size: var(--fs-heading); margin-bottom: var(--sp8); }
.rp-share p { font-size: var(--fs-body); color: var(--g2); max-width: 72ch; }
.rp-cmd { display: inline-block; margin-top: 12px; padding: 8px 14px; background: var(--bg); border-radius: var(--r16); font-weight: var(--w-semi); font-size: var(--fs-body); font-family: var(--mono); color: var(--ink); }
.rp pre { margin: 10px 0 0; padding: 14px; background: var(--bg); border-radius: var(--r16); font-size: var(--fs-small); font-family: var(--mono); overflow-x: auto; max-height: 360px; color: var(--ink); }
.rp-foot { margin-top: var(--sp96); padding-top: var(--sp24); font-size: var(--fs-small); color: var(--g2); display: grid; gap: 8px; }
.rp-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: var(--r999); background: transparent; color: var(--accent); font-weight: var(--w-semi); font-size: var(--fs-body); font-family: var(--font); cursor: pointer; text-decoration: none; }
.rp-btn:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.rp-btn.danger { color: var(--g2); }
.rp-btn.danger:hover { background: var(--g2); color: var(--bg); }
.rp-btn.solid { background: var(--accent); color: var(--bg); }
.rp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* site-only begin: the site's buttons are borderless (the local report's reco/report.css keeps bordered pills, which need their padding), so in a
   row they read as links: no inline padding, their text starts on the text column, hover underlines, no pill. Only existing class names may appear
   here; tests/site/test_report_parity.py fails a class that the local report does not have, and any site-only selector outside this block. */
.rp-actions { column-gap: var(--sp32); }
.rp-actions .rp-btn:not(.solid) { padding-inline: 0; }
.rp-actions .rp-btn:not(.solid):hover { background: transparent; color: var(--accent); text-decoration: underline; }
.rp-actions .rp-btn.danger:hover { color: var(--g2); }
/* site-only end */
.rp-owner { margin-top: var(--sp32); padding: var(--sp24); border-radius: var(--r16); background: var(--g1); display: grid; gap: var(--sp16); }
.rp-owner[hidden] { display: none; }
.rp-owner h2 { margin: 0; font-size: var(--fs-body); }
.rp-owner p { margin: 0; max-width: 72ch; }
@media (max-width: 900px) {
  .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rp-rec { grid-template-columns: 1fr; }
  .rp-rec .p, .rp-rec .k { grid-column: 1; grid-row: auto; text-align: left; }
}
@media (max-width: 520px) {
  .ch-t { font-size: var(--fs-heading); }
  .rp-sec { margin-top: var(--sp80); }   /* 80 on a phone: the next section's serif h2 never reads as the eyebrow of the closed details above it */
  .ch-t[y="220"] { transform: translateY(var(--sp8)); }   /* the day labels under the x axis: Figtree's taller box at the heading step touched the axis line (G6); 8 units lower, still inside the 240-unit drawing */
  .rp { padding: var(--sp24) var(--sp16) var(--sp64); }
  .rp-verdict { padding-top: var(--sp64); }
  .rp-tile { padding: var(--sp16); }
  .rp-tile .v { font-size: var(--fs-heading); }
}
@media print {
  .rp { padding: 0; max-width: none; }
  .rp-share, .rp-actions, .rp details > summary, .rp-noprint { display: none !important; }
  .rp details { display: block; }
  .rp-fig, .rp-tile, .rp-rec { break-inside: avoid; }
  .rp-sec { margin-top: 32px; }
  .rp-verdict { padding-top: 24px; }
}
