:root {
  color-scheme: dark;
  --guide-bg: #061321;
  --guide-ink: #f4f8fd;
  --guide-muted: #9eb6d2;
  --guide-blue: #2f80ed;
  --drawer-width: clamp(370px, 23vw, 440px);
}

* { box-sizing: border-box; }
html { min-width: 1180px; background: var(--guide-bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--guide-ink);
  background: radial-gradient(circle at 14% 8%, #163f65 0, transparent 29%), linear-gradient(145deg, #0a2037 0%, #061321 42%, #050f1b 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #84c4ff; outline-offset: 2px; }

.guide-page { min-height: 100vh; padding: 34px calc(var(--drawer-width) + 28px) 48px 28px; }
.guide-header { width: min(1660px, 100%); min-height: 92px; display: flex; align-items: end; justify-content: space-between; gap: 28px; margin: 0 auto 18px; }
.guide-title { min-width: 430px; }
.eyebrow { margin: 0 0 5px; color: #4e9ffc; font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.guide-title h1 { margin: 0; font-size: clamp(2.3rem, 3.2vw, 3.7rem); font-weight: 700; line-height: .98; letter-spacing: -.045em; }
.guide-title > p:last-child { max-width: 850px; margin: 10px 0 0; color: var(--guide-muted); font-size: .9rem; line-height: 1.45; }
.guide-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.header-button { min-height: 42px; padding: 0 15px; border: 1px solid #3b5575; border-radius: 8px; background: #102039; color: #eff6ff; cursor: pointer; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.header-button:hover { border-color: var(--guide-blue); background: #172d4a; }
.guide-search { position: relative; width: min(360px, 28vw); height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #344d6d; border-radius: 8px; background: #0c1727; box-shadow: 0 10px 24px #0002; }
.guide-search > span { color: #7e94b0; font-size: 21px; }
.guide-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: .78rem; }
.guide-search input::placeholder { color: #7588a2; }
.search-results { position: absolute; z-index: 500; top: 49px; right: 0; left: 0; max-height: 390px; overflow: auto; padding: 6px; border: 1px solid #405775; border-radius: 8px; background: #101d2f; box-shadow: 0 22px 55px #000d; }
.search-results[hidden] { display: none; }
.search-results button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; padding: 9px 10px; border: 0; border-radius: 5px; background: transparent; cursor: pointer; text-align: left; }
.search-results button:hover { background: #203958; }
.search-results strong, .search-results em { display: block; }
.search-results strong { color: #eff6ff; font-size: 11px; }
.search-results em { margin-top: 2px; overflow: hidden; color: #93a7bf; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.search-results small { color: #7fb3ed; font-size: 8px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.search-empty { margin: 0; padding: 14px 10px; color: #93a7bf; font-size: 11px; text-align: center; }

.app-viewport { width: min(1660px, 100%); margin: 0 auto; overflow: auto; border-radius: 5px; box-shadow: 0 25px 85px #000a; }
.app-shell {
  --app-bg: #111827; --app-surface: #1f2937; --app-surface-alt: #263246; --app-input: #0d1626;
  --app-text: #f3f5f7; --app-muted: #aab4c0; --app-border: #3b4656; --app-hover: #27364a;
  --app-selection: #244a7a; --app-handle: #374151; --app-primary: #4f8cff; --app-disabled: #718096;
  width: 100%; min-width: 1260px; height: min(900px, calc(100vh - 160px)); min-height: 730px; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #2b3b51; border-radius: 5px; background: var(--app-bg); color: var(--app-text);
  font-family: "Segoe UI", Arial, sans-serif; font-size: clamp(8.5px, .61vw, 11px);
}
.app-shell.light-theme { --app-bg: #d7dce3; --app-surface: #e3e7ec; --app-surface-alt: #cfd6df; --app-input: #eef1f5; --app-text: #2f3745; --app-muted: #5d6674; --app-border: #9ba7b6; --app-hover: #c6d0dc; --app-selection: #8fb9ef; --app-handle: #aab4c1; --app-primary: #2f80ed; --app-disabled: #7a8492; }
.app-shell.light-theme .video-screen, .app-shell.light-theme .current-caption { background: #15191f; color: #fff; }
.app-shell.sharp-corners, .app-shell.sharp-corners * { border-radius: 0 !important; }
.app-titlebar { height: 30px; flex: 0 0 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; background: #242424; color: #f5f5f5; font-size: 10px; }
.app-titlebar strong { font-weight: 500; }
.overview-trigger { cursor: pointer; }
.overview-trigger:focus-visible { outline: 1px solid #4ba4ff; outline-offset: -2px; }
.app-mark { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #8ea6bf; border-radius: 2px; background: #edf5ff; color: #14345d; font-size: 6px; font-weight: 900; }
.window-controls { height: 100%; display: flex; align-items: center; margin-left: auto; }
.window-controls span { width: 40px; height: 100%; display: grid; place-items: center; font-size: 13px; }
.app-menubar { position: relative; z-index: 80; height: 33px; flex: 0 0 33px; display: flex; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--app-border); background: var(--app-surface); }
.menu-wrap { position: relative; height: 25px; }
.menu-target { height: 25px; padding: 0 10px; border: 0; background: transparent; color: var(--app-text); cursor: pointer; }
.menu-target:hover, .menu-target.open { background: var(--app-hover); }
.app-dropdown { position: absolute; z-index: 400; top: 25px; left: 0; width: 150px; padding: 4px 0; border: 1px solid var(--app-border); border-radius: 0 7px 7px 7px; background: var(--app-surface); box-shadow: 0 12px 28px #000a; }
.app-dropdown[hidden] { display: none; }
.app-dropdown button { width: 100%; height: 29px; display: grid; grid-template-columns: 17px 1fr; align-items: center; gap: 4px; padding: 0 9px 0 4px; border: 0; background: transparent; color: var(--app-text); cursor: pointer; font-size: 10px; text-align: left; }
.app-dropdown button:hover { background: var(--app-hover); }
.app-dropdown button.divider-before { height: 34px; margin-top: 3px; padding-top: 5px; border-top: 1px solid var(--app-border); }
.menu-check { opacity: 0; font-weight: 850; }
.appearance-option[data-checked="true"] .menu-check { opacity: 1; }

.sync-workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(480px, 1fr) 7px minmax(520px, 1fr); background: var(--app-bg); }
.sync-workspace.review-mode { grid-template-columns: 0 0 minmax(0, 1fr); }
.submission-pane { min-width: 0; min-height: 0; overflow: hidden; }
.review-mode .submission-pane, .review-mode .main-splitter { visibility: hidden; }
.submission-scroll { height: 100%; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 10px 10px 11px; scrollbar-color: var(--app-handle) var(--app-bg); }
.main-splitter { background: var(--app-handle); }
.app-heading { padding: 0 0 3px; }
.app-heading h2 { margin: 0 0 7px; font-size: 16px; line-height: 1; }
.app-heading p { margin: 0; font-size: 10px; }
.qt-panel { min-width: 0; margin: 0; padding: 9px 9px 10px; border: 1px solid var(--app-border); border-radius: 7px; background: var(--app-surface); }
.qt-panel legend { margin-left: 7px; padding: 0 5px; background: var(--app-surface); color: var(--app-text); font-weight: 650; }
input, textarea, select { min-width: 0; border: 1px solid var(--app-border); border-radius: 4px; background: var(--app-input); color: var(--app-text); padding: 4px 7px; }
input, select { height: 31px; }
textarea { resize: none; }
input[readonly], textarea[readonly] { color: #d2d8e0; }
.light-theme input[readonly], .light-theme textarea[readonly] { color: #3d4652; }
.sim-button { min-width: 0; min-height: 31px; padding: 4px 10px; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-input); color: var(--app-text); cursor: pointer; }
.sim-button:hover:not(:disabled):not(.is-disabled) { border-color: var(--app-primary); background: var(--app-hover); }
.sim-button.primary { border-color: var(--app-primary); background: var(--app-primary); color: #fff; font-weight: 700; }
.sim-button:disabled, .sim-button.is-disabled { color: var(--app-disabled); background: var(--app-surface-alt); cursor: pointer; }
.sim-button.wide { width: 100%; }
.source-grid { display: grid; grid-template-columns: 82px minmax(0, 1fr) 74px; gap: 7px; align-items: center; }
.source-grid > label, .source-grid > span { padding-left: 6px; }
.source-grid textarea { height: 112px; padding-top: 7px; line-height: 1.5; }
.button-stack { align-self: stretch; display: grid; align-content: start; gap: 7px; }
.detected-media { grid-column: 2 / 4; min-height: 22px; margin: 0; display: flex; align-items: center; }
.field-grid { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px 8px; align-items: center; }
.field-grid > label:first-child, .field-grid > label:nth-of-type(2), .field-grid > label:nth-of-type(3) { padding-left: 6px; }
.check-line { display: flex; align-items: center; gap: 7px; min-height: 24px; }
.check-line input { width: 16px; height: 16px; margin: 0; accent-color: var(--app-primary); }
.engine-status { margin: 0; line-height: 1.45; }
.engine-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; padding-left: 96px; }
.job-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; }
.job-progress { height: 9px; overflow: hidden; border: 1px solid var(--app-border); border-radius: 4px; background: var(--app-input); }
.job-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #2f80ed, #65aeff); transition: width .16s linear; }

.activity-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px 14px 12px; overflow: hidden; }
.activity-tabs { height: 38px; display: flex; align-items: end; border-bottom: 1px solid var(--app-border); }
.activity-tab { min-width: 78px; height: 37px; padding: 0 18px; border: 0; border-radius: 8px 8px 0 0; background: #14213a; color: #b6c7db; cursor: pointer; }
.activity-tab:hover { background: var(--app-hover); }
.activity-tab.selected { border-bottom: 2px solid var(--app-primary); color: #fff; background: var(--app-bg); }
.activity-view { min-height: 0; flex: 1; }
.activity-view[hidden] { display: none !important; }
.log-view, .queue-view { display: flex; flex-direction: column; padding: 9px 0 0; }
.log-box { min-height: 0; flex: 1; overflow: auto; padding: 12px; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-input); }
.log-box p { margin: 0 0 8px; color: #dce5ef; font-family: Consolas, monospace; font-size: 10px; line-height: 1.45; }
.log-box time { color: #62a9ff; }
.log-box .success { color: #4be0a0; }
.current-job { margin: 8px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--app-border); }
.purge-row { display: flex; justify-content: flex-end; padding-top: 8px; }
.purge { min-width: 92px; }
.queue-table-wrap { min-height: 0; flex: 1; overflow: auto; padding: 7px; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-input); }
.queue-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--app-text); }
.queue-table th, .queue-table td { padding: 8px 7px; overflow: hidden; border-right: 1px solid #263246; border-bottom: 1px solid #263246; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.queue-table th { color: #eef5ff; font-weight: 500; text-align: center; }
.queue-table th:first-child, .queue-table td:first-child { width: 7%; text-align: center; }
.queue-table tbody tr { cursor: pointer; }
.queue-table tbody tr:hover, .queue-table tbody tr.selected { background: var(--app-hover); }
.status { display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f1b94e; }
.status.complete::before { background: #3ddc91; }

.review-view { display: flex; flex-direction: column; gap: 7px; padding-top: 8px; }
.review-toolbar { display: flex; gap: 6px; }
.review-main { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(260px, 3fr) 7px minmax(420px, 5.5fr) 7px minmax(260px, 2.35fr); }
.review-main::before, .review-main::after { content: ""; background: var(--app-handle); }
.video-panel { grid-column: 1; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(250px, 1fr) 165px; gap: 7px; padding: 8px; }
.video-screen { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; border-top: 35px solid #020305; border-bottom: 35px solid #020305; background: radial-gradient(ellipse at 50% 35%, #5a554d 0, #3a3834 35%, #181a1d 74%, #080a0d 100%); color: #fff; }
.deposition-frame { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 43%; filter: saturate(.88) contrast(.98); }
.video-slate { width: 72%; max-width: 290px; display: grid; gap: 7px; padding: 22px; border: 1px solid #8292a1; background: #0b1018b8; text-align: center; }
.video-slate span { color: #70b1ff; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.video-slate strong { font-size: 15px; letter-spacing: .04em; }
.video-slate small { color: #a8bed4; }
.video-timecode { position: absolute; left: 16px; bottom: -28px; padding: 3px 9px; border-radius: 0; background: #050505; color: #ddd; font-family: Consolas, monospace; font-size: 8px; }
.current-caption { display: grid; align-content: center; gap: 10px; padding: 15px 17px; border-radius: 4px; background: #111; color: #fff; font-size: 13px; line-height: 1.42; text-align: center; }
.current-caption span { color: #8c98a8; }
.current-caption strong { color: #fff; font-size: 15px; line-height: 1.35; }
.transcript-panel { grid-column: 3; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 8px; }
.review-status { margin: 0 0 7px; }
.review-status p { margin: 0 0 3px; overflow: hidden; color: var(--app-text); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.transcript-list { min-height: 0; flex: 1; overflow-y: auto; border: 1px solid var(--app-border); border-radius: 4px; background: var(--app-input); }
.transcript-line { position: relative; width: 100%; min-height: 30px; display: grid; grid-template-columns: 112px 48px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 10px; border: 0; background: transparent; color: #159234; cursor: pointer; font-family: Consolas, "Courier New", monospace; font-size: 11px; text-align: left; user-select: none; }
.transcript-line:hover { background: #122335; }
.transcript-line.selected { border: 1px solid #dcecff; background: #28598d; color: #fff; }
.transcript-line.clip-range { background: #28598d; color: #fff; font-weight: 700; }
.transcript-line.clip-range + .transcript-line.clip-range { box-shadow: inset 0 1px #34699e; }
.transcript-line.quality-warning { color: #ffd400; font-weight: 650; }
.transcript-line.quality-interpolated { color: #ff7919; }
.transcript-line.quality-warning.selected, .transcript-line.quality-interpolated.selected, .transcript-line.quality-warning.clip-range, .transcript-line.quality-interpolated.clip-range { color: #fff; }
.transcript-line time, .transcript-line .page-line { color: inherit; font-family: inherit; font-size: inherit; }
.transcript-line .line-copy { overflow: hidden; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.clip-boundary-handle { position: absolute; z-index: 8; top: 2px; bottom: 2px; left: var(--handle-left); width: 13px; background: transparent; cursor: ew-resize; transform: translateX(-6px); touch-action: none; }
.clip-boundary-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 3px; border-radius: 1px; background: var(--handle-color); box-shadow: 0 0 5px var(--handle-glow); }
.clip-boundary-handle::after { content: ""; position: absolute; left: 1px; width: 11px; height: 7px; border-radius: 1px; background: var(--handle-color); }
.clip-boundary-handle.start { --handle-color: #45d483; --handle-glow: #45d48388; }
.clip-boundary-handle.start::after { top: 0; }
.clip-boundary-handle.end { --handle-color: #f2c94c; --handle-glow: #f2c94c88; }
.clip-boundary-handle.end::after { bottom: 0; }
body.dragging-clip-boundary, body.dragging-transcript-range { cursor: ew-resize; user-select: none; }
.clip-panel { grid-column: 5; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 5px; padding: 7px; overflow-y: auto; }
.clip-queue-section { min-height: 240px; flex: 1; display: flex; flex-direction: column; }
.section-title { margin: 0 0 6px; font-size: 12px; }
.clip-list { min-height: 170px; flex: 1; overflow-y: auto; border: 1px solid var(--app-border); border-radius: 4px; background: var(--app-input); }
.clip-item { width: 100%; display: block; padding: 10px 9px; border: 0; background: transparent; color: var(--app-text); cursor: pointer; text-align: left; }
.clip-item:hover, .clip-item.selected { background: var(--app-hover); }
.clip-item strong, .clip-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-item small { margin-top: 4px; color: var(--app-muted); }
.compact-panel { padding: 7px; }
.compact-panel .sim-button { min-height: 27px; padding: 3px 6px; }
.clip-boundary-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.clip-boundary-column { min-width: 0; }
.clip-boundary-column > span { display: block; margin-bottom: 3px; }
.clip-boundary-column > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.clip-boundary-column .sim-button { min-width: 0; padding: 3px 2px; }
.clip-export-row { display: flex; gap: 4px; }
.clip-export-row #clip-export-toggle { flex: 1; min-height: 27px; text-align: left; }
.clip-export-row #cancel-clip-export { min-height: 27px; }
.clip-export-drawer { display: flex; flex-direction: column; gap: 4px; }
.clip-export-drawer[hidden], .clip-export-row [hidden], .clip-context-menu[hidden] { display: none; }
.clip-export-menu-wrap { position: relative; min-width: 0; }
.clip-export-menu-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.clip-export-menu { position: absolute; z-index: 610; right: 0; bottom: calc(100% + 3px); width: 100%; min-width: 175px; padding: 3px; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-surface); box-shadow: 0 10px 25px #0009; }
.clip-export-menu[hidden] { display: none; }
.clip-export-menu button { width: 100%; padding: 6px 8px; border: 0; border-radius: 3px; background: transparent; color: var(--app-text); cursor: pointer; text-align: left; }
.clip-export-menu button:hover, .clip-export-menu button:focus-visible { background: var(--app-hover); }
.clip-context-menu { position: fixed; z-index: 600; min-width: 124px; padding: 4px; border: 1px solid var(--app-border); border-radius: 5px; background: var(--app-surface); box-shadow: 0 10px 25px #0009; }
.clip-context-menu button { width: 100%; padding: 6px 9px; border: 0; border-radius: 3px; background: transparent; color: var(--app-text); cursor: pointer; text-align: left; }
.clip-context-menu button:hover, .clip-context-menu button:focus-visible { background: var(--app-hover); }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px; }
.compact-panel > .check-line { margin-top: 5px; }
.playback-panel { flex: 0 0 178px; padding: 7px 9px 8px; }
.timing-toolbar { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.timing-toolbar .sim-button { min-height: 27px; padding: 3px 9px; }
.compact-check { margin-left: 2px; }
.nudge-label { margin-left: 4px; }
.playback-readout { margin-left: auto; min-width: 115px; text-align: right; }
.waveform { position: relative; height: 105px; margin-top: 5px; overflow: hidden; border: 1px solid #172336; background: var(--app-input); cursor: crosshair; }
.waveform::after { content: ""; position: absolute; top: 50%; right: 8px; left: 8px; height: 1px; background: #24364d; }
.waveform-bars { position: absolute; inset: 10px 10px 16px; display: flex; align-items: center; gap: 1px; }
.waveform-bars span { flex: 1; min-width: 1px; border-radius: 0; background: #50a6ff; opacity: .95; }
.waveform-playhead { position: absolute; z-index: 2; top: 3px; bottom: 13px; left: 33.7%; width: 2px; background: #ffe34e; box-shadow: 0 0 8px #ffe34e88; }
.wave-time { position: absolute; z-index: 3; bottom: 2px; color: #b9c6d5; font-size: 8px; }
.wave-time.start { left: 4px; }.wave-time.end { right: 4px; }
.timeline { width: 100%; height: 12px; margin-top: 3px; padding: 0; accent-color: #5aa6f6; }

[data-guide] { position: relative; transition: box-shadow .16s ease, background-color .16s ease; }
[data-guide]:not(.appearance-option) { cursor: help; }
[data-guide]:hover, [data-guide]:focus-visible, [data-guide]:focus-within, [data-guide].is-active { z-index: 12; border-radius: 6px; box-shadow: 0 0 0 2px #61adfb; }
[data-guide].is-active { animation: guide-pop .7s ease-out 1; }
[data-guide]:has([data-guide]:hover):not(.is-active) { box-shadow: none; }
@keyframes guide-pop { 0% { box-shadow: 0 0 0 2px #61adfb, 0 0 0 3px #61adfb99; } 100% { box-shadow: 0 0 0 2px #61adfb, 0 0 0 10px #61adfb00; } }
.activity-tab[data-guide]:hover, .activity-tab[data-guide].is-active { border-radius: 8px 8px 0 0; }
.transcript-line > .clip-boundary-handle[data-guide], .transcript-line > .clip-boundary-handle[data-guide]:hover, .transcript-line > .clip-boundary-handle[data-guide].is-active { position: absolute; z-index: 14; border-radius: 0; cursor: ew-resize; box-shadow: none; animation: none; }

.guide-drawer { position: fixed; z-index: 300; top: 0; right: 0; bottom: 0; width: var(--drawer-width); overflow-y: auto; padding: 32px 28px 44px; border-left: 1px solid #cbd7e3; background: #f4f7fb; color: #173250; box-shadow: -18px 0 48px #0003; scrollbar-color: #8ea8c1 #edf2f7; }
.drawer-home { position: absolute; top: 18px; right: 19px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #b9cada; border-radius: 50%; background: #fff; color: #255b8f; cursor: pointer; font-size: 17px; font-weight: 850; }
.drawer-home:hover { border-color: #6a9fd3; background: #e8f1fb; }
.drawer-kicker { margin: 0; color: #2f80ed; font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.drawer-content { min-height: 0; padding: 0 0 34px; }
.drawer-content h2 { margin: 9px 48px 12px 0; color: #102a4a; font-size: 31px; line-height: 1.05; letter-spacing: -.035em; }
.drawer-content h2.overview-title { margin-top: 14px; font-size: 42px; }
.drawer-content h3 { margin: 25px 0 10px; padding-top: 18px; border-top: 1px solid #ccd9e7; color: #2268ac; font-size: 17px; }
.drawer-content h4 { margin: 17px 0 5px; color: #15385d; font-size: 12px; }
.drawer-content p { margin: 0 0 13px; color: #566e8b; font-size: 12.5px; line-height: 1.58; }
.drawer-content ul, .drawer-content ol { margin: 0 0 16px; padding-left: 20px; color: #536b87; font-size: 12px; line-height: 1.55; }
.drawer-content li { margin-bottom: 8px; }
.drawer-content strong { color: #173b61; }
.drawer-overview-copy { margin-top: 22px; }
.drawer-overview-copy p { color: #536a82; font-size: 15px; line-height: 1.65; }
.drawer-overview-prompt { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 11px; margin-top: 28px; padding: 15px 14px; border-left: 3px solid #397fc8; background: #e8f1fb; }
.drawer-overview-prompt span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #3b8dea; color: white; font-weight: 850; }
.drawer-overview-prompt p { margin: 0; color: #294d72; font-size: 13px; font-weight: 700; line-height: 1.45; }
.drawer-summary { color: #3f5771 !important; font-size: 15px !important; line-height: 1.5 !important; }
.drawer-section { margin: 28px 0; padding-top: 20px; border-top: 1px solid #ccd7e3; }
.drawer-section h3 { margin: 0 0 12px; padding: 0; border: 0; color: #2e6eaa; font-size: 18px; }
.drawer-controls-list { display: grid; gap: 12px; }
.drawer-control-row { min-width: 0; display: grid; grid-template-columns: 126px minmax(0, 1fr); align-items: start; gap: 12px; scroll-margin-top: 22px; }
.drawer-control-row.focus { padding: 10px 12px; border-left: 3px solid #397fc8; border-radius: 0 5px 5px 0; background: #e8f1fb; }
.drawer-control-row strong { display: block; margin: 1px 0 3px; color: #213f61; font-size: 12px; }
.drawer-control-row p { margin: 0; color: #53677f; font-size: 12px; line-height: 1.5; }
.drawer-control-sample { min-width: 0; min-height: 30px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 5px 8px; border: 1px solid #445975; border-radius: 5px; background: #17243a; color: #f7fbff; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.drawer-control-sample.primary { border-color: #2f80ed; background: #2f80ed; }
.drawer-control-sample.text { justify-content: flex-start; padding-inline: 2px; border-color: transparent; background: transparent; color: #405773; }
.drawer-control-sample.tone-green, .drawer-control-sample.tone-yellow, .drawer-control-sample.tone-orange, .drawer-control-sample.tone-red { justify-content: flex-start; padding: 7px 8px; border-color: #445975; background: #091322; font-family: Consolas, "Courier New", monospace; font-size: 9px; font-weight: 700; text-align: left; }
.drawer-control-sample.tone-green { color: #159234; }
.drawer-control-sample.tone-yellow { color: #d0a000; }
.drawer-control-sample.tone-orange { color: #c06420; }
.drawer-control-sample.tone-red { color: #b00020; }
.drawer-control-sample.waveform-mini, .drawer-control-sample.timeline-mini { padding: 7px 8px; border-color: #445975; background: #091322; }
.mini-wave-bars { width: 100%; height: 24px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.mini-wave-bars i { width: 2px; border-radius: 1px; background: #58aaff; }
.mini-wave-bars i:nth-child(1), .mini-wave-bars i:nth-child(21) { height: 4px; }
.mini-wave-bars i:nth-child(2), .mini-wave-bars i:nth-child(20) { height: 8px; }
.mini-wave-bars i:nth-child(3), .mini-wave-bars i:nth-child(19) { height: 13px; }
.mini-wave-bars i:nth-child(4), .mini-wave-bars i:nth-child(18) { height: 7px; }
.mini-wave-bars i:nth-child(5), .mini-wave-bars i:nth-child(17) { height: 18px; }
.mini-wave-bars i:nth-child(6), .mini-wave-bars i:nth-child(16) { height: 11px; }
.mini-wave-bars i:nth-child(7), .mini-wave-bars i:nth-child(15) { height: 22px; }
.mini-wave-bars i:nth-child(8), .mini-wave-bars i:nth-child(14) { height: 14px; }
.mini-wave-bars i:nth-child(9), .mini-wave-bars i:nth-child(13) { height: 9px; }
.mini-wave-bars i:nth-child(10), .mini-wave-bars i:nth-child(12) { height: 17px; }
.mini-wave-bars i:nth-child(11) { height: 24px; }
.mini-timeline { position: relative; width: 100%; height: 5px; border: 1px solid #7890aa; border-radius: 999px; background: #263246; }
.mini-timeline::before { content: ""; position: absolute; inset: -1px auto -1px -1px; width: 58%; border-radius: inherit; background: #72b8f3; }
.mini-timeline::after { content: ""; position: absolute; top: 50%; left: 58%; width: 13px; height: 13px; border-radius: 50%; background: #4e9eea; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px #12365d; }
.drawer-control-sample.range-mini, .drawer-control-sample.handle-mini { position: relative; padding: 6px 8px; border-color: #445975; background: #091322; }
.mini-range-lines { width: 100%; display: grid; gap: 3px; }
.mini-range-lines i { height: 5px; border-radius: 1px; background: #28598d; }
.mini-range-lines i:first-child { margin-left: 22%; }
.mini-range-lines i:last-child { margin-right: 17%; }
.mini-handle-track { position: relative; width: 78%; height: 3px; background: #28598d; }
.mini-handle-track::before { content: ""; position: absolute; top: -8px; bottom: -8px; width: 3px; border-radius: 1px; background: var(--handle-color); box-shadow: 0 0 4px color-mix(in srgb, var(--handle-color) 55%, transparent); }
.mini-handle-track::after { content: ""; position: absolute; width: 9px; height: 7px; border-radius: 1px; background: var(--handle-color); }
.handle-mini.start { --handle-color: #45d483; }
.handle-mini.start .mini-handle-track::before { left: 12%; }
.handle-mini.start .mini-handle-track::after { top: -8px; left: calc(12% - 3px); }
.handle-mini.end { --handle-color: #f2c94c; }
.handle-mini.end .mini-handle-track::before { right: 12%; }
.handle-mini.end .mini-handle-track::after { right: calc(12% - 3px); bottom: -8px; }
.drawer-control-sample.field, .drawer-control-sample.select { justify-content: flex-start; background: #0d1829; color: #a6b5c7; }
.drawer-control-sample.select { position: relative; padding-right: 22px; }
.drawer-control-sample.select::after { content: "⌄"; position: absolute; right: 8px; color: #9fc5ef; }
.drawer-control-sample.checkbox { justify-content: flex-start; gap: 7px; padding-inline: 2px; border-color: transparent; background: transparent; color: #405773; text-align: left; white-space: normal; }
.drawer-control-sample.checkbox::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #647b95; border-radius: 3px; background: #fff; }
.drawer-callout, .callout { margin-top: 18px; padding: 12px 13px; border-left: 3px solid #397fc8; border-radius: 0 6px 6px 0; background: #e8f1fb; color: #315577; font-size: 12px; line-height: 1.55; }
.drawer-callout p, .callout p { margin: 0; }
.reference-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 19px; }
.reference-card { min-height: 92px; padding: 12px; border: 1px solid #c4d3e4; border-radius: 8px; background: #fff; color: #214b76; cursor: pointer; text-align: left; }
.reference-card:hover { border-color: #4d97e5; background: #edf6ff; }
.reference-card > span { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 50%; background: #e7f1fc; color: #2f80ed; font-size: 12px; font-weight: 850; }
.reference-card strong, .reference-card small { display: block; }
.reference-card strong { font-size: 11px; }
.reference-card small { margin-top: 4px; color: #71849b; font-size: 9px; line-height: 1.35; }
.reference-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; color: #48617e; font-size: 10px; line-height: 1.4; }
.reference-table th { padding: 7px; background: #15385d; color: #fff; font-size: 9px; text-align: left; }
.reference-table td { padding: 7px; border: 1px solid #c6d4e3; vertical-align: top; }
.reference-table tr:nth-child(even) td { background: #e8f1fa; }

@media (max-width: 1580px) {
  :root { --drawer-width: 370px; }
  .guide-page { padding-left: 16px; padding-right: calc(var(--drawer-width) + 16px); }
  .guide-header { align-items: start; }
  .guide-actions { max-width: 470px; flex-wrap: wrap; justify-content: flex-end; }
  .guide-search { width: 100%; }
  .app-shell { font-size: 8px; }
  .sync-workspace { grid-template-columns: minmax(440px, .95fr) 7px minmax(500px, 1.05fr); }
  .review-main { grid-template-columns: minmax(250px, 3fr) 7px minmax(390px, 5fr) 7px minmax(245px, 2.2fr); }
}
@media (max-height: 850px) {
  .guide-page { padding-top: 16px; }
  .guide-header { min-height: 76px; margin-bottom: 12px; }
  .guide-title h1 { font-size: 2.5rem; }
  .app-shell { height: 735px; min-height: 700px; }
  .source-grid textarea { height: 84px; }
  .video-panel { grid-template-rows: minmax(190px, 1fr) 125px; }
  .playback-panel { flex-basis: 154px; }
}
