/* Torus Lab in the application shell (v7.7.0, WP7-04, lane L73). The shell, the settings fields, the graphics window and the status bar
 * come from assets/lab-core/labs.css; this sheet adds what only Torus Lab shows, on the tokens of docs/V770-PLAN.md section 2: no glow,
 * no gradient, the dark graphics background only inside the graphics window. The page loads it after labs.css. */
.torus-app .input-errors { padding: 0 16px; }
.torus-app .input-errors:empty { display: none; }
.torus-app .input-errors p { margin: 8px 0; color: var(--error); font-size: 13px; line-height: 20px; }
.torus-app .app-settings .field > .field-slider { grid-column: 1 / -1; grid-row: auto; width: 100%; min-height: 20px; padding: 0; accent-color: var(--accent); }
.torus-app .app-settings .field.wide > textarea { width: 100%; min-height: 64px; padding: 6px 8px; font: inherit; font-size: 13px; line-height: 20px; }
.torus-app .app-settings fieldset { margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.torus-app .app-settings legend { padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--text); }
.torus-app .layer-list { display: grid; grid-template-columns: 1fr; gap: 0; }
.torus-app .layer-list .check { display: flex; align-items: center; gap: 8px; }
.torus-app .app-settings .message { font-size: 12px; line-height: 18px; }
.torus-app .obs-copy-preview { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.torus-app .obs-copy-preview h3 { margin: 0 0 8px; font-size: 13px; }
.torus-app .torus-record:empty { display: none; }
.torus-app .torus-record { margin: 8px 0; font-size: 13px; white-space: pre-line; }
.torus-app .torus-record dl { white-space: normal; }

/* graphics window */
.torus-app .obs-viewport { outline-offset: -3px; }
.torus-app .obs-viewport:focus-visible { outline: 2px solid var(--focus); }
.torus-app .obs-camera-panel { padding: 8px 12px; border-top: 1px solid var(--border); background: var(--page); }
.torus-app .obs-camera-panel .buttonrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.torus-app .obs-camera-panel button { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.torus-app .obs-camera-panel .field { display: flex; align-items: center; gap: 8px; margin: 0; }
.torus-app .app-graphics-footer .playback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.torus-app .app-graphics-footer .playback > button { min-width: 36px; min-height: 30px; padding: 2px 10px; }
.torus-app .app-graphics-footer .playback-slider { display: flex; flex: 1 1 200px; align-items: center; gap: 8px; }
.torus-app .app-graphics-footer .playback-slider input { flex: 1 1 auto; min-width: 120px; accent-color: var(--accent); }
.torus-app .app-graphics-footer .workspace-speed { display: flex; align-items: center; gap: 8px; }
/* 7.7.0 (R71-F13, lane F71c): the playback labels stay on one line */
.torus-app .app-graphics-footer .playback-slider label, .torus-app .app-graphics-footer .workspace-speed label { white-space: nowrap; }
.torus-app .app-graphics-footer .field label { margin: 0; font-size: 12px; }
.torus-app .torus-playback-line { flex: 1 1 100%; margin: 0; color: var(--text-2); font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }

/* result views */
.torus-app .obs-result-plot { display: block; width: 100%; max-width: 100%; height: auto; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--page); }
.torus-app .obs-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.torus-app .obs-metric { min-width: 0; padding: 8px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.torus-app .obs-metric dt { color: var(--text-2); font-size: 12px; line-height: 16px; }
.torus-app .obs-metric dd { margin: 2px 0 0; color: var(--text); font-size: 15px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.torus-app .obs-metric dd span { color: var(--text-2); font-size: 12px; font-weight: 400; }
.torus-app .obs-completeness, .torus-app .obs-coil-reliability, .torus-app .obs-convergence-state { margin: 8px 0; font-size: 13px; line-height: 20px; }
.torus-app .obs-completeness p, .torus-app .obs-coil-reliability p, .torus-app .obs-convergence-state p { margin: 0 0 6px; }
.torus-app .obs-completeness-list, .torus-app .obs-convergence-state ul { margin: 4px 0 8px; padding-left: 20px; }
.torus-app .obs-model-line { color: var(--text-2); }
.torus-app .obs-freshness { margin: 8px 0; }
.torus-app .obs-freshness:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.torus-app .obs-freshness[data-freshness="previous"] .obs-freshness-state, .torus-app .obs-freshness[data-freshness="stale"] .obs-freshness-state { color: var(--text); }
.torus-app .study-guidance p { margin: 6px 0; font-size: 12px; line-height: 18px; color: var(--text-2); }
.torus-app .tablewrap caption { padding: 6px 10px; color: var(--text-2); font-size: 12px; text-align: left; caption-side: top; }
/* 7.7.0 (lane F71c; plan section 4 rule 6): a result word in a table is plain text; the word carries the state, no colour or weight does */
.torus-app .l4a-word { white-space: nowrap; }
.torus-app .l4a-verify .l4a-panel, .torus-app .l4b-verify .l4a-panel, .torus-app .l4b-verify .l4b-panel { margin: 8px 0; }

@media (max-width: 1023px) {
  .torus-app .obs-metrics { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* wide tables scroll inside their region, never the page */
.torus-app .app-results > .app-section { min-width: 0; max-width: 100%; }
.torus-app .tablewrap, .torus-app .obs-tablewrap, .torus-app .l4a-tablewrap, .torus-app .readable-table-region { display: block; max-width: 100%; overflow-x: auto; }
.torus-app .l4a-tableblock, .torus-app .l4a-panel, .torus-app .l4a-verify, .torus-app .l4b-verify { min-width: 0; max-width: 100%; }
.torus-app .property-list dd, .torus-app .torus-record { overflow-wrap: anywhere; }
/* A long button label wraps inside a narrow window instead of widening the section (320 px reflow). */
.torus-app .app-section button { white-space: normal; max-width: 100%; height: auto; overflow-wrap: anywhere; }

/* Torus Lab, v7.7.0: the immersive workspace of 7.6.0 was replaced by the application shell; its styles are in observatory.css and
 * assets/lab-core/labs.css. This file stays because the runtime builder joins it to observatory.css. */
