.page-title { max-width: 1480px; position: relative; padding-bottom: 16px; }
.page-title p { max-width: 770px; color: #9cabbc; }
.mi-open { margin-top: 12px; border: 1px solid #417367; border-radius: 6px; background: #142e2c; color: #a7f3da; padding: 9px 13px; cursor: pointer; font: 600 12px "Trebuchet MS", sans-serif; }
.model-wrap { max-width: 1480px; }
.model-stage { min-width: 0; }
.math-inspector { min-width: 0; color: #d4e3e9; font: 13px/1.5 "Trebuchet MS", "Avenir Next", sans-serif; }
.math-inspector * { box-sizing: border-box; }
.math-inspector [hidden] { display: none !important; }
.math-inspector > details { border: 1px solid #34525c; border-radius: 12px; background: #101f2b; overflow: hidden; scroll-margin-top: 80px; }
.math-inspector > details > summary { cursor: pointer; padding: 18px 18px 16px; list-style: none; background: radial-gradient(ellipse at top right, #214a484d, transparent 80%), #11232d; }
.math-inspector > details > summary::-webkit-details-marker { display: none; }
.math-inspector > details > summary::after { content: "+"; float: right; color: #7be0cf; font: 23px monospace; margin-top: -42px; }
.math-inspector > details[open] > summary::after { content: "-"; }
.mi-eyebrow { display: block; color: #7be0cf; letter-spacing: .17em; font-size: 9px; font-weight: bold; }
.math-inspector > details > summary strong { display: block; color: #f1f4ef; font: 27px/1.3 "Palatino Linotype", "Book Antiqua", Georgia, serif; margin: 4px 0; }
.mi-summary-hint { color: #97b1bb; font-size: 11px; }
.mi-content { padding: 0 16px 16px; }
.mi-frame-note { color: #bce4d8; border-top: 1px solid #34525c; padding: 12px 0; font-size: 11px; }
.mi-frame-note span { display: block; color: #9eafb9; font-size: 10px; margin-top: 3px; }
.mi-presets { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 13px; }
.math-inspector button { color: #d8e8ed; background: #1c3340; border: 1px solid #3d5966; border-radius: 5px; min-height: 34px; padding: 6px 10px; cursor: pointer; font: 600 11px "Trebuchet MS", sans-serif; }
.math-inspector button:hover { border-color: #7be0cf; background: #243f48; }
.math-inspector button:focus-visible, .math-inspector summary:focus-visible, .math-inspector input:focus-visible, .math-inspector select:focus-visible, .mi-open:focus-visible { outline: 2px solid #7be0cf; outline-offset: 3px; }
.mi-presets button[aria-pressed="true"] { color: #9df1d8; border-color: #72c7af; background: #183e38; }
.mi-label { display: flex; justify-content: space-between; color: #adc6d0; font-size: 11px; margin: 9px 0 4px; }
.mi-label output { color: #ffc76b; font-family: Consolas, "Liberation Mono", monospace; }
.math-inspector input[type="range"] { width: 100%; accent-color: #7be0cf; margin: 5px 0; cursor: pointer; }
.math-inspector input[type="range"]:disabled { opacity: .35; cursor: default; }
.mi-fields { display: grid; gap: 9px; margin: 12px 0; min-width: 0; }
.mi-fields:not(.mi-two) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.mi-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mi-fields label, .mi-date > label { display: block; color: #adc6d0; font-size: 10px; min-width: 0; }
.math-inspector select, .math-inspector input[type="number"], .math-inspector input[type="datetime-local"] { width: 100%; min-width: 0; display: block; margin-top: 4px; border: 1px solid #3a5260; border-radius: 5px; background: #0a1822; color: #e5edf2; padding: 8px; font: 12px "Trebuchet MS", sans-serif; color-scheme: dark; }
.math-inspector input[readonly] { color: #8ca1ac; background: #13232e; }
.mi-check { display: flex; align-items: center; gap: 6px; color: #c8dce2; font-size: 11px; margin-top: 16px; cursor: pointer; }
.mi-check input { accent-color: #7be0cf; margin: 0; }
.mi-help { font-size: 10px; line-height: 1.6; color: #a4bac4; margin: 6px 0 10px; }
.mi-date { border-top: 1px solid #2b4351; padding-top: 12px; margin-top: 12px; }
.mi-date > div { display: flex; align-items: end; gap: 6px; }
.mi-date input { flex: 1; }
.mi-date a { display: inline-block; margin-top: 9px; color: #9ddccc; font-size: 10px; text-underline-offset: 3px; }
.mi-error { color: #ffd2bb; border-left: 2px solid #ffb28f; padding: 8px; font-size: 11px; background: #3c2421; overflow-wrap: anywhere; }
.mi-instrument { border-top: 1px solid #34525c; margin-top: 16px; padding-top: 15px; }
.mi-section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; justify-content: space-between; margin-bottom: 10px; }
.mi-section-heading h2 { font-size: 12px; color: #e7f2f2; margin: 0; }
.mi-badge { display: inline-block; font-size: 9px; font-weight: bold; padding: 3px 7px; border: 1px solid #5b634a; border-radius: 20px; color: #ffd38e; background: #393423; }
.mi-badge[data-state="below"] { color: #a9c0d3; background: #1d2f40; border-color: #3b596c; }
#mi-ray { width: 100%; height: auto; display: block; background: #0b1822; border: 1px solid #2b4351; border-radius: 8px; }
.mi-plot-key { display: flex; gap: 10px; flex-wrap: wrap; font-size: 8px; color: #b4c6ce; margin: 7px 0; }
.mi-plot-key span::before { display: inline-block; width: 11px; height: 2px; margin-right: 4px; vertical-align: middle; content: ""; background: #7be0cf; }
.mi-plot-key span:nth-child(2)::before { background: #ffc76b; }
.mi-plot-key span:nth-child(3)::before { background: #80929c; }
.mi-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 12px 0; border-top: 1px solid #2a424e; border-left: 1px solid #2a424e; background: #0d1b26; }
.mi-metrics > div { border-bottom: 1px solid #2a424e; border-right: 1px solid #2a424e; padding: 10px 7px; min-width: 0; }
.mi-metrics dt { color: #9cb7c3; font-size: 9px; margin-bottom: 6px; }
.mi-metrics dd { color: #f4ddac; font: 13px/1.4 Consolas, "Liberation Mono", monospace; margin: 0; overflow-wrap: anywhere; }
.mi-direction { display: flex; justify-content: space-between; gap: 8px; color: #9cb7c3; font-size: 10px; margin-bottom: 15px; }
.mi-direction strong { color: #d9e9e8; font: 12px Consolas, "Liberation Mono", monospace; padding-left: 4px; }
.mi-callout { font-size: 10px; color: #c8d8dc; border-left: 2px solid #ba9c65; background: #222a2c; padding: 8px 10px; margin: 12px 0; line-height: 1.7; }
.mi-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid #2b4351; }
.mi-section > summary { color: #c7dce2; font-size: 11px; cursor: pointer; font-weight: bold; padding-bottom: 5px; }
.mi-setup > summary span { display: block; padding: 5px 0 0 12px; color: #91b6b6; font: 9px Consolas, "Liberation Mono", monospace; }
.mi-table-wrap { max-width: 100%; overflow-x: auto; }
.math-inspector table { width: 100%; border-collapse: collapse; font-size: 9px; text-align: right; }
.math-inspector th { color: #a4bcc6; font-weight: normal; font-size: 8px; padding: 7px 3px; border-bottom: 1px solid #37515e; white-space: nowrap; }
.math-inspector td { color: #d8e4e8; padding: 7px 3px; border-bottom: 1px solid #223944; font-variant-numeric: tabular-nums; }
.math-inspector th:first-child, .math-inspector td:first-child { text-align: left; }
.math-inspector td[data-gap="large"] { color: #ffc591; }
.math-inspector tbody tr:first-child td { color: #92e3cf; }
.mi-coordinates { margin: 10px 0; }
.mi-coordinates > div { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: 10px; }
.mi-coordinates dt { color: #9cb7c3; }
.mi-coordinates dd { text-align: right; margin: 0; color: #e0e8e6; font-family: Consolas, "Liberation Mono", monospace; }
.mi-equation { font: 10px/1.8 Consolas, "Liberation Mono", monospace; color: #b3dfd5; overflow-wrap: anywhere; }
.mi-export { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.mi-sources p { color: #a4bac4; font-size: 10px; line-height: 1.7; }
.mi-sources a { color: #9ddccc; text-underline-offset: 2px; }
.mi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1280px) {
  .model-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
  .math-inspector { padding-top: 8px; }
  .mi-content { max-height: min(1120px, calc(100vh - 150px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #466771 #101f2b; }
  .mi-open { position: absolute; right: 16px; bottom: 16px; margin: 0; }
}
@media (max-width: 1279px) {
  .math-inspector { margin-top: 20px; }
  .mi-content { max-width: 740px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .page-title { padding-top: 15px; }
  .page-title h1 { font-size: 20px; }
  .page-title p { font-size: 11px; }
  .model-wrap { padding-left: 8px; padding-right: 8px; }
  .mi-content { padding: 0 12px 12px; }
  .mi-fields label, .mi-date > label, .mi-help, .mi-callout { font-size: 11px; }
  .math-inspector table { font-size: 10px; }
  .mi-content button { min-height: 40px; }
}
