:root {
  color-scheme: dark;
  --bg: #000204;
  --bg-elevated: #020609;
  --surface: rgba(2, 8, 12, .86);
  --surface-soft: rgba(3, 10, 14, .72);
  --surface-hover: rgba(7, 18, 23, .82);
  --line: rgba(181, 238, 245, .09);
  --line-strong: rgba(137, 230, 240, .18);
  --line-active: rgba(111, 226, 236, .34);
  --text: #f5f8f9;
  --text-soft: #c5d0d5;
  --muted: #8d9da5;
  --muted-2: #657780;
  --cyan: #8de9f2;
  --cyan-strong: #55d7e4;
  --cyan-soft: rgba(79, 209, 223, .08);
  --green: #80dca7;
  --amber: #efc777;
  --red: #f18a8a;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --card-padding-small: 14px;
  --chip-padding-y: 4px;
  --chip-padding-x: 10px;
  --shadow: 0 30px 90px rgba(0, 0, 0, .34);
  --scrollbar-size: 7px;
  --scrollbar-track: rgba(10, 18, 22, .22);
  --scrollbar-thumb: rgba(84, 205, 217, .30);
  --scrollbar-thumb-hover: rgba(99, 223, 234, .52);
  --scrollbar-thumb-active: rgba(141, 233, 242, .72);
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
*::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 999px; }
*::-webkit-scrollbar-thumb { min-height: 28px; border: 2px solid transparent; border-radius: 999px; background: var(--scrollbar-thumb); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:active { background: var(--scrollbar-thumb-active); background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-button { width: 0; height: 0; display: none; }

html, body { width: 100%; height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(70% 55% at 78% -10%, rgba(42, 187, 205, .08), transparent 60%),
    radial-gradient(55% 55% at 0% 100%, rgba(34, 130, 150, .04), transparent 66%),
    #000204;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(rgba(103, 232, 249, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .012) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), rgba(0,0,0,.45) 72%, transparent);
}

button, input, select { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .42; cursor: not-allowed !important; transform: none !important; }
.hidden { display: none !important; }

.app-shell { position: relative; height: 100vh; display: grid; grid-template-columns: 166px minmax(0, 1fr); }
.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  border-right: 1px solid rgba(181, 238, 245, .075);
  background: rgba(0, 3, 5, .82);

}
.brand { display: flex; align-items: center; gap: 10px; padding: 3px 9px 22px; }
.brand-mark { width: 30px; height: 30px; display: block; object-fit: contain; border-radius: 7px; filter: drop-shadow(0 0 12px rgba(126, 230, 239, .10)); }
.brand-copy { min-width: 0; }
.brand-name { font-size: 12px; line-height: 1; font-weight: 850; letter-spacing: .18em; }
.brand-edition { margin-top: 6px; color: #64767f; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; }

.nav-list { display: grid; gap: 5px; }
.nav-item {
  appearance: none;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #809099;
  cursor: pointer;
  text-align: left;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.nav-item:hover { color: #d9e4e8; background: rgba(103, 232, 249, .022); border-color: rgba(181, 238, 245, .06); }
.nav-item.active { color: #f5f9fa; background: rgba(103, 232, 249, .045); border-color: rgba(152, 236, 244, .14); box-shadow: inset 0 1px 0 rgba(208, 248, 251, .018); }
.nav-index { min-width: 18px; color: #485b64; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.nav-item.active .nav-index { color: var(--cyan-strong); }
.nav-item b { font-size: 13px; font-weight: 690; }

.sidebar-footer { margin-top: auto; padding: 14px 5px 2px; border-top: 1px solid rgba(181, 238, 245, .06); display: grid; gap: 11px; }
.save-state { min-height: 28px; display: flex; align-items: center; gap: 8px; color: #788991; font-size: 12px; }
.tiny-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(128, 220, 167, .06); }
.save-state.saving .tiny-dot { background: var(--amber); }
.save-state.error .tiny-dot { background: var(--red); }
.language-button {
  appearance: none; min-height: 36px; border-radius: 11px; border: 1px solid rgba(181, 238, 245, .09);
  background: rgba(7, 16, 20, .58); color: #b5c2c8; cursor: pointer; font-size: 12px; font-weight: 720;
  transition: .16s ease;
}
.language-button:hover { color: #eef5f6; border-color: rgba(141, 233, 242, .20); background: rgba(10, 23, 28, .72); }

.workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 62px auto minmax(0, 1fr); }
.topbar {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 20px; border-bottom: 1px solid rgba(181, 238, 245, .07);
  background: rgba(0, 4, 6, .64);
}
.page-identity { min-width: 0; }
.eyebrow, .panel-label, .subsection-title {
  color: #627780; font: 750 12px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .16em; text-transform: uppercase;
}
.topbar h1 { margin: 5px 0 0; font-size: 18px; line-height: 1; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.runtime-pill {
  min-height: 34px; padding: 0 11px; border: 1px solid rgba(181, 238, 245, .10); border-radius: 999px;
  background: rgba(4, 12, 15, .68); display: flex; align-items: center; gap: 8px; color: #c2cfd4;
  font-size: 12px; font-weight: 760; letter-spacing: .04em;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #61727b; }
.status-dot.success { background: var(--green); box-shadow: 0 0 0 4px rgba(128, 220, 167, .07), 0 0 12px rgba(128, 220, 167, .18); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(239, 199, 119, .06); }
.status-dot.danger { background: var(--red); box-shadow: 0 0 0 4px rgba(241, 138, 138, .07); }

.content { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; isolation: isolate; padding: 18px 20px 28px; }
.panel { display: none; width: min(100%, 980px); margin: 0 auto; }
.panel.active { display: block; }

.section-heading { display: flex; justify-content: space-between; gap: 18px; margin: 0 0 14px; }
.section-heading h2 { margin: 5px 0 4px; font-size: 25px; line-height: 1.12; letter-spacing: -.035em; }
.section-heading p { margin: 0; max-width: 700px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.compact-heading { margin-top: 16px; margin-bottom: 10px; }
.compact-heading h2 { font-size: 20px; }

.surface {
  position: relative;
  border: 1px solid rgba(165, 238, 245, .10);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(103, 232, 249, .013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .013) 1px, transparent 1px),
    linear-gradient(145deg, rgba(2, 8, 12, .94) 0%, rgba(1, 5, 8, .97) 58%, rgba(0, 2, 4, .98) 100%);
  background-size: 52px 52px, 52px 52px, auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.surface-line { position: absolute; z-index: 0; left: 14%; right: 14%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(164, 242, 248, .42), transparent); pointer-events: none; }
.surface > *:not(.surface-line) { position: relative; z-index: 1; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .72fr); gap: 12px; }
.hero-panel { min-height: 218px; padding: 24px 25px; display: flex; flex-direction: column; justify-content: center; }
.hero-status { display: inline-flex; width: fit-content; align-items: center; gap: 9px; color: rgba(192, 240, 245, .58); font: 720 12px/1 ui-monospace, monospace; letter-spacing: .16em; }
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgba(141, 233, 242, .38); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(141,233,242,.16); border-radius: 50%; }
@keyframes softPulse { 0% { transform: scale(.55); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.hero-panel h2 { margin: 12px 0 10px; max-width: 590px; font-size: 29px; line-height: 1.08; letter-spacing: -.045em; }
.hero-panel > p { margin: 0; max-width: 650px; color: #9eabb1; font-size: 14px; line-height: 1.6; }
.hero-actions { margin-top: 20px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.hero-hint { color: #6f8189; font-size: 12px; }

.readiness-panel { padding: 20px; min-height: 218px; }
.panel-label { margin-bottom: 13px; }
.status-stack { display: grid; gap: 7px; }
.status-row {
  min-height: 52px; padding: 11px 12px; border: 1px solid rgba(181, 238, 245, .075); border-radius: 13px;
  background: rgba(2, 8, 11, .58); display: grid; gap: 4px;
}
.status-row span { color: #758991; font-size: 12px; }
.status-row b { color: #dce7ea; font-size: 12px; font-weight: 650; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.metric { min-width: 0; min-height: 88px; padding: 15px; border: 1px solid rgba(181, 238, 245, .075); border-radius: 14px; background: rgba(3, 10, 13, .56); }
.metric span { display: block; margin-bottom: 7px; color: #687c85; font-size: 12px; }
.metric b { display: block; color: #f3f7f8; font-size: 14px; font-weight: 690; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 5px; color: #778990; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }

.calibration-guide { padding: 18px; }
.calibration-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.calibration-guide-head > div { min-width: 0; }
.calibration-guide-head h3 { margin: 9px 0 5px; font-size: 18px; line-height: 1.2; }
.calibration-guide-head p { margin: 0; max-width: 690px; color: #81939a; font-size: 12px; line-height: 1.5; }
.calibration-guide-head > button { flex: 0 0 auto; white-space: nowrap; }
.calibration-steps { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.calibration-step { min-width: 0; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 11px; padding: var(--card-padding-small); border: 1px solid rgba(181,238,245,.07); border-radius: 13px; background: rgba(2,8,11,.48); }
.calibration-step > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(120,226,237,.15); background: rgba(84,215,228,.04); color: var(--cyan); font: 720 12px/1 ui-monospace, monospace; }
.calibration-step b { display: block; font-size: 12px; font-weight: 700; }
.calibration-step p { margin: 5px 0 0; color: #84969e; font-size: 12px; line-height: 1.5; }
.calibration-step small { display: block; margin-top: 8px; padding: 9px 11px; border-left: 2px solid rgba(239,199,119,.46); border-radius: 0 8px 8px 0; background: rgba(91,64,13,.10); color: #c9ad77; font-size: 12px; line-height: 1.45; }
.calibration-rule { margin-top: 10px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid rgba(111,226,236,.12); border-radius: 11px; background: rgba(55,187,201,.035); color: #8ea2a9; font-size: 12px; line-height: 1.45; }
.calibration-rule b { flex: 0 0 auto; color: #bceef2; }

.primary-button, .secondary-button, .quiet-button {
  appearance: none; min-height: 38px; padding: 0 14px; border-radius: 11px; cursor: pointer;
  font-size: 12px; font-weight: 740; transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.primary-button { border: 1px solid rgba(176, 245, 250, .58); color: #021012; background: linear-gradient(180deg, #b1f3f7, #64d9e4); box-shadow: 0 10px 30px rgba(63, 207, 220, .12); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(63, 207, 220, .18); filter: brightness(1.035); }
.secondary-button { border: 1px solid rgba(181, 238, 245, .13); background: rgba(9, 20, 25, .78); color: #e5eef1; }
.secondary-button:hover { transform: translateY(-1px); border-color: rgba(141, 233, 242, .25); background: rgba(12, 27, 32, .90); }
.quiet-button { border: 1px solid rgba(181, 238, 245, .085); background: rgba(4, 11, 14, .46); color: #aab9bf; }
.quiet-button:hover { color: #edf4f6; border-color: rgba(141, 233, 242, .18); background: rgba(8, 18, 22, .66); }
.compact { min-height: 32px; padding: 0 11px; font-size: 12px; }
.button-row, .speed-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.speed-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); gap: 20px; padding: 22px; }
.human-badge, .badge { display: inline-flex; align-items: center; min-height: 25px; width: fit-content; max-width: 100%; padding: var(--chip-padding-y) var(--chip-padding-x); border-radius: 999px; border: 1px solid rgba(127, 231, 240, .15); background: rgba(77, 211, 224, .04); color: rgba(185, 241, 246, .72); font: 770 12px/1.15 ui-monospace, monospace; letter-spacing: .09em; vertical-align: middle; }
.badge { color: #94a7ae; border-color: rgba(181, 238, 245, .11); background: rgba(5, 13, 17, .7); }
.badge.accent { color: #a7edf3; border-color: rgba(92, 218, 230, .28); background: rgba(68, 204, 218, .06); }
.badge.not-recommended { color: #f0a2a2; border-color: rgba(241, 138, 138, .32); background: rgba(241, 138, 138, .07); letter-spacing: .055em; }
.speed-copy h3 { margin: 10px 0 6px; font-size: 27px; line-height: 1.05; letter-spacing: -.04em; }
.speed-copy > p { margin: 0; max-width: 570px; color: #91a1a8; font-size: 13px; line-height: 1.58; }
.speed-tip { margin-top: 15px; display: flex; align-items: flex-start; gap: 9px; color: #84969e; }
.speed-tip > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; color: var(--cyan); background: rgba(79,209,223,.05); border: 1px solid rgba(141,233,242,.12); }
.speed-tip b { display: block; color: #c9d5d9; font-size: 12px; }
.speed-tip p { margin: 2px 0 0; font-size: 12px; }
.speed-control { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 17px; border-radius: 16px; border: 1px solid rgba(181, 238, 245, .09); background: rgba(0, 5, 8, .62); }
.speed-value-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.speed-value-row > div { display: grid; gap: 4px; }
.speed-value-row span { color: #6d8088; font-size: 12px; }
.speed-value-row strong { font-size: 32px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.value-note { max-width: 110px; text-align: right; line-height: 1.35; }
.range { width: 100%; accent-color: var(--cyan-strong); }
.primary-range { margin: 2px 0 14px; }

.number-input, .text-input, .select, .number {
  min-height: 38px; padding: 0 11px; border: 1px solid rgba(181, 238, 245, .11); border-radius: 10px;
  background: rgba(0, 5, 8, .80); color: #edf4f6; outline: none;
}
.number-input:focus, .text-input:focus, .select:focus, .number:focus { border-color: rgba(111, 226, 236, .34); box-shadow: 0 0 0 3px rgba(79, 209, 223, .045); }
.number-input { width: 122px; }

.settings-groups { margin-top: 12px; display: grid; gap: 10px; }
.details-block { overflow: hidden; }
.details-block summary { min-height: 62px; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.details-block summary::-webkit-details-marker { display: none; }
.details-block summary > span { display: grid; gap: 3px; }
.details-block summary b { font-size: 13px; font-weight: 680; }
.details-block summary small { color: #70828a; font-size: 12px; }
.details-block summary i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(181, 238, 245, .08); background: rgba(6, 15, 18, .52); color: #768b93; font-style: normal; font-size: 16px; line-height: 1; transition: transform .18s ease, color .18s ease, border-color .18s ease; }
.details-block[open] summary i { transform: rotate(45deg); color: var(--cyan); border-color: rgba(141,233,242,.18); }
.details-block[open] summary { border-bottom: 1px solid rgba(181, 238, 245, .065); }
.details-content { padding: 16px; }

.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.control-card { min-width: 0; padding: var(--card-padding-small); border-radius: 13px; border: 1px solid rgba(181, 238, 245, .07); background: rgba(2, 8, 11, .48); }
.control-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.control-title strong { font-size: 12px; font-weight: 680; }
.control-help { margin: 5px 0 10px; min-height: 32px; color: #74878f; font-size: 12px; line-height: 1.45; }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; align-items: center; }
.aim-height-layout { display:grid; grid-template-columns:150px minmax(0,1fr); gap:13px; align-items:center; }
.aim-height-preview { --aim-point-y:33%; position:relative; min-height:150px; overflow:hidden; border:1px solid rgba(181,238,245,.08); border-radius:12px; background:linear-gradient(180deg,rgba(44,160,175,.035),rgba(0,5,8,.50)); }
.aim-height-preview svg { position:absolute; left:7px; top:5px; width:76px; height:140px; fill:rgba(133,167,175,.22); stroke:rgba(146,188,196,.34); stroke-width:2; }
.aim-height-preview .aim-limb { fill:none; stroke-linecap:round; stroke-width:7; }
.aim-height-reference { position:absolute; left:78px; right:6px; color:#657981; font-size:12px; line-height:1.2; white-space:nowrap; }
.aim-height-reference::before { content:""; position:absolute; right:100%; top:50%; width:17px; margin-right:4px; border-top:1px dashed rgba(181,238,245,.15); }
.aim-height-reference.head { top:calc(15% - 7px); }
.aim-height-reference.body { top:calc(33% - 7px); }
.aim-height-marker { position:absolute; z-index:2; left:8px; right:8px; top:var(--aim-point-y); height:0; border-top:1px solid rgba(141,233,242,.72); transition:top .12s ease; }
.aim-height-marker i { position:absolute; left:32px; top:-5px; width:9px; height:9px; border-radius:50%; border:2px solid #b7f4f7; background:#42cbd9; box-shadow:0 0 12px rgba(83,218,229,.45); }
.aim-height-marker b { position:absolute; right:0; top:-13px; min-width:38px; padding:3px 6px; border:1px solid rgba(111,226,236,.22); border-radius:7px; background:#061317; color:#b7edf1; font:700 12px/1 ui-monospace,monospace; text-align:center; }
.aim-height-editor { min-width:0; display:grid; gap:9px; }
.aim-height-editor p { margin:0; color:#71858d; font-size:12px; line-height:1.4; }
.aim-height-editor p b { color:#b9d7db; }
.number { width: 100%; }
.switch-row { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch > span { position: absolute; inset: 0; border-radius: 999px; border: 1px solid rgba(181, 238, 245, .12); background: #0a1115; cursor: pointer; transition: .18s ease; }
.switch > span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #697b83; transition: .18s ease; }
.switch input:checked + span { border-color: rgba(103,232,249,.30); background: rgba(69,207,220,.15); }
.switch input:checked + span::before { transform: translateX(18px); background: var(--cyan); box-shadow: 0 0 10px rgba(141,233,242,.30); }

.capture-method-row { margin-bottom: 10px; min-height: 64px; padding: 13px var(--card-padding-small); border: 1px solid rgba(181, 238, 245, .07); border-radius: 13px; background: rgba(2, 8, 11, .48); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.capture-method-row b { font-size: 12px; }
.capture-method-row p { margin: 3px 0 0; color: #71848c; font-size: 12px; }
.resolution-guide { margin-bottom: 10px; padding: 14px 15px; border: 1px solid rgba(111,226,236,.13); border-radius: 13px; background: rgba(46,166,179,.035); }
.resolution-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.resolution-guide-head > div { min-width: 0; }
.resolution-guide-head b { color: #c8e6e9; font-size: 12px; }
.resolution-guide-head p { margin: 5px 0 0; color: #81969e; font-size: 12px; line-height: 1.5; }
.resolution-guide-head > .chip { flex: 0 0 auto; }
.resolution-nuances { display: grid; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(181,238,245,.07); }
.resolution-nuances p { margin: 0; color: #788b93; font-size: 12px; line-height: 1.5; }
.resolution-nuances p:last-child { color: #b39d73; }
.capture-actions { margin-top: 14px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid rgba(181, 238, 245, .08); border-radius: 10px; background: rgba(0, 5, 8, .72); }
.segmented button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #7d9098; cursor: pointer; font-size: 12px; font-weight: 690; }
.segmented button.active { background: rgba(74, 208, 221, .11); color: #cff6f8; box-shadow: inset 0 0 0 1px rgba(141,233,242,.13); }

.panel[data-panel="system"].active { display: grid; gap: 10px; align-content: start; }
.panel[data-panel="system"] > .section-heading { margin-bottom: 4px; }
.panel[data-panel="system"] > .surface { margin-bottom: 0; }
.system-section { padding: 20px; margin-bottom: 0; }
.system-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.system-section-head > div { min-width: 0; }
.system-section-head > button { flex: 0 0 auto; align-self: flex-start; white-space: nowrap; }
.system-section-head h3 { margin: 7px 0 4px; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
.system-section-head p { margin: 0; max-width: 670px; color: #82949b; font-size: 12px; line-height: 1.5; }
.model-metrics { margin: 16px 0 12px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.secondary-actions { margin-top: 2px; }

.driver-summary-list { display: grid; gap: 8px; margin-top: 15px; }
.driver-summary { min-width: 0; padding: var(--card-padding-small) 15px; border: 1px solid rgba(181, 238, 245, .07); border-radius: 13px; background: rgba(2, 8, 11, .48); display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: .16s ease; }
.driver-summary.selecting { border-color: rgba(111, 226, 236, .30); background: rgba(55, 187, 201, .055); }
.driver-summary h4 { margin: 0 0 4px; font-size: 12px; }
.driver-summary p { margin: 0; max-width: 610px; color: #788b93; font-size: 12px; line-height: 1.42; }
.driver-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 25px; max-width: 100%; padding: var(--chip-padding-y) var(--chip-padding-x); border-radius: 999px; border: 1px solid rgba(181, 238, 245, .08); color: #7e9199; background: rgba(0, 5, 8, .56); font-size: 12px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.chip.good { color: #a1d9b7; border-color: rgba(128,220,167,.18); }
.chip.warn { color: #d9bd82; border-color: rgba(239,199,119,.20); }
.chip.bad { color: #d88b8b; border-color: rgba(241,138,138,.20); }
.technical-stack { display: grid; gap: 16px; }
.subsection-title { margin: 2px 0 9px; color: rgba(164, 235, 242, .58); }

.hotkey-list { display: grid; gap: 8px; }
.hotkey-row { padding: 13px var(--card-padding-small); border: 1px solid rgba(181,238,245,.07); border-radius: 12px; background: rgba(2,8,11,.48); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hotkey-row h4 { margin: 0 0 3px; font-size: 12px; }
.hotkey-row p { margin: 0; color: #74878f; font-size: 12px; }
.hotkey-button { min-width: 105px; min-height: 34px; border: 1px solid rgba(181,238,245,.11); border-radius: 9px; background: rgba(0,5,8,.72); color: #c9d7db; cursor: pointer; font-size: 12px; font-weight: 680; }
.hotkey-button.listening { color: var(--cyan); border-color: rgba(111,226,236,.30); }

.export-progress { margin: 12px 0; padding: 12px 13px; border-radius: 12px; border: 1px solid rgba(141,233,242,.09); background: rgba(2,8,11,.58); }
.progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 12px; }
.progress-track { height: 7px; border-radius: 999px; overflow: hidden; background: rgba(141, 233, 242, .065); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #43cbd9, #b4f4f7); transition: width .25s ease; }
.export-progress p { margin: 7px 0 0; color: #778a92; font-size: 12px; }

.inline-alert { margin: 8px 20px 0; padding: 12px 14px; border: 1px solid rgba(239,199,119,.20); border-radius: 12px; background: rgba(60,43,12,.16); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.inline-alert strong { font-size: 12px; }
.inline-alert p { margin: 2px 0 0; color: #a99773; font-size: 12px; }

.log-list { max-height: 220px; overflow: auto; margin-top: 14px; border: 1px solid rgba(181,238,245,.07); border-radius: 12px; background: rgba(0,4,6,.62); }
.log-entry { display: grid; grid-template-columns: 70px 52px minmax(0,1fr); gap: 8px; padding: 8px 10px; border-bottom: 1px solid rgba(181,238,245,.045); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.log-entry:last-child { border-bottom: 0; }
.log-time { color: #52666e; }
.log-level { color: #789099; }
.log-entry[data-level="ERROR"] .log-level, .log-entry[data-level="CRITICAL"] .log-level { color: var(--red); }
.log-entry[data-level="WARNING"] .log-level { color: var(--amber); }
.log-message { min-width: 0; color: #9cadb3; white-space: pre-wrap; word-break: break-word; }

/* Guided startup */
.blocking-overlay { position: fixed; z-index: 1000; inset: 0; padding: 16px; display: grid; place-items: center; background: radial-gradient(circle at 50% 0%, rgba(52, 202, 218, .065), transparent 34%), #000204; overflow: auto; }
.blocking-shell { width: min(800px, 100%); }
.blocking-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.blocking-brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.blocking-brand > div { display: grid; gap: 5px; }
.blocking-brand b { font-size: 12px; letter-spacing: .16em; }
.blocking-brand span { color: #61757e; font: 700 12px/1 ui-monospace, monospace; letter-spacing: .12em; }
.startup-stepper { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; margin-bottom: 9px; }
.startup-stepper > div { min-height: 42px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(181,238,245,.07); border-radius: 11px; background: rgba(3,9,12,.54); color: #50636c; }
.startup-stepper > div > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; border: 1px solid rgba(181,238,245,.08); font: 700 12px/1 ui-monospace, monospace; }
.startup-stepper b { font-size: 12px; }
.startup-stepper > div.active { border-color: rgba(111,226,236,.28); color: #e0eff1; background: rgba(67,196,209,.055); }
.startup-stepper > div.active > span { color: var(--cyan); border-color: rgba(111,226,236,.28); }
.startup-stepper > div.done { color: #7f999f; }
.startup-stepper > div.done > span { color: var(--green); border-color: rgba(128,220,167,.20); }
.blocking-card { min-height: 0; padding: 24px 26px; }
.blocking-card h1 { margin: 8px 0 8px; font-size: 27px; line-height: 1.1; letter-spacing: -.035em; }
#blockingNormal > p, .fatal-block > p { margin: 0; color: #91a1a8; font-size: 13px; line-height: 1.55; }
.blocking-detail { margin-top: 10px !important; padding-left: 11px; border-left: 2px solid rgba(79,209,223,.26); color: #77919a !important; font-size: 12px !important; }
.startup-special { margin-top: 16px; }
.startup-special > .text-input { width: 100%; }
.startup-action-row { margin-top: 12px; }
.form-message { margin: 5px 0 0; color: #82959d; font-size: 12px; line-height: 1.45; }
.notice-box { margin: 10px 0; padding: 12px 14px; border: 1px solid rgba(141,233,242,.09); border-radius: 11px; background: rgba(59,189,202,.028); color: #82a4ac; font-size: 12px; line-height: 1.5; }

.startup-driver-list { max-height: 318px; overflow: auto; display: grid; gap: 8px; padding-right: 3px; }
.startup-driver-card { padding: var(--card-padding-small); border: 1px solid rgba(181,238,245,.08); border-radius: 13px; background: rgba(2,8,11,.55); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; transition: border-color .16s ease, background .16s ease; }
.startup-driver-card.recommended { border-color: rgba(103,232,249,.22); background: rgba(54,197,211,.042); }
.startup-driver-card.selecting { border-color: rgba(111,226,236,.34); background: rgba(55,187,201,.075); }
.driver-card-copy { min-width: 0; }
.startup-driver-card h3 { margin: 0 0 5px; font-size: 13px; }
.startup-driver-card p { margin: 0; color: #809199; font-size: 12px; line-height: 1.42; }
.driver-meta-line { margin-top: 5px; color: #5f7680; font-size: 12px; }
.driver-card-action { min-width: 112px; display: flex; justify-content: flex-end; align-items: center; }
.driver-card-action > button { min-width: 96px; }
.driver-card-progress { min-width: 112px; min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid rgba(111,226,236,.24); background: rgba(62,205,219,.07); color: #a9e9ee; font-size: 12px; font-weight: 720; white-space: nowrap; }
.driver-card-progress.compact-progress { min-width: 108px; min-height: 32px; }
/* The startup choice is mandatory on every launch. Keep all six options in one
   overview instead of hiding later drivers behind an inner scrollbar. Fatal
   recovery keeps the original single-column scrollable list. */
#startupDriverCards { max-height: none; overflow: visible; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-right: 0; }
#startupDriverCards .startup-driver-card { min-height: 96px; padding: 11px 12px; align-items: start; gap: 10px; }
#startupDriverCards .startup-driver-card h3 { margin-bottom: 3px; line-height: 1.3; }
#startupDriverCards .startup-driver-card p { display: block; min-height: 0; overflow: visible; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
#startupDriverCards .driver-meta-line { margin-top: 4px; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
#startupDriverCards .driver-tags { grid-column: 1 / -1; width: 100%; max-height: none; margin-top: 0; overflow: visible; }
#startupDriverCards .driver-tags .chip { width: 100%; max-width: 100%; overflow: visible; border-radius: 10px; white-space: normal; overflow-wrap: anywhere; }
#startupDriverCards .driver-card-action { min-width: 90px; }
#startupDriverCards .driver-card-action > button { min-width: 86px; }
.driver-selection-active { place-items: start center; padding-top: 10px; }
.driver-selection-active .blocking-shell { width: min(860px,100%); }
.driver-selection-active .blocking-brand { display: none; }
.driver-selection-active .startup-stepper { margin-bottom: 7px; }
.driver-selection-active .startup-stepper > div { min-height: 36px; }
.driver-selection-active .blocking-card { padding: 16px 20px; }
.driver-selection-active .blocking-card h1 { margin: 5px 0 6px; font-size: 24px; }
.driver-selection-active .startup-special { margin-top: 10px; }
.driver-selection-active .notice-box { margin: 7px 0; padding: 9px 11px; }
.driver-status-spinner { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; border: 2px solid rgba(141,233,242,.16); border-top-color: var(--cyan); animation: spin .72s linear infinite; }
.button-spinner { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; border: 2px solid rgba(2, 16, 18, .22); border-top-color: #021012; animation: spin .72s linear infinite; }
.button-spinner.subtle-spinner { border-color: rgba(141,233,242,.15); border-top-color: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }

.export-live-head { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.export-live-head b { display: block; font-size: 13px; }
.export-live-head p { margin: 3px 0 0; }
.activity-orb { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(111,226,236,.24); background: rgba(67,196,209,.04); }
.activity-orb::before, .activity-orb::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid rgba(109,224,235,.38); animation: buildPulse 1.8s ease-out infinite; }
.activity-orb::after { animation-delay: .9s; }
.activity-orb i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgba(141,233,242,.48); }
@keyframes buildPulse { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.build-state { min-height: 25px; padding: 6px 10px; border: 1px solid rgba(111,226,236,.22); border-radius: 999px; background: rgba(67,196,209,.04); color: #a8edf2; font: 780 12px/1.15 ui-monospace, monospace; letter-spacing: .07em; }
.progress-track.large { margin-top: 12px; height: 8px; }
.progress-track.indeterminate { position: relative; overflow: hidden; }
.progress-track.indeterminate i { width: 38% !important; transition: none; animation: buildSweep 1.65s cubic-bezier(.45,0,.55,1) infinite; background: linear-gradient(90deg, rgba(79,209,223,.08), #58d5e1, #b4f4f7, rgba(79,209,223,.08)); }
@keyframes buildSweep { 0% { transform: translateX(-115%); } 100% { transform: translateX(285%); } }
.export-telemetry { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; margin: 10px 0; }
.export-telemetry > div { min-width: 0; padding: 10px 11px; border: 1px solid rgba(181,238,245,.07); border-radius: 10px; background: rgba(0,5,8,.50); }
.export-telemetry span { display: block; margin-bottom: 4px; color: #687c84; font-size: 12px; }
.export-telemetry b { display: block; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.engine-watch { padding: 11px 12px; display: flex; gap: 9px; align-items: flex-start; border: 1px solid rgba(141,233,242,.09); border-radius: 10px; background: rgba(55,187,201,.026); }
.watch-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--cyan-strong); box-shadow: 0 0 0 5px rgba(79,209,223,.055); animation: watchBlink 1.3s ease-in-out infinite; }
.watch-dot.ready { background: var(--green); box-shadow: 0 0 0 5px rgba(128,220,167,.06); animation: none; }
@keyframes watchBlink { 50% { opacity: .35; } }
.engine-watch b { font-size: 12px; }
.engine-watch p { margin: 3px 0 0; color: #778a92; font-size: 12px; line-height: 1.4; }
.export-events { max-height: 72px; overflow: hidden; display: grid; gap: 3px; margin-top: 7px; }
.export-event { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 8px; padding: 2px; }
.export-event span { color: #5d7079; font: 12px/1.35 ui-monospace, monospace; }
.export-event p { margin: 0; color: #8fa0a7; font-size: 12px; line-height: 1.35; }
.export-event.error p { color: #d88b8b; }

.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(141,233,242,.12); border-top-color: var(--cyan); animation: spin .8s linear infinite; }

/* Blocking errors */
.fatal-icon { width: 38px; height: 38px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(241,138,138,.20); background: rgba(241,138,138,.05); color: var(--red); font-size: 20px; font-weight: 800; }
.danger-text { color: #b96d6d; }
.fatal-cause { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(241,138,138,.14); border-radius: 12px; background: rgba(91,28,28,.10); }
.fatal-cause > span, .solution-title { color: #9f7777; font: 720 12px/1.2 ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }
.fatal-cause p { margin: 5px 0 0; color: #c6a4a4; font-size: 12px; }
.fatal-details { max-height: 128px; overflow: auto; margin: 9px 0 0; padding: 10px; border: 1px solid rgba(181,238,245,.06); border-radius: 10px; background: rgba(0,3,5,.75); color: #8f9ca2; font: 12px/1.45 ui-monospace, monospace; white-space: pre-wrap; }
.solution-title { margin-top: 14px; color: #799099; }
.fatal-advice { display: grid; gap: 6px; margin-top: 7px; }
.fatal-advice-step { padding: 10px 12px; border: 1px solid rgba(181,238,245,.07); border-radius: 10px; background: rgba(2,8,11,.50); color: #9daeb4; font-size: 12px; line-height: 1.45; }
.fatal-advice-step b { color: var(--cyan); font: 720 12px/1 ui-monospace, monospace; }
.fatal-driver-picker { margin-top: 13px; }
.fatal-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.fatal-footnote { margin-top: 10px !important; color: #6e7e85 !important; font-size: 12px !important; }

.restart-toast { position: fixed; z-index: 1200; right: 15px; bottom: 15px; width: min(420px, calc(100% - 30px)); padding: 12px; border: 1px solid rgba(239,199,119,.18); border-radius: 13px; background: rgba(13, 13, 10, .96); box-shadow: 0 20px 60px rgba(0,0,0,.42); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.restart-toast > div { display: grid; gap: 2px; }
.restart-toast b { font-size: 12px; }
.restart-toast span { color: #9a8f75; font-size: 12px; }
.toast { position: fixed; z-index: 1300; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(520px, calc(100% - 32px)); padding: 10px 14px; border: 1px solid rgba(181,238,245,.11); border-radius: 11px; background: rgba(5,12,15,.96); color: #c7d4d8; box-shadow: 0 18px 50px rgba(0,0,0,.38); font-size: 12px; }
.modal-overlay { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,2,4,.78);  }
.modal { width: min(430px, 100%); padding: 22px; }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal p { margin: 0 0 18px; color: #8798a0; font-size: 12px; line-height: 1.5; }
.modal-actions { justify-content: flex-end; gap: 10px; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 148px minmax(0,1fr); }
  .sidebar { padding-left: 9px; padding-right: 9px; }
  .content { padding-left: 14px; padding-right: 14px; }
  .inline-alert { margin-left: 14px; margin-right: 14px; }
  .overview-grid, .speed-card { grid-template-columns: 1fr; }
  .readiness-panel { min-height: 0; }
  .metric-grid, .model-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .control-grid { grid-template-columns: 1fr; }
  .calibration-steps { grid-template-columns: 1fr; }
  .calibration-guide-head { flex-direction: column; }
  .calibration-guide-head > button { width: 100%; }
  .resolution-guide-head { flex-direction: column; }
}

/* Dynamic hardware/model names need more than a 150px column in the normal
   920px desktop window. Use two readable columns before content starts
   truncating; wide windows retain the denser four-column overview. */
@media (max-width: 1040px) {
  .metric-grid, .model-metrics, .diagnostics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .metric-grid, .model-metrics, .diagnostics-grid { grid-template-columns: 1fr; }
  .aim-height-layout { grid-template-columns:128px minmax(0,1fr); }
  .aim-height-reference { left:70px; }
}

@media (max-height: 650px) {
  .content { padding-top: 14px; }
  .hero-panel { min-height: 190px; padding: 20px; }
  .hero-panel h2 { font-size: 26px; }
  .blocking-overlay { align-items: start; padding-top: 10px; }
  .blocking-brand { margin-bottom: 8px; }
  .blocking-card { padding: 18px 20px; }
  .startup-special { margin-top: 11px; }
  .startup-driver-list { max-height: 286px; }
  .export-events { max-height: 54px; }
}

.speed-nudges { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin: 0 0 9px; }
.speed-nudge { appearance: none; min-height: 40px; padding: 0 10px; border: 1px solid rgba(181,238,245,.09); border-radius: 10px; background: rgba(5,14,18,.56); color: #9aabb1; display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: .15s ease; }
.speed-nudge span { color: var(--cyan); font: 720 12px/1 ui-monospace, monospace; }
.speed-nudge b { font-size: 12px; font-weight: 680; }
.speed-nudge:hover { color: #edf5f6; border-color: rgba(141,233,242,.19); background: rgba(9,22,27,.72); transform: translateY(-1px); }

/* v4.11 self-setup */
.setup-live-head { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:10px; align-items:center; }
.setup-live-head b { font-size:13px; }
.setup-progress-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; color:#6f838b; font-size:12px; }
.setup-progress-meta b { color:#c8d9dd; font-size:12px; font-weight:700; text-align:right; }
.setup-progress-hint { margin:5px 0 0; color:#72868e; font-size:12px; line-height:1.45; }
.setup-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-top:10px; }
.setup-fact { min-height:52px; padding:11px 12px; border:1px solid rgba(181,238,245,.07); border-radius:11px; background:rgba(2,8,11,.50); display:grid; gap:4px; }
.setup-fact span { color:#6e838b; font-size:12px; }
.setup-fact b { color:#cbd9dd; font-size:12px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
.setup-timeline { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; margin-top:10px; }
.setup-stage { min-width:0; min-height:48px; padding:8px 9px; border:1px solid rgba(181,238,245,.06); border-radius:10px; background:rgba(2,8,11,.38); color:#5e727a; display:grid; grid-template-columns:18px minmax(0,1fr); align-items:center; gap:7px; font-size:12px; line-height:1.3; }
.setup-stage i { width:18px; height:18px; display:grid; place-items:center; border-radius:6px; border:1px solid rgba(181,238,245,.08); color:#60757d; font:700 12px/1 ui-monospace,monospace; font-style:normal; }
.setup-stage.done { color:#8cab98; border-color:rgba(128,220,167,.11); }
.setup-stage.done i { color:#9dd7b3; border-color:rgba(128,220,167,.18); background:rgba(78,170,112,.06); }
.setup-stage.active { color:#c6edf0; border-color:rgba(111,226,236,.22); background:rgba(55,187,201,.055); }
.setup-stage.active i { color:#baf2f5; border-color:rgba(111,226,236,.28); background:rgba(55,187,201,.09); }
.setup-stage.error { color:#d5a0a0; border-color:rgba(241,138,138,.20); background:rgba(90,22,22,.08); }
.setup-detail-wrap { margin:10px 0 0; border:1px solid rgba(239,199,119,.11); border-radius:10px; background:rgba(57,39,7,.08); overflow:hidden; }
.setup-detail-wrap > summary { cursor:pointer; list-style:none; padding:9px 11px; color:#b7a47e; font-size:12px; font-weight:700; user-select:none; }
.setup-detail-wrap > summary::-webkit-details-marker { display:none; }
.setup-detail-wrap > summary::after { content:"+"; float:right; color:#6f858e; }
.setup-detail-wrap[open] > summary::after { content:"−"; }
.setup-detail { margin:0; max-height:110px; overflow:auto; padding:0 11px 10px; color:#8e8170; font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; white-space:pre-wrap; word-break:break-word; }
.driver-setup-status { margin-bottom:9px; padding:12px 13px; border-radius:11px; border:1px solid rgba(111,226,236,.18); background:rgba(55,187,201,.045); color:#9bb1b7; font-size:12px; line-height:1.45; }
.driver-setup-status.error { border-color:rgba(241,138,138,.22); background:rgba(90,22,22,.10); color:#c99393; }
.driver-setup-status.reboot-required { position:sticky; top:6px; z-index:12; display:flex; align-items:center; justify-content:space-between; gap:14px; border-color:rgba(241,138,138,.34); background:rgba(24,8,10,.94); box-shadow:0 12px 30px rgba(0,0,0,.34); backdrop-filter:blur(16px); }
.driver-setup-status.reboot-required .button-row { flex:0 0 auto; margin:0; }
.driver-setup-status.reboot-required .driver-setup-copy { max-width:620px; }
@media(max-width:720px){ .driver-setup-status.reboot-required{align-items:stretch;flex-direction:column}.driver-setup-status.reboot-required .button-row,.driver-setup-status.reboot-required .driver-restart-windows{width:100%} }
.driver-setup-live { display:flex; align-items:center; gap:10px; min-width:0; }
.driver-setup-copy { min-width:0; display:grid; gap:2px; }
.driver-setup-copy b { color:#dcebed; font-size:12px; }
.driver-setup-copy span { color:#77939b; font-size:12px; line-height:1.4; }
.driver-setup-status.error .driver-setup-copy b { color:#e8b3b3; }
.driver-summary-actions { flex:0 0 auto; justify-content:flex-end; }
@media(max-width:720px){
  .system-section-head, .capture-method-row { align-items: stretch; flex-direction: column; }
  .system-section-head > button { width: 100%; }
  .startup-driver-card { grid-template-columns: 1fr; align-items:start; }
  #startupDriverCards { grid-template-columns:1fr; }
  #startupDriverCards .startup-driver-card p { min-height:0; display:block; overflow:visible; }
  #startupDriverCards .driver-meta-line { white-space:normal; overflow:visible; }
  #startupDriverCards .driver-tags { max-height:none; overflow:visible; }
  .driver-card-action { min-width:0; justify-content:stretch; }
  .driver-card-action > button, .driver-card-progress { width:100%; min-width:0; }
  .driver-summary-actions { width:100%; justify-content:flex-start; }
  .setup-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .setup-timeline { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px){ .startup-stepper b{display:none}.startup-stepper>div{justify-content:center;padding:0 5px} }
@media (min-width:721px) and (max-width:1040px){ .setup-timeline{grid-template-columns:repeat(3,minmax(0,1fr));} }


/* v4.12: low-overhead UI by default. The Control Center should not compete with
   inference for GPU/CPU time on entry-level systems. */
.sidebar, .topbar, .modal-overlay { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.panel { contain: layout style; }
.control-card, .metric, .driver-summary, .startup-driver-card, .status-row { contain: layout paint; }
.panel:not(.active), .hidden { content-visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keep continuous motion only on blocking work indicators. Idle/running state is
   intentionally static to avoid unnecessary WebView repaints. */
.status-dot, .tiny-dot, .live-dot { animation: none !important; }

/* Low-end friendly system note: visible, static and cheap to paint. */
.system-efficiency-note {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #71858d;
  font-size: 12px;
  line-height: 1.45;
}
.system-efficiency-note .tiny-dot { background: #7dcf9c; box-shadow: none; }

/* Avoid hover transforms on touch/slow systems. They create extra compositor work
   while adding little value to a desktop control panel. */
@media (hover: none), (pointer: coarse) {
  .speed-nudge:hover, .primary-button:hover, .secondary-button:hover, .quiet-button:hover { transform: none !important; }
}

/* Automatic economy profile for low-end PCs / reduced-motion users. It keeps
   information density and readability while removing decorative paint work. */
.low-power body {
  background: #000204;
  -webkit-font-smoothing: auto;
}
.low-power body::before { display: none; }
.low-power .surface-line { opacity: .36; }
.low-power .hero-panel,
.low-power .blocking-overlay { background-image: none !important; }
.low-power .control-card,
.low-power .metric,
.low-power .driver-summary,
.low-power .startup-driver-card,
.low-power .restart-toast,
.low-power .toast,
.low-power .primary-button { box-shadow: none !important; }
.low-power .status-dot,
.low-power .tiny-dot,
.low-power .live-dot,
.low-power .activity-orb i,
.low-power .watch-dot { box-shadow: none !important; }
.low-power .nav-item:hover,
.low-power .speed-nudge:hover,
.low-power .primary-button:hover,
.low-power .secondary-button:hover,
.low-power .quiet-button:hover { transform: none !important; filter: none !important; }
.low-power .activity-orb::before,
.low-power .activity-orb::after { animation-duration: 2.8s; }
.low-power .progress-track.indeterminate i { animation-duration: 2.4s; }

/* v4.12: explicit low-end UI override; auto remains the default. */
.performance-mode-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding-top:14px;border-top:1px solid rgba(116,232,239,.08)}
.performance-mode-row b{font-size:13px}.performance-mode-row p{margin:4px 0 0;font-size:12px;color:var(--muted);line-height:1.45}
.compact-segmented{flex:0 0 auto}.compact-segmented button{min-width:72px}
@media(max-width:720px){.performance-mode-row{align-items:flex-start;flex-direction:column}.compact-segmented{width:100%}.compact-segmented button{flex:1;min-width:0}}


/* v4.16.24: WebView2 scroll stability. Live telemetry must not rebuild large DOM
   subtrees while the compositor is moving them. During active scrolling we also
   temporarily drop expensive decorative paint; everything is restored after 180 ms. */
.blocking-overlay, .startup-driver-list, .log-list, .setup-detail { overscroll-behavior: contain; scrollbar-gutter: stable; }
.ui-scrolling body::before { visibility: hidden; }
.ui-scrolling .surface,
.ui-scrolling .restart-toast,
.ui-scrolling .toast { box-shadow: none !important; }
.ui-scrolling .surface-line { visibility: hidden; }
.ui-scrolling .activity-orb::before,
.ui-scrolling .activity-orb::after,
.ui-scrolling .progress-track.indeterminate i,
.ui-scrolling .driver-status-spinner { animation-play-state: paused !important; }
.ui-scrolling .nav-item,
.ui-scrolling .control-card,
.ui-scrolling .metric,
.ui-scrolling .driver-summary,
.ui-scrolling .startup-driver-card,
.ui-scrolling button { transition: none !important; }

.reset-config-content { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.reset-config-content h4 { margin:0 0 5px; color:#d8e6e9; font-size:13px; }
.reset-config-content p { margin:0; max-width:680px; color:var(--muted); font-size:12px; line-height:1.5; }
.reset-config-button { flex:0 0 auto; border-color:rgba(241,138,138,.16); color:#d7b0b0; }
.reset-config-button:hover { border-color:rgba(241,138,138,.30); color:#f0c3c3; }
.config-resetting .panel[data-panel="settings"], .config-resetting .panel[data-panel="system"] { pointer-events:none; }
@media(max-width:720px){ .reset-config-content{align-items:stretch;flex-direction:column}.reset-config-button{width:100%} }
