@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/assets/fonts/inter-400.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/assets/fonts/inter-500.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/assets/fonts/inter-600.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/assets/fonts/inter-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #edf2f5;
  --surface-3: #e2e9ed;
  --text: #17222b;
  --muted: #60727e;
  --border: #cdd8de;
  --border-strong: #9fb1bc;
  --accent: #0079c8;
  --accent-strong: #005f9f;
  --primary: #6550a7;
  --primary-strong: #4f3c8e;
  --success: #147a59;
  --warning: #a26300;
  --danger: #c83b46;
  --speaker-1: #079bc1;
  --speaker-2: #1ca66f;
  --speaker-3: #8367c7;
  --speaker-4: #d59a18;
  --overlap: #e4514d;
  --shadow: 0 16px 42px rgba(33, 53, 64, 0.12);
  --header-height: 68px;
  --sidebar-width: 236px;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07151e;
  --surface: #0e222d;
  --surface-2: #132b37;
  --surface-3: #1a3542;
  --text: #e7f0f4;
  --muted: #9ab0bc;
  --border: #29434f;
  --border-strong: #45616d;
  --accent: #4cb7de;
  --accent-strong: #78cce9;
  --primary: #aa91df;
  --primary-strong: #c1adea;
  --success: #53c697;
  --warning: #f4c95d;
  --danger: #f17878;
  --speaker-1: #23b5d3;
  --speaker-2: #2ecb82;
  --speaker-3: #a78bfa;
  --speaker-4: #f4c95d;
  --overlap: #f0645a;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.brand-logo {
  width: 96px;
  height: 42px;
  object-fit: contain;
}

:root[data-theme="dark"] .brand-logo,
:root[data-theme="dark"] .public-footer img,
:root[data-theme="dark"] .floating-audio-head > img,
:root[data-theme="dark"] .modal-brand-logo {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.7));
}

.brand-product {
  display: grid;
  gap: 3px;
}

.brand-product strong {
  font-size: 18px;
}

.brand-product small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
}

.app-brand .brand-logo {
  width: 78px;
  height: 36px;
}

.app-brand > span {
  font-size: 16px;
}

.button,
.icon-button,
.account-button,
.language-switch button {
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  background: var(--accent);
  color: #04131b;
}

