@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;450;500;550;600;650;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --ground: oklch(.976 .008 83);
  --surface: oklch(.995 .003 83);
  --surface-muted: oklch(.945 .011 83);
  --ink: oklch(.245 .009 70);
  --muted: oklch(.465 .016 75);
  --line: oklch(.815 .014 79);
  --grid: oklch(.87 .012 79);
  --accent: oklch(.52 .10 76);
  --rex: var(--accent);
  --accent-soft: oklch(.938 .04 83);
  --positive: oklch(.435 .065 152);
  --positive-soft: oklch(.952 .02 152);
  --negative: oklch(.475 .09 28);
  --negative-soft: oklch(.952 .018 28);
  --chart-band: oklch(.88 .012 76);
  --focus: oklch(.47 .11 76);
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --page-width: 79rem;
  --gutter: 2.5rem;
  --radius: .2rem;
  --z-sticky: 10;
  --z-skip: 20;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ground: oklch(.195 .009 79);
    --surface: oklch(.235 .01 79);
    --surface-muted: oklch(.275 .013 79);
    --ink: oklch(.935 .009 83);
    --muted: oklch(.745 .014 80);
    --line: oklch(.425 .015 79);
    --grid: oklch(.34 .012 79);
    --accent: oklch(.76 .10 80);
    --accent-soft: oklch(.305 .037 79);
    --positive: oklch(.765 .075 151);
    --positive-soft: oklch(.282 .03 151);
    --negative: oklch(.755 .095 29);
    --negative-soft: oklch(.287 .035 29);
    --chart-band: oklch(.365 .014 79);
    --focus: oklch(.81 .12 80);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ground: oklch(.195 .009 79);
  --surface: oklch(.235 .01 79);
  --surface-muted: oklch(.275 .013 79);
  --ink: oklch(.935 .009 83);
  --muted: oklch(.745 .014 80);
  --line: oklch(.425 .015 79);
  --grid: oklch(.34 .012 79);
  --accent: oklch(.76 .10 80);
  --accent-soft: oklch(.305 .037 79);
  --positive: oklch(.765 .075 151);
  --positive-soft: oklch(.282 .03 151);
  --negative: oklch(.755 .095 29);
  --negative-soft: oklch(.287 .035 29);
  --chart-band: oklch(.365 .014 79);
  --focus: oklch(.81 .12 80);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
