:root {
  color-scheme: dark;
  --night: #070b12;
  --night-soft: #0b111c;
  --surface: #101827;
  --surface-high: #151f31;
  --ink: #f7f8fb;
  --ink-soft: #c4ccda;
  --muted: #8994a7;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #6683ff;
  --indigo: #8d72ff;
  --cyan: #5ad7e8;
  --mint: #76e6c1;
  --amber: #ffbe66;
  --danger: #ff7890;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(102, 131, 255, 0.15), transparent 30rem),
    radial-gradient(circle at 90% 18%, rgba(90, 215, 232, 0.09), transparent 26rem),
    var(--night);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(102, 131, 255, 0.45);
  border-radius: 9px;
  color: var(--cyan);
  background: linear-gradient(145deg, rgba(102, 131, 255, 0.2), rgba(90, 215, 232, 0.08));
  font-size: 0.85rem;
}

.brand-dot { color: var(--cyan); }

.system-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.top-action-button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  font-weight: 750;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0b55d;
  box-shadow: 0 0 0 4px rgba(240, 181, 93, 0.1);
}

.system-state.ready .state-dot {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(118, 230, 193, 0.1);
}

.system-state.error .state-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 120, 144, 0.1);
}

.incident-banner {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px max(20px, calc((100vw - 1180px) / 2));
  border-block: 1px solid rgba(255, 120, 144, 0.52);
  color: #fff;
  background: rgba(132, 22, 48, 0.97);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.26);
}