:root:not([data-theme="dark"]) .button-primary {
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button-danger {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
  background: color-mix(in srgb, var(--danger) 13%, var(--surface));
  color: var(--danger);
}

.button-danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.button-small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

.button-full {
  width: 100%;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 800;
  line-height: 1;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

[data-tooltip]::after {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  padding: 5px 8px;
  transform: translate(-50%, -3px);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.language-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.language-switch button {
  min-width: 39px;
  height: 36px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-switch button.active {
  background: var(--surface-3);
  color: var(--text);
}

.public-header,
.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: var(--header-height);
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.public-header {
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.public-nav a:hover {
  color: var(--text);
}

.public-nav a {
  position: relative;
  padding: 24px 0;
  transition: color 180ms ease;
}

.public-nav a::after {
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  content: "";
  transition: transform 220ms ease;
}

.public-nav a:hover::after,
.public-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero {
  position: relative;
  display: flex;
  min-height: min(660px, calc(100svh - 96px));
  overflow: hidden;
  align-items: center;
  background: #07151e;
  color: #e7f0f4;
}

.hero canvas,
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero canvas {
  opacity: 0.74;
}

.hero-grid {
  border-right: 1px solid rgba(76, 183, 222, 0.09);
  border-left: 1px solid rgba(76, 183, 222, 0.09);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 108px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #64c7e9;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: 88px;
  font-weight: 860;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-statement {
  display: block;
  max-width: 760px;
  margin-top: 18px;
  color: #ffffff;
  font-size: 29px;
  font-weight: 650;
  line-height: 1.18;
}

.hero-lead {
  max-width: 690px;
  margin: 18px 0 0;
  color: #c4d5de;
  font-size: 20px;
  line-height: 1.42;
}

.hero-inner > *,
.hero-live {
  animation: hero-rise 760ms both;
}

.hero-inner > :nth-child(2) { animation-delay: 70ms; }
.hero-inner > :nth-child(3) { animation-delay: 130ms; }
.hero-inner > :nth-child(4) { animation-delay: 190ms; }
.hero-inner > :nth-child(5) { animation-delay: 250ms; }
.hero-inner > :nth-child(6) { animation-delay: 310ms; }
.hero-live { animation-delay: 360ms; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}

.hero .button-quiet {
  color: #d8e6ec;
}

.hero .button-quiet:hover {
  background: rgba(255, 255, 255, 0.07);
}

.hero-proof {
  display: flex;
  gap: 42px;
  margin-top: 46px;
}

.hero-proof span {
  display: grid;
  gap: 3px;
}

.hero-proof b {
  color: #ffffff;
  font-size: 16px;
}

.hero-proof small {
  color: #9fb8c4;
}

.hero-live {
  position: absolute;
  z-index: 2;
  right: max(24px, calc((100vw - 1440px) / 2));
  bottom: 66px;
  width: min(560px, 42vw);
  padding: 16px 0;
  border-top: 1px solid rgba(120, 204, 233, 0.4);
  border-bottom: 1px solid rgba(120, 204, 233, 0.22);
  background: rgba(7, 21, 30, 0.78);
}

.hero-live-head {
  display: flex;
  justify-content: space-between;
  color: #8baab9;
  font: 12px Consolas, monospace;
}

.hero-live-head span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecb82;
}

.hero-track {
  position: relative;
  height: 38px;
  margin: 12px 0;
  background: rgba(255, 255, 255, 0.05);
}

.hero-track i {
  position: absolute;
  top: 5px;
  height: 28px;
}

.hero-track .speaker-one { left: 4%; width: 42%; background: #23b5d3; }
.hero-track .speaker-two { left: 50%; width: 39%; background: #2ecb82; }
.hero-track .speaker-overlap { left: 43%; width: 10%; background: #f0645a; }

.hero-live p {
  margin: 6px 0;
  color: #d8e5eb;
  font-size: 13px;
}

.hero-live p b {
  display: inline-block;
  width: 32px;
  color: #63c5e6;
}

.hero-live p:last-child b {
  color: #54d49e;
}

.result-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.result-band > div {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 4px;
  padding: 20px 28px;
  border-right: 1px solid var(--border);
  transition: background-color 220ms ease, box-shadow 220ms ease;
}

.result-band > div:hover {
  background: var(--surface-2);
  box-shadow: inset 0 -3px var(--accent);
}

.result-band > div:last-child {
  border-right: 0;
}

.result-band strong {
  font-size: 17px;
}

.result-band span {
  color: var(--muted);
  font-size: 13px;
}

.public-section,
.public-cta,
.public-footer {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.public-section {
  padding: 96px 0;
}

.section-marker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.section-marker span {
  color: var(--accent);
  font: 700 12px Consolas, monospace;
}

.section-marker::after {
  width: 56px;
  height: 1px;
  background: var(--border-strong);
  content: "";
}

.section-heading {
  max-width: 690px;
}

.section-heading h2,
.security-copy h2,
.public-cta h2 {
  margin: 0;
  font-size: 50px;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading > p:last-child,
.security-copy > p:last-child,
.public-cta p {
  color: var(--muted);
  font-size: 18px;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 54px;
  border: 1px solid var(--border);
  background: var(--border);
}

.value-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
  gap: 9vw;
  align-items: start;
}

.value-points {
  border-top: 1px solid var(--border);
}

.value-points article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--border);
  transition: background-color 220ms ease, padding 220ms ease;
}

.value-points article:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--surface-2);
}

.value-points article > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.value-points h3,
.value-points p {
  margin: 0;
}

.value-points h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.value-points p {
  color: var(--muted);
}

.capability-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.capability-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.15fr);
  gap: 8vw;
}

.capability-list {
  border-top: 1px solid var(--border);
}

.capability-list details {
  border-bottom: 1px solid var(--border);
  transition: background-color 220ms ease;
}

.capability-list details:hover,
.capability-list details[open] {
  background: var(--surface-2);
}

.capability-list summary {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px 12px;
  cursor: pointer;
  list-style: none;
}

.capability-list summary::-webkit-details-marker { display: none; }
.capability-list summary > span { color: var(--accent); font: 700 12px Consolas, monospace; }
.capability-list summary > strong { font-size: 19px; }
.capability-list summary::after {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  content: "+";
  font-size: 20px;
  font-weight: 400;
  transition: transform 320ms ease, border-color 180ms ease, color 180ms ease;
}

.capability-list details[open] summary::after {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}

.accordion-copy {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 280ms ease, opacity 220ms ease;
}

.accordion-copy p {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
}

.capability-list details[open] .accordion-copy {
  grid-template-rows: 1fr;
  padding: 0 52px 22px 68px;
  opacity: 1;
}

.benefit-grid article {
  min-height: 260px;
  padding: 30px;
  background: var(--surface);
}

.feature-index {
  color: var(--accent);
  font: 700 12px Consolas, monospace;
}

.benefit-grid h3 {
  margin: 72px 0 10px;
  font-size: 21px;
}

.benefit-grid p {
  margin: 0;
  color: var(--muted);
}

.workflow-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.workflow-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(480px, 1.2fr);
  gap: 80px;
}

.workflow-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  padding: 25px 0;
  border-bottom: 1px solid var(--border);
}

.workflow-list li:first-child {
  padding-top: 0;
}

.workflow-list li > span {
  color: var(--accent);
  font-size: 22px;
  font-weight: 850;
}

.workflow-list h3,
.workflow-list p {
  margin: 0;
}

.workflow-list p {
  margin-top: 5px;
  color: var(--muted);
}

.security-section,
.control-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.security-facts,
.control-facts {
  border-top: 1px solid var(--border);
}

.security-facts > div,
.control-facts > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 200ms ease, padding 200ms ease;
}

