/* Portage results page: case ID, stat tiles, sections, table, print */
.results { display: grid; gap: var(--section-gap); }
.results-section { min-width: 0; }
.results-section > h2 { margin-bottom: var(--sp-4); }
.results-head { display: grid; gap: var(--sp-3); }
.muted { display: block; color: var(--muted); font-size: var(--fs-xs); }
.print-only { display: none; }
.figure-legend { margin-top: var(--sp-3); }
.radar-wrap { max-width: 420px; margin-inline: auto; }

.case-card { display: grid; gap: var(--sp-3); }
.case-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.case-id {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}
.case-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; letter-spacing: .08em; }

.tiles {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}
.tile {
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  break-inside: avoid;
}
.tile-label { font-size: var(--fs-sm); color: var(--text-2); }
.tile-value {
  font-size: var(--fs-2xl);
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.chart-slot { min-width: 0; }
.classification { display: grid; gap: var(--sp-1); padding-inline-start: 0; list-style: none; }

.results-table { min-width: 36rem; }
.results-table th[scope="row"] { font-weight: 400; color: var(--text); }
.results-table td { font-variant-numeric: tabular-nums; }
.table-wrap { margin-top: var(--sp-3); }
.history > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--accent); }
.history > .table-wrap { margin-top: 0; }

@page { size: A4 portrait; margin: 15mm; }

@media print {
  .site-header,
  .site-footer,
  .no-print { display: none !important; }
  .print-only { display: block; }
  .print-head { margin-bottom: var(--sp-4); }
  .print-site { font-size: var(--fs-lg); font-weight: 700; }
  .results-section,
  .tile,
  figure,
  .table tr { break-inside: avoid; }
  .results-section > h2 { break-after: avoid; }
  .table-wrap { overflow: visible; }
  .results-table { min-width: 0; }
  .history > summary { display: none; }
  .radar-wrap { max-width: 100%; }
  .tile { box-shadow: none; }
}