.incident-banner[hidden] { display: none; }
.incident-banner div { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.incident-banner span { color: #ffdce3; }
.incident-banner a { color: #fff; font-weight: 800; white-space: nowrap; }

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.launch-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 7vw, 90px);
  align-items: end;
  min-height: 390px;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(102, 131, 255, 0.08), transparent 45%),
    rgba(10, 16, 26, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 14px;
  color: #9eafff;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.headline-gradient {
  display: inline-block;
  padding-inline-end: 0.075em;
  margin-inline-end: -0.075em;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.headline-gradient-start {
  background-image: linear-gradient(110deg, #a898ff, var(--blue));
}

.headline-gradient-end {
  background-image: linear-gradient(110deg, var(--blue), var(--cyan) 85%);
}

.intro {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.7;
}

.privacy-note {
  max-width: 610px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.launch-form {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 24, 39, 0.88);
}

.launch-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.language-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.75fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}

.language-control label {
  margin: 0;
}

select {
  min-width: 0;
  padding: 11px 38px 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #080e17;
}

select:focus {
  border-color: rgba(102, 131, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(102, 131, 255, 0.12);
}

.input-row {
  display: flex;
  gap: 10px;
}

input {
  min-width: 0;
  flex: 1;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #080e17;
}

input:focus {
  border-color: rgba(102, 131, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(102, 131, 255, 0.12);
}

.primary-button, .ghost-button, .small-button {
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.primary-button {
  padding: 13px 18px;
  color: #07101a;
  background: linear-gradient(115deg, #93a6ff, var(--cyan));
  white-space: nowrap;
}

.primary-button:disabled { cursor: wait; opacity: 0.6; }
.download-button { display: inline-flex; width: fit-content; color: #07101a; text-decoration: none; }

.form-hint {
  min-height: 18px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-hint.success { color: var(--mint); }
.form-hint.error { color: var(--danger); }

.overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 70px;
}

.overview article {
  display: grid;
  gap: 5px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 20, 32, 0.72);
}

.metric-label, .overview small { color: var(--muted); }
.metric-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.overview strong { font-size: 1.65rem; letter-spacing: -0.04em; }
.overview small { font-size: 0.72rem; }

.system-alerts-section {
  margin: 0 0 70px;
  scroll-margin-top: 80px;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.operations-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 20, 32, 0.76);
}

.operations-grid small { color: var(--muted); font-size: 0.7rem; }
.operations-grid strong { overflow-wrap: anywhere; font-size: 0.86rem; }

.alerts-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: 14px;
}

.alerts-columns > div,
.alerts-columns details {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(13, 20, 32, 0.66);
}

.alerts-columns h3 {
  margin: 0 0 13px;
  font-size: 0.86rem;
}

.alerts-columns summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.incident-list {
  display: grid;
  gap: 9px;
}

.alerts-columns details .incident-list { margin-top: 14px; }

.incident-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(255, 120, 144, 0.25);
  border-radius: 12px;
  background: rgba(132, 22, 48, 0.1);
}

.incident-card.resolved {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.incident-severity {
  padding: 4px 6px;
  border-radius: 6px;
  color: #ffdce3;
  background: rgba(255, 120, 144, 0.14);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.incident-card.warning .incident-severity {
  color: #ffe4b3;
  background: rgba(240, 181, 93, 0.14);
}

.incident-card-copy strong { display: block; margin-bottom: 5px; font-size: 0.84rem; }
.incident-card-copy p { margin: 0; color: var(--ink-soft); font-size: 0.74rem; line-height: 1.5; }
.incident-card-copy small { display: block; margin-top: 7px; color: var(--muted); font-size: 0.66rem; }
.incident-link { color: var(--cyan); font-size: 0.72rem; font-weight: 800; white-space: nowrap; }

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

.section-heading h2, .dialog-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.045em;
}

.ghost-button, .small-button {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.025);
}

.ghost-button:hover, .small-button:hover { border-color: rgba(102, 131, 255, 0.5); color: var(--ink); }
.small-button.danger:hover { border-color: rgba(255, 120, 144, 0.45); color: #ffacbb; }

.loading {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

.meeting-list {
  display: grid;
  gap: 10px;
}

.meeting-card {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr)
    250px
    110px
    100px
    170px;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(13, 20, 32, 0.76);
  transition: border-color 160ms ease, transform 160ms ease;
}

.meeting-card:hover {
  border-color: rgba(102, 131, 255, 0.35);
  transform: translateY(-1px);
}

.meeting-title strong { display: block; font-size: 0.98rem; }
.meeting-title-line {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.meeting-title-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supported-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(152, 167, 196, 0.28);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(152, 167, 196, 0.06);
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.platform-badge.google-meet {
  border-color: rgba(118, 230, 193, 0.28);
  color: #b5efd9;
  background: rgba(118, 230, 193, 0.06);
}

.platform-badge.teams {
  border-color: rgba(143, 145, 255, 0.34);
  color: #c3c4ff;
  background: rgba(143, 145, 255, 0.07);
}

.platform-badge.zoom {
  border-color: rgba(90, 171, 255, 0.34);
  color: #add4ff;
  background: rgba(90, 171, 255, 0.07);
}

.detail-grid .platform-badge {
  margin-top: 2px;
}
.meeting-title small, .meeting-value small, .meeting-phase small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
}
.meeting-phase small {
  min-height: 1.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meeting-value strong { font-size: 0.82rem; font-weight: 700; }

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(118, 230, 193, 0.2);
  border-radius: 999px;
  color: #b5efd9;
  background: rgba(118, 230, 193, 0.05);
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-chip.recording, .status-chip.joining, .status-chip.admission, .status-chip.finalizing,
.status-chip.waiting_audio, .status-chip.waiting_worker,
.status-chip.transcribing, .status-chip.summarizing {
  border-color: rgba(90, 215, 232, 0.26);
  color: #a9eaf3;
  background: rgba(90, 215, 232, 0.06);
}

.status-chip.failed {
  border-color: rgba(255, 120, 144, 0.22);
  color: #ffacbb;
  background: rgba(255, 120, 144, 0.05);
}

.status-chip.transcript_ready {
  border-color: rgba(118, 230, 193, 0.2);
  color: #b5efd9;
  background: rgba(118, 230, 193, 0.05);
}

.status-chip.sent {
  border-color: rgba(118, 230, 193, 0.38);
  color: var(--mint);
  background: rgba(118, 230, 193, 0.06);
}

.status-chip.uncertain {
  border-color: rgba(240, 181, 93, 0.4);
  color: #f0b55d;
  background: rgba(240, 181, 93, 0.06);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, 78px);
  gap: 8px;
  justify-content: start;
}

.card-actions .small-button {
  width: 78px;
  padding-right: 8px;
  padding-left: 8px;
}

.action-placeholder {
  width: 78px;
  height: 1px;
}

.empty-state {
  padding: 50px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(1040px, calc(100% - 28px));
  max-height: min(860px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  color: var(--ink);
  background: #0b111c;
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(2, 5, 10, 0.78); backdrop-filter: blur(8px); }

.dialog-shell { padding: clamp(22px, 4vw, 38px); }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 28px; }

.close-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 1.3rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.detail-grid div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.detail-grid small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.66rem; }
.detail-grid strong { font-size: 0.78rem; }

.audio-block, .transcript-block, .result-section, .processing-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.audio-block h3, .transcript-block h3, .result-section h3, .processing-panel h3 {
  margin: 0;
  font-size: 1rem;
}
.block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.block-heading h3 { margin: 0; }
.block-heading a { flex: 0 0 auto; text-decoration: none; }
audio { width: 100%; }

.results-stack {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.result-section {
  margin-top: 0;
  padding: clamp(20px, 3vw, 28px);
}

.report-section {
  border-color: rgba(102, 131, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(102, 131, 255, 0.055), transparent 38%),
    rgba(255, 255, 255, 0.018);
}

.transcript-section {
  border-color: rgba(90, 215, 232, 0.18);
  background:
    linear-gradient(145deg, rgba(90, 215, 232, 0.04), transparent 38%),
    rgba(255, 255, 255, 0.012);
}

.automation-section {
  border-color: rgba(118, 230, 193, 0.18);
  background:
    linear-gradient(145deg, rgba(118, 230, 193, 0.04), transparent 38%),
    rgba(255, 255, 255, 0.012);
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.transcript-provenance {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.result-heading .eyebrow,
.block-heading .eyebrow,
.processing-panel .eyebrow {
  margin-bottom: 7px;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}
.export-row a { text-decoration: none; }

.report-overview,
.report-panel,
.report-grid article {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 8, 14, 0.22);
}

.report-overview {
  margin-bottom: 12px;
  border-color: rgba(102, 131, 255, 0.2);
  background: rgba(102, 131, 255, 0.045);
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.report-panel {
  margin-top: 12px;
}

.report-section h4,
.automation-section h4 {
  margin: 0 0 10px;
  color: #c9d1ff;
  font-size: 0.76rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.report-section p,
.report-section li,
.automation-section p,
.automation-section li {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

.report-section p,
.automation-section p {
  margin-bottom: 0;
}

.report-section ul,
.automation-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.automation-section li small {
  display: block;
  color: var(--muted);
}

.calendar-event-card > p {
  margin-top: 0;
}

.calendar-event-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 13px;
  line-height: 1.2;
  text-decoration: none;
}

.empty-copy {
  margin: 0;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
}

.report-section .sourced-list {
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.sourced-list > li {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(102, 131, 255, 0.025);
}

.claim-statement {
  margin: 0 !important;
}

.claim-controls,
.review-controls,
.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.claim-controls {
  justify-content: space-between;
  margin-top: 9px;
}

.evidence-toggle,
.review-button {
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.025);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.evidence-toggle {
  border-color: rgba(90, 215, 232, 0.28);
  color: var(--cyan);
}

.review-button[aria-pressed="true"] {
  border-color: rgba(118, 230, 193, 0.42);
  color: var(--mint);
  background: rgba(118, 230, 193, 0.08);
}

.review-controls[data-review-status="contested"] .review-button[aria-pressed="true"] {
  border-color: rgba(255, 120, 144, 0.45);
  color: #ff9bad;
  background: rgba(255, 120, 144, 0.08);
}

.review-button.muted,
.review-status,
.legacy-evidence {
  color: var(--muted);
  font-size: 0.66rem;
}

.review-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.evidence-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.evidence-panel[hidden] {
  display: none;
}

.evidence-card {
  padding: 10px;
  border: 1px solid rgba(90, 215, 232, 0.18);
  border-radius: 9px;
  background: rgba(90, 215, 232, 0.035);
}

.evidence-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.66rem;
}

.evidence-meta strong {
  color: #b8c3ff;
}

.evidence-card p {
  margin: 7px 0 9px !important;
  font-size: 0.78rem !important;
}

.evidence-actions .small-button {
  padding: 5px 8px;
  font-size: 0.66rem;
}

.action-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.action-table-head,
.action-table-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(220px, 2.3fr) minmax(100px, 0.8fr);
  gap: 14px;
  align-items: start;
  padding: 11px 13px;
  background: #0c1320;
}

.action-table-head {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.action-table-row {
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.45;
}

.action-table-row strong {
  color: #b8c3ff;
}

.action-table-row time {
  color: var(--muted);
}

.action-evidence {
  grid-column: 1 / -1;
}

.processing-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border-color: rgba(90, 215, 232, 0.2);
  background: rgba(90, 215, 232, 0.035);
}

.processing-heading {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.processing-panel p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.processing-panel.processing-failed {
  flex-direction: row;
  align-items: center;
  border-color: rgba(255, 120, 144, 0.28);
  background: rgba(255, 120, 144, 0.045);
}

.processing-panel.configuration-panel {
  border-color: rgba(240, 181, 93, 0.25);
  background: rgba(240, 181, 93, 0.04);
}

.processing-steps {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  width: 100%;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.processing-steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
  text-align: center;
}

.processing-steps li::before {
  position: absolute;
  top: 12px;
  left: -50%;
  z-index: 0;
  width: 100%;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.processing-steps li:first-child::before {
  display: none;
}

.processing-steps li span {
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.65rem;
}

.processing-steps li.done,
.processing-steps li.current {
  color: var(--ink-soft);
}

.processing-steps li.done span {
  border-color: rgba(118, 230, 193, 0.4);
  color: var(--mint);
}

.processing-steps li.current span {
  border-color: rgba(90, 215, 232, 0.55);
  color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(90, 215, 232, 0.08);
}

.transcript-segments {
  max-height: 620px;
  overflow-y: auto;
}

.segment {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.segment:first-of-type { border-top: 0; padding-top: 0; }
.segment-speaker { color: #aebaff; font-size: 0.74rem; font-weight: 800; }
.segment-speaker small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; }
.segment p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.65; }
.segment.segment-highlight {
  border-radius: 9px;
  background: rgba(90, 215, 232, 0.1);
  box-shadow: 0 0 0 1px rgba(90, 215, 232, 0.28);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(380px, calc(100% - 44px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: #151f31;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255, 120, 144, 0.45); }

.install-steps {
  display: grid;
  gap: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.install-steps p { margin: 0; }
.install-steps code { color: var(--cyan); }

.token-row {
  display: flex;
  gap: 9px;
}

.token-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

#voice-profile-dialog {
  width: min(860px, calc(100% - 28px));
}

.voice-profile-summary,
.voice-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.voice-profile-summary article,
.voice-profile-summary > div,
.voice-quality-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.voice-profile-summary small,
.voice-quality-grid small,
.voice-policy-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.voice-profile-summary strong,
.voice-quality-grid strong {
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

#voice-profile-recognition.active { color: var(--mint); }

.voice-profile-notice {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 190, 102, 0.24);
  border-radius: 11px;
  color: var(--ink-soft);
  background: rgba(255, 190, 102, 0.045);
  line-height: 1.55;
}

.voice-profile-notice strong { color: var(--amber); }
.voice-profile-notice ul { margin: 8px 0 0; padding-left: 20px; }

.voice-profile-notice.ready {
  border-color: rgba(118, 230, 193, 0.28);
  background: rgba(118, 230, 193, 0.055);
}

.voice-profile-notice.ready strong { color: var(--mint); }
.voice-profile-notice.ready p { margin: 7px 0 0; }

.voice-profile-section,
.voice-profile-danger {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  line-height: 1.6;
}

.voice-profile-section h3,
.voice-profile-danger h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.92rem;
}

.voice-profile-section p,
.voice-profile-danger p { margin: 8px 0; }
.voice-profile-section ul { margin: 8px 0; padding-left: 20px; }

.voice-calibration-state {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(132, 154, 255, 0.28);
  border-radius: 14px;
  background: rgba(87, 112, 255, 0.08);
}

.voice-calibration-state p { margin: 5px 0 0; }
.voice-calibration-state.review { border-color: rgba(255, 184, 77, 0.38); }
.voice-calibration-state.failed { border-color: rgba(255, 101, 122, 0.35); }

.inline-loader {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid rgba(132, 154, 255, 0.28);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: voice-spin 0.8s linear infinite;
}

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

.voice-policy-text {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: #080e17;
}

.voice-consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  color: var(--ink);
}

.voice-consent-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 4px;
}

.voice-profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.voice-quality-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.voice-profile-danger {
  border-top-color: rgba(255, 116, 126, 0.24);
}

.voice-profile-danger h3 { color: var(--danger); }

.voice-profile-admin-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.voice-profile-admin-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.voice-profile-admin-list article > div { display: grid; gap: 2px; }
.voice-profile-admin-list article > small { grid-column: 1 / -1; }
.voice-profile-admin-list small { color: var(--muted); }
.voice-profile-admin-list span { color: var(--muted); font-size: 0.78rem; }
.voice-profile-admin-list span.active { color: var(--mint); }

#glossary-dialog {
  width: min(1180px, calc(100% - 28px));
  height: min(860px, calc(100vh - 28px));
  overflow: hidden;
}

#glossary-dialog .dialog-shell {
  height: 100%;
  overflow-y: auto;
}

#glossary-dialog .dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 16px;
  background: #0b111c;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.glossary-workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.012);
}

.glossary-workspace[hidden] { display: none; }

.glossary-sidebar {
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: rgba(4, 9, 16, 0.42);
}

.glossary-sidebar-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 14px;
}

.glossary-sidebar-heading h3,
.glossary-sidebar-heading p { margin: 0; }

.glossary-sidebar-heading h3 { font-size: 0.88rem; }

.glossary-sidebar-heading p {
  max-width: 145px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.glossary-sidebar-heading .small-button {
  padding: 6px 8px;
  font-size: 0.68rem;
}

.glossary-navigation {
  display: grid;
  gap: 5px;
}

.glossary-navigation-group + .glossary-navigation-group {
  margin-top: 14px;
}

.glossary-navigation-label {
  display: block;
  margin: 0 7px 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.glossary-navigation button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  text-align: left;
  background: transparent;
}

.glossary-navigation button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.glossary-navigation button[aria-current="true"] {
  border-color: rgba(90, 215, 232, 0.24);
  color: var(--ink);
  background: rgba(90, 215, 232, 0.07);
}

.glossary-navigation-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(102, 131, 255, 0.26);
  border-radius: 8px;
  color: #b8c3ff;
  background: rgba(102, 131, 255, 0.08);
  font-size: 0.67rem;
  font-weight: 900;
}

.glossary-navigation-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.glossary-navigation-copy strong,
.glossary-navigation-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glossary-navigation-copy strong { font-size: 0.75rem; }
.glossary-navigation-copy small { color: var(--muted); font-size: 0.64rem; }
.glossary-navigation-version { color: var(--muted); font-size: 0.64rem; }

.glossary-editor {
  min-width: 0;
  padding: 20px;
}

.glossary-metadata-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.glossary-metadata-grid input,
.glossary-metadata-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #080e17;
}

.glossary-metadata-grid input:disabled,
.glossary-metadata-grid textarea:disabled {
  opacity: 0.62;
}

.glossary-metadata-grid textarea {
  min-height: 58px;
  resize: vertical;
}

.glossary-create {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(90, 215, 232, 0.25);
  border-radius: 13px;
  background: rgba(90, 215, 232, 0.035);
}

.glossary-create .glossary-toolbar { margin-top: 0; }

.glossary-metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.glossary-catalog-enabled {
  grid-column: auto;
  grid-row: auto;
}

.glossary-catalog-enabled span {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 750;
}

.glossary-assignment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
}

.glossary-assignment-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(90, 215, 232, 0.2);
  border-radius: 13px;
  background: rgba(90, 215, 232, 0.035);
}

.glossary-assignment-panel h3,
.glossary-assignment-panel p { margin: 0; }

.glossary-evidence-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.glossary-assignment-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.glossary-assignment-editor summary {
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.glossary-assignment-editor .form-hint { margin: 10px 0; }

.glossary-assignment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.glossary-assignment-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.glossary-assignment-actions { justify-content: flex-start; }

.glossary-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.glossary-summary-copy,
.glossary-version {
  display: grid;
  gap: 5px;
}

.glossary-summary-copy { min-width: 0; }

.glossary-scope {
  color: var(--cyan);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glossary-summary-copy > strong {
  color: var(--ink);
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.glossary-summary small,
.glossary-summary p,
.glossary-term span,
.glossary-candidate-list small {
  color: var(--muted);
  font-size: 0.74rem;
}

.glossary-version {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 215, 232, 0.18);
  border-radius: 10px;
  background: rgba(90, 215, 232, 0.035);
}

.glossary-version strong {
  color: var(--cyan);
  font-size: 1.05rem;
}

.glossary-summary p { margin: 0; line-height: 1.55; }

.glossary-global-notice {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 11px 13px;
  border-left: 2px solid rgba(118, 230, 193, 0.48);
  color: var(--ink-soft);
  background: rgba(118, 230, 193, 0.035);
}

.glossary-global-notice[hidden] { display: none; }
.glossary-global-notice strong { color: var(--mint); font-size: 0.76rem; }
.glossary-global-notice p { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.glossary-metadata[hidden] { display: none; }

.glossary-toolbar,
.glossary-actions,
.glossary-restore-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.glossary-toolbar {
  margin: 20px 0 11px;
}

.glossary-toolbar h3,
.glossary-secondary h3 {
  margin: 0;
  font-size: 0.9rem;
}

.glossary-toolbar .form-hint { margin: 4px 0 0; }

.glossary-terms-heading {
  padding-top: 2px;
}

.glossary-terms {
  display: grid;
  gap: 10px;
}

.glossary-term {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.55fr) minmax(220px, 1.4fr) auto;
  gap: 11px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.glossary-term label {
  display: grid;
  gap: 6px;
}

.glossary-term input,
.glossary-term textarea,
.glossary-restore-row select {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #080e17;
}

.glossary-term textarea {
  min-height: 62px;
  resize: vertical;
}

.glossary-variants {
  grid-row: span 2;
}

.glossary-enabled {
  display: flex !important;
  grid-column: 1 / 3;
  grid-row: 2;
  align-items: center;
  gap: 8px !important;
}

.glossary-enabled input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
}

.glossary-term [data-glossary-remove] {
  grid-column: 4;
  grid-row: 1 / 3;
  align-self: center;
}

.glossary-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.glossary-secondary {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.glossary-secondary h3 { margin-bottom: 12px; }

.glossary-candidate-list {
  display: grid;
  gap: 8px;
}

.glossary-candidate-list article {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 1fr) auto;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.glossary-candidate-list span { color: var(--ink-soft); }
.glossary-restore-row { justify-content: flex-start; }
.glossary-restore-row select { max-width: 220px; }

.transcript-corrections {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(118, 230, 193, 0.2);
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(118, 230, 193, 0.035);
}

.transcript-corrections summary {
  color: var(--mint);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}

.transcript-corrections > div {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.transcript-corrections article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.transcript-corrections p { margin: 5px 0 0; font-size: 0.76rem; }
.transcript-corrections del { color: #ff9bad; }
.transcript-corrections ins { color: var(--mint); text-decoration: none; }

@media (max-width: 1100px) {
  .meeting-card {
    grid-template-columns: minmax(170px, 1fr) 210px 90px 90px 150px;
    gap: 12px;
  }

  .card-actions {
    grid-template-columns: repeat(2, 70px);
  }

  .card-actions .small-button {
    width: 70px;
  }
}

@media (max-width: 900px) {
  .launch-panel { grid-template-columns: 1fr; min-height: auto; }
  .language-control { grid-template-columns: 1fr; }
  .overview { grid-template-columns: repeat(2, 1fr); }
  .operations-grid { grid-template-columns: repeat(2, 1fr); }
  .alerts-columns { grid-template-columns: 1fr; }
  .meeting-card { grid-template-columns: minmax(180px, 1fr) 220px 100px 170px; }
  .meeting-card > :nth-child(4) { display: none; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
  .glossary-workspace { grid-template-columns: 205px minmax(0, 1fr); }
  .glossary-editor { padding: 16px; }
  .glossary-term { grid-template-columns: 1fr 1fr; }
  .glossary-assignment-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-variants { grid-column: 1 / 3; grid-row: auto; }
  .glossary-enabled { grid-column: 1 / 3; grid-row: auto; }
  .glossary-term [data-glossary-remove] {
    grid-column: 1 / 3;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .topbar, main { width: min(100% - 24px, 1180px); }
  .topbar { padding: 16px 0; }
  .top-actions { gap: 6px; }
  .system-state span:last-child { display: none; }
  .top-action-button { padding: 7px 9px; font-size: 0.68rem; }
  main { padding-top: 12px; }
  .launch-panel { padding: 26px 20px; border-radius: 20px; }
  .input-row { flex-direction: column; }
  .overview { grid-template-columns: 1fr; margin-bottom: 50px; }
  .operations-grid { grid-template-columns: 1fr; }
  .incident-banner { align-items: flex-start; padding-inline: 12px; font-size: 0.8rem; }
  .incident-card { grid-template-columns: auto minmax(0, 1fr); }
  .incident-link { grid-column: 2; }
  .meeting-card { grid-template-columns: minmax(0, 1fr) 170px; gap: 12px; }
  .meeting-card > :not(.meeting-title, .card-actions) { display: none; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .segment { grid-template-columns: 1fr; gap: 7px; }
  .result-heading, .processing-panel, .processing-heading { align-items: stretch; flex-direction: column; }
  #glossary-dialog .dialog-shell { padding: 18px 14px; }
  #glossary-dialog .dialog-header { margin-bottom: 18px; }
  .glossary-workspace { grid-template-columns: 1fr; }
  .glossary-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .glossary-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-navigation-group + .glossary-navigation-group { margin-top: 0; }
  .glossary-navigation-group { min-width: 0; }
  .glossary-navigation button { grid-template-columns: 26px minmax(0, 1fr); }
  .glossary-navigation-mark { width: 26px; height: 26px; }
  .glossary-navigation-version { display: none; }
  .glossary-editor { padding: 14px; }
  .glossary-summary { align-items: stretch; flex-direction: column; gap: 12px; }
  .glossary-version { width: fit-content; }
  .glossary-metadata-grid,
  .glossary-assignment-options { grid-template-columns: 1fr; }
  .voice-profile-summary,
  .voice-quality-grid { grid-template-columns: 1fr; }
  .glossary-term { grid-template-columns: 1fr; }
  .glossary-variants,
  .glossary-enabled,
  .glossary-term [data-glossary-remove] { grid-column: 1; }
  .glossary-candidate-list article { grid-template-columns: 1fr; }
  .export-row { justify-content: flex-start; }
  .action-table-head { display: none; }
  .action-table-row { grid-template-columns: 1fr; gap: 5px; }
  .processing-steps { grid-auto-columns: auto; grid-auto-flow: row; grid-template-columns: 1fr; gap: 10px; }
  .processing-steps li { grid-template-columns: 25px 1fr; align-items: center; justify-items: start; text-align: left; }
  .processing-steps li::before { top: -10px; left: 12px; width: 1px; height: 10px; }
}

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