:root { --os-accent: #2563eb; --os-text: #1f2328; --os-font: system-ui, "Segoe UI", "Malgun Gothic", sans-serif; }
html, body { margin: 0; height: 100%; background: var(--os-chrome, #1f2328); font-family: var(--os-ui-font, var(--os-font)); }
#os-root { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--os-chrome-text, #e6edf3); }
.os-body { flex: 1; min-height: 0; display: flex; }
.os-wrap { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.os-stage { position: relative; isolation: isolate; flex: none; overflow: hidden; box-shadow: 0 4px 24px #0006; font-family: var(--os-font); color: var(--os-text); }
.os-layer { position: absolute; inset: 0; pointer-events: none; }
.os-layer > * { pointer-events: auto; }
.os-obj { position: absolute; box-sizing: border-box; white-space: pre-wrap; overflow: hidden; display: flex; align-items: center; font-size: 20px; color: var(--os-text); font-family: inherit; isolation: isolate; }
.os-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.os-rich p { margin: 0; }
.os-rich ul, .os-rich ol { margin: 0; padding-inline-start: 1.4em; }
.os-rich a { color: inherit; }
.os-text { align-items: flex-start; }
.os-image, .os-video { object-fit: contain; }
.os-audio:not([controls]) { display: none; }
.os-button { justify-content: center; border: 0; border-radius: 6px; background: var(--os-accent); color: #fff; font: inherit; font-size: 20px; cursor: pointer; }
.os-input, .os-select { font: inherit; font-size: 20px; padding: 6px 10px; border: 2px solid #8c959f; border-radius: 6px; background: #fff; color: var(--os-text); }
.os-slider { accent-color: var(--os-accent); }
.os-click, .os-drag { cursor: pointer; }
.os-drag { touch-action: none; cursor: grab; }
.os-obj:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.os-bar :focus-visible, .os-side :focus-visible, .os-debug :focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; } /* player controls too, not only slide objects */
.os-obj[data-state="selected"] { outline: 3px solid var(--os-accent); outline-offset: -3px; }
.os-obj[data-state="picked"] { outline: 3px dashed #f59e0b; outline-offset: 2px; }
.os-obj[data-state="disabled"] { opacity: .55; cursor: default; }
.os-cc { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: 80%; padding: 6px 12px; border-radius: 4px;
  background: #000c; color: #fff; font-size: 18px; text-align: center; white-space: pre-wrap; z-index: 5; }
.os-side { flex: none; width: 260px; overflow: auto; padding: 8px 14px; background: #24292f; border-right: 1px solid #444c56; font-size: 14px; }
.os-side h2 { font-size: 15px; margin: 8px 0; }
.os-side ol, .os-side ul { list-style: none; padding: 0; margin: 0; }
.os-side li button { width: 100%; text-align: start; margin: 2px 0; }
.os-side button[aria-current] { background: var(--os-ui-accent, var(--os-accent)); border-color: var(--os-ui-accent, var(--os-accent)); }
.os-side .os-scene { margin: 10px 0 4px; font-weight: 600; color: #8b949e; }
.os-side a { color: #79c0ff; }
.os-side dt { font-weight: 600; margin-top: 8px; }
.os-side dd { margin: 2px 0 0; color: #c9d1d9; }
.os-side input, .os-side textarea { width: 100%; box-sizing: border-box; margin: 4px 0; font: inherit; }
.os-notes { white-space: pre-wrap; }
.os-credits li { margin: 0 0 10px; line-height: 1.4; }
.os-bar { position: relative; flex: none; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 6px 8px; font-size: 14px; flex-wrap: wrap; }
.os-bar button, .os-side button, .os-bar select { font: inherit; padding: 5px 10px; border-radius: 6px; border: 1px solid #57606a; background: #2d333b; color: #e6edf3; cursor: pointer; }
.os-bar button:disabled, .os-side button:disabled { opacity: .4; cursor: default; }
.os-bar button[aria-pressed="true"] { background: var(--os-ui-accent, var(--os-accent)); color: #fff; } /* white keeps 4.5:1 on the default accent */
.os-logo { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); max-height: 32px; max-width: 160px; object-fit: contain; }
.os-ask { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #000b; color: #fff; font-size: 20px; }
.os-ask div { display: flex; gap: 12px; }
.os-ask button { font: inherit; font-size: 17px; padding: 8px 20px; border-radius: 6px; border: 1px solid #fff6; background: #2d333b; color: #fff; cursor: pointer; }
.os-ask button:first-child { background: var(--os-ui-accent, var(--os-accent)); border-color: transparent; }
.os-seek { flex: 1; min-width: 120px; max-width: 420px; accent-color: var(--os-ui-accent, var(--os-accent)); }
.os-vol { width: 80px; accent-color: var(--os-ui-accent, var(--os-accent)); }
.os-time, .os-count { font-variant-numeric: tabular-nums; }
.os-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) {
  .os-side { position: absolute; z-index: 10; top: 0; bottom: 52px; left: 0; width: 80%; }
  .os-vol, .os-speed, .os-time, .os-logo { display: none; }
}
@media (prefers-reduced-motion: reduce) { .os-obj { transition: none !important; } }
[hidden] { display: none !important; }
.os-lb-back { position: absolute; inset: 0; }
.os-lb-back::after { content: ""; position: absolute; inset: 0; background: #0009; z-index: 99999; }
.os-lightbox { position: absolute; transform: scale(.8); transform-origin: 0 0; z-index: 100000; box-shadow: 0 8px 40px #000a; overflow: hidden; }
.os-lb-close { position: absolute; top: 8px; right: 8px; z-index: 100001; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #1f2328; color: #fff; font-size: 20px; cursor: pointer; }
.os-web { border: 0; background: #fff; }
.os-cert { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #000c; padding: 16px; }
.os-cert-card { width: min(720px, 100%); aspect-ratio: 1.414; box-sizing: border-box; padding: 6% 8%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: #fffdf7; color: #1f2328; border: 10px double #b08d3c; font-family: Georgia, "Times New Roman", serif; }
.os-cert-card h1 { margin: 0 0 12px; font-size: 34px; color: #7a5c14; }
.os-cert-course { margin: 0 0 18px; font-size: 22px; font-weight: 700; }
.os-cert-body { margin: 0; font-size: 18px; line-height: 1.5; }
.os-cert-logo { max-height: 48px; margin-bottom: 12px; }
.os-cert-actions { display: flex; gap: 10px; }
.os-cert-actions button { font: inherit; padding: 8px 18px; border-radius: 6px; border: 0; background: var(--os-ui-accent, var(--os-accent)); color: #fff; cursor: pointer; }
@media print {
  html, body { background: #fff !important; }
  #os-root { position: static; }
  #os-root > :not(.os-cert), .os-cert-actions { display: none !important; }
  .os-cert { position: static; background: none; padding: 0; }
  .os-cert-card { width: 100%; }
}
.os-timer { font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 6px; background: #2d333b; color: #e6edf3; }
.os-timer.low { background: #cf222e; color: #fff; }
.os-pano { cursor: grab; touch-action: none; background-color: #111; }
.os-pano-spot { position: absolute; width: 36px; height: 36px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--os-accent); color: #fff; font: 700 22px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 8px #0008; }
.os-page { position: absolute; inset: 0; overflow: auto; background: var(--os-page-bg, #fff); color: var(--os-text); font-family: var(--os-font); }
.os-page-body { max-width: 720px; margin: 0 auto; padding: 40px 20px 72px; font-size: 18px; line-height: 1.6; }
.os-page-body > * + * { margin-top: 24px; }
.os-b-heading { font-size: 30px; line-height: 1.25; margin: 0; }
.os-b-text .os-rich p { margin: 0 0 .6em; }
.os-b-image { margin: 0; }
.os-b-image img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.os-b-image figcaption { font-size: 15px; color: #57606a; margin-top: 6px; }
.os-b-divider { border: 0; border-top: 1px solid #d0d7de; }
.os-b-accordion details { border-bottom: 1px solid #d0d7de; padding: 12px 4px; }
.os-b-accordion summary { cursor: pointer; font-weight: 600; }
.os-b-more { margin-top: 8px; }
.os-b-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #d0d7de; }
.os-b-tablist button { font: inherit; font-size: 16px; padding: 8px 14px; border: 0; background: none; color: inherit; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.os-b-tablist button[aria-selected="true"] { border-color: var(--os-accent); font-weight: 600; }
.os-b-panel { padding: 14px 4px; }
.os-b-quiz { border: 1px solid #d0d7de; border-radius: 8px; padding: 16px 20px; }
.os-b-quiz legend { font-weight: 600; padding: 0 6px; }
.os-b-choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.os-b-choice input { margin-top: 6px; }
.os-b-submit { font: inherit; margin-top: 10px; padding: 8px 18px; border: 0; border-radius: 6px; background: var(--os-accent); color: #fff; cursor: pointer; }
.os-b-submit:disabled { opacity: .5; cursor: default; }
.os-b-feedback.ok { color: #1a7f37; font-weight: 600; }
.os-b-feedback.no { color: #cf222e; font-weight: 600; }
@media (max-width: 700px) { .os-page-body { padding: 20px 16px 56px; font-size: 17px; } .os-b-heading { font-size: 24px; } }
.os-debug { flex: none; width: 280px; overflow: auto; padding: 8px 12px; background: #161b22; border-left: 1px solid #30363d; font: 12.5px/1.4 ui-monospace, Consolas, monospace; color: #e6edf3; }
.os-debug.closed { width: 34px; padding: 8px 4px; }
.os-debug.closed b { display: none; }
.os-dbg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-family: system-ui, sans-serif; }
.os-debug button, .os-debug select, .os-debug input { font: inherit; color: inherit; background: #0d1117; border: 1px solid #30363d; border-radius: 4px; }
.os-debug select { width: 100%; margin: 2px 0 6px; }
.os-debug h3 { margin: 10px 0 4px; font: 600 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: #8b949e; }
.os-dbg-vars { width: 100%; border-collapse: collapse; }
.os-dbg-vars th { text-align: left; font-weight: 400; color: #79c0ff; padding: 2px 6px 2px 0; white-space: nowrap; }
.os-dbg-vars td input { width: 100%; box-sizing: border-box; padding: 1px 4px; }
.os-dbg-vars tr.ro th { color: #8b949e; }
.os-dbg-log { list-style: none; margin: 0; padding: 0; }
.os-dbg-log li { display: flex; gap: 6px; padding: 2px 0; border-bottom: 1px solid #21262d; }
.os-dbg-log .tag { flex: none; width: 34px; text-align: center; border-radius: 3px; font-size: 10.5px; background: #30363d; }
.os-dbg-log .k-run .tag { background: #1a7f37; } .os-dbg-log .k-else .tag { background: #9a6700; } .os-dbg-log .k-false .tag, .os-dbg-log .k-skip .tag { background: #6e7681; }
.os-dbg-log .k-var .tag { background: #0b5cad; } .os-dbg-log .k-slide .tag { background: #8250df; }
.os-dbg-empty { color: #8b949e; }
.os-dbg-clear { margin-top: 8px; padding: 3px 8px; cursor: pointer; }
@media (max-width: 700px) { .os-debug:not(.closed) { position: absolute; right: 0; top: 0; bottom: 52px; z-index: 11; } }
.os-res-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; text-align: start; }
.os-res-table td { border-top: 1px solid #ddd; padding: 4px 6px; vertical-align: top; }
.os-results .os-cert-card { aspect-ratio: auto; max-height: 80vh; overflow: auto; }
.os-textview-size { display: flex; gap: 6px; margin-bottom: 8px; }
.os-textview { line-height: 1.6; overflow-wrap: anywhere; }
.os-textview figure { margin: 8px 0; font-style: italic; color: #c9d1d9; }
.os-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.os-table th, .os-table td { border: 1px solid #8c959f; padding: 4px 8px; text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.os-table th { background: #0000000d; font-weight: 700; }
.os-math { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 1.4em; }
.os-chart { width: 100%; height: 100%; display: block; }
.os-check, .os-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.os-check input, .os-radio input { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--os-accent); }
.os-dial { border-radius: 50%; background: radial-gradient(circle, #fff 55%, #d0d7de 56%); border: 2px solid #8c959f; cursor: grab; touch-action: none; }
.os-dial-knob { position: absolute; left: 50%; top: 8%; width: 6px; height: 42%; margin-left: -3px; border-radius: 3px; background: var(--os-accent, #0969da); transform-origin: 50% 100%; }
.os-zoom { display: none !important; }
.os-pano-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Learner display settings (Display settings panel). Slide content keeps the author's colours (the editor checks them);
   these change the player around it, the Text view and captions. */
.os-prefs label { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.os-prefs input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.os-prefs select { font: inherit; padding: 4px; }
.os-prefs-note { color: #8b949e; font-size: 13px; }
.os-hc, .os-hc .os-bar, .os-hc .os-side { background: #000; color: #fff; }
.os-hc .os-bar button, .os-hc .os-side button, .os-hc .os-bar select { background: #000; color: #fff; border: 2px solid #fff; }
.os-hc .os-bar button[aria-pressed="true"], .os-hc .os-side button[aria-current] { background: #ffd400; color: #000; border-color: #ffd400; }
.os-hc a, .os-hc .os-side a { color: #ffd400; }
.os-hc .os-side dd, .os-hc .os-textview figure, .os-hc .os-prefs-note, .os-hc .os-side .os-scene { color: #fff; }
.os-hc :focus-visible, .os-hc .os-obj:focus-visible { outline: 4px solid #ffd400; outline-offset: 2px; }
.os-readable .os-textview, .os-readable .os-cc, .os-readable .os-side, .os-readable .os-bar {
  font-family: Verdana, Tahoma, "Segoe UI", sans-serif; letter-spacing: .12em; word-spacing: .16em; line-height: 1.8; }
.os-readable .os-textview p { margin-bottom: 2em; }
