/* Page layer for the GTM study on viz-design-system 2.3.0 (vendor/viz-design-system). Load after tokens.css and kit.css.
   Every colour comes from a kit token; chart classes live in the page's inline style block (gtm/output.py CHART_CSS). */
main h2 {font-size: var(--viz-type-section); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .75rem; max-width: 34ch;}
main h3 {font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 1.75rem 0 .4rem;}
p, li {max-width: 72ch;}
.block {margin-top: 3rem;}
.block::before {content: ""; display: block; padding-top: .75rem; border-top: 2px solid var(--viz-rule-strong);}
.page-nav {display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: var(--viz-type-small);}
.page-nav a {min-height: 44px; display: inline-flex; align-items: center;}
.kpi-figure {white-space: nowrap;}
figure.chart {margin-block: 1.5rem;}
figure.chart .chart-plot svg {max-width: 460px;}
.panels {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem;}
.panels svg {max-width: 420px;}
.legend {display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0 0 .5rem; padding: 0; font-size: var(--viz-type-small);}
.legend li {display: inline-flex; align-items: center; gap: .45rem;}
.legend .key {display: inline-block; width: 28px; height: 0; border-top: 3px solid;}
.legend .k-actual {border-top: 4px solid var(--viz-foreground);}
.legend .k-model {border-color: var(--viz-categorical-1);}
.legend .k-stage {border-top-style: dashed; border-color: var(--viz-categorical-2);}
.legend .k-trail {border-top-style: dotted; border-color: var(--viz-categorical-3);}
.table-scroll {margin-block: .75rem;}
table.data {width: auto; min-width: 60%;}
table.data td.num, table.data th.num {padding-left: 1.25rem; white-space: nowrap;}
details.kit-disclosure {border-bottom: 1px solid var(--viz-rule); margin-block: .5rem;}
details.kit-disclosure > summary {font-weight: 600;}
ol.decisions li {margin: .6rem 0;}
section.method details > *:not(summary) {max-width: 72ch;}
.links {display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;}
.links a {min-height: 44px; display: inline-flex; align-items: center;}
@media (max-width: 759px) {
  .panels {grid-template-columns: minmax(0, 1fr);}
  table.data {min-width: 100%;}
  table.kpis tbody td {display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start;}
  table.kpis tbody td > * {align-self: end;}
  table.kpis tbody td > .kpi-figure, table.kpis tbody td > .kpi-context {align-self: start;}
}
@media print {
  .page-nav {display: none;}
  .table-scroll {overflow: visible;}
  figure.chart, .table-scroll {break-inside: avoid;}
}
figure.chart.narrow {max-width: 640px;}
figure.chart.wide {max-width: 680px;}
figure.chart.wide .chart-plot svg {max-width: 620px;}
table.data th.r {text-align: right;}
.kpi-unit {font-family: var(--viz-font-body); font-size: .5em; letter-spacing: 0; font-weight: 400; color: var(--viz-muted);}
p.note {font-size: var(--viz-type-small); color: var(--viz-muted);}
/* Phone: charts scale down to the column, so their text is set larger in chart units (about 12 px rendered). */
@media (max-width: 759px) {
  svg.gchart text {font-size: 16px;}
  svg.gchart .tick, svg.gchart .value, svg.gchart .muted {font-size: 15px;}
}
/* Below-the-fold sections skip layout until scrolled near; this keeps the font swap cheap on slow phones. */
section.block, section.method {content-visibility: auto; contain-intrinsic-size: auto 1600px;}
/* Wide charts (effect sweep, error rates) scale to about 0.74 on a phone; set their text so it renders near 12 px. */
@media (max-width: 759px) {
  figure.chart.wide svg.gchart text {font-size: 17px;}
  figure.chart.wide svg.gchart .tick, figure.chart.wide svg.gchart .value, figure.chart.wide svg.gchart .muted, figure.chart.wide svg.gchart .lbl {font-size: 16px;}
}
