@layer page {
  .calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.1rem; align-items: end; }
  .calc-form .field { min-width: 0; display: grid; gap: .4rem; }
  .calc-form .field > span { font-size: .9rem; font-weight: 650; }
  .calc-form input, .calc-form select { width: 100%; min-height: 44px; }
  .calc-actions { margin-block: 1.25rem; }
  .calc-output { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.3rem; }
  .calc-output h2 { font-size: var(--fs-h3); margin-bottom: .8rem; }
  .calc-output .stat-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .calc-output .stat-value { font-size: clamp(1.2rem, 2.2vw, 1.8rem); overflow-wrap: anywhere; }
  .calc-summary { width: 100%; min-height: 10rem; resize: vertical; margin-block: .5rem; font: .875rem/1.65 var(--font-ui); }
  .calc-error { min-height: 1.5em; font-weight: 650; color: var(--accent); }
  .calc-note { max-width: 78ch; color: var(--ink-2); font-size: .95rem; line-height: 1.65; margin-block: 1rem; }
  .calc-chart-wrap { overflow-x: auto; margin-block: 1rem; }
  .calc-chart { display: block; width: 100%; min-width: 44rem; height: auto; max-height: 15rem; color: var(--ink); }
  .calc-chart text { fill: currentColor; font: 14px var(--font-ui); }
  .calc-chart line { stroke: var(--line-strong); }
  .calc-chart circle { fill: var(--accent); }
  .calc-table { max-height: 25rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
  .calc-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
  .calc-table th, .calc-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .calc-table th { background: var(--surface-2); }
  .calc-label { display: block; font-size: .9rem; font-weight: 650; margin-top: 1rem; }
  @media print {
    body.page-tool .masthead, body.page-tool footer, body.page-tool .tool-prose, body.page-tool .promo-band,
    body.page-tool .site-footer, body.page-tool .search-palette { display: none; }
    .calc-form, .calc-actions, .calc-summary, .calc-label, .calc-error { display: none; }
    .calc-table { max-height: none; overflow: visible; }
    .calc-chart { min-width: 0; }
    .tool { box-shadow: none; width: 100%; }
  }
}
