/* Local extension of the shared sim component vocabulary for the video workbench. */
html.sim-video-document { height: auto; min-height: 100%; overflow: auto; }
.sim-video-body { --va-ink: #24362c; --va-muted: #58685f; --va-paper: #fff; --va-bg: #f4f6f2; --va-line: #dce2d9; --va-green: #526b46; --va-orange: #a84b19; height: auto; min-height: 100%; overflow: auto; background: var(--va-bg); color: var(--va-ink); font-family: 'Noto Sans TC', system-ui, sans-serif; font-size: 1rem; line-height: 1.6; }
.sim-video-body ::selection { background: #d4e1c9; color: #24362c; }
.sim-video-body :focus-visible { outline: 3px solid #57844c; outline-offset: 3px; }
.sim-video-body a { color: var(--va-green); text-underline-offset: .22em; }
.sim-video-body button, .sim-video-body input, .sim-video-body select { font: inherit; }
.sim-video-body .sim-btn { flex: 0 0 auto; min-height: 2.75rem; border-radius: .6rem; font-size: .875rem; width: auto; white-space: nowrap; padding: .55rem .9rem; box-shadow: none; }
.sim-video-body .sim-btn:focus, .sim-video-body .sim-btn:hover { box-shadow: none; }
.sim-video-body .sim-btn-secondary { color: var(--va-ink); background: var(--va-paper); border: 1px solid var(--va-line); }
.sim-video-body .sim-btn-primary { color: #fff; background: var(--va-green); border: 1px solid var(--va-green); }
.sim-video-body .sim-btn:hover:not(:disabled) { filter: brightness(.96); transform: none; }
.sim-video-body button:disabled { opacity: .42; cursor: not-allowed; }
.sim-video-header { padding: .85rem max(1.25rem, calc((100% - 1440px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--va-line); background: var(--va-paper); }
.sim-video-brand { font-weight: 700; text-decoration: none; font-size: .9rem; }
.sim-video-header nav { display: flex; gap: 1.5rem; font-size: .85rem; }
.sim-video-header nav a { min-height: 2.75rem; display: flex; align-items: center; }
.sim-video-main { max-width: 1480px; height: auto; overflow: visible; margin: auto; padding: 1.75rem 1.25rem 0; }
.sim-video-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.sim-video-heading h1 { font-size: 1.8rem; line-height: 1.3; font-weight: 700; letter-spacing: -.025em; margin-bottom: .4rem; }
.sim-video-heading p { color: var(--va-muted); font-size: .95rem; }
.sim-video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sim-video-file-label { position: relative; cursor: pointer; display: inline-flex; align-items: center; }
.sim-video-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sim-video-file-label:focus-within { outline: 3px solid #57844c; outline-offset: 3px; }
.sim-video-steps { display: flex; list-style: none; border-top: 1px solid var(--va-line); border-bottom: 1px solid var(--va-line); padding: .8rem 0; gap: 2.5rem; color: var(--va-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.sim-video-steps li { display: flex; gap: .6rem; align-items: center; }
.sim-video-steps li[data-done] { color: var(--va-green); font-weight: 700; }
.sim-video-status { min-height: 3.25rem; display: flex; align-items: center; font-size: .875rem; color: var(--va-green); padding: .65rem 0; }
.sim-video-status[data-error] { color: #b13223; }
.sim-video-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.sim-video-editor, .sim-video-results { min-width: 0; }
.sim-video-section-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.sim-video-section-title h2 { font-size: 1.05rem; font-weight: 700; }
.sim-video-section-title h3 { font-size: 1rem; }
.sim-video-section-title > span { color: var(--va-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.sim-video-stage { display: grid; place-items: center; position: relative; background: #18251e; border-radius: .75rem; overflow: hidden; min-height: 13rem; }
#videoCanvas { display: block; width: 100%; height: auto; max-height: 34rem; object-fit: contain; cursor: crosshair; touch-action: manipulation; }
.sim-video-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem; color: #d9e5d6; background: #202e26; }
.sim-video-empty svg { margin-bottom: .9rem; color: #9fb097; }
.sim-video-empty h3 { font-size: 1.25rem; color: #f0f5ed; font-weight: 500; }
.sim-video-empty p { font-size: .9rem; margin: .5rem 0 .9rem; }
.sim-video-empty small { font-size: .75rem; color: #b1c0b5; margin-top: .75rem; }
.sim-video-upload-link { cursor: pointer; text-decoration: underline; text-underline-offset: .3em; min-height: 2.75rem; display: flex; align-items: center; color: #eff7e8; }
.sim-video-transport { display: flex; align-items: center; gap: 1rem; margin: .8rem 0; }
.sim-video-play-buttons { display: flex; gap: .35rem; }
.sim-video-play-buttons svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.sim-video-play-buttons .sim-btn { min-width: 2.75rem; padding: .5rem .65rem; display: flex; align-items: center; justify-content: center; }
.sim-video-timeline { flex: 1; min-width: 0; }
.sim-video-time-label { display: flex; justify-content: space-between; font-size: .75rem; gap: .5rem; color: var(--va-muted); font-variant-numeric: tabular-nums; }
.sim-video-body input[type=range] { width: 100%; accent-color: var(--va-green); min-height: 1.6rem; }
.sim-video-modebar { display: flex; gap: .4rem; flex-wrap: wrap; padding: .75rem 0 .5rem; border-top: 1px solid var(--va-line); }
.sim-video-body button[aria-pressed=true] { background: var(--va-green); color: #fff; border-color: var(--va-green); }
.sim-video-help { font-size: .8rem; line-height: 1.6; color: var(--va-muted); }
.sim-video-setup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 .75rem; }
.sim-video-setup label { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--va-muted); }
.sim-video-setup input, .sim-video-setup select, #componentInput { display: block; width: 100%; min-width: 0; min-height: 2.75rem; border: 1px solid var(--va-line); border-radius: .5rem; padding: .5rem .65rem; background: var(--va-paper); color: var(--va-ink); font-size: 1rem; font-variant-numeric: tabular-nums; caret-color: var(--va-green); }
.sim-video-setup input:invalid { border-color: #b13223; }
.sim-video-setup input:disabled { background: var(--va-bg); color: var(--va-muted); }
.sim-video-checks { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .8rem; align-items: center; }
.sim-video-checks label { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .45rem; }
.sim-video-body input[type=checkbox] { accent-color: var(--va-green); width: 1rem; height: 1rem; flex: 0 0 auto; }
#scaleReadout { color: var(--va-muted); font-variant-numeric: tabular-nums; }
.sim-video-details { border-top: 1px solid var(--va-line); margin-top: 1rem; }
.sim-video-details summary { cursor: pointer; padding: .85rem 0; font-size: .85rem; }
.sim-video-detail-content p { font-size: .8rem; color: var(--va-muted); margin-bottom: .75rem; max-width: 75ch; }
.sim-video-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sim-video-results { background: var(--va-paper); border: 1px solid var(--va-line); padding: 1rem; border-radius: .75rem; }
.sim-video-tabs { display: flex; padding: .25rem; background: var(--va-bg); border-radius: .6rem; gap: .2rem; }
.sim-video-tabs button { flex: 1; background: transparent; border: 0; border-radius: .4rem; min-height: 2.75rem; color: var(--va-muted); font-size: .85rem; cursor: pointer; }
.sim-video-legend { display: flex; gap: 1rem; align-items: center; font-size: .75rem; color: var(--va-muted); min-height: 3.2rem; }
.sim-video-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.sim-video-dot { display: inline-block; width: .5rem; height: .5rem; background: #526b46; border-radius: 50%; }
.sim-video-dash { display: inline-block; width: 1.1rem; border-top: 2px dashed #a84b19; }
#componentWrap { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
#componentInput { font-size: .8rem; padding: .3rem; width: auto; }
.sim-video-chart { width: 100%; height: 18rem; display: block; }
.sim-video-readouts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; border-top: 1px solid var(--va-line); border-bottom: 1px solid var(--va-line); margin: 1rem 0; padding: 1rem 0; }
.sim-video-readouts span { display: block; font-size: .75rem; color: var(--va-muted); }
.sim-video-readouts strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; font-weight: 500; }
.sim-video-model .sim-video-section-title { margin-bottom: .25rem; }
.sim-video-setup .sim-video-model-check { flex-direction: row; align-items: center; justify-content: flex-start; color: var(--va-ink); gap: .5rem; align-self: end; min-height: 2.75rem; }
.sim-video-equation { color: var(--va-muted); font-size: .9rem; font-family: Georgia, serif; line-height: 1.8; margin-top: 1rem; }
.sim-video-data { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--va-line); }
.sim-video-table-scroll { overflow: auto; max-height: 24rem; border: 1px solid var(--va-line); border-radius: .6rem; scrollbar-color: #b5c2ae var(--va-bg); }
.sim-video-data table { width: 100%; border-collapse: collapse; font-size: .85rem; background: var(--va-paper); font-variant-numeric: tabular-nums; }
.sim-video-data th { position: sticky; top: 0; background: var(--va-bg); color: var(--va-muted); font-weight: 500; white-space: nowrap; }
.sim-video-data th, .sim-video-data td { padding: .65rem 1rem; text-align: right; border-bottom: 1px solid var(--va-line); }
.sim-video-data th:first-child, .sim-video-data td:first-child { text-align: left; }
.sim-video-data tr[data-current] { background: #edf3e8; }
.sim-video-data td button { border: 0; background: none; color: var(--va-green); text-decoration: underline; text-underline-offset: .2em; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; }
.sim-video-data .sim-video-table-empty { text-align: center; padding: 2rem; color: var(--va-muted); }
.sim-video-footer { display: flex; justify-content: space-between; gap: 1rem; color: var(--va-muted); font-size: .75rem; padding: 2rem 0; }
.sim-video-footer p { text-align: right; }
@media (min-width: 1024px) { .sim-video-workspace { grid-template-columns: minmax(0, 1.65fr) minmax(22rem, 1fr); gap: 1.75rem; } }
@media (max-width: 639px) { .sim-video-header { padding: .65rem 1rem; } .sim-video-header nav a:first-child { display: none; } .sim-video-header nav { font-size: .75rem; } .sim-video-brand { max-width: 10rem; font-size: .8rem; } .sim-video-main { padding: 1.25rem .85rem 0; } .sim-video-heading h1 { font-size: 1.55rem; } .sim-video-heading p { font-size: .85rem; } .sim-video-actions { width: 100%; } .sim-video-steps { gap: 0; justify-content: space-between; font-size: .75rem; } .sim-video-steps li { gap: .25rem; } .sim-video-transport { flex-wrap: wrap; gap: .5rem; } .sim-video-timeline { flex-basis: 100%; order: -1; } .sim-video-play-buttons { width: 100%; } .sim-video-play-buttons button { flex: 1; } .sim-video-modebar { gap: .35rem; } .sim-video-modebar .sim-btn { padding: .5rem .65rem; } .sim-video-empty svg { display: none; } .sim-video-empty h3 { font-size: 1rem; } .sim-video-empty p { font-size: .75rem; margin: .25rem 0; } .sim-video-empty small { font-size: .65rem; margin-top: .25rem; } .sim-video-setup { gap: .5rem; } .sim-video-setup label { font-size: .7rem; } .sim-video-footer { flex-direction: column; } .sim-video-footer p { text-align: left; } .sim-video-data .sim-video-section-title { align-items: start; } }
[data-theme=dark] .sim-video-body { --va-ink: #e0e9dd; --va-muted: #b0bdae; --va-paper: #1c2922; --va-bg: #152019; --va-line: #3a493e; --va-green: #a6bf97; --va-orange: #eea577; }
[data-theme=dark] .sim-video-body .sim-btn-secondary { color: var(--va-ink); background: var(--va-paper); }
[data-theme=dark] .sim-video-body .sim-btn-secondary:hover:not([aria-pressed=true]) { background: #293a2d; }
[data-theme=dark] .sim-video-status[data-error] { color: #ffaaa0; }
[data-theme=dark] .sim-video-body .sim-btn-primary, [data-theme=dark] .sim-video-body button[aria-pressed=true] { background: #526b46; }
[data-theme=dark] .sim-video-data tr[data-current] { background: #30422e; }
@media (prefers-reduced-motion: reduce) { .sim-video-body *, .sim-video-body *::before, .sim-video-body *::after { transition: none !important; animation: none !important; } }