.control-facts > div:hover {
  padding-right: 10px;
  padding-left: 10px;
  background: var(--surface-2);
}

.security-facts strong,
.control-facts strong {
  color: var(--primary);
  font-size: 22px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.security-facts span,
.control-facts span {
  color: var(--muted);
}

.control-copy > p:last-child {
  color: var(--muted);
  font-size: 18px;
}

.control-copy h2 {
  margin: 0;
  font-size: 50px;
  line-height: 1.08;
}

.reveal-ready .public-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-ready .public-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 580ms ease, transform 580ms ease;
}

.public-cta {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 50px 0;
  border-top: 1px solid var(--border);
}

.public-cta > div {
  max-width: 820px;
}

.public-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.public-footer img {
  width: 96px;
  max-height: 38px;
  object-fit: contain;
}

.app-view {
  min-height: 100vh;
}

.app-header {
  padding: 0 20px;
  gap: 10px;
}

.app-header-spacer {
  flex: 1;
}

.service-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.service-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 15%, transparent);
}

.service-indicator.busy i {
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 15%, transparent);
}

.account-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 700;
}

.account-button > span:first-child {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
}

.account-button > span:last-child {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
}

.app-layout {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: var(--header-height);
  display: flex;
  height: calc(100vh - var(--header-height));
  flex-direction: column;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.app-sidebar nav {
  display: grid;
  gap: 5px;
}

.app-sidebar nav button,
.sidebar-logout {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.app-sidebar nav button > span:first-child,
.sidebar-logout > span:first-child {
  display: inline-grid;
  width: 21px;
  place-items: center;
  color: var(--accent);
  font-size: 18px;
}

.app-sidebar nav button:hover,
.app-sidebar nav button.active,
.sidebar-logout:hover {
  background: var(--surface-2);
  color: var(--text);
}

.app-sidebar nav button.active {
  box-shadow: inset 3px 0 var(--accent);
}

.sidebar-usage {
  margin-top: auto;
  padding: 16px 10px;
  border-top: 1px solid var(--border);
}

.usage-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.usage-label strong {
  color: var(--text);
}

.usage-track {
  height: 5px;
  margin: 10px 0 7px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
}

.usage-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 220ms ease;
}

.sidebar-usage small {
  color: var(--muted);
}

.sidebar-logout {
  width: 100%;
  margin-top: 3px;
}

.app-main {
  min-width: 0;
  padding: 34px clamp(20px, 3vw, 52px) 72px;
}

.app-page {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.page-heading h1,
.result-heading h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
}

.page-heading p:last-child,
.result-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quota-summary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 0 9px;
  min-width: 154px;
  padding: 10px 0 10px 20px;
  border-left: 3px solid var(--accent);
}