body, main, section, article, div { min-width: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--ink); text-decoration-thickness: .065em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0 0 1rem; line-height: 1.2; text-wrap: balance; font-weight: 650; }
h1 { max-width: 29ch; font-size: 2.5rem; letter-spacing: -.033em; }
h2 { font-size: 1.65rem; letter-spacing: -.025em; }
h3 { font-size: 1.2rem; letter-spacing: -.015em; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; max-width: 65ch; text-wrap: pretty; }
ul, ol { margin: .75rem 0 1.5rem; padding-inline-start: 1.4rem; }
li { padding-inline-start: .25rem; margin-block: .55rem; }
strong { font-weight: 650; }
small, .small { font-size: .85rem; }
sup { font-size: .6em; }
code, pre, .num, .figure, output { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .9em; }
pre { max-width: 100%; overflow-x: auto; font-size: .8rem; line-height: 1.8; padding: 1.25rem; background: var(--surface-muted); border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 2rem; }
.skip-link { position: absolute; inset-block-start: -10rem; inset-inline-start: 1rem; z-index: var(--z-skip); padding: .7rem 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); }
.skip-link:focus { inset-block-start: 1rem; }
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .nav-inner, .page-shell, .footer-inner { width: min(100%, var(--page-width)); margin-inline: auto; padding-inline: var(--gutter); }
.header-inner { display: flex; align-items: center; gap: 2rem; padding-block: 1.4rem; }
.site-brand { display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.35; text-decoration: none; letter-spacing: -.015em; }
.site-brand span, .site-brand small { display: block; font-weight: 450; font-size: .85rem; color: var(--muted); letter-spacing: 0; }
.header-meta { margin-inline-start: auto; color: var(--muted); font-size: .8rem; line-height: 1.55; text-align: right; }
.header-meta p { margin: 0; }
.header-meta span { display: block; }
.header-actions { display: flex; align-items: center; gap: .75rem; font-size: .8rem; }
.header-actions label { color: var(--muted); }
.header-actions select { min-height: 2.35rem; padding: .35rem 1.8rem .35rem .6rem; font-size: .8rem; background-color: var(--surface); }
.site-nav { border-bottom: 1px solid var(--line); background: var(--ground); }
.nav-inner { display: flex; gap: 1.8rem; }
.site-nav a { display: block; flex: 0 0 auto; padding: .95rem 0 .8rem; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: .88rem; font-weight: 550; color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); border-color: var(--line); }
.site-nav a[aria-current='page'] { color: var(--ink); border-color: var(--ink); }
.page-shell { padding-block: 3.6rem 5rem; }
.page-intro { padding-bottom: 2.8rem; }
.page-summary { font-size: 1.1rem; color: var(--muted); line-height: 1.65; }
.meta-line { color: var(--muted); font-size: .87rem; margin-top: 1.25rem; }
.meta-line span { display: inline-block; margin-inline-end: 1.25rem; }
.section { padding-block: 2.6rem; border-top: 1px solid var(--line); }
.section:last-child { padding-bottom: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; }
.section-heading h2 { margin: 0; }
h2.section-heading { display: block; }
.section-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.prose { max-width: 65ch; }
.prose p:last-child, .prose li:last-child { margin-bottom: 0; }
.muted, .note { color: var(--muted); }
.note { font-size: .875rem; margin-top: 1rem; }
.lead { font-size: 1.15rem; line-height: 1.6; }
.position-line { font-size: 1.6rem; line-height: 1.45; letter-spacing: -.023em; max-width: 49ch; margin-bottom: 1.2rem; }
.position-line strong { color: var(--accent); }
.finding { padding-block: 1.6rem; }
.finding:first-child { padding-top: 0; }
.finding + .finding { border-top: 1px solid var(--grid); }
.finding h3 { margin-bottom: .75rem; }
.finding .table-wrap { margin-block: 1.3rem .2rem; }
.finding-list { margin: 1.2rem 0 0; padding: 0; list-style: none; }
.finding-list li { padding: .65rem 0; margin: 0; border-bottom: 1px solid var(--grid); }
.finding-list li:last-child { border: 0; }
.callout { padding: 1.35rem 1.5rem; margin-block: 1.5rem; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-gutter: stable; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.table-wrap:focus-visible { outline-offset: 3px; }
.data-table, .compact-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
caption { padding: .8rem 1rem; text-align: left; font-weight: 550; color: var(--muted); font-size: .85rem; background: var(--surface); }
th, td { padding: .75rem 1rem; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
thead th { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface-muted); font-weight: 600; color: var(--ink); white-space: nowrap; border-bottom-color: var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 550; }
tbody tr:hover > * { background-color: var(--surface-muted); }
td.num, th.num, td.numeric, th.numeric { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: .84em; }
td.nowrap, th.nowrap, .nowrap { white-space: nowrap; }
td.rationale { min-width: 20rem; max-width: 39rem; white-space: normal; }
.compact-table th, .compact-table td { padding: .65rem .85rem; }
.decision-table { min-width: 56rem; }
.decision-table th:first-child, .decision-table td:nth-child(2), .decision-table td:nth-child(4) { white-space: nowrap; }
.decision-table .rationale { display: block; min-width: 23rem; }
.nightly-table { min-width: 146rem; font-size: .79rem; }
.nightly-table td { white-space: nowrap; }
.nightly-table td:nth-child(5) { white-space: normal; min-width: 12rem; }
tfoot td, tfoot th { border-top: 1px solid var(--line); border-bottom: 0; background: var(--surface-muted); font-weight: 650; }
.rex-row > *, tbody tr.rex-row:hover > * { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.rex-text { color: var(--accent); }
.action { display: inline-block; border: 1px solid var(--line); padding: .16rem .5rem; border-radius: .2rem; font-size: .76rem; line-height: 1.5; font-weight: 650; text-transform: capitalize; white-space: nowrap; }
.action-raise { color: var(--positive); background: var(--positive-soft); border-color: var(--positive); }
.action-conditional { color: var(--negative); background: var(--negative-soft); border-color: var(--negative); }
.action-hold, .action-closed { color: var(--muted); background: var(--surface-muted); }
.positive { color: var(--positive); }
.negative { color: var(--negative); }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-block: 1.5rem; background: var(--surface); }
.metric { padding: 1.35rem 1.5rem; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { color: var(--muted); font-size: .85rem; font-weight: 500; margin-bottom: .65rem; }
.metric h3 { color: var(--muted); font-size: .9rem; font-weight: 550; margin-bottom: .65rem; }
.metric-value { display: block; font-family: var(--mono); font-size: 1.8rem; font-weight: 500; letter-spacing: -.04em; line-height: 1.2; font-variant-numeric: tabular-nums; margin-block: .4rem .65rem; overflow-wrap: anywhere; }
.metric p:last-child { font-size: .84rem; color: var(--muted); margin-bottom: 0; }
.metric small { display: block; color: var(--muted); line-height: 1.5; }
.chart-wrap { overflow-x: auto; width: 100%; margin-block: 1.3rem; padding: .8rem .25rem .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chart { display: block; width: 100%; min-width: 46rem; height: auto; font-family: var(--sans); }
.chart text { font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .65rem 1.6rem; margin-block: .85rem 1.2rem; color: var(--muted); font-size: .85rem; }
.chart-legend span { display: inline-flex; gap: .5rem; align-items: center; }
.legend-key, .legend-swatch { display: inline-block; width: 1.25rem; height: .75rem; background: var(--chart-band); border: 1px solid var(--line); }
.legend-rex { background: var(--accent); border-color: var(--accent); width: .65rem; height: .65rem; border-radius: 50%; }
.legend-band::before, .legend-line::before, .legend-filled::before, .legend-hollow::before { content: ''; display: inline-block; flex: 0 0 auto; width: 1.2rem; height: .7rem; background: var(--chart-band); border: 1px solid var(--line); }
.legend-line::before { height: 0; border: 0; border-top: 2px solid var(--ink); background: none; }
.legend-filled::before, .legend-hollow::before { width: .6rem; height: .6rem; border: 2px solid var(--accent); border-radius: 50%; background: var(--accent); }
.legend-hollow::before { background: var(--surface); }
.peer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.peer-panel h3 { margin-bottom: .4rem; }
.peer-panel > p { color: var(--muted); font-size: .87rem; margin-bottom: 1rem; }
.peer-panel .data-table { font-size: .83rem; }
.peer-panel th, .peer-panel td { padding: .65rem .75rem; }
.peer-panel td:first-child { min-width: 10rem; }

.night-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.night-card { background: var(--surface); border: 1px solid var(--line); padding: 1.5rem; border-radius: var(--radius); break-inside: avoid; }
.night-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--grid); }
.night-card-header h2, .night-card-header h3 { font-size: 1.25rem; margin: 0 0 .35rem; }
.night-card-header p { color: var(--muted); font-size: .8rem; margin: 0; }
.night-card-grid { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.6fr); gap: 1.25rem; }
.rate-summary { margin-bottom: 1.1rem; }
.rate-summary .rate, .rate-summary strong { font-family: var(--mono); font-size: 1.65rem; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.rate-summary p { margin-bottom: .3rem; font-size: .87rem; }
.rate-summary .metric-value { font-size: 1.65rem; color: var(--accent); }
.fact-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: .3rem 1rem; margin: 0; font-size: .84rem; }
.fact-list > div, .definitions > div { display: contents; }
.fact-list dt { color: var(--muted); }
.fact-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.recommendation { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--grid); }
.recommendation p { font-size: .88rem; margin-bottom: .6rem; }
.recommendation p:last-child { margin-bottom: 0; }
.recommendation strong { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.controls { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 1.5rem; margin-block: 1.5rem; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.field { min-width: 0; }
.field > label, fieldset > legend, .field-label { display: block; font-size: .95rem; font-weight: 650; margin-bottom: .65rem; }
.field p, .field .hint, .field small { display: block; color: var(--muted); font-size: .83rem; line-height: 1.5; margin-block: .6rem 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.input-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.input-row label { display: inline-flex; align-items: center; gap: .4rem; }
input, select, button { border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
input[type='number'], select { min-height: 2.65rem; max-width: 100%; padding: .45rem .65rem; background: var(--surface); }
input[type='number'] { width: 6.5rem; font-family: var(--mono); font-size: .9rem; font-variant-numeric: tabular-nums; }
input[type='range'] { display: block; width: 100%; min-height: 1.5rem; padding: 0; margin: .65rem 0; accent-color: var(--ink); cursor: pointer; }
input[type='radio'], input[type='checkbox'] { accent-color: var(--ink); width: 1rem; height: 1rem; margin: 0; flex: 0 0 auto; }
input:disabled, select:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
input[aria-invalid='true'] { border-color: var(--negative); }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 2.5rem; padding: .5rem .85rem; font-weight: 550; font-size: .875rem; background: var(--surface); text-decoration: none; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
button:hover, .button:hover { background: var(--surface-muted); border-color: var(--muted); color: var(--ink); }
button:active, .button:active { background: var(--accent-soft); }
.print-button { white-space: nowrap; }
details { margin-block: 1.25rem; border-top: 1px solid var(--grid); padding-top: 1rem; }
summary { font-weight: 550; cursor: pointer; width: fit-content; }
summary:hover { color: var(--accent); }
details[open] summary { margin-bottom: 1rem; }
.occupancy-table input { width: 5.8rem; }
.nightly-inputs { margin-top: 1.5rem; }
.nightly-inputs .table-wrap { margin-top: 1rem; }
.model-formula { white-space: pre-wrap; overflow-wrap: anywhere; }
.sensitivity-chart { display: block; width: 100%; min-width: 42rem; height: auto; }
.formula { font-family: var(--mono); font-size: .8rem; line-height: 1.8; }
.range-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.definitions { display: grid; grid-template-columns: minmax(8rem, .35fr) 1fr; gap: 1.15rem 2rem; max-width: 65ch; margin-block: 1.5rem; }
.definitions dt { font-weight: 650; }
.definitions dd { margin: 0; }
.download-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.4rem; }
.download-links a { display: inline-flex; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .9rem; font-weight: 550; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface-muted); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: .5rem 2rem; padding-block: 1.75rem; color: var(--muted); font-size: .79rem; }
.footer-inner p { max-width: 85ch; margin: 0; }
.footer-inner p:first-child { grid-column: 1 / -1; }

@media (max-width: 64rem) {
  :root { --gutter: 1.75rem; }
  .header-inner { flex-wrap: wrap; gap: .75rem 1.5rem; }
  .header-meta { text-align: left; }
  .header-actions { margin-inline-start: auto; }
  .nav-inner { gap: 1.3rem; }
  .site-nav a { font-size: .85rem; }
  .control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .night-card-grid { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.6fr); }
  .metric { padding: 1.2rem; }
  .metric-value { font-size: 1.6rem; }
}

@media (max-width: 46rem) {
  :root { --gutter: 1.1rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .header-inner { padding-block: 1.15rem; }
  .site-brand { font-size: 1rem; }
  .header-meta { order: 3; flex-basis: 100%; margin-inline: 0; font-size: .76rem; }
  .header-actions { gap: .4rem; }
  .header-actions .print-button { display: none; }
  .header-actions label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .nav-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .8rem; }
  .site-nav a { text-align: center; padding-block: .8rem .65rem; font-size: .8rem; }
  .page-shell { padding-block: 2.4rem 3rem; }
  .page-intro { padding-bottom: 2rem; }
  .page-summary { font-size: 1rem; }
  .section { padding-block: 2rem; }
  .section-heading { display: block; }
  .section-heading p { margin-top: .6rem; }
  .position-line { font-size: 1.35rem; }
  .peer-grid, .night-cards { grid-template-columns: 1fr; gap: 1.5rem; }
  .night-card { padding: 1.15rem; }
  .night-card-grid { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.6fr); }
  .control-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .controls { padding: 1.1rem; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: 1.1rem; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line); }
  .metric-label { margin: 0; align-self: center; }
  .metric-value { margin: 0; font-size: 1.5rem; }
  .metric p, .metric small { grid-column: 1 / -1; }
  .definitions { grid-template-columns: 1fr; gap: .25rem; }
  .definitions dd { margin-bottom: 1rem; }
  .callout { padding: 1rem; }
  .footer-inner { grid-template-columns: 1fr; }
  th, td { padding: .7rem .8rem; }
}

