.sensor-projection {
  margin-block: 54px;
  padding: 26px 0 0;
  color: var(--context-ink, #18212f);
  background: transparent;
  border-top: 1px solid var(--context-line, #d8dde6);
}
.sensor-projection h3 { margin: 0 0 16px; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.sensor-projection [hidden] { display: none !important; }
.sensor-projection h4 { margin: 18px 0 8px; font-size: 1.05rem; }
.sensor-projection p { max-width: 82ch; line-height: 1.55; }
.sensor-projection .projection-equation { overflow-x: auto; padding: 8px 4px; font-family: Georgia, serif; line-height: 1.8; }
.sensor-projection .projection-config { font-size: .88rem; font-weight: 750; color: #48566a; }
.projection-controls { display: grid; gap: 10px; margin: 18px 0 12px; }
.projection-control-label { display: block; margin-bottom: 6px; font-weight: 750; }
.projection-button-group { display: flex; flex-wrap: wrap; gap: 7px; }
.sensor-projection button {
  min-height: 44px; padding: 9px 12px; border: 1px solid #8794a5; border-radius: 5px;
  color: #25394d; background: #fff; font: inherit; font-size: .9rem; cursor: pointer;
  text-align: left; line-height: 1.3;
}
.sensor-projection button[aria-pressed="true"] { border: 2px solid #235f9e; padding: 8px 11px; background: #e7f4fb; color: #153f69; font-weight: 750; }
.sensor-projection button[aria-pressed="true"]::before { content: "✓ "; }
.sensor-projection button:focus-visible, .sensor-projection summary:focus-visible,
.sensor-projection [tabindex]:focus-visible { outline: 3px solid #854300; outline-offset: 3px; }
.projection-reset-row { display: flex; flex-wrap: wrap; gap: 9px; }
.projection-summary { margin: 8px 0 12px; padding-left: 12px; border-left: 3px solid #235f9e; font-weight: 650; font-variant-numeric: tabular-nums; }
.projection-note { border-left: 3px solid #7862b2; padding-left: 12px; min-height: 0; }
.projection-status { font-size: .86rem; color: #48566a; min-height: 0; }
.projection-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.projection-comparison-wrap { margin: 14px 0 4px; border-block: 1px solid #d8dde6; }
.projection-comparison-wrap table caption { padding: 9px 0 7px; }
.projection-comparison-table { table-layout: fixed; }
.projection-comparison-table th { overflow-wrap: anywhere; }
.projection-comparison-table td { font-variant-numeric: tabular-nums; }
.projection-comparison-note { margin: 6px 0 16px; color: #536174; font-size: .8rem; }
.projection-chart { width: 100%; height: auto; display: block; overflow: visible; background: #fff; border: 1px solid #d8dde6; border-radius: 6px; }
.projection-grid { stroke: #e6e9ed; stroke-width: 1; }
.projection-zero { stroke: #bbc4cf; stroke-width: 1.3; }
.projection-tick { fill: #536174; font-size: 12px; font-variant-numeric: tabular-nums; }
.projection-axis-title { fill: #25394d; font-size: 14px; font-weight: 650; }
.projection-trend { stroke: #657487; stroke-width: 1.4; stroke-dasharray: 6 5; }
.projection-pair { cursor: pointer; outline: none; }
.projection-pair.fresh { --pair-color: #367d51; }
.projection-pair.training { --pair-color: #b05f3b; }
.projection-hit { stroke: transparent; stroke-width: 18; pointer-events: stroke; }
.projection-gap { stroke: var(--pair-color); stroke-width: 1.1; opacity: .43; }
.projection-target { fill: var(--pair-color); stroke: var(--pair-color); stroke-width: 1; }
.projection-prediction { fill: none; stroke: var(--pair-color); stroke-width: 1.7; }
.projection-pair.is-selected .projection-gap, .projection-pair:focus-visible .projection-gap { stroke-width: 3.3; opacity: 1; }
.projection-pair.is-selected .projection-prediction, .projection-pair:focus-visible .projection-prediction { stroke-width: 3; }
.projection-legend { display: flex; flex-wrap: wrap; gap: 7px 20px; margin-bottom: 8px; font-size: .9rem; }
.projection-legend .training { color: #b05f3b; }
.projection-legend .fresh { color: #367d51; }
.projection-trend-caption { font-size: .85rem; color: #536174; margin: 6px 0; }
.projection-pair-readout { padding: 10px 12px; background: #f1f5f9; border: 1px solid #d8dde6; border-radius: 5px; font-size: .9rem; font-variant-numeric: tabular-nums; min-height: 3.3em; }
.projection-chart-help { margin: 7px 0; font-size: .8rem; color: #536174; }
.sensor-projection details { margin-top: 16px; border-top: 1px solid #d8dde6; padding-top: 12px; }
.sensor-projection summary { cursor: pointer; min-height: 36px; font-weight: 750; }
.projection-table-wrap { overflow-x: auto; max-width: 100%; }
.projection-data-wrap { max-height: 380px; overflow: auto; }
.sensor-projection table { width: 100%; border-collapse: collapse; font-size: .87rem; font-variant-numeric: tabular-nums; }
.sensor-projection table caption { text-align: left; padding: 10px 0; color: #536174; }
.sensor-projection th, .sensor-projection td { padding: 9px; border-bottom: 1px solid #e1e6ec; text-align: right; }
.sensor-projection th:first-child { text-align: left; }
.sensor-projection thead th { background: #f0f4f8; vertical-align: bottom; }
.sensor-projection .is-current { background: #e7f4fb; }
.projection-tls-note { background: #fbfaf6; border-left: 4px solid #c69218; padding: 4px 15px 9px; margin-top: 23px; }
.projection-error { padding: 15px; background: #fff1ed; border: 2px solid #a43b32; }
.projection-audit { overflow-wrap: anywhere; font-size: .85rem; }
@media (forced-colors: active) {
  .sensor-projection button:focus-visible, .sensor-projection summary:focus-visible,
  .sensor-projection [tabindex]:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
  }
}
@media (max-width: 620px) {
  .sensor-projection { padding: 20px 0 0; margin-block: 38px; }
  .projection-comparison-table { font-size: .8rem; }
  .projection-comparison-table th, .projection-comparison-table td { padding: 7px 4px; }
  .projection-button-group button { flex: 1 1 170px; }
  .projection-chart { min-height: 325px; }
  .projection-tick { font-size: 12px; }
  .projection-axis-title { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .sensor-projection *, .sensor-projection *::before { scroll-behavior: auto; transition: none; animation: none; }
}

/* The rule choice stays beside its examples. Tables keep the full article
   width; they do not inherit the narrower figure column. */
.projection-workbench, .projection-picture, .projection-report { min-width: 0; }
.projection-workbench [data-projection-output]:not([hidden]) { display: contents; }
@media (min-width: 1100px) {
  .projection-workbench { display: grid; grid-template-columns: minmax(210px, .55fr) minmax(0, 1.8fr); align-items: start; gap: 0 20px; }
  .projection-workbench > .projection-controls { margin-top: 8px; padding-right: 14px; border-right: 1px solid #d8dde6; }
  .projection-workbench .projection-button-group, .projection-workbench .projection-reset-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .projection-workbench .projection-report { grid-column: 1 / -1; }
}

/* Let complete words wrap; a long row heading may use the full next line. */
.projection-comparison-table th { overflow-wrap:normal; word-break:normal; hyphens:none; }
@media(max-width:480px) {
  .projection-comparison-table th:first-child { width:34%; }
  .projection-comparison-table th { font-size:.78rem; }
}