.quota-summary span,
.quota-summary small {
  color: var(--muted);
}

.quota-summary strong {
  grid-row: span 2;
  font-size: 38px;
  line-height: 1;
}

.source-switch {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.source-switch button {
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.source-switch button.active {
  background: var(--surface-3);
  color: var(--text);
}

.source-panel {
  width: 100%;
}

.drop-zone {
  display: grid;
  width: 100%;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.drop-zone strong {
  font-size: 20px;
}

.drop-zone > span:not(.drop-icon),
.drop-zone small {
  color: var(--muted);
}

.drop-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 7px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-size: 27px;
  font-weight: 800;
}

.recorder {
  min-height: 250px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

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

.recorder-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.recorder-status.recording i {
  background: var(--danger);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 16%, transparent);
  animation: record-pulse 1.2s infinite;
}

@keyframes record-pulse {
  50% { opacity: 0.45; }
}

.recorder-status time {
  margin-left: auto;
  font: 700 15px Consolas, monospace;
}

#recordCanvas {
  width: 100%;
  height: 92px;
  margin: 18px 0;
  background: var(--surface-2);
}

.recorder-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.file-type {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
  color: var(--primary);
  font-weight: 900;
}

.selected-file > div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.selected-file strong,
.selected-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file > div span {
  color: var(--muted);
  font-size: 12px;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 18px 0 32px;
}

.submit-row p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.recent-section,
.transcript-section {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-row h2 {
  margin: 0;
  font-size: 21px;
}

.section-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.analysis-list,
.user-list,
.admin-queue-list {
  display: grid;
  gap: 8px;
}

.admin-queue-heading {
  margin-top: 0;
}

.admin-queue-list {
  margin-bottom: 34px;
}

.admin-queue-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.admin-queue-primary {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.admin-queue-primary strong,
.admin-queue-primary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-queue-primary span {
  color: var(--muted);
  font-size: 12px;
}

.admin-queue-primary:hover strong {
  color: var(--accent);
}

.admin-queue-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.analysis-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(90px, auto)) 34px;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.analysis-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.analysis-primary {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.analysis-file-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-weight: 900;
}

.analysis-title {
  min-width: 0;
}

.analysis-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-title small,
.analysis-metric small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.analysis-metric {
  color: var(--text);
  font-size: 13px;
}

.status-badge,
.speaker-chip,
.signal-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.status-completed { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.status-queued, .status-processing, .status-pause_requested { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.status-paused { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }
.status-failed { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.history-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-field {
  display: flex;
  min-width: 250px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.search-field:focus-within {
  border-color: var(--accent);
}

.search-field input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
}

.history-toolbar .search-field {
  width: min(520px, 100%);
}

.history-more {
  display: flex;
  margin: 18px auto 0;
}

.analysis-topbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.analysis-loading {
  display: grid;
  min-height: 430px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.analysis-loading h1 {
  margin: 20px 0 5px;
  font-size: 28px;
}

.analysis-loading p {
  margin: 0;
  color: var(--muted);
}

.loader {
  width: 44px;
  height: 44px;
  border: 4px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 2400ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.queue-position {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}

.queue-position strong {
  color: var(--warning);
  font-size: 24px;
}

.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.result-heading h1 {
  overflow-wrap: anywhere;
}

.owner-badge {
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  color: var(--muted);
  font-size: 12px;
}

.sticky-player {
  position: sticky;
  z-index: 8;
  top: calc(var(--header-height) + 8px);
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(246, 248, 250, 0.96);
  backdrop-filter: blur(8px);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] .sticky-player {
  background: rgba(14, 34, 45, 0.96);
}

.sticky-player.is-seeking {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.waveform-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
  margin: 0 2px 8px;
}

.waveform-heading > strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.waveform-legend,
.speaker-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.waveform-legend {
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
  overflow: hidden;
}

.waveform-legend span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waveform-legend span strong {
  color: var(--text);
  font-size: 11px;
}

.waveform-legend span small {
  color: var(--muted);
  font: 700 9px Consolas, monospace;
}

.waveform-legend i {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--speaker-color) 72%, #ffffff);
  border-radius: 3px;
  background: var(--speaker-color);
}

.transcript-waveform-wrap {
  position: relative;
  height: 142px;
  overflow: hidden;
  border: 1px solid #26313d;
  border-radius: 5px;
  background: #0a0e13;
}

#resultWaveform {
  display: block;
  width: 100%;
  height: 112px;
  cursor: crosshair;
}

.waveform-time-ticks {
  position: absolute;
  inset: auto 7px 0;
  height: 30px;
  border-top: 1px solid #222b36;
}

.waveform-time-tick {
  position: absolute;
  top: 8px;
  color: #8390a0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

.waveform-time-tick:first-child { transform: none; }
.waveform-time-tick:last-child { transform: translateX(-100%); }

#resultAudio {
  display: none;
}

.custom-audio-player {
  display: grid;
  grid-template-columns: 38px 46px minmax(120px, 1fr) 46px auto 36px 84px minmax(0, auto);
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding-top: 8px;
}

.custom-audio-player time,
.floating-audio-controls time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.audio-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font-size: 15px;
}

.audio-icon-button:hover,
.audio-utility-button:hover,
.mini-audio-button:hover {
  border-color: var(--primary);
  background: var(--surface-2);
  color: var(--primary);
}

.audio-timeline {
  position: relative;
  height: 28px;
}

.audio-timeline::before,
.audio-buffered-bar,
.audio-played-bar {
  position: absolute;
  top: 11px;
  left: 0;
  height: 6px;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.audio-timeline::before {
  width: 100%;
  background: var(--border);
}

.audio-buffered-bar {
  width: 0;
  background: #aebdc6;
}

.audio-played-bar {
  width: 0;
  background: var(--primary);
}

.audio-timeline input[type="range"] {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  background: transparent;
}

.audio-timeline input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.audio-timeline input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(22, 33, 43, 0.28);
}

.audio-timeline input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}

.audio-timeline input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(22, 33, 43, 0.28);
}

.compact-select {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.compact-select select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.volume-range {
  width: 84px;
  accent-color: var(--accent);
}

.audio-utility-button,
.mini-audio-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.audio-load-status {
  min-width: 44px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waveform-tooltip {
  position: absolute;
  z-index: 3;
  top: 8px;
  padding: 4px 7px;
  border: 1px solid #354553;
  border-radius: 4px;
  background: #17232d;
  box-shadow: var(--shadow);
  color: #edf4f7;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  pointer-events: none;
}

.speaker-assignment-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  background: var(--surface-2);
}

.speaker-assignment-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.speaker-assignment-heading h3,
.speaker-assignment-heading p,
.inline-status {
  margin: 0;
}

.speaker-assignment-heading h3 { font-size: 15px; }
.speaker-assignment-heading p,
.inline-status { color: var(--muted); font-size: 12px; }

.speaker-assignments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.speaker-control {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.speaker-control strong {
  min-width: max-content;
  font-size: 12px;
}

.speaker-swatch {
  width: 10px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--speaker-color);
}

.speaker-control input {
  width: 180px;
  min-width: 0;
  height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.inline-status {
  min-height: 18px;
  padding-top: 6px;
}

.result-stats,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 20px 0 34px;
  border: 1px solid var(--border);
  background: var(--border);
}

.result-stats > div,
.admin-stats > div {
  display: grid;
  min-height: 88px;
  align-content: center;
  gap: 2px;
  padding: 14px 18px;
  background: var(--surface);
}

.result-stats strong,
.admin-stats strong {
  font-size: 23px;
}

.result-stats span,
.admin-stats span {
  color: var(--muted);
  font-size: 11px;
}

.transcript-search {
  width: min(370px, 100%);
}

.transcript-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: min(620px, 58vw);
}

.follow-toggle {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.follow-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
}

.speaker-filters {
  margin: 0 0 12px;
}

.speaker-filter {
  min-height: 33px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.speaker-filter.active {
  border-color: var(--speaker-color, var(--accent));
  background: color-mix(in srgb, var(--speaker-color, var(--accent)) 14%, var(--surface));
  color: var(--text);
}

.utterance-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.utterance-row {
  position: relative;
  display: grid;
  grid-template-columns: 112px 155px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 68px;
  align-items: start;
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-left: 7px solid var(--speaker-color);
  border-radius: 0;
  background: color-mix(in srgb, var(--speaker-color) 6%, var(--surface));
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.utterance-row:last-child {
  border-bottom: 0;
}

.utterance-row:hover {
  background: color-mix(in srgb, var(--speaker-color) 12%, var(--surface));
  box-shadow: inset 3px 0 var(--speaker-color);
}

.utterance-row.active {
  z-index: 1;
  background: color-mix(in srgb, var(--speaker-color) 22%, var(--surface));
  box-shadow: inset 10px 0 var(--speaker-color), inset 0 0 0 2px color-mix(in srgb, var(--speaker-color) 72%, transparent);
}

.utterance-row.is-source-target {
  z-index: 2;
  box-shadow: inset 10px 0 var(--speaker-color), inset 0 0 0 2px color-mix(in srgb, var(--primary) 76%, transparent);
}

.utterance-row.is-overlap {
  background: color-mix(in srgb, var(--overlap) 6%, var(--surface));
}

.utterance-row.active.is-overlap {
  background: color-mix(in srgb, var(--overlap) 16%, var(--surface));
}

.utterance-row.active .utterance-text,
.utterance-row.active .utterance-speaker {
  color: var(--text);
  font-weight: 750;
}

.utterance-time {
  width: fit-content;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.utterance-speaker {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--speaker-color) 48%, var(--border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--speaker-color) 15%, var(--surface));
  color: var(--speaker-color);
  font-size: 12px;
  font-weight: 850;
}

.utterance-speaker small {
  min-width: 28px;
  padding: 3px 5px;
  border-radius: 3px;
  background: var(--speaker-color);
  color: #07151e;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.utterance-speaker span {
  overflow-wrap: anywhere;
}

.utterance-copy {
  min-width: 0;
}

.utterance-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.signal-overlap { background: color-mix(in srgb, var(--overlap) 16%, transparent); color: var(--overlap); }
.signal-low { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.signal-now { display: none; background: var(--speaker-color); color: #07151e; }
.utterance-row.active .signal-now { display: inline-flex; }

.utterance-text {
  padding-top: 2px;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.utterance-empty {
  color: var(--muted);
  font-style: italic;
}

.highlight {
  padding: 0 1px;
  background: color-mix(in srgb, var(--warning) 42%, transparent);
  color: inherit;
}

.floating-audio-player {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(680px, calc(100vw - 36px));
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 34px rgba(22, 33, 43, 0.19);
  backdrop-filter: blur(12px);
  animation: floating-player-enter 180ms ease-out;
}

[data-theme="dark"] .floating-audio-player {
  background: rgba(18, 31, 41, 0.97);
}

.floating-audio-player[hidden] { display: none; }

@keyframes floating-player-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.floating-audio-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
}

.floating-audio-head > img {
  width: 64px;
  height: 30px;
  object-fit: contain;
}

.floating-audio-head > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.floating-audio-head strong,
.floating-audio-segment {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-audio-head .icon-button {
  width: 30px;
  height: 30px;
}

.floating-audio-segment {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.floating-audio-controls {
  display: grid;
  grid-template-columns: 32px 34px 36px 34px 42px minmax(90px, 1fr) 42px auto;
  align-items: center;
  gap: 7px;
}

.floating-audio-controls input[type="range"] {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  accent-color: var(--primary);
}

body.has-floating-player .app-main {
  padding-bottom: 150px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(180px, 1fr) 150px 120px auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.user-identity {
  display: grid;
  min-width: 0;
}

.user-identity strong,
.user-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity span,
.user-metric small {
  color: var(--muted);
  font-size: 12px;
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.modal {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(2, 12, 17, 0.72);
  backdrop-filter: blur(4px);
}

.modal-form {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 30px;
}

.modal-brand-logo {
  width: 112px;
  height: 50px;
  object-fit: contain;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.delete-analysis-filename {
  overflow-wrap: anywhere;
}

.modal-form h2,
.modal-form p {
  margin: 0;
}

.modal-form > p:not(.eyebrow):not(.form-error) {
  color: var(--muted);
}

.modal-form label:not(.checkbox-field) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.modal-form input:not([type="checkbox"]) {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: 0;
  background: var(--bg);
}

.modal-form input:focus {
  border-color: var(--accent);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 12px;
}

.toast-stack {
  position: fixed;
  z-index: 100;
  top: 80px;
  right: 16px;
  display: grid;
  width: min(390px, calc(100% - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  animation: toast-in 180ms ease-out;
}

.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 1100px) {
  .public-nav { display: none; }
  .hero-live { width: 46vw; }
  .value-layout, .capability-layout { gap: 48px; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .result-band { grid-template-columns: repeat(2, 1fr); }
  .result-band > div:nth-child(2) { border-right: 0; }
  .result-band > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .analysis-item { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(80px, auto)) 34px; }
  .analysis-item .analysis-metric:nth-of-type(3) { display: none; }
  .user-row { grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) 110px auto; }
  .user-row .user-metric:nth-of-type(2) { display: none; }
}

@media (max-width: 820px) {
  input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
  select,
  textarea {
    font-size: 16px;
  }

  :root { --header-height: 60px; }
  .public-header { padding: 0 16px; }
  .public-header .theme-toggle { display: none; }
  .public-header .button { min-width: auto; padding-inline: 12px; }
  .hero { min-height: min(760px, calc(100svh - 76px)); align-items: flex-start; }
  .hero-inner { width: calc(100% - 32px); padding: 58px 0 194px; }
  .hero h1 { font-size: 72px; }
  .hero-statement { font-size: 24px; }
  .hero-lead { font-size: 17px; }
  .section-heading h2, .security-copy h2, .control-copy h2, .public-cta h2 { font-size: 38px; }
  .page-heading h1, .result-heading h1 { font-size: 36px; }
  .hero-proof { gap: 18px; }
  .hero-live { right: 16px; bottom: 36px; left: 16px; width: auto; }
  .public-section, .public-cta, .public-footer { width: calc(100% - 32px); }
  .public-section { padding: 68px 0; }
  .value-layout, .capability-layout, .workflow-inner, .security-section, .control-section { grid-template-columns: 1fr; gap: 46px; }
  .public-cta { align-items: flex-start; flex-direction: column; gap: 16px; }
  .app-header { padding: 0 11px; }
  .mobile-menu-button { display: inline-grid; }
  .service-indicator span, .account-button > span:last-child { display: none; }
  .app-layout { display: block; }
  .app-sidebar {
    position: fixed;
    z-index: 40;
    top: var(--header-height);
    left: 0;
    width: min(290px, 84vw);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: var(--header-height) 0 0;
    background: rgba(2, 12, 17, 0.62);
  }
  .app-main { padding: 25px 16px 56px; }
  .page-heading { align-items: flex-start; }
  .quota-summary { min-width: 105px; }
  .quota-summary span, .quota-summary small { display: none; }
  .quota-summary strong { font-size: 32px; }
  .analysis-item { grid-template-columns: minmax(0, 1fr) auto 28px; gap: 9px; }
  .analysis-item .analysis-metric { display: none; }
  .analysis-item .analysis-metric:first-of-type { display: block; }
  .sticky-player { top: calc(var(--header-height) + 5px); padding: 9px; }
  .compact-select span, .volume-range { display: none; }
  .transcript-waveform-wrap { height: 122px; }
  #resultWaveform { height: 92px; }
  .custom-audio-player { grid-template-columns: 38px 42px minmax(90px, 1fr) 42px auto 36px; gap: 5px; }
  .custom-audio-player .volume-range, .custom-audio-player .audio-load-status { display: none; }
  .result-stats, .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .transcript-heading-row { gap: 14px; }
  .transcript-tools { width: 100%; min-width: 0; justify-content: flex-start; flex-wrap: wrap; }
  .utterance-row { grid-template-columns: 94px minmax(0, 1fr); }
  .utterance-speaker { grid-column: 2; grid-row: 1; }
  .utterance-copy { grid-column: 1 / -1; }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .user-row .user-metric { display: none; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .admin-queue-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .admin-queue-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 560px) {
  .public-header .brand { gap: 7px; font-size: 17px; }
  .public-header .brand-logo { width: 72px; height: 34px; }
  .public-header .brand-product { display: none; }
  .public-header .theme-toggle { display: inline-grid; width: 36px; height: 36px; }
  .public-header .header-actions { gap: 6px; }
  .language-switch button { min-width: 34px; }
  .hero-inner { padding-top: 48px; }
  .hero h1 { font-size: 56px; }
  .hero-statement { font-size: 21px; }
  .section-heading h2, .security-copy h2, .control-copy h2, .public-cta h2 { font-size: 32px; }
  .page-heading h1, .result-heading h1 { font-size: 32px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-proof { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-proof span:last-child { grid-column: 1 / -1; }
  .hero-live p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .result-band, .benefit-grid { grid-template-columns: 1fr; }
  .result-band > div { min-height: 82px; border-right: 0; border-bottom: 1px solid var(--border); }
  .benefit-grid article { min-height: 210px; }
  .benefit-grid h3 { margin-top: 42px; }
  .security-facts > div, .control-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .control-facts strong { font-size: 19px; }
  .capability-list summary { grid-template-columns: 30px minmax(0, 1fr) 28px; padding-inline: 7px; }
  .capability-list details[open] .accordion-copy { padding: 0 36px 20px 44px; }
  .value-points article { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .public-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; padding: 16px 0; }
  .app-header .brand { font-size: 16px; }
  .app-header .brand-logo { width: 64px; height: 32px; }
  .app-header .brand > span { display: none; }
  .page-heading { display: block; }
  .quota-summary { display: flex; gap: 7px; margin-top: 14px; padding: 8px 0 8px 12px; }
  .quota-summary span, .quota-summary small { display: inline; }
  .source-switch { display: flex; }
  .source-switch button { flex: 1; padding-inline: 10px; }
  .drop-zone { min-height: 215px; padding: 20px; }
  .submit-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .submit-row .button { width: 100%; }
  .section-row { align-items: flex-start; flex-direction: column; }
  .transcript-tools { align-items: stretch; flex-direction: column; }
  .follow-toggle { width: 100%; }
  .analysis-item { grid-template-columns: minmax(0, 1fr) 25px; }
  .analysis-item .analysis-metric { display: none !important; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; width: 100% !important; }
  .analysis-topbar { align-items: flex-start; flex-direction: column; }
  .export-actions { width: 100%; }
  .export-actions .button { flex: 1; }
  .result-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .result-heading h1 { font-size: 26px; line-height: 1.12; }
  .owner-badge { align-self: stretch; padding: 7px 10px; }
  .waveform-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .waveform-legend { justify-content: flex-start; width: 100%; overflow: visible; flex-wrap: wrap; }
  .waveform-legend span { overflow: visible; white-space: nowrap; }
  .transcript-waveform-wrap { height: 112px; }
  #resultWaveform { height: 82px; }
  .custom-audio-player { grid-template-columns: 36px 42px minmax(80px, 1fr) 42px 34px; }
  .custom-audio-player .compact-select { display: none; }
  .custom-audio-player .audio-load-status { display: none; }
  .speaker-assignment-heading { align-items: stretch; flex-direction: column; }
  .speaker-assignment-heading .button { width: 100%; }
  .speaker-control { width: 100%; }
  .speaker-control input { width: 100%; }
  .result-stats > div, .admin-stats > div { min-height: 74px; padding: 11px; }
  .utterance-row { grid-template-columns: 1fr; gap: 5px; }
  .utterance-speaker { grid-column: auto; grid-row: auto; }
  .utterance-copy { grid-column: auto; }
  .utterance-text { font-size: 15px; }
  .modal-form { padding: 27px 20px 22px; }
  .floating-audio-player { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; padding: 11px; }
  .floating-audio-head { grid-template-columns: 54px minmax(0, 1fr) 30px; }
  .floating-audio-head > img { width: 54px; }
  .floating-audio-controls { grid-template-columns: repeat(4, 34px) minmax(52px, 1fr); }
  #floatingAudioReplay { grid-column: 1; grid-row: 1; }
  #floatingAudioBack { grid-column: 2; grid-row: 1; }
  #floatingAudioPlayButton { grid-column: 3; grid-row: 1; }
  #floatingAudioForward { grid-column: 4; grid-row: 1; }
  #floatingAudioCurrentTime { grid-column: 5; grid-row: 1; }
  #floatingAudioSeekSlider { grid-column: 1 / -1; grid-row: 2; }
  #floatingAudioDuration { display: none; }
  #floatingAudioOpenTranscript { grid-column: 1 / -1; grid-row: 3; }
  body.has-floating-player .app-main { padding-bottom: 210px; }
}

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