/* Milankovitch Dials: the work order and choices beside the orbital climate console, inside the practice shell's stage. */
.md { position: absolute; inset: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; padding: 8px 12px; color: var(--tlg-text, #172c38); }
.md-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }

/* the work order */
.md-ticket { padding: 8px 12px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px solid #9cc3dd; background: #eef6fb; color: #10283a; box-shadow: inset 0 0 0 3px #fff; }
.md-ticket-k { margin: 0 0 6px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #1f5f7a; }
.md-facts { margin: 0; padding-left: 20px; font-size: 17px; line-height: 1.35; font-weight: 600; }
.md-facts li + li { margin-top: 2px; }
html[data-theme="dark"] .md-ticket { background: #13242f; color: #e3f1fa; border-color: #3f6f8c; box-shadow: none; }
html[data-theme="dark"] .md-ticket-k { color: #8fd0ec; }

/* choices */
.md-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.md-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.md-choices { display: grid; gap: 8px; }
.md-choices.is-two.md-choices--tilt, .md-choices.is-two.md-choices--record { grid-template-columns: 1fr 1fr; }
.md-choice { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 28px 6px 10px; min-height: 56px; text-align: left;
  font: inherit; cursor: pointer; color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1); border-radius: 12px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .1); touch-action: manipulation; }
.md-choice-i svg { width: 44px; height: 44px; display: block; }
.md-choice-l { font-size: 18px; font-weight: 800; line-height: 1.25; }
.md-choices--tilt .md-choice-l { font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.md-choices--record .md-choice-l { white-space: nowrap; }
.md-choice:hover:not(:disabled) { border-color: #1f5f7a; }
.md-choice[aria-pressed="true"] { border-color: #1f5f7a; border-width: 3px; background: #e3f2fa; box-shadow: 0 0 0 3px rgba(31, 95, 122, .25); }
.md-choice[aria-pressed="true"] .md-choice-l::before { content: '● '; color: #1f5f7a; }
.md-choices--tilt .md-choice[aria-pressed="true"] .md-choice-l::before { content: none; }
html[data-theme="dark"] .md-choice[aria-pressed="true"] { background: #173040; border-color: #8fd0ec; }
html[data-theme="dark"] .md-choice[aria-pressed="true"] .md-choice-l::before { color: #8fd0ec; }
.md-choice:disabled { cursor: default; opacity: 1; }
.md-choice.is-ok { border-color: #2e8b57; border-width: 3px; }
.md-choice.is-bad { border-color: #b42318; border-style: dashed; border-width: 3px; }
.md-mark { position: absolute; top: 2px; right: 8px; font-size: 18px; font-weight: 900; }
.md-choice.is-ok .md-mark { color: #1d6b40; }
.md-choice.is-bad .md-mark { color: #b42318; }
html[data-theme="dark"] .md-choice.is-ok .md-mark { color: #8fe0ad; }
html[data-theme="dark"] .md-choice.is-bad .md-mark { color: #ffb4a8; }
.md-msg { margin: 0; font-size: 16px; font-weight: 700; color: #8a3b12; }
.md-msg:empty { display: none; }
html[data-theme="dark"] .md-msg { color: #ffbf8a; }
.md-about { font-size: 16px; line-height: 1.45; }
.md-about summary { cursor: pointer; font-weight: 700; }
.md-about p { margin: 6px 0 0; }

/* the console */
.md-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.md-scene { position: relative; width: 100%; aspect-ratio: 720 / 620; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border, #a5b6c1); user-select: none; -webkit-user-select: none; }
.md-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.md-wall { fill: url(#md-g-wall); }
html[data-theme="dark"] .md-wall { fill: url(#md-g-wall-d); }
.md-sky { fill: url(#md-g-sky); }
html[data-theme="dark"] .md-sky { fill: #33506b; }

.md-t { font-family: var(--tlg-font-body, system-ui, sans-serif); fill: #1d2b2f; }
.md-t-b { font-weight: 800; }
.md-t-rail { font-size: 19px; font-weight: 800; fill: #e6f1f8; letter-spacing: .06em; }
.md-t-railfine { font-size: 17px; font-weight: 600; fill: #b7cbd9; font-style: italic; }
.md-t-chip { font-size: 18px; font-weight: 800; fill: #f2f8fc; }
.md-t-fine { font-size: 17px; font-weight: 600; fill: #d7e4ee; font-style: italic; paint-order: stroke; stroke: #0b1430; stroke-width: 3px; }
.md-t-space { font-size: 18px; fill: #e6f1f8; }
.md-t-amber { fill: #ffc04d; }
.md-t-snowok { fill: #9fe3ff; }
.md-t-tilt { font-size: 20px; fill: #ffb08f; }
.md-t-sky { font-size: 18px; font-weight: 700; fill: #10283a; }
.md-t-sign { font-size: 17px; fill: #2b1d10; }
.md-t-paper { font-size: 17px; fill: #3b2f20; }
.md-t-plate { font-size: 18px; font-weight: 900; fill: #2b1d06; letter-spacing: .05em; }
.md-t-plate2 { font-size: 17px; font-weight: 600; fill: #3b2a0e; font-style: italic; }
.md-t-lcd { font-size: 17px; font-weight: 800; fill: #7dffb2; font-variant-numeric: tabular-nums; }
.md-t-detent { font-size: 17px; font-weight: 800; fill: #10283a; font-variant-numeric: tabular-nums; pointer-events: none; }
.md-t-meterk { font-size: 17px; font-weight: 700; fill: #e6f1f8; }
.md-t-meterv { font-size: 17px; font-weight: 800; fill: #ffd27a; font-variant-numeric: tabular-nums; }
.md-t-mark { font-size: 26px; font-weight: 900; }
.md-t-ok { fill: #2fd27a; } .md-t-bad { fill: #ff7a6a; }
html[data-theme="dark"] .md-t-sky { fill: #e6f1f8; }

.md-sign { fill: #f4e6c4; stroke: #6b4a2b; stroke-width: 2; }
.md-plot { cursor: pointer; }
.md-plot-hit { fill: transparent; }
.md-plot-ring { stroke: #ff6a3d; stroke-width: 5; stroke-dasharray: 12 7; }
.md.is-locked .md-plot, .md.is-locked .md-pickable, .md.is-locked .md-detent { cursor: default; }

.md-dial.is-off { opacity: .55; }
.md-dial-glow { fill: none; stroke: #ffb020; stroke-width: 5; stroke-opacity: .7; }
.md-dial.is-ok { opacity: 1; }
.md-dial.is-ok > circle:first-of-type { stroke: #2fd27a; stroke-width: 4; }
.md-dial.is-bad > circle:first-of-type { stroke: #ff7a6a; stroke-dasharray: 6 4; }
.md-pickable { cursor: pointer; }
.md-pickable:hover:not(.is-chosen) { opacity: .8; }
.md-detent { cursor: pointer; }
.md-detent-knob { fill: #e7cd86; stroke: #3b2a0e; stroke-width: 2; }
.md-detent.is-chosen .md-detent-knob { fill: #ff6a3d; }
.md-detent-bg { fill: #f4f8fb; stroke: #6b7b88; stroke-width: 1.5; }
.md-detent.is-chosen .md-detent-bg { stroke: #ff6a3d; stroke-width: 3; }
.md-detent:hover .md-detent-bg { stroke: #1f5f7a; stroke-width: 2.5; }

/* reveal badge (over the rail) */
.md-badge { position: absolute; left: 2%; right: 2%; top: 1%; padding: 7px 12px; border-radius: 10px; font-size: 17px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .97); color: #10202c; border: 3px solid #1f5f7a; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); animation: md-pop .25s ease-out; }
.md-badge.is-ok { border-color: #1d6b40; }
.md-badge.is-bad { border-color: #b42318; }
@keyframes md-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* briefing + start */
.md-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.md-start-svg { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) { .md-badge { animation: none; } }
@media (max-width: 1100px) { .md { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .md { position: static; grid-template-columns: 1fr; }
  .md-panel { overflow: visible; }
  .md-view { display: block; order: -1; }
  .md-scene { width: 100% !important; }
}
