/* Website-owned recreation of web/v3's graphite Viewer. No app CSS is imported. */
.hero .sw-host { display: block; padding: 0; border: 0; border-radius: 10px; background: none; min-width: 0; container-type: inline-size; }
.sw-viewer { --sw-bg: #0c0d0e; --sw-panel: #101113; --sw-rail: #121315; --sw-line: #232629; --sw-text: #e8e6e2; --sw-muted: #9a9da2; --sw-soft: #8a8d92; --sw-label: #5d6166; --sw-accent: #3fcf8e; color: var(--sw-text); background: var(--sw-bg); font: 14px/1.4 "IBM Plex Sans", system-ui, sans-serif; height: clamp(620px, 44vw, 860px); display: flex; position: relative; border: 1px solid var(--sw-line); border-radius: 10px; overflow: hidden; box-shadow: 0 24px 80px #0005; isolation: isolate; }
.sw-viewer *, .sw-viewer *::before, .sw-viewer *::after { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #2c2f34 transparent; }
.sw-viewer [hidden] { display: none !important; }
.sw-viewer :is(button,input,select) { font-family: inherit; }
.sw-viewer button { cursor: pointer; }
.sw-viewer button:disabled { cursor: default; opacity: .5; }
.sw-viewer :is(button,a,input,select,[tabindex]):focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }
.sw-viewer :is(h2,p,dl,dd) { margin: 0; }
.sw-viewer .sw-mono, .sw-eyebrow { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.sw-eyebrow { font-size: 10px; letter-spacing: 1.3px; color: var(--sw-label); }
.sw-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sw-rail { width: 88px; flex: none; display: flex; flex-direction: column; background: var(--sw-rail); border-right: 1px solid var(--sw-line); }
.sw-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0 15px; border-bottom: 1px solid #1d1f22; }
.sw-brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--sw-accent); }
.sw-brand-mark span { width: 10px; height: 10px; border-radius: 2px; background: var(--sw-bg); }
.sw-brand-word { font: 600 8px "IBM Plex Mono", monospace; letter-spacing: .7px; color: #cfd1d4; }
.sw-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 8px; display: flex; flex-direction: column; gap: 3px; }
.sw-nav-group { flex: none; text-align: center; text-transform: uppercase; font: 8px "IBM Plex Mono", monospace; letter-spacing: 1.5px; color: #4f5358; padding: 4px 0 6px; }
.sw-nav-group:not(:first-child) { padding-top: 14px; }
.sw-nav-btn { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--sw-soft); font-size: 10px; font-weight: 500; letter-spacing: .2px; }
.sw-nav-btn svg { color: #787c81; }
.sw-nav-btn:hover:not(:disabled) { color: #cfd1d4; background: #171a1c; }
.sw-nav-btn.sw-active { color: var(--sw-accent); background: #15281f; font-weight: 600; }
.sw-nav-btn.sw-active svg { color: var(--sw-accent); }
.sw-logout { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px; padding: 10px 4px; border: 0; background: transparent; color: var(--sw-soft); font-size: 22px; }
.sw-logout span { font-size: 10px; }
.sw-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.sw-topbar { display: flex; flex: none; height: 58px; align-items: center; gap: 16px; padding: 0 22px; border-bottom: 1px solid var(--sw-line); background: var(--sw-panel); }
.sw-viewer .sw-title { font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.sw-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--sw-line); border-radius: 7px; white-space: nowrap; color: var(--sw-soft); font-size: 11px; letter-spacing: .5px; }
.sw-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #4ec77a; }
.sw-dot.sw-amber { background: #e2a13a; }
.sw-health { padding: 6px 14px; color: #5fd18d; font-size: 10px; letter-spacing: 1px; }
.sw-health .sw-dot { background: #4ec77a; box-shadow: 0 0 7px #4ec77a; }
.sw-rec { display: flex; align-items: center; gap: 7px; border: 1px solid #2f2622; border-radius: 7px; padding: 6px 12px; color: #e58a85; background: #1a1411; font-size: 11px; letter-spacing: 1px; }
.sw-rec .sw-dot, .sw-live-label .sw-dot { background: #e5484d; opacity: .45; }
.sw-clock { font-size: 13px; letter-spacing: 1px; color: #cfd1d4; white-space: nowrap; }
.sw-content { flex: 1; min-height: 0; padding: 22px; display: flex; overflow: hidden; }
.sw-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.sw-bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sw-cluster { display: flex; align-items: center; gap: 10px; }
.sw-toggle { display: flex; overflow: hidden; border: 1px solid var(--sw-line); border-radius: 7px; }
.sw-toggle button { background: transparent; border: 0; color: var(--sw-soft); padding: 6px 13px; font: 11px "IBM Plex Mono", monospace; }
.sw-toggle button.sw-on { background: #1b1e21; color: var(--sw-accent); font-weight: 600; }
.sw-hint { font-size: 11px; letter-spacing: .5px; color: var(--sw-label); }
.sw-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; overflow-y: auto; }
.sw-grid[data-layout="1"] { grid-template-columns: 1fr; }
.sw-grid[data-layout="4"] { grid-template-rows: repeat(2,minmax(0,1fr)); }
.sw-grid[data-layout="9"] { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(3,minmax(0,1fr)); }
.sw-grid[data-layout="16"] { grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); }
.sw-tile { position: relative; min-width: 0; min-height: 0; border: 1px solid var(--sw-line); border-radius: 9px; overflow: hidden; background: #000; cursor: pointer; }
.sw-tile:hover, .sw-tile:focus-visible { border-color: #3f6553; }
.sw-tile.sw-empty { display: grid; place-items: center; background: #0a0b0c; color: var(--sw-label); cursor: default; font: 10px "IBM Plex Mono", monospace; }
.sw-viewer :is(.sw-poster, .sw-tile video, .sw-stage video) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sw-viewer video:not(.sw-has-frame) { opacity: 0; }
.sw-feed-name, .sw-live-label, .sw-feed-clock, .sw-signal { position: absolute; z-index: 1; }
.sw-feed-name { top: 10px; left: 10px; font-size: 10px; text-shadow: 0 1px 4px #000; max-width: calc(100% - 80px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-live-label { top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; font-size: 10px; color: #aaa; }
.sw-feed-clock { bottom: 8px; left: 10px; font-size: 10px; text-shadow: 0 1px 4px #000; }
.sw-signal { right: 10px; bottom: 9px; }
.sw-topline { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sw-back { padding: 6px 12px; color: var(--sw-muted); font-size: 12.5px; }
.sw-camcount { color: var(--sw-muted); font-size: 12px; letter-spacing: .5px; }
.sw-camcount span { color: var(--sw-label); }
.sw-focus-camera { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; }
.sw-focus-camera .sw-tile { width: 100%; aspect-ratio: 16/9; max-height: 100%; border-radius: 10px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.sw-focus-camera .sw-feed-name { top: 12px; left: 14px; font-size: 12px; max-width: calc(100% - 150px); }
.sw-focus-camera .sw-live-label { top: 11px; right: 52px; height: 30px; padding: 0 7px; border-radius: 5px; background: #00000073; color: var(--sw-text); letter-spacing: 1px; }
.sw-focus-camera .sw-feed-clock { bottom: 14px; left: 14px; font-size: 13px; color: #cfd1d4; }
.sw-focus-camera .sw-signal { display: none; }
.sw-res, .sw-ov-full { display: none; position: absolute; z-index: 1; }
.sw-focus-camera .sw-res { display: block; right: 14px; bottom: 14px; color: #80858a; font-size: 11px; text-shadow: 0 1px 3px #000; }
.sw-focus-camera .sw-ov-full { display: flex; top: 11px; right: 14px; width: 30px; height: 30px; align-items: center; justify-content: center; border: 1px solid var(--sw-line); border-radius: 7px; background: #00000080; color: #cfd1d4; }
.sw-focus-controls { display: flex; flex: none; align-items: stretch; gap: 14px; margin-top: 14px; }
.sw-panel { padding: 14px 18px; border: 1px solid #1f2225; border-radius: 10px; background: var(--sw-panel); }
.sw-stream { display: flex; flex: none; flex-direction: column; gap: 10px; width: 240px; }
.sw-kv { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.sw-kv > div { display: flex; justify-content: space-between; gap: 8px; }
.sw-kv dt { color: var(--sw-label); }
.sw-kv dd { color: var(--sw-muted); text-transform: capitalize; }
.sw-stream .sw-toggle { align-self: flex-start; }
.sw-stream .sw-toggle button { padding: 5px 16px; }
.sw-actions { display: flex; gap: 8px; margin-top: auto; }
.sw-actions .sw-btn { flex: 1; padding: 9px; border-radius: 8px; font-size: 12.5px; }
.sw-btn, .sw-viewer a.sw-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px; background: var(--sw-rail); color: #cfd1d4; border: 1px solid var(--sw-line); border-radius: 7px; text-decoration: none; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.sw-btn:hover:not(:disabled) { border-color: #46534b; background: #1b1e21; }
.sw-btn.sw-accent, .sw-btn.sw-on { background: #122a20; border-color: #234c3b; color: var(--sw-accent); }
.sw-btn.sw-solid, .sw-btn.sw-solid:hover:not(:disabled) { background: var(--sw-accent); border-color: transparent; color: #0a0b0c; font-weight: 600; }
.sw-btn.sw-quiet { background: transparent; color: var(--sw-muted); }
.sw-picker { display: flex; flex: none; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 3px; margin-bottom: 14px; }
.sw-picker > * { flex: none; }
.sw-pick { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--sw-line); color: var(--sw-muted); background: var(--sw-rail); white-space: nowrap; font-size: 12.5px; }
.sw-pick.sw-on { color: var(--sw-text); border-color: #234c3b; background: #122a20; }
.sw-pick-code { color: #6b6f74; font-size: 11px; }
.sw-viewer :is(input:not([type="range"]),select) { color: #cfd1d4; background: #181a1d; border: 1px solid var(--sw-line); border-radius: 7px; padding: 5px 8px; max-width: 100%; min-width: 0; font-size: 11px; color-scheme: dark; }
.sw-goto { display: flex; align-items: center; gap: 6px; }
.sw-playback-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 14px; }
.sw-playback-left { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.sw-stage { position: relative; flex: 1; min-height: 125px; border: 1px solid var(--sw-line); border-radius: 10px; overflow: hidden; background: #000; }
.sw-stage:fullscreen { height: 100%; width: 100%; }
.sw-review { position: absolute; top: 11px; right: 12px; display: flex; align-items: center; gap: 7px; color: var(--sw-muted); font-size: 10px; background: #0a0b0cb3; padding: 4px 8px; border-radius: 6px; }
.sw-recording-time { position: absolute; bottom: 13px; left: 14px; font-size: 20px; font-weight: 600; text-shadow: 0 1px 4px #000; }
.sw-video-error { position: absolute; inset: 0; display: grid; place-items: center; background: #101113d9; font-size: 12px; }
.sw-transport { display: flex; flex-wrap: wrap; flex: none; align-items: center; justify-content: center; gap: 6px; }
.sw-transport input[type="range"] { width: 80px; accent-color: var(--sw-accent); }
.sw-transport .sw-t-btn { min-width: 40px; height: 38px; padding: 0 10px; border: 1px solid var(--sw-line); border-radius: 8px; background: var(--sw-rail); color: #cfd1d4; cursor: pointer; font: 12px "IBM Plex Mono", monospace; }
.sw-transport .sw-t-btn:disabled { color: #3a3d41; cursor: default; }
.sw-transport .sw-t-play { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 10px; background: var(--sw-accent); color: var(--sw-bg); cursor: pointer; font-size: 17px; }
.sw-transport .sw-t-speed { display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 14px; border: 1px solid var(--sw-line); border-radius: 8px; background: var(--sw-rail); color: var(--sw-soft); cursor: pointer; font-size: 12px; }
.sw-transport .sw-t-speed.sw-on, .sw-skip-presets button.sw-on { border-color: #286b4d; background: #15281f; color: var(--sw-accent); }
.sw-t-sep { width: 1px; height: 26px; margin: 0 6px; background: var(--sw-line); }
.sw-skip-config { position: relative; }
.sw-skip-config summary { list-style: none; cursor: pointer; }
.sw-skip-config summary::-webkit-details-marker { display: none; }
.sw-skip-config summary::after { content: none; }
.sw-skip-menu { position: absolute; z-index: 30; bottom: calc(100% + 8px); left: 50%; width: 260px; padding: 12px; transform: translateX(-50%); border: 1px solid var(--sw-line); border-radius: 9px; background: #16181a; box-shadow: 0 12px 36px #0007; }
.sw-skip-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 9px 0; }
.sw-skip-presets button, .sw-skip-custom input { min-height: 32px; border: 1px solid var(--sw-line); border-radius: 6px; background: var(--sw-rail); color: var(--sw-soft); }
.sw-skip-custom { display: grid; grid-template-columns: 1fr 80px auto; align-items: center; gap: 7px; color: var(--sw-muted); font-size: 12px; }
.sw-skip-custom input { min-width: 0; padding: 6px; }
.sw-timeline { position: relative; height: 60px; flex: none; border: 1px solid var(--sw-line); border-radius: 6px; overflow: hidden; cursor: crosshair; touch-action: none; background: repeating-linear-gradient(90deg,transparent 0,transparent calc(11.111% - 1px),#24282c calc(11.111% - 1px),#24282c 11.111%),#141619; }
.sw-recording-band { position: absolute; left: 0; right: 0; top: 8px; bottom: 20px; background: #888; border-radius: 3px; }
.sw-event-mark { position: absolute; bottom: 4px; width: 8px; height: 8px; border-radius: 50%; background: #e2a13a; transform: translateX(-50%); }
.sw-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--sw-accent); box-shadow: 0 0 8px #3fcf8e88; }
.sw-ticks { display: flex; justify-content: space-between; font-size: 9px; color: var(--sw-label); }
.sw-timeline-caption { color: var(--sw-muted); font-size: 10px; }
.sw-event-panel { min-height: 0; overflow-y: auto; padding: 14px; border: 1px solid var(--sw-line); border-radius: 10px; background: #101113; }
.sw-event-panel .sw-event-image { display: block; margin: 10px 0 12px; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 6px; }
.sw-event-panel dl { font-size: 12px; }
.sw-event-panel dl > div { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; }
.sw-event-panel dt { color: var(--sw-label); }
.sw-event-actions { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.sw-clip-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sw-event-panel .sw-pin { width: 100%; margin-bottom: 14px; }
.sw-event-jump { display: flex; width: 100%; justify-content: space-between; padding: 10px 0; background: none; border: 0; border-top: 1px solid var(--sw-line); color: var(--sw-muted); font-size: 11px; }
.sw-events { overflow-y: auto; }
.sw-history-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 10px; }
.sw-history-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--sw-muted); min-width: 0; }
.sw-history-filters input { width: 181px; }
.sw-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-viewer .sw-history-range { font-size: 11px; color: var(--sw-muted); margin-bottom: 14px; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chip { padding: 6px 13px; border: 1px solid var(--sw-line); border-radius: 20px; background: var(--sw-rail); color: var(--sw-muted); font-size: 12px; }
.sw-chip.sw-on { background: #122a20; border-color: #234c3b; color: var(--sw-accent); }
.sw-count { font-size: 10px; color: var(--sw-label); white-space: nowrap; }
.sw-event-list { display: flex; flex-direction: column; gap: 8px; }
.sw-event-row { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--sw-line); border-radius: 9px; cursor: pointer; background: #101113; }
.sw-event-row:hover { border-color: #3f6553; background: #131816; }
.sw-event-thumb { position: relative; width: 112px; flex: none; aspect-ratio: 16/9; background: #000; overflow: hidden; border-radius: 5px; }
.sw-event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sw-duration { position: absolute; right: 4px; bottom: 3px; color: #eee; padding: 1px 4px; background: #000b; font-size: 10px; }
.sw-badge { border: 1px solid #e2a13a88; border-radius: 4px; padding: 3px 6px; color: #e2a13a; font-size: 10px; text-transform: capitalize; }
.sw-event-meta { flex: 1; min-width: 0; }
.sw-event-cam { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sw-event-sub { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.sw-event-sub small { min-width: 0; overflow: hidden; color: #6b6f74; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.sw-event-when { text-align: right; font-size: 11px; white-space: nowrap; }
.sw-event-when small { display: block; color: var(--sw-label); margin-top: 4px; }
.sw-clip-cell { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 4px; width: 118px; color: #5fd18d; font-size: 10px; white-space: nowrap; }
.sw-clip-actions { display: flex; gap: 8px; }
.sw-viewer .sw-clip-actions :is(button,a) { padding: 0; border: 0; background: none; color: var(--sw-accent); font-size: 10px; font-weight: 500; text-decoration: none; }
.sw-viewer .sw-clip-actions :is(button,a):hover { text-decoration: underline; }
.sw-empty-events { padding: 38px 12px; text-align: center; color: var(--sw-label); font-size: 11px; }
.sw-media-dialog { padding: 18px; border: 1px solid var(--sw-line); border-radius: 12px; background: var(--sw-panel); color: var(--sw-text); width: min(800px,90vw); max-height: 90dvh; }
.sw-media-dialog::backdrop { background: #000b; }
.sw-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sw-dialog-header h2 { font-size: 16px; }
.sw-media-dialog video { display: block; opacity: 1 !important; width: 100%; max-height: 65vh; margin: 12px 0; }
.sw-tabs, .sw-statusbtn, .sw-hd-toggle, .sw-camcount, .sw-m-badge { display: none; }
.sw-management { overflow-y: auto; gap: 16px; }
.sw-viewer h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.sw-viewer .sw-help { color: var(--sw-muted); font-size: 12px; line-height: 1.65; margin: 8px 0; }
.sw-card { padding: 16px; border: 1px solid var(--sw-line); border-radius: 10px; background: var(--sw-panel); margin-bottom: 14px; }
.sw-card > .sw-eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 16px; margin-bottom: 10px; }
.sw-card > .sw-eyebrow:empty { display: none; }
.sw-cluster { flex-wrap: wrap; }
.sw-field { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; font-size: 13px; border-bottom: 1px solid #1f2225; }
.sw-field:last-child { border-bottom: 0; }
.sw-field > span { min-width: 0; flex: 1; }
.sw-field strong { font-weight: 500; }
.sw-field small { display: block; font-size: 11px; line-height: 1.6; color: var(--sw-muted); margin-top: 5px; }
.sw-field input:not([type="checkbox"]), .sw-field select { width: 215px; flex: none; }
.sw-field input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sw-accent); }
.sw-viewer .sw-management input:not([type="checkbox"]), .sw-viewer .sw-management select { min-height: 34px; font-size: 12px; }
.sw-savebar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 12px 0; margin-top: 12px; border-top: 1px solid var(--sw-line); }
.sw-savebar > .sw-help { margin-right: auto; }
.sw-saved { color: var(--sw-accent); padding: 10px 12px; font-size: 12px; background: #122a20; border: 1px solid #234c3b; border-radius: 7px; }
.sw-form-error { color: #e58a85; font-size: 12px; padding: 8px 0; }
.sw-switch { display: inline-flex; flex: none; align-items: center; width: 36px; height: 20px; padding: 2px; border: 1px solid #34383d; border-radius: 12px; background: #25292d; }
.sw-switch > span { width: 14px; height: 14px; border-radius: 50%; background: #6b7178; transition: transform 120ms; }
.sw-switch.sw-on { background: #13472f; border-color: #287950; }
.sw-switch.sw-on > span { background: var(--sw-accent); transform: translateX(15px); }
.sw-config-dialog { width: min(650px,92vw); max-height: min(85dvh,900px); padding: 20px; background: var(--sw-panel); color: var(--sw-text); border: 1px solid var(--sw-line); border-radius: 12px; overflow-y: auto; }
.sw-config-dialog::backdrop { background: #000b; }
.sw-dialog-body { margin-top: 16px; }
.sw-config-dialog .sw-field input:not([type="checkbox"]), .sw-config-dialog .sw-field select { width: 55%; }
.sw-config-dialog .sw-field input:not([type="checkbox"]) { font-size: 14px; padding: 8px; }
/* Phone sheets sit inside the device over a scrim, like the Viewer's bottom sheets. */
.sw-scrim { position: absolute; inset: 0; z-index: 40; background: #0000008c; }
.sw-viewer .sw-sheet:focus-visible { outline: none; }
.sw-sheet { position: absolute; inset: auto 0 0; z-index: 41; width: auto; max-width: none; max-height: 80%; margin: 0; padding: 8px 16px 16px; overflow-y: auto; border: 0; border-top: 1px solid var(--sw-line); border-radius: 16px 16px 0 0; background: var(--sw-panel); color: var(--sw-text); box-shadow: 0 -18px 48px -18px #000c; }
.sw-grip { width: 38px; height: 4px; margin: 4px auto 12px; border-radius: 4px; background: var(--sw-line); }
.sw-sheet-title { padding: 0 4px 12px; color: var(--sw-label); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.sw-sheet-nav { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.sw-sheet-nav .sw-nav-btn { gap: 8px; min-height: 82px; padding: 16px 6px; border: 1px solid var(--sw-line); border-radius: 12px; background: #181a1d; color: #cfd1d4; font-size: 12px; font-weight: 400; }
.sw-sheet-nav .sw-nav-btn svg { color: var(--sw-muted); }
.sw-sheet-nav .sw-nav-btn.sw-active { border-color: #234c3b; background: #15281f; color: var(--sw-accent); }
.sw-sheet-nav .sw-nav-btn.sw-active svg { color: var(--sw-accent); }
.sw-sheet-nav .sw-nav-btn.sw-danger, .sw-sheet-nav .sw-nav-btn.sw-danger svg { color: #e58a85; }
.sw-status-sheet { display: flex; flex-direction: column; gap: 14px; padding: 4px 4px 8px; }
.sw-status-row { display: flex; align-items: center; gap: 10px; color: var(--sw-soft); font-size: 12px; letter-spacing: .5px; }
.sw-dot.sw-glow { box-shadow: 0 0 7px #4ec77a; }
.sw-dot.sw-recdot { width: 7px; height: 7px; background: #e5484d; }
.sw-dot.sw-recdot.sw-idle { background: #cfd1d4; }
.sw-clock-big { color: #cfd1d4; font-size: 16px; letter-spacing: 1px; }
.sw-camera-table { min-height: 0; overflow: auto; border: 1px solid var(--sw-line); border-radius: 9px; }
.sw-camera-row { display: grid; grid-template-columns: minmax(145px,1.7fr) .9fr 1fr 1fr 40px 90px; align-items: center; gap: 12px; min-width: 650px; width: 100%; padding: 18px 14px; text-align: left; border: 0; border-bottom: 1px solid var(--sw-line); background: var(--sw-panel); color: var(--sw-text); font-size: 12px; }
.sw-camera-row:not(.sw-table-head):hover { background: #151b18; }
.sw-camera-row > span:first-child { position: relative; padding-left: 13px; }
.sw-camera-row .sw-dot { position: absolute; top: 6px; left: 0; }
.sw-camera-row small { display: block; margin-top: 4px; color: var(--sw-label); font-size: 10px; }
.sw-table-head { font: 10px "IBM Plex Mono",monospace; color: var(--sw-label); background: #101214; }
.sw-link { justify-self: start; padding: 5px 10px; border: 1px solid var(--sw-line); border-radius: 7px; color: #cfd1d4; font-size: 12px; white-space: nowrap; }
.sw-camera-row:hover .sw-link { border-color: #234c3b; color: var(--sw-accent); }
.sw-status { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #11211a; color: #5fd18d; font-size: 10px; font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }
.sw-status.sw-off { background: #241414; color: #e58a85; }
.sw-chip.sw-f { padding: 5px 11px; border-radius: 6px; font-size: 11.5px; }
.sw-prov-actions { display: flex; gap: 8px; }
.sw-prov-actions .sw-btn { flex: 1; }
.sw-device { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; font-size: 13px; }
.sw-device small { display: block; margin-top: 5px; color: var(--sw-muted); font-size: 11px; }
.sw-linkcards { display: flex; flex-wrap: wrap; gap: 12px; }
.sw-no-signal-label { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sw-label); font-size: 12px; }
.sw-zone-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 16px; min-height: 0; }
.sw-zone-editor { min-width: 0; }
.sw-zone-picture { position: relative; aspect-ratio: 16/9; background: #000; margin-top: 16px; border: 1px solid var(--sw-line); border-radius: 9px; overflow: hidden; }
.sw-zone-picture :is(img,video) { display: block; width: 100%; height: 100%; object-fit: contain; }
.sw-zone-picture svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sw-zone-picture circle { cursor: grab; }
.sw-zone-picture circle:focus { outline: none; fill: #e2a13a; }
.sw-zone-properties { min-width: 0; }
.sw-zone-properties .sw-field { flex-wrap: wrap; gap: 8px; }
.sw-zone-properties .sw-field input:not([type="checkbox"]) { width: 90px; }
.sw-zone-row { display: flex; align-items: center; gap: 5px; margin-bottom: 9px; }
.sw-zone-row input { flex: 1; min-width: 0; width: 50px; }
.sw-zone-row .sw-btn { padding: 4px 7px; }
.sw-zone-row .sw-mono { color: var(--sw-label); font-size: 10px; }
.sw-alert-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 18px; }
.sw-alert-layout > div { min-width: 0; }
.sw-alert-layout .sw-bar { flex-wrap: wrap; }
.sw-activity-row { display: flex; width: 100%; gap: 13px; align-items: center; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--sw-line); text-align: left; background: none; color: var(--sw-text); }
.sw-activity-row:hover { background: #141917; }
.sw-activity-row > span { flex: 1; }
.sw-activity-row .sw-dot { width: 9px; height: 9px; }
.sw-activity-row strong { font-size: 13px; font-weight: 500; }
.sw-activity-row small { display: block; color: var(--sw-muted); margin-top: 4px; font-size: 11px; }
.sw-activity-row time { font-size: 10px; color: var(--sw-label); }
.sw-schedule-table { overflow-x: auto; }
.sw-schedule-row { display: grid; grid-template-columns: minmax(135px,1.2fr) repeat(3,minmax(115px,1fr)) 32px; align-items: center; gap: 10px; min-width: 600px; padding: 18px 10px; border-bottom: 1px solid var(--sw-line); font-size: 11px; }
.sw-schedule-row .sw-dot { margin-right: 5px; }
.sw-schedule-row small { color: var(--sw-label); font-size: 10px; }
.sw-schedule-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.sw-schedule-cards .sw-schedule-row { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 16px; background: var(--sw-panel); border: 1px solid var(--sw-line); border-radius: 9px; }
.sw-schedule-cards small { display: block; margin-bottom: 5px; }
.sw-schedule-split { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 18px; }
.sw-scope-list { display: flex; flex-direction: column; gap: 9px; align-items: stretch; }
.sw-scope-list .sw-btn { white-space: normal; text-align: left; }
.sw-scope-list [aria-pressed="true"] { color: var(--sw-accent); border-color: #234c3b; background: #122a20; }
.sw-schedule-editor { min-width: 0; }
.sw-schedule-options { display: flex; flex-wrap: wrap; gap: 16px; }
.sw-schedule-options label { font-size: 10px; font-family: "IBM Plex Mono",monospace; color: var(--sw-label); }
.sw-schedule-options select { display: block; margin-top: 6px; }
.sw-rule-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 8px; }
.sw-rule-tools .sw-btn { font-size: 11px; padding: 6px 8px; }
.sw-schedule-rule { border: 1px solid var(--sw-line); border-radius: 8px; padding: 10px; margin: 8px 0; }
.sw-schedule-rule .sw-chip { padding: 5px 9px; }
.sw-schedule-rule .sw-cluster { margin-top: 10px; }
.sw-schedule-rule label { font-size: 11px; color: var(--sw-muted); }
.sw-schedule-rule input { display: block; }
.sw-storage-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.sw-stat { display: block; margin: 15px 0 6px; font-size: 30px; font-weight: 500; }
.sw-storage-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.sw-volume-track { position: relative; height: 22px; border: 1px solid var(--sw-line); border-radius: 5px; background: #1a1d20; margin: 25px 0 12px; }
.sw-volume-track span { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #e2a13a; }
.sw-health-select { display: flex; align-items: center; gap: 12px; justify-content: flex-end; font-size: 12px; color: var(--sw-muted); }
.sw-health-strip { display: flex; gap: 3px; height: 16px; }
.sw-health-strip span { flex: 1; border-radius: 2px; background: #363a40; }
.sw-health-camera { margin-top: 16px; }
.sw-settings-layout { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 22px; min-height: 0; }
.sw-settings-nav { border-right: 1px solid var(--sw-line); padding-right: 12px; }
.sw-settings-nav .sw-nav-group { text-align: left; padding: 16px 8px 7px; }
.sw-setting-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; width: 100%; border-radius: 7px; background: transparent; padding: 10px; color: var(--sw-muted); font-size: 12px; text-align: left; }
.sw-setting-nav:hover { background: #151b18; }
.sw-setting-nav.sw-on { background: #122a20; color: var(--sw-accent); }
.sw-settings-detail { min-width: 0; }
.sw-setting-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sw-setting-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.sw-settings-detail [data-manage="settings-back"] { display: none; }
.sw-settings-detail .sw-field { gap: 14px; }
.sw-settings-detail .sw-field input:not([type="checkbox"]), .sw-settings-detail .sw-field select { width: 155px; }
@container (max-width: 900px) {
  .sw-zone-layout, .sw-alert-layout { grid-template-columns: minmax(0,1fr); }
  .sw-zone-properties { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .sw-zone-properties .sw-savebar { grid-column: 1/-1; }
  .sw-alert-layout > aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .sw-storage-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sw-storage-split { grid-template-columns: minmax(0,1fr); }
  .sw-storage-stats .sw-card { padding: 14px; }
  .sw-stat { font-size: 22px; }
  /* Recording, detection, and PTZ columns drop out; the table never scrolls sideways. */
  .sw-camera-row { min-width: 0; grid-template-columns: 2fr 1fr 90px; }
  .sw-camera-row > :is(:nth-child(3),:nth-child(4),:nth-child(5)) { display: none; }
  .sw-chip.sw-f { padding: 8px 13px; }
  .sw-activity-row { padding: 14px 4px; }
}
@container (max-width: 650px) {
  .sw-management .sw-bar { flex-wrap: wrap; }
  .sw-viewer .sw-management input:not([type="checkbox"]), .sw-viewer .sw-management select { font-size: 16px; }
  .sw-schedule-split, .sw-settings-layout { grid-template-columns: minmax(0,1fr); }
  .sw-scope-list { flex-direction: row; overflow-x: auto; }
  .sw-scope-list .sw-btn { flex: none; }
  .sw-schedule-cards, .sw-zone-properties, .sw-alert-layout > aside { grid-template-columns: minmax(0,1fr); }
  .sw-settings-nav { border: 0; padding: 0; }
  .sw-setting-nav { min-height: 44px; margin-bottom: 6px; padding: 11px 14px; border: 1px solid #1f2225; background: var(--sw-panel); font-size: 14px; }
  .sw-setting-nav > span { color: #4f5358; font-size: 17px; }
  .sw-settings-detail { display: none; }
  .sw-setting-detail .sw-settings-nav { display: none; }
  .sw-setting-detail .sw-settings-detail { display: block; }
  .sw-settings-detail [data-manage="settings-back"] { display: inline-flex; min-height: 44px; margin: -6px 0 4px; padding: 0 10px 0 0; border: 0; background: transparent; color: var(--sw-accent); font-size: 14px; font-weight: 500; }
  .sw-savebar > .sw-help { flex: 1 1 100%; }
  .sw-savebar .sw-btn { flex: 1; min-height: 44px; }
  .sw-switch { width: 46px; height: 27px; padding: 2px; border-radius: 27px; }
  .sw-switch > span { width: 21px; height: 21px; }
  .sw-switch.sw-on > span { transform: translateX(19px); }
  /* Each history filter takes its own row; the two actions share one. */
  .sw-history-filters label, .sw-filter-actions { flex: 1 1 100%; }
  .sw-history-filters :is(input,select) { width: 100%; height: 40px; }
  .sw-filter-actions .sw-btn { flex: 1; min-height: 44px; }
  .sw-field { flex-wrap: wrap; gap: 10px; }
  .sw-field > span { min-width: 150px; }
  .sw-field input:not([type="checkbox"]), .sw-field select { flex: 1; }
}
@media (min-width: 1200px) {
  .hero { grid-template-columns: minmax(0,.82fr) 38px minmax(0,1.65fr); gap: clamp(12px,1vw,22px); }
  .hero-copy { width: calc(100% - clamp(20px,2.5vw,64px)); max-width: 500px; justify-self: center; text-align: left; }
}
@container (max-width: 1050px) { .sw-hint { display: none; } .sw-topbar { gap: 10px; } .sw-playback-body { grid-template-columns: minmax(0,1fr) 230px; } .sw-pick-code { display: none; } }
@container (width > 900px) {
  .sw-viewer { height: clamp(920px, 44vw, 960px); }
}
@container (max-width: 900px) {
  .sw-rail, .sw-fleet, .sw-health, .sw-rec, .sw-clock { display: none; }
  .sw-topbar { height: 52px; padding: 0 14px; gap: 10px; }
  .sw-viewer .sw-title { font-size: 15px; }
  .sw-statusbtn { display: flex; flex: none; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border: 1px solid var(--sw-line); border-radius: 8px; background: transparent; color: var(--sw-soft); font-size: 11px; letter-spacing: .5px; }
  .sw-statusbtn .sw-dot { box-shadow: 0 0 7px #4ec77a; }
  .sw-statusbtn svg { color: var(--sw-label); }
  /* The SD/HD control belongs to the live wall only. */
  .sw-viewer[data-view="live"] .sw-hd-toggle { display: flex; flex: none; height: 34px; border-radius: 8px; }
  .sw-topbar .sw-hd-toggle button { min-height: 0; padding: 0 12px; letter-spacing: .5px; }
  .sw-content { padding: 12px; }
  .sw-tabs { display: flex; flex: none; border-top: 1px solid var(--sw-line); background: var(--sw-rail); }
  .sw-tabs .sw-nav-btn, .sw-tabs .sw-nav-btn:hover:not(:disabled), .sw-tabs .sw-nav-btn.sw-active { flex: 1; width: auto; height: 56px; padding: 0; gap: 3px; border-radius: 0; background: transparent; font-weight: 400; }
  .sw-tabs .sw-nav-btn svg { width: 22px; height: 22px; }
  .sw-viewer :is(input:not([type="range"]),select) { font-size: 16px; }
  .sw-toggle button, .sw-btn { min-height: 36px; }
  /* Single camera: the feed leads at its natural height and the screen scrolls. */
  .sw-focus { overflow-y: auto; }
  .sw-camcount { display: inline; }
  .sw-focus-camera { flex: none; }
  .sw-focus-camera .sw-tile { max-height: none; }
  .sw-focus-camera .sw-ov-full { width: 40px; height: 40px; }
  .sw-focus-camera .sw-live-label { right: 62px; height: 40px; }
  .sw-focus-controls { flex-direction: column; gap: 12px; }
  .sw-stream { width: 100%; }
  .sw-actions .sw-btn { padding: 12px; font-size: 13.5px; }
  /* Playback: one scrolling column with touch-sized transport and scrub surfaces. */
  .sw-playback-body { grid-template-columns: 1fr; display: flex; flex-direction: column; overflow-y: auto; }
  .sw-playback-left { flex: none; }
  .sw-stage { flex: none; min-height: 0; aspect-ratio: 16/9; }
  .sw-event-panel { flex: none; max-height: 360px; }
  .sw-transport { gap: 8px; }
  .sw-transport .sw-t-btn, .sw-transport .sw-t-speed { height: 44px; }
  .sw-transport .sw-t-play { width: 52px; height: 52px; }
  .sw-timeline { height: 76px; }
  /* Events: the class chip moves onto the camera line. */
  .sw-event-row { gap: 10px; padding: 8px; }
  .sw-event-row > .sw-badge { display: none; }
  .sw-m-badge { display: inline-block; flex: none; padding: 2px 7px; font-size: 9px; }
  .sw-event-thumb { width: 96px; }
  .sw-event-when { font-size: 13px; }
  .sw-clip-cell { width: 82px; }
  .sw-clip-actions { gap: 5px; }
}
@container (max-width: 500px) {
  .sw-viewer { height: 600px; height: clamp(530px, 84svh, 700px); }
  /* Phone wall: every camera as a full-width 16:9 feed in one scrolling column; the layout toolbar is desktop-only. */
  .sw-live .sw-bar, .sw-grid > .sw-empty { display: none; }
  .sw-grid { display: flex; flex-direction: column; padding-bottom: 4px; }
  .sw-grid > .sw-tile { flex: none; width: 100%; aspect-ratio: 16/9; }
  /* The zone editor needs a precise pointer, so the phone menu leaves it out. */
  .sw-sheet-nav [data-nav="zones"] { display: none; }
  /* Keeps camera names readable in a phone-width row: clip actions stack instead of holding a fixed column. */
  .sw-clip-cell { width: auto; }
  .sw-clip-actions { flex-direction: column; align-items: flex-end; gap: 3px; }
  .sw-cluster { gap: 7px; }
  .sw-toggle button { padding: 6px 9px; }
  .sw-count { display: none; }
  .sw-chips { gap: 5px; }
  .sw-chip { padding: 7px 11px; }
  .sw-ticks span:nth-child(even) { display: none; }
}
