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

/* the work order */
.st-ticket { padding: 8px 12px 10px; border-radius: var(--tlg-radius-lg, 14px); border: 2px dashed #c9a227; background: #fff8e1; color: #2a2208; }
.st-ticket-k { margin: 0 0 4px; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #7a5a06; }
.st-given { margin: 2px 0 4px; font-size: 18px; font-weight: 800; line-height: 1.35; font-variant-numeric: tabular-nums; }
.st-rule { margin: 4px 0 0; font-size: 16px; font-weight: 700; line-height: 1.35; padding: 5px 9px; border-radius: 9px; background: #fff; border: 1.5px solid #e5d28a; }
html[data-theme="dark"] .st-ticket { background: #2a2410; color: #f6eccb; border-color: #8a7420; }
html[data-theme="dark"] .st-ticket-k { color: #f2d36b; }
html[data-theme="dark"] .st-rule { background: #1c180a; border-color: #6b5a1a; }

/* controls */
.st-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.st-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.st-numrow { display: flex; align-items: center; gap: 8px; }
.st-num { font: inherit; font-size: 22px; font-weight: 800; width: 150px; min-height: 50px; padding: 6px 10px; text-align: right; color: var(--tlg-text, #172c38);
  background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1); border-radius: 10px; font-variant-numeric: tabular-nums; }
.st-unit { font-size: 20px; font-weight: 800; }
.st-sign, .st-choice { position: relative; font: inherit; cursor: pointer; color: var(--tlg-text, #172c38); background: var(--tlg-surface, #fff); border: 2px solid var(--tlg-border, #a5b6c1);
  border-radius: 10px; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); touch-action: manipulation; }
.st-sign { min-width: 50px; min-height: 50px; font-size: 22px; font-weight: 900; }
.st-choices { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.st-choice { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 6px 26px 6px 12px; font-size: 19px; font-weight: 800; }
.st-choices.is-units .st-choice { font-size: 22px; }
.st-sign:hover:not(:disabled), .st-choice:hover:not(:disabled) { border-color: #1f5f7a; }
.st-choice[aria-pressed="true"] { border-color: #1f5f7a; border-width: 3px; background: #dff0f5; box-shadow: 0 0 0 3px rgba(31, 95, 122, .25); }
.st-choice[aria-pressed="true"] .st-choice-l::before { content: '● '; color: #1f5f7a; }
html[data-theme="dark"] .st-choice[aria-pressed="true"] { background: #173341; border-color: #8fd0e4; }
html[data-theme="dark"] .st-choice[aria-pressed="true"] .st-choice-l::before { color: #8fd0e4; }
.st button:disabled, .st input:disabled { cursor: default; opacity: 1; }
.st-choice.is-ok { border-color: #2e8b57; border-width: 3px; }
.st-choice.is-bad { border-color: #b42318; border-style: dashed; border-width: 3px; }
.st-field.is-ok .st-num { border-color: #2e8b57; border-width: 3px; }
.st-field.is-bad .st-num { border-color: #b42318; border-style: dashed; border-width: 3px; }
.st-mark { position: absolute; top: 4px; right: 8px; font-size: 18px; font-weight: 900; }
.st-choice.is-ok .st-mark { color: #1d6b40; }
.st-choice.is-bad .st-mark { color: #b42318; }
html[data-theme="dark"] .st-choice.is-ok .st-mark { color: #8fe0ad; }
html[data-theme="dark"] .st-choice.is-bad .st-mark { color: #ffb4a8; }
.st-msg { margin: 0; font-size: 16px; font-weight: 700; color: #8a3b12; }
.st-msg:empty { display: none; }
html[data-theme="dark"] .st-msg { color: #ffbf8a; }
.st-about { font-size: 16px; line-height: 1.45; }
.st-about summary { cursor: pointer; font-weight: 700; }
.st-about p { margin: 6px 0 0; }
.st :focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }

/* the track */
.st-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.st-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; }
.st-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-sky { fill: url(#st-g-sky); }
html[data-theme="dark"] .st-sky { fill: url(#st-g-sky-d); }
.st-cloud ellipse { fill: #ffffff; opacity: .85; }
html[data-theme="dark"] .st-cloud ellipse { fill: #8a9ab4; opacity: .35; }
.st-glass { fill: #bfe0f2; stroke: #1d2026; stroke-width: 1.5; }
.st-beam { stroke: #ff3b2f; stroke-width: 3; stroke-dasharray: 7 6; opacity: .9; }
.st-dim path { stroke: #fff; stroke-width: 3; fill: none; }
.st-dim .st-dim-head { fill: #fff; stroke: none; }
.st-dim-tag { fill: #fff8e1; stroke: #7a5a06; stroke-width: 2; }
.st-axis { stroke: #fff; stroke-width: 4; fill: none; }
.st-axis-head { fill: #fff; }
.st-arrow-shaft { stroke: #ffd23f; stroke-width: 7; stroke-linecap: round; fill: none; }
.st-arrow-head { fill: #ffd23f; stroke: #5a4310; stroke-width: 1.5; }
.st-varrow circle { fill: #ffd23f; stroke: #5a4310; }
.st-row-mark { fill: #ffe98a; stroke: #c9a227; stroke-width: 2; }
.st-plot-ax { stroke: #28323a; stroke-width: 2.5; fill: none; }
.st-plot-line { stroke: #1f6fb2; stroke-width: 3; fill: none; }
.st-plot-pt { fill: #1f6fb2; stroke: #fff; stroke-width: 2; }
.st-plot-tri { stroke: #c2410c; stroke-width: 3; stroke-dasharray: 8 5; fill: none; }

.st-t { font-family: var(--tlg-font-body, system-ui, sans-serif); fill: #10202c; }
.st-t-boardk { font-size: 18px; font-weight: 800; fill: #8fa3b3; letter-spacing: .1em; }
.st-t-led { font-size: 26px; font-weight: 800; fill: #ffb627; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.st-t-led.is-run { fill: #ff7a4a; }
.st-t-led.is-res { fill: #8df07a; font-size: 23px; }
.st-t-dim { font-size: 20px; font-weight: 900; fill: #2a2208; }
.st-t-axis { font-size: 20px; font-weight: 900; fill: #fff; paint-order: stroke; stroke: #24461c; stroke-width: 4px; }
.st-t-axis2 { font-size: 18px; font-weight: 800; fill: #fff; paint-order: stroke; stroke: #24461c; stroke-width: 4px; }
.st-t-arrow { font-size: 20px; font-weight: 900; fill: #10202c; paint-order: stroke; stroke: #fff8e1; stroke-width: 5px; }
.st-t-unitalg { font-size: 24px; font-weight: 900; fill: #10202c; paint-order: stroke; stroke: #fff8e1; stroke-width: 6px; }
.st-t-veh { font-size: 18px; font-weight: 800; fill: #fff; }
.st-t-con { font-size: 18px; font-weight: 800; fill: #c9d4dc; letter-spacing: .08em; }
.st-t-lcd { font-size: 28px; font-weight: 900; fill: #1c2b14; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.st-t-lcd.is-bad { fill: #8a1a10; }
.st-t-mark { font-size: 30px; font-weight: 900; }
.st-t-mark.is-ok { fill: #14532d; }
.st-t-mark.is-bad { fill: #b42318; }
.st-t-paperk { font-size: 18px; font-weight: 900; fill: #2a2208; }
.st-t-paperh { font-size: 19px; font-weight: 800; fill: #5a4a2a; }
.st-t-paper { font-size: 21px; font-weight: 700; fill: #10202c; font-variant-numeric: tabular-nums; }
.st-t-paper.is-b { font-weight: 900; }
.st-t-rowmk { font-size: 18px; fill: #7a5a06; }
.st-t-plot { font-size: 18px; font-weight: 800; fill: #28323a; }
.st-t-plotk { font-size: 18px; font-weight: 900; fill: #9a3412; paint-order: stroke; stroke: #f7fafc; stroke-width: 4px; }
.st-t-plotwait { font-size: 20px; font-weight: 700; font-style: italic; fill: #5c6a74; }

/* reveal badge (over the gantry) */
.st-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: st-pop .25s ease-out; }
.st-badge.is-ok { border-color: #1d6b40; }
.st-badge.is-bad { border-color: #b42318; }
@keyframes st-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

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

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