:root {
	color-scheme: dark;
	--bg: #090b0e;
	--panel: #22252a;
	--panel-alt: #2a2e34;
	--accent: #168cff;
	--accent-2: #64b5ff;
	--warning: #e6ad2f;
	--danger: #d85b61;
	--text: #f1f3f5;
	--muted: #9ba3ad;
}
* { box-sizing: border-box; }
html, body {
	margin: 0;
	min-height: 100%;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	zoom: 1;
	background-color: var(--bg);
	background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
	background-size: 32px 32px;
	font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', sans-serif;
	color: var(--text);
}
html { scrollbar-gutter: stable; }
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: transparent;
}
#app {
	flex: 1 0 auto;
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}
.page { max-width: 980px; margin: 0 auto; padding: 72px 20px 120px; }
.hero { text-align: center; padding: 46px 12px 28px; }
.eyebrow {
	display: inline-block; margin-bottom: 1rem; font-size: .72rem; letter-spacing: .12em;
	text-transform: uppercase; color: rgba(191,219,254,.9);
}
h1, h2, h3 {
	margin: 0; font-weight: 700;
	color: var(--text);
}
.hero h1 {
	font-size: clamp(2.7rem, 6vw, 5rem); line-height: .95; letter-spacing: -.06em;
}
.hero p, .description__content p, .faq__answer, .faq__answer ul { line-height: 1.7; }
.hero p { max-width: 720px; margin: 1rem auto 0; font-size: 1.05rem; }
.demo {
	width: min(92vw, 540px); margin: 0 auto; padding: 1.5rem; border-radius: 0;
	background: var(--panel); border: 1px solid #3b4048; border-top: 3px solid var(--accent);
	box-shadow: 8px 8px 0 rgba(0,0,0,.24);
}
.demo__header, .demo__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.demo__header { margin-bottom: 1rem; }
.demo__title { font-size: clamp(1.3rem, 2vw, 2rem); letter-spacing: .04em; }
.demo__badge {
	padding: .35rem .7rem; border-radius: 0; border: 1px solid #49627b;
	background: rgba(22,140,255,.12); color: var(--text); font-size: .75rem;
	font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.meter {
	position: relative; height: 28px; border-radius: 0; overflow: hidden;
	margin-bottom: .85rem; background: #111316; border: 1px solid #454b54;
}
.meter__fill {
	position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 0;
	background: var(--accent);
	transition: width .08s linear;
}
.meter__ticks {
	position: absolute; inset: 0; pointer-events: none;
	background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), rgba(255,255,255,.06) calc(10% - 1px), rgba(255,255,255,.06) 10%);
}
.demo__level { font-size: 1.8rem; font-weight: 800; letter-spacing: .04em; }
.demo__status {
	margin-top: .75rem; color: var(--muted); font-size: .92rem; letter-spacing: .04em;
	text-transform: uppercase;
}
.demo__button {
	appearance: none; border: 1px solid #49627b; border-radius: 0;
	padding: .8rem 1.2rem; background: rgba(22,140,255,.12); color: var(--text);
	font-weight: 700; cursor: pointer; transition: background .18s ease;
}
.demo__button:hover { background: rgba(22,140,255,.22); border-color: var(--accent); }
.demo__error {
	display: none; margin-top: .8rem; padding: .85rem 1rem; border-radius: 0;
	color: #fecaca; background: rgba(127,29,29,.25); border: 1px solid rgba(248,113,113,.45);
}
.demo__error.is-visible { display: block; }
.description { max-width: 760px; margin: 72px auto 0; padding: 32px 22px 10px; }
.description__content { display: grid; gap: 1rem; }
.description__content h2 { font-size: clamp(1.4rem, 2vw, 2.1rem); }
.faq {
	margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12);
	color: var(--muted);
}
.faq h3 { margin-bottom: .85rem; font-size: 1.15rem; }
.faq__item { margin-top: 1.2rem; }
.faq__question { margin: 0 0 .45rem; font-weight: 700; color: var(--text); }
.faq__answer { margin: 0; }
.faq__answer ul { margin: 0; padding-left: 1.1rem; }
.description__meta { margin-top: .8rem; font-size: .9rem; color: rgba(191,219,254,.78); }
.footer {
	flex-shrink: 0;
	padding: 24px 20px 40px;
	text-align: center;
	color: rgba(203, 226, 255, 0.8);
	font-size: 0.9rem;
}
.footer a {
	color: var(--text);
	text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
.footer__separator { margin: 0 .55rem; color: rgba(203, 226, 255, 0.45); }

/* Application interface */
:root {
  --bg: #07111f;
  --panel: #0f1b2a;
  --panel-alt: #14253a;
  --line: rgba(255,255,255,.1);
  --muted: #a7bfd9;
  --text: #edf5ff;
  --placeholder: rgba(126, 146, 172, 0.28);
  --source: linear-gradient(135deg, #7fd7ff, #7de1c6);
  --meter: linear-gradient(135deg, #9db8ff, #7dd0ff);
  --border-angle: 0deg;
}

@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px 12px;
  background: rgba(7, 17, 31, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-chrome {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  background: rgba(7, 17, 31, 0.22);
  -webkit-backdrop-filter: blur(14px) brightness(0.86);
  backdrop-filter: blur(14px) brightness(0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.topbar__title {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: rgba(237, 245, 255, 0.9);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__logo {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.topbar__link {
  color: rgba(237, 245, 255, 0.8);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  zoom: 1;
  background: radial-gradient(circle at top, #122845 0%, var(--bg) 45%, #040b14 100%);
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
}

#app {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.dashboard {
  width: min(94vw, 1080px);
  max-width: 100%;
  overflow-x: clip;
  margin: 48px auto;
  padding: 24px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.permission-banner {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 201, 92, 0.15), rgba(255, 178, 92, 0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  color: #fff2c8;
}

.permission-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #ffd166;
}

.permission-banner__icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.permission-banner__text {
  font-size: 0.85rem;
  line-height: 1.5;
}

.permission-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.permission-banner__button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}

.row--focus-target {
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.9), 0 0 20px rgba(255, 209, 102, 0.2);
}

.section {
  min-width: 0;
  max-width: 100%;
  + .section { margin-top: 28px; }
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.analysis-section__subtitle {
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--muted);
}

.spectrum-panel {
  position: relative;
  z-index: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #090A0B;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  --channel-a: #7fd7ff;
  --channel-b: #7de1c6;
}

.spectrum-panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--border-angle), var(--channel-a) 0%, transparent 25%, var(--channel-b) 50%, transparent 75%, var(--channel-a) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: analysis-border-spin 3s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.spectrum-panel.is-loading::before {
  opacity: 1;
}

@keyframes analysis-border-spin {
  to { --border-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .spectrum-panel::before { animation: none; }
}

.spectrum-panel__controls {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.spectrum-panel__meta {
  margin-left: auto;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.spectrum-panel__meta span { margin-left: 8px; color: #7de1c6; }

.spectrum-panel__plot-select {
  width: min(100%, 220px);
}

.two-channel-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.two-channel-toolbar__snapshot {
  width: auto;
  min-width: 116px;
}

.analysis-workspace {
  position: relative;
}

.spectrum-panel__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.spectrum-panel__controls > :first-child { min-width: 0; }
.spectrum-panel__actions .spectrum-panel__meta { margin-left: 0; }
.spectrum-panel__expand { display: grid; width: 34px; height: 34px; flex: 0 0 auto; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--muted); font: inherit; font-size: 1rem; cursor: pointer; }
.spectrum-panel__expand:hover { border-color: rgba(127,215,255,0.4); background: rgba(127,215,255,0.09); color: var(--text); }

body.is-frequency-response-fullscreen { overflow: hidden; }
.analysis-workspace.is-frequency-response-fullscreen {
  position: fixed;
  z-index: 100;
  top: var(--app-chrome-height, 96px);
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.two-channel-fullscreen__header { display: flex; grid-column: 1 / -1; grid-row: 1; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; padding: 0 0 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.two-channel-fullscreen__title { color: var(--text); font-size: 1rem; font-weight: 700; }
.two-channel-fullscreen__meta { margin-top: 4px; color: var(--muted); font-size: 0.76rem; }
.two-channel-fullscreen__back { min-height: 38px; padding: 0 16px; border: 1px solid rgba(127,215,255,0.24); border-radius: 6px; background: rgba(127,215,255,0.08); color: var(--text); font: inherit; font-size: 0.78rem; cursor: pointer; }
.two-channel-fullscreen__back:hover { border-color: rgba(127,215,255,0.45); background: rgba(127,215,255,0.14); }
.analysis-workspace.is-frequency-response-fullscreen > .metering-view { grid-column: 1; grid-row: 2; height: 100%; min-height: 0; }
.analysis-workspace.is-frequency-response-fullscreen > .metering-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel { display: flex; min-height: 0; height: 100%; flex-direction: column; padding: 12px; overflow: hidden; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel__controls { align-items: center; margin-bottom: 8px; padding-right: 42px; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel.is-fullscreen-active .spectrum-panel__expand { position: absolute; z-index: 2; top: 10px; right: 10px; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel .row__meta,
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel__meta,
.analysis-workspace.is-frequency-response-fullscreen .two-channel-toolbar { display: none; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel__canvas { height: auto; min-height: 0; flex: 1 1 auto; }
.analysis-workspace.is-frequency-response-fullscreen .spectrum-panel > .field { flex: 0 0 auto; margin-top: 6px; }
.analysis-workspace.is-frequency-response-fullscreen > .snapshot-panel { position: static; grid-column: 2; grid-row: 2; width: auto; height: 100%; min-height: 0; padding: 16px 0 16px 16px; border-left: 1px solid rgba(255,255,255,0.1); background: transparent; backdrop-filter: none; transform: none; }
.analysis-workspace.is-frequency-response-fullscreen > .snapshot-panel-toggle,
.analysis-workspace.is-frequency-response-fullscreen > .snapshot-panel .snapshot-panel__close { display: none; }

.snapshot-panel {
  position: fixed;
  z-index: 30;
  top: var(--app-chrome-height, 96px);
  right: 0;
  bottom: 0;
  width: min(420px, calc(100vw - 24px));
  padding: 20px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: rgba(15, 27, 42, 0.9);
  backdrop-filter: blur(14px);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.snapshot-panel.is-expanded {
  transform: translateX(0);
}

.snapshot-panel-toggle {
  position: fixed;
  z-index: 31;
  top: calc(var(--app-chrome-height, 96px) + 16px);
  right: 0;
  display: grid;
  width: 42px;
  min-height: 132px;
  padding: 5px 5px 10px;
  justify-items: center;
  align-items: start;
  gap: 8px;
  border: 1px solid rgba(127, 215, 255, 0.28);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(20, 37, 58, 0.94);
  box-shadow: -8px 6px 24px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: right 180ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.snapshot-panel-toggle:hover { border-color: rgba(127,215,255,0.5); background: rgba(27, 49, 75, 0.98); box-shadow: -10px 8px 28px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255,255,255,0.07); }
.snapshot-panel-toggle:focus-visible { outline: 2px solid rgba(127,215,255,0.75); outline-offset: 3px; }
.snapshot-panel-toggle__icon { position: relative; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(125,225,198,0.3); border-radius: 6px; background: rgba(125,225,198,0.09); }
.snapshot-panel-toggle__icon::before { width: 7px; height: 7px; border-bottom: 2px solid #7de1c6; border-left: 2px solid #7de1c6; content: ''; transform: translateX(2px) rotate(45deg); transition: transform 180ms ease; }
.snapshot-panel-toggle__label { align-self: center; color: var(--muted); font-size: 0.72rem; font-weight: 650; line-height: 1; writing-mode: vertical-rl; }

.snapshot-panel-toggle.is-expanded {
  right: min(420px, calc(100vw - 24px));
  border-color: rgba(125,225,198,0.34);
}

.snapshot-panel-toggle.is-expanded .snapshot-panel-toggle__icon::before { transform: translateX(-2px) rotate(225deg); }

.snapshot-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.snapshot-panel__title { font-size: 1rem; font-weight: 700; }
.snapshot-panel__empty { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.snapshot-panel__close { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
.snapshot-panel__close:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: var(--text); }
.snapshot-panel__import { display: flex; justify-content: flex-end; padding-top: 16px; }
.snapshot-panel__live { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.snapshot-panel__live-toggle { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 0.78rem; cursor: pointer; }
.snapshot-panel__live-toggle input { width: 18px; height: 18px; margin: 0; accent-color: #7de1c6; }
.snapshot-panel__save { min-height: 38px; padding: 0 12px; border: 1px solid rgba(125,225,198,0.32); border-radius: 6px; background: rgba(125,225,198,0.1); color: var(--text); font: inherit; font-size: 0.76rem; font-weight: 600; cursor: pointer; }
.snapshot-panel__save:hover { border-color: rgba(125,225,198,0.52); background: rgba(125,225,198,0.16); }
.snapshot-group__heading { padding: 0 4px 10px; color: var(--text); font-size: 0.82rem; font-weight: 700; }
.snapshot-panel__upload { display: flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid rgba(127,215,255,0.24); border-radius: 6px; background: rgba(127,215,255,0.08); color: var(--text); font-size: 0.76rem; font-weight: 600; cursor: pointer; }
.snapshot-panel__upload:hover { border-color: rgba(127,215,255,0.42); background: rgba(127,215,255,0.13); }
.snapshot-panel__upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.snapshot-panel__empty { padding: 18px 0 4px; }
.snapshot-group { padding-top: 18px; }
.snapshot-group + .snapshot-group { margin-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.snapshot-group__title { display: flex; align-items: center; gap: 9px; overflow: hidden; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.snapshot-group__title::before { width: 3px; height: 15px; border-radius: 2px; background: #7de1c6; content: ''; }
.snapshot-list-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 0 4px 9px; border-bottom: 1px solid rgba(255,255,255,0.16); color: var(--muted); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.snapshot-list-header span:last-child { max-width: 74px; text-align: right; line-height: 1.25; }
.snapshot-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto minmax(8px, 1fr) auto; align-items: center; gap: 8px; margin: 0; padding: 10px 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,0.1); border-radius: 0; background: transparent; transition: background 140ms ease; }
.snapshot-item { position: relative; z-index: 0; --channel-a: #7fd7ff; --channel-b: #7de1c6; }
.snapshot-item::before { position: absolute; z-index: -1; inset: 0; padding: 1px; border-radius: 6px; background: conic-gradient(from var(--border-angle), var(--channel-a) 0%, transparent 25%, var(--channel-b) 50%, transparent 75%, var(--channel-a) 100%); content: ''; opacity: 0; pointer-events: none; transition: opacity 180ms ease; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: analysis-border-spin 3s linear infinite; }
.snapshot-item.is-loading::before { opacity: 1; }
.snapshot-item:hover { background: rgba(255,255,255,0.035); }
.snapshot-item:has(.snapshot-item__visible:checked) { background: rgba(125,225,198,0.055); }
.snapshot-item__name { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.78rem; text-overflow: ellipsis; transition: border-color 140ms ease, background 140ms ease; }
.snapshot-item__name:hover { background: rgba(255,255,255,0.04); }
.snapshot-item__name:focus { border-color: rgba(127,215,255,0.55); background: var(--panel); }
.snapshot-item__color { width: 28px; height: 28px; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.22); border-radius: 50%; background: transparent; cursor: pointer; }
.snapshot-item__color::-webkit-color-swatch-wrapper { padding: 2px; }
.snapshot-item__color::-webkit-color-swatch { border: 0; border-radius: 50%; }
.snapshot-item__color::-moz-color-swatch { border: 0; border-radius: 50%; }
.snapshot-item__settings-toggle { min-height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 0.68rem; cursor: pointer; }
.snapshot-item__settings-toggle:hover, .snapshot-item__settings-toggle[aria-expanded='true'] { border-color: rgba(127,215,255,0.24); background: rgba(127,215,255,0.08); color: var(--text); }
.snapshot-item__settings { display: none; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; padding: 10px 4px 4px; border-top: 1px solid rgba(255,255,255,0.08); }
.snapshot-item__settings.is-expanded { display: grid; }
.snapshot-item__settings .field { min-width: 0; }
.snapshot-item__settings input[type='range'] { width: 100%; }
.snapshot-item__polarity { display: flex; grid-column: 1 / -1; align-items: center; gap: 9px; color: var(--text); font-size: 0.76rem; cursor: pointer; }
.snapshot-item__polarity input { width: 18px; height: 18px; margin: 0; accent-color: #7de1c6; }
.snapshot-item__spacer { width: 1px; height: 26px; justify-self: end; background: rgba(255,255,255,0.12); }
.snapshot-item__visible { width: 20px; height: 20px; margin: 0; accent-color: #7de1c6; cursor: pointer; }
.snapshot-item__download, .snapshot-item__delete { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer; }
.snapshot-item__download:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: var(--text); }
.snapshot-item__delete:hover { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.1); color: #fca5a5; }

@media (min-width: 2001px) {
  .snapshot-panel { background: transparent; backdrop-filter: none; transform: translateX(0); }
  .snapshot-panel-toggle, .snapshot-panel__close { display: none; }
}

.spectrum-panel__canvas {
  display: block;
  width: 100%;
  height: 370px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
}

.spectrum-panel__canvas--spectrogram {
  height: 320px;
  image-rendering: pixelated;
}

.spectrogram-axis {
  position: relative;
  height: 16px;
  margin: 5px 12px 0 38px;
  color: var(--muted);
  font-size: 0.68rem;
}

.spectrogram-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.spectrogram-axis span:first-child { transform: none; }
.spectrogram-axis span:last-child { transform: translateX(-100%); }

.spectrum-panel__empty {
  position: absolute;
  inset: 64px 12px 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  background: rgba(7, 17, 31, 0.55);
}

.group-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.group-toggle input {
  accent-color: #7fd7ff;
  cursor: pointer;
}

.analysis-source-field {
  min-width: min(100%, 260px);
}

.analysis-source-options {
  display: grid;
  gap: 4px;
}

.analysis-source-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  background: rgba(255,255,255,0.035);
  color: var(--text);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.analysis-source-option:has(input:checked) {
  border-color: rgba(127,215,255,0.42);
  background: rgba(127,215,255,0.1);
}

.analysis-source-option input {
  accent-color: #7fd7ff;
  cursor: pointer;
}

.analysis-source-option__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metering-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  align-items: end;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.metering-view--meters > .metering-group {
  grid-column: 1 / -1;
}

.metering-group__title {
  grid-column: 1 / -1;
  margin-bottom: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.advanced-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(68, 88, 108, 0.18);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: transparent;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.row:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.row__handle {
  position: absolute;
  left: -2px;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: rgba(237, 245, 255, 0.35);
  font-size: 0.9rem;
  line-height: 1;
  cursor: grab;
  opacity: 0;
  transform: translate(-100%, -50%);
  transition: opacity 150ms ease, color 150ms ease;
  user-select: none;
  pointer-events: auto;
}

.row:hover .row__handle,
.row:focus-within .row__handle {
  opacity: 1;
  color: rgba(237, 245, 255, 0.7);
}

.row__handle:active {
  cursor: grabbing;
}

.row.is-dragging {
  opacity: 0.6;
}

.row.is-drop-target {
  outline: 1px solid rgba(125, 225, 198, 0.6);
  box-shadow: 0 0 0 1px rgba(125, 225, 198, 0.2);
}

.row--meter.expanded {
  align-items: stretch;
}

.row--source.expanded {
  align-items: stretch;
}

.row + .row {
  margin-top: 2px;
}

.row--source,
.row--meter,
.row--analysis {
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.row--meter-display {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(127, 215, 255, 0.2);
  cursor: default;
}

.row--source.expanded,
.row--meter.expanded,
.row--analysis.expanded {
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.row--analysis { grid-template-columns: minmax(0, 1fr) 24px; }

.row--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255,255,255,0.7);
  box-shadow: none;
  cursor: pointer;
}

.row--placeholder:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.96);
}

.row--placeholder.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.plus {
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
}

.row__icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex-shrink: 0;
}

.row__icon--source {
  background: var(--source);
  box-shadow: 0 0 18px rgba(125, 215, 255, 0.7);
}

.row__icon--meter {
  background: var(--meter);
  box-shadow: 0 0 18px rgba(157, 184, 255, 0.6);
}

.analysis-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: 0 0 12px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 15, 0.7);
  backdrop-filter: blur(5px);
}

.analysis-dialog {
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: #102035;
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

.analysis-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.analysis-dialog__header h2 { margin: 0; font-size: 1rem; }

.analysis-dialog__groups {
  display: grid;
  gap: 20px;
}

.analysis-dialog__group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-dialog__subtitle {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.analysis-dialog__note {
  margin: -2px 0 8px;
  color: #ffd166;
  font-size: 0.72rem;
  line-height: 1.4;
}

.analysis-dialog__choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.analysis-dialog__choice:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.analysis-dialog__choice:disabled { cursor: not-allowed; opacity: 0.45; }

.analysis-dialog__choice span { color: var(--muted); font-size: 0.75rem; }

.calibration-dialog {
  width: min(100%, 620px);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: #102035;
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

.calibration-dialog__source {
  width: 100%;
  margin-bottom: 16px;
}

.calibration-dialog__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calibration-dialog__choice {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(125, 225, 198, 0.28);
  border-radius: 7px;
  background: rgba(125, 225, 198, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calibration-dialog__choice.is-selected {
  border-color: #7fd7ff;
  background: rgba(127, 215, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(127, 215, 255, 0.22);
}

.calibration-dialog__choice span,
.calibration-dialog__hint {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.calibration-dialog__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.calibration-dialog__hint {
  margin: 14px 0;
}

.calibration-dialog__submit {
  width: 100%;
}

.calibration-dialog__manual-submit {
  width: 100%;
  margin-top: 8px;
}

.calibration-dialog__manual {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.calibration-dialog__manual .field {
  width: 100%;
}

.row__details {
  min-width: 0;
}

.row__details--meter {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.row__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}

.row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.row__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.row__fields {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  cursor: default;
}

.row__fields.is-visible {
  display: flex;
}

.row--source .row__details,
.row--meter .row__details {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field--color {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.field input[type='text'],
.field select,
.field input[type='color'],
.field input[type='number'] {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23edf5ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.field select option {
  background: var(--panel);
  color: var(--text);
  padding: 8px;
}

.field input[type='text'] {
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
}

.field input[type='color'] {
  width: 48px;
  min-width: 48px;
  height: 38px;
  padding: 4px;
  align-self: flex-start;
}

.field input[type='number'] {
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
}

.field select:disabled,
.field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle {
  border: 0;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  cursor: pointer;
}

.source__calibration-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.source__calibration-info {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  flex-wrap: wrap;
  align-items: flex-end;
}

  .field-text {
  font-size: 0.85rem;
  color: var(--text);
}

.row--warning {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(239, 68, 68, 0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer;
}

.row--warning:hover {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.26), rgba(239, 68, 68, 0.14));
}

.row__icon--warning {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #fca5a5;
}

.row__icon--warning svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.row__warning-text {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #ffe1e1;
}

.row--error {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(239, 68, 68, 0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.row__error-text {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #fca5a5;
  margin-bottom: 6px;
}

.source__calibration {
  width: 120px;
  min-width: 120px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.72rem;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.source__calibration-field {
  min-width: 120px;
}

.source__calibration-field .source__calibration {
  width: 100%;
}

.source__calibration.is-not-calibrated {
  color: #ffd7d7;
  background: rgba(248, 113, 113, 0.12);
}

.source__calibration.is-calibrated {
  color: #d8ffe8;
  background: rgba(34, 197, 94, 0.12);
}

.source__calibration-status {
  width: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.source__calibration-status--error {
  color: #fca5a5;
}

.row__action {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  justify-self: end;
  align-self: center;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row--meter.expanded .row__action {
  align-self: start;
  margin-top: 2px;
}

.row--source .field--color {
  display: none;
}

.row--source.expanded .field--color {
  display: flex;
}

.row--source.expanded .row__action {
  align-self: start;
  margin-top: 2px;
}

.log {
  min-height: 120px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(68, 88, 108, 0.18);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

@media (max-width: 600px) {
  .dashboard {
    width: 100%;
    padding: 16px 12px 24px;
  }

  .row {
    grid-template-columns: 18px minmax(0, 1fr) 24px;
    padding: 10px;
  }

  .row__header-row {
    flex-wrap: wrap;
  }

  .row__fields.is-visible {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .field,
  .field input[type='text'],
  .field select,
  .field input[type='number'] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .field input[type='text'],
  .field select,
  .field input[type='number'] {
    font-size: 16px;
  }

  .source__calibration-row,
  .source__calibration-info {
    width: 100%;
  }

  .row--source .field--color {
    display: none;
  }

  .row--source.expanded .field--color {
    display: flex;
  }

  .field--color {
    width: 100%;
  }

  .source__calibration-field,
  .source__calibration-field .source__calibration {
    width: 100%;
    min-width: 0;
  }

  .snapshot-panel { width: min(360px, calc(100vw - 32px)); padding: 18px; }
  .snapshot-panel-toggle { top: calc(var(--app-chrome-height, 72px) + 10px); }
  .snapshot-panel-toggle.is-expanded { right: min(360px, calc(100vw - 32px)); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.fade-in {
  animation: fadeIn 75ms ease-out;
}

.fade-out {
  animation: fadeOut 75ms ease-out forwards;
}

.metering-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.metering-export {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.metering-export__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.metering-export__identity > div {
  min-width: 0;
}

.metering-export__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.metering-export__status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

.metering-export__status.is-recording {
  color: #ffb36b;
}

.metering-export__status.is-recording span {
  background: #ff6b6b;
  box-shadow: 0 0 8px rgba(255,107,107,0.8);
}

.metering-export__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.metering-view--meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.metering-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  padding: 32px 20px;
  border: 1px solid #3dd9a4;
  border-radius: 14px;
  background: rgba(61, 217, 164, 0.08);
  text-align: center;
}

.metering-empty__title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.metering-empty__message {
  color: var(--muted);
  font-size: 0.82rem;
}

.metering-empty__button {
  margin-top: 8px;
}

.metering-view--meters > .row--meter-display:only-child,
.metering-group > .row--meter-display:only-child {
  grid-column: 1 / -1;
}

.metering-view--meters > .row + .row,
.metering-group > .row + .row {
  margin-top: 0;
}

.row--meter-display {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.row--meter-display .row__details--meter {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.row--special-meter {
  min-height: 290px;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.special-meter__face {
  position: relative;
  width: min(540px, 100%);
  max-width: 100%;
  overflow: hidden;
  height: 200px;
  margin-top: 8px;
}

.special-meter__dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #202122;
  padding: 0;
  margin: 0 -1px;
}

.special-meter__display-dot { position: absolute; }
.special-meter__slow-label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.special-meter__dot.is-on.is-green { background: #84cc16; box-shadow: 0 0 16px rgba(119, 185, 27, 0.4); }
.special-meter__dot.is-on.is-red { background: #ef4444; box-shadow: 0 0 16px rgba(185, 53, 27, 0.4); }
.special-meter__dot.is-on.is-amber,
.special-meter__dot--fast.is-on { background: #f59e0b; box-shadow: 0 0 16px rgba(185, 127, 27, 0.4); }

.special-meter__fast-section { width: min(552px, 100%); max-width: 100%; overflow: hidden; }

@media (max-width: 600px) {
  .metering-view--meters {
    grid-template-columns: minmax(0, 1fr);
  }
}
.special-meter__fast-label {
  margin-bottom: 4px;
  color: #f59e0b;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.special-meter__bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
}

.special-meter__bar .special-meter__dot { margin: 0; }

.special-meter__scale {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 108%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.63rem;
}

.special-meter__scale span:last-child { text-align: left; }

.meter-reading {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.meter-reading__value {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.meter-reading__unit {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meter-level {
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-level__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 150ms linear;
}

.meter-level__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.source-level {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 80ms linear, background-color 80ms linear;
  cursor: default;
}

.source-level.is-hidden {
  display: none;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(20, 37, 58, 0.12);
}

.status-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(94vw, 1080px);
  margin: 0 auto;
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.status-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-bar__snapshot {
  appearance: none;
  border: 1px solid rgba(127, 215, 255, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(127, 215, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.status-bar__snapshot:hover { background: rgba(127, 215, 255, 0.15); }
.status-bar__snapshot:disabled { cursor: wait; opacity: 0.6; }

.status-bar__badge--running {
  background: rgba(34, 197, 94, 0.15);
  color: #7fffb0;
}

.status-bar__badge--running::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

.status-bar__badge--stopped {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
}

.status-bar__badge--stopped::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(7, 17, 31, 0.2);
}

.nav-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(94vw, 1080px);
  margin: 0 auto;
  padding: 10px 0;
}

.nav-bar__button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 150ms ease;
}

.nav-bar__button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* Graphite instrument theme */
:root {
  color-scheme: dark;
  --bg: #090b0e;
  --panel: #22252a;
  --panel-alt: #2a2e34;
  --line: #3b4048;
  --muted: #9ba3ad;
  --text: #f1f3f5;
  --placeholder: #606873;
  --accent: #168cff;
  --accent-strong: #4ba7ff;
  --accent-soft: rgba(22, 140, 255, 0.12);
  --block-shadow: 6px 6px 0 rgba(0, 0, 0, 0.48);
  --source: #168cff;
  --meter: #64b5ff;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', sans-serif;
}

button,
input,
select { font-family: inherit; }

:where(button, a, input, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-chrome {
  background: transparent;
  border-bottom: 0;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.topbar {
  background: #202328;
  border-bottom-color: var(--line);
  backdrop-filter: none;
}

.topbar__title { color: var(--text); font-weight: 700; }
.topbar__link { color: var(--muted); }
.topbar__link:hover { color: var(--accent-strong); }
.topbar__logo { border-radius: 0; }

.status-bar,
.nav-bar { background: transparent; border-bottom: 0; }

.section__title {
  color: #c9ced4;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section__header {
  min-height: 34px;
  margin-bottom: 0;
  padding: 0 10px;
  border-bottom: 2px solid var(--accent);
  background: #202328;
}

.permission-banner {
  border: 1px solid #725a23;
  border-left: 3px solid #e6ad2f;
  border-radius: 0;
  background: #29271f;
  box-shadow: var(--block-shadow);
  color: #f2e4bd;
}

.permission-banner__button,
.two-channel-fullscreen__back,
.snapshot-panel__save,
.snapshot-panel__upload,
.status-bar__snapshot {
  border-color: #49627b;
  border-radius: 0;
  background: var(--accent-soft);
}

.permission-banner__button:hover,
.two-channel-fullscreen__back:hover,
.snapshot-panel__save:hover,
.snapshot-panel__upload:hover,
.status-bar__snapshot:hover {
  border-color: var(--accent);
  background: rgba(22, 140, 255, 0.2);
}

.row {
  border-radius: 0;
  border-bottom-color: var(--line);
  background: #202328;
  box-shadow: var(--block-shadow);
  transition: background 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}

.row + .row { margin-top: 0; }
.row:hover { background: #2a2e34; box-shadow: var(--block-shadow), inset 0 0 var(--accent); }

.row--source,
.row--meter,
.row--analysis { background: #202328; }

.row--source.expanded,
.row--meter.expanded,
.row--analysis.expanded {
  background: #292d32;
  box-shadow: var(--block-shadow), inset 3px 0 var(--accent);
}

.row--placeholder { background: #1c1f23; color: var(--muted); }
.row--placeholder:hover { background: #262a2f; color: var(--accent-strong); box-shadow: var(--block-shadow), inset 3px 0 var(--accent); }

.row--meter-display {
  border-color: var(--line);
  border-left: 3px solid var(--accent);
  background: #22252a;
}

.row__icon,
.analysis-color-dot { border-radius: 0; box-shadow: none !important; }
.row__handle { color: var(--muted); }
.row__meta { color: var(--muted); }
.row__fields { border-top-color: var(--line); }
.row__action { color: var(--muted); }
.row__action:hover { color: var(--accent-strong); }

.field input[type='text'],
.field select,
.field input[type='color'],
.field input[type='number'] {
  min-height: 36px;
  border: 1px solid #454b54;
  border-radius: 0;
  background-color: #090b0e;
}

.field input:hover,
.field select:hover { border-color: #65707c; }

.field input:focus,
.field select:focus { border-color: var(--accent); outline: 1px solid var(--accent); }

.field select option { background: #202328; }
input[type='checkbox'], input[type='range'] { accent-color: var(--accent); }

.toggle,
.source__calibration,
.demo__button,
.nav-bar__button {
  border: 1px solid #454b54;
  border-radius: 0;
  background: #282c31;
  color: var(--text);
}

.toggle:hover,
.source__calibration:hover:not(:disabled),
.demo__button:hover,
.nav-bar__button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-bar__button { border-color: transparent; background: transparent; }

.advanced-settings,
.log,
.metering-export,
.metering-empty {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #22252a;
  box-shadow: var(--block-shadow);
}

.spectrum-panel {
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 0;
  background: #15171a;
  box-shadow: var(--block-shadow);
}

.spectrum-panel::before,
.snapshot-item::before { border-radius: 0; }
.spectrum-panel__meta span { color: var(--accent-strong); }
.spectrum-panel__canvas { border-color: var(--line); border-radius: 0; }
.spectrum-panel__empty { background: rgba(23, 25, 28, 0.88); }

.spectrum-panel__expand,
.snapshot-panel__close,
.snapshot-item__settings-toggle,
.snapshot-item__download,
.snapshot-item__delete {
  border-radius: 0;
  background: #202328;
}

.spectrum-panel__expand:hover,
.snapshot-item__settings-toggle:hover,
.snapshot-item__settings-toggle[aria-expanded='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.analysis-source-option {
  border-radius: 0;
  border-color: var(--line);
  background: #1b1e22;
}

.analysis-source-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.analysis-dialog,
.calibration-dialog {
  border-color: #555c66;
  border-radius: 0;
  background: #202328;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.35);
}

.dialog-backdrop { background: rgba(10, 11, 13, 0.82); backdrop-filter: none; }

.analysis-dialog__choice {
  border-radius: 0;
  border-color: var(--line);
  background: #1b1e22;
}

.analysis-dialog__choice:hover:not(:disabled) {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 var(--accent);
}

.calibration-dialog__choice {
  border-color: #454b54;
  border-radius: 0;
  background: #1b1e22;
}

.calibration-dialog__choice:hover,
.calibration-dialog__choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 var(--accent);
}

.snapshot-panel {
  border-left: 1px solid #555c66;
  background: #202328;
  backdrop-filter: none;
}

.snapshot-panel-toggle {
  border-color: #49627b;
  border-radius: 0;
  background: #22272d;
  box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.28);
  backdrop-filter: none;
}

.snapshot-panel-toggle:hover { border-color: var(--accent); background: #292f36; box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.34); }
.snapshot-panel-toggle__icon { border-radius: 0; border-color: var(--accent); background: var(--accent-soft); }
.snapshot-panel-toggle__icon::before { border-color: var(--accent-strong); }
.snapshot-item { border-radius: 0; border-bottom-color: var(--line); }
.snapshot-item:hover { background: #292d32; }
.snapshot-item:has(.snapshot-item__visible:checked) { background: var(--accent-soft); }
.snapshot-item__name { border-radius: 0; }
.snapshot-item__color { border-radius: 0; }
.snapshot-item__color::-webkit-color-swatch,
.snapshot-item__color::-moz-color-swatch { border-radius: 0; }
.snapshot-group__title::before { border-radius: 0; background: var(--accent); }

.meter-level {
  height: 10px;
  border: 1px solid #454b54;
  border-radius: 0;
  background: #111316;
}

.meter-level__fill { border-radius: 0; }
.meter-reading__value { font-family: 'Courier New', monospace; letter-spacing: 0; }

.status-bar__badge,
.status-bar__snapshot { border-radius: 0; }
.status-bar__badge--running { border-left: 2px solid #45c97a; background: rgba(69, 201, 122, 0.1); }
.status-bar__badge--stopped { border-left: 2px solid #6f7781; background: #25282d; }
.source__calibration.is-not-calibrated { border-color: #815254; background: #332426; }
.source__calibration.is-calibrated { border-color: #376b4b; background: #213128; }

.row--warning,
.row--error { border-left: 3px solid #d85b61; background: #312326; box-shadow: none; }
.row--warning:hover { background: #3a282b; }

.metering-export__status span,
.status-bar__badge::before,
.source-level,
.special-meter__dot { border-radius: 50%; }

.analysis-workspace.is-frequency-response-fullscreen { background: #090b0e; backdrop-filter: none; }
.two-channel-fullscreen__header { border-bottom-color: var(--line); }

@media (max-width: 600px) {
  .section__header { padding-inline: 8px; }
  .dashboard { padding-inline: 8px; }
}

/* Keep every section block on the same visual surface. */
.metering-export,
.metering-empty,
.advanced-settings,
.log {
  background: #22252a;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--block-shadow);
}

.spectrum-panel {
  background: #15171a;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 0;
  box-shadow: var(--block-shadow);
}

.metering-empty {
  border-color: var(--line);
}

/* Workspace mode toolbar */
.workspace-toolbar {
  width: 100%;
  background: #292b2e;
}
.workspace-toolbar__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  width: min(94vw, 1080px);
  min-height: 42px;
  margin: 0 auto;
}
.workspace-toolbar__tabs {
  display: flex;
  align-items: center;
}
.workspace-toolbar__tabs { gap: 2px; }
.workspace-toolbar__tab {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f0f1f2;
  font: inherit;
  cursor: pointer;
}
.workspace-toolbar__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  font-size: .82rem;
}
.workspace-toolbar__tab:hover { background: #1d2024; }
.workspace-toolbar__tab.is-active { box-shadow: inset 0 -2px var(--accent); }
.workspace-toolbar__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(22, 140, 255, .65);
}
@media (max-width: 600px) {
  .workspace-toolbar__inner { width: 100%; gap: 8px; padding-right: 8px; }
  .workspace-toolbar__tab { padding-inline: 9px; }
}