@media (max-width: 24rem) {
  .header-inner { align-items: flex-start; }
  .header-actions { margin-inline: 0; }
  .night-card-grid { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.6fr); }
  .metric { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  :root, :root[data-theme], :root:not([data-theme='light']) {
    color-scheme: light;
    --ground: white; --surface: white; --surface-muted: #f2f1ed;
    --ink: #1d1c19; --muted: #57554d; --line: #aaa69a; --grid: #d5d1c7;
    --accent: #796013; --accent-soft: #f4ebd4; --chart-band: #d7d5cf;
    --positive: #305f40; --positive-soft: #edf3ed; --negative: #883f38; --negative-soft: #f9eeec;
    --gutter: 0;
  }
  body { font-size: 9pt; line-height: 1.45; background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .skip-link, .site-nav, .header-actions, .download-links, .print-button { display: none !important; }
  .header-inner { padding-block: 0 5mm; }
  .site-brand { font-size: 11pt; }
  .header-meta { font-size: 8pt; }
  .page-shell { padding-block: 7mm 0; width: 100%; }
  h1 { font-size: 23pt; max-width: none; }
  h2 { font-size: 15pt; }
  h3 { font-size: 11pt; }
  h1, h2, h3, h4, caption { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .page-intro { padding-bottom: 6mm; }
  .section { padding-block: 6mm; }
  .position-line { font-size: 15pt; }
  .table-wrap, .chart-wrap { overflow: visible; width: 100%; border-radius: 0; }
  .data-table, .compact-table { font-size: 7.5pt; }
  th, td, .compact-table th, .compact-table td { padding: 2mm; }
  thead { display: table-header-group; }
  thead th { position: static; white-space: normal; }
  tr { break-inside: avoid; }
  td.rationale { min-width: 0; max-width: none; }
  .decision-table { min-width: 0; }
  .decision-table .rationale { min-width: 0; }
  .nightly-table { min-width: 0; table-layout: fixed; font-size: 4.5pt; }
  .nightly-table td, .nightly-table th { white-space: normal; overflow-wrap: anywhere; padding: 1.2mm .8mm; }
  .nightly-table td:nth-child(5) { min-width: 0; }
  .nightly-table .num { font-size: 1em; white-space: normal; }
  .chart { min-width: 0; width: 100%; }
  .sensitivity-chart { min-width: 0; }
  .chart-wrap, .metric-grid, .night-card { break-inside: avoid; }
  .chart-wrap { max-width: 240mm; margin-inline: auto; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { display: block; padding: 4mm; }
  .metric + .metric { border-top: 0; border-left: 1px solid var(--line); }
  .metric-value { font-size: 19pt; }
  .peer-grid, .night-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm; }
  .night-card { padding: 4mm; }
  .night-card-grid { grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.6fr); }
  .controls { padding: 4mm; break-inside: avoid; }
  .control-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  input[type='range'] { display: none; }
  .site-footer { margin-top: 7mm; }
  .footer-inner { display: block; padding-block: 4mm; font-size: 7pt; }
  a { text-decoration: none; }
}

/* nightly table: key columns on screen; long room column wraps */
#nightly-table, .nightly-table { font-size: .78rem; }
#nightly-table th, #nightly-table td, .nightly-table th, .nightly-table td { padding: .45rem .55rem; }
#nightly-table td:last-child, .nightly-table td:last-child { white-space: normal; min-width: 11rem; max-width: 15rem; }
dl.fact-list dt { min-width: 0; }
.night-card .fact-list dd { overflow-wrap: break-word; white-space: normal; min-width: 0; }
.night-card .fact-list dt { min-width: 0; }
.night-card .fact-list { min-width: 0; }
@media print { .site-nav, .theme-control { display: none !important; } .table-wrap, .chart-wrap { overflow: visible !important; border: 0; } table { font-size: .66rem; } body { background: #fff; color: #000; } }

.table-wrap.wide { box-shadow: inset -28px 0 22px -24px rgba(0,0,0,.18); }
.scroll-cue { font-size: .78rem; color: var(--muted); margin: .2rem 0 .6rem; }

#nightly-table td.rationale, .nightly-table td.rationale { min-width: 0; max-width: none; }
#nightly-table th, #nightly-table td { width: auto; }

.table-wrap.wide td:first-child, .table-wrap.wide th:first-child { white-space: nowrap; }
