:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #151b24;
  --panel-2: #1c2430;
  --border: #283241;
  --text: #e6edf3;
  --muted: #8b98a8;
  --accent: #7c9cff;
  --accent-2: #b48cff;
  --high: #ff6b6b;
  --medium: #f5b84a;
  --low: #58c4a8;
  --radius: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  word-break: break-word;
}

/* ---------------------------------------------------------------- Top Navigation */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.logo {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(124, 156, 255, 0.7);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-link.app-nav-link {
  color: var(--accent);
  font-weight: 600;
}

.account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent);
  color: #0b0f17;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.user-login {
  font-weight: 600;
  color: var(--text);
}

.btn-signout {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-signout:hover {
  color: var(--high);
  background: rgba(255, 107, 107, 0.12);
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn-large {
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-primary {
  color: #0b0f17;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 20px rgba(124, 156, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 26px rgba(180, 140, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--border);
}

.btn-github {
  background: #24292f;
  color: #ffffff !important;
  border-color: #3d444e;
}

.btn-github:hover {
  background: #2f363d;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.github-icon {
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- LANDING PAGE */

.landing-view {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 5.5rem;
}

.hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.1);
  border: 1px solid rgba(124, 156, 255, 0.25);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.badge-dot.green {
  background: var(--low);
  box-shadow: 0 0 10px var(--low);
}

.badge-dot.purple {
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.035em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 20%, var(--accent-2) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

.hero-microcopy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Mockup Window */

.preview-section {
  display: flex;
  justify-content: center;
}

.mockup-window {
  width: 100%;
  max-width: 980px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 35px rgba(124, 156, 255, 0.08);
  overflow: hidden;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.mockup-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.mockup-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.mockup-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mockup-audio {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
}

.audio-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(124, 156, 255, 0.4);
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  height: 24px;
}

.audio-wave .bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.bar-1 { height: 8px; }
.bar-2 { height: 16px; }
.bar-3 { height: 22px; }
.bar-4 { height: 12px; }
.bar-5 { height: 18px; }
.bar-6 { height: 24px; }
.bar-7 { height: 14px; }
.bar-8 { height: 20px; }
.bar-9 { height: 10px; }
.bar-10 { height: 18px; }
.bar-11 { height: 24px; }
.bar-12 { height: 14px; }
.bar-13 { height: 8px; }
.bar-14 { height: 12px; }

.audio-timer {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
}

.audio-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(180, 140, 255, 0.15);
  color: var(--accent-2);
}

.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mockup-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.mockup-panel h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.mockup-prose {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.mockup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mockup-risks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.mockup-risk {
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
  background: var(--panel-2);
  padding: 0.6rem;
  border-radius: 6px;
  border-left: 3px solid var(--border);
}

.mockup-risk.high { border-left-color: var(--high); }
.mockup-risk.medium { border-left-color: var(--medium); }

.sev-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  height: fit-content;
}

.mockup-risk.high .sev-tag { color: var(--high); background: rgba(255, 107, 107, 0.15); }
.mockup-risk.medium .sev-tag { color: var(--medium); background: rgba(245, 184, 74, 0.15); }

.mockup-risk strong { display: block; margin-bottom: 0.2rem; }
.mockup-risk p { margin: 0 0 0.3rem; color: var(--muted); }

/* Features Section */

.features-section,
.steps-section {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 2rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Security Section */

.security-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.security-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.security-content h3 {
  margin: 0.5rem 0 0.6rem;
  font-size: 1.25rem;
}

.security-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Steps Section */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}

.step-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--text);
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* CTA Banner */

.cta-banner {
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(124, 156, 255, 0.15), transparent 70%), var(--panel);
  border: 1px solid rgba(124, 156, 255, 0.3);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.cta-banner h2 {
  font-size: 2.3rem;
  margin: 0;
  font-weight: 800;
}

.cta-banner p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 580px;
}

/* Site Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- APP DASHBOARD VIEW */

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.25rem;
  padding: 1.25rem 2rem 3rem;
  align-items: start;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
}

.btn-new-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.8rem 1rem;
  box-sizing: border-box;
}

.sidebar-history {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sidebar-title-row h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.generator-panel {
  padding: 2rem;
}

.generator-header {
  margin-bottom: 1.5rem;
}

.generator-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.generator-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input:not([type='radio']):not([type='checkbox']) {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

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

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem 0.8rem;
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

legend {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 0.3rem;
}

fieldset label,
label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.changes-only {
  display: grid;
  gap: 0.85rem;
}

.changes-only[hidden] {
  display: none;
}

button[type='submit'] {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  color: #0b0f17;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-error,
.error-box {
  color: var(--high);
  margin: 0;
}

.error-box {
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.cast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 12rem);
  padding-right: 0.25rem;
}

.cast-list::-webkit-scrollbar {
  width: 5px;
}
.cast-list::-webkit-scrollbar-track {
  background: transparent;
}
.cast-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.cast-list::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.cast-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}

.cast-list a:hover,
.cast-list a.active {
  border-color: var(--accent);
}

.cast-repo {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cast-title,
.cast-list time {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty,
.muted {
  color: var(--muted);
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  align-self: center;
  background: var(--border);
}

.pill.ready {
  background: rgba(88, 196, 168, 0.18);
  color: var(--low);
}

.pill.failed {
  background: rgba(255, 107, 107, 0.18);
  color: var(--high);
}

.pill.running,
.pill.queued {
  background: rgba(124, 156, 255, 0.18);
  color: var(--accent);
}

.detail {
  display: grid;
  gap: 1rem;
}

.intro h2 {
  font-size: 1.6rem;
  margin: 0.5rem 0;
}

.intro p {
  color: var(--muted);
  max-width: 60ch;
}

.detail-head h2 {
  font-size: 1.5rem;
  margin: 0.2rem 0 0.4rem;
}

.detail-head-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.btn-inline-new {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(124, 156, 255, 0.1);
  border: 1px solid rgba(124, 156, 255, 0.25);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-inline-new:hover {
  background: rgba(124, 156, 255, 0.2);
  border-color: var(--accent);
  text-decoration: none;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  margin: 0;
  color: var(--muted);
}

.status.ready {
  color: var(--low);
}

.status.failed {
  color: var(--high);
}

.status.working p {
  margin: 0 0 0.4rem;
}

progress {
  width: 100%;
  max-width: 420px;
  accent-color: var(--accent);
}

audio {
  width: 100%;
}

.warnings {
  margin: 0;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border-radius: 8px;
  background: rgba(245, 184, 74, 0.08);
  border: 1px solid rgba(245, 184, 74, 0.35);
  color: var(--medium);
  font-size: 0.9rem;
}

.block h3 {
  margin: 0.5rem 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}

.block p {
  margin: 0 0 0.6rem;
}

.items,
.timeline,
.checklist {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--text);
  font-size: 1rem;
}

.paths {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.3rem 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: 0.88rem;
}

.risks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.risk {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--panel-2);
  border-left: 3px solid var(--border);
}

.risk p {
  margin: 0.25rem 0 0;
}

.risk.high {
  border-left-color: var(--high);
}

.risk.medium {
  border-left-color: var(--medium);
}

.risk.low {
  border-left-color: var(--low);
}

.sev {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.15rem;
}

.risk.high .sev {
  color: var(--high);
}

.risk.medium .sev {
  color: var(--medium);
}

.risk.low .sev {
  color: var(--low);
}

details.script {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

details.script summary {
  cursor: pointer;
  color: var(--muted);
}

dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0;
}

dialog button[value='cancel'] {
  background: var(--panel-2);
  color: var(--text);
}

/* ---------------------------------------------------------------- Q&A */

.qa-list {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.qa-list .empty {
  color: var(--muted);
}

.qa-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.qa-question {
  margin: 0;
}

.qa-answer p {
  margin: 0 0 0.4rem;
}

.qa-answer p:last-child {
  margin-bottom: 0;
}

.qa-form {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.qa-form input {
  min-width: 0;
}

.qa-form .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 860px) {
  .top {
    padding: 0.75rem 1rem;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .mockup-grid,
  .security-card {
    grid-template-columns: 1fr;
  }
  .brand-group {
    gap: 1rem;
  }
  .nav-links {
    display: none;
  }
  .landing-view {
    padding: 2rem 1rem 3rem;
    gap: 3.5rem;
  }
}

/* ---------------------------------------------------------------- Audio Briefing Hero Card */

.audio-hero-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(28, 36, 48, 0.8), rgba(21, 27, 36, 0.95));
  border: 1px solid rgba(124, 156, 255, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.audio-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.audio-hero-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.audio-hero-title h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}

.audio-icon {
  font-size: 1.4rem;
}

.audio-element {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  outline: none;
}

.audio-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.skip-group,
.speed-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.speed-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

.skip-btn,
.speed-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skip-btn:hover,
.speed-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.speed-btn.active {
  color: #0b0f17;
  background: var(--accent);
  border-color: var(--accent);
}

.audio-generating {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: rgba(124, 156, 255, 0.08);
  border: 1px solid rgba(124, 156, 255, 0.25);
  border-radius: 8px;
}

.generating-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
}

.soundwave-anim {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.soundwave-anim .bar {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  animation: pulseBar 0.8s infinite alternate ease-in-out;
}

.soundwave-anim .bar-1 { animation-delay: 0.1s; }
.soundwave-anim .bar-2 { animation-delay: 0.25s; }
.soundwave-anim .bar-3 { animation-delay: 0.4s; }
.soundwave-anim .bar-4 { animation-delay: 0.2s; }
.soundwave-anim .bar-5 { animation-delay: 0.35s; }

@keyframes pulseBar {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* ---------------------------------------------------------------- Spoken Transcript Card */

.transcript-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.transcript-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
}

.transcript-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn-copy-transcript {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-copy-transcript:hover {
  background: rgba(124, 156, 255, 0.15);
  border-color: var(--accent);
}

.transcript-prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #e6edf3;
  letter-spacing: 0.01em;
}

.transcript-prose p {
  margin: 0 0 1.25rem;
}

.transcript-prose p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- Quick Summary & Risk Alert */

.quick-summary-card {
  display: grid;
  gap: 0.6rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.quick-summary-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-prose p {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.summary-prose p:last-child {
  margin-bottom: 0;
}

.risk-alert-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.4);
}

.risk-alert-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-alert-head h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--high);
  font-weight: 700;
}

.risk-alert-icon {
  font-size: 1.2rem;
}

.risk-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.risk-alert-item {
  background: rgba(255, 107, 107, 0.06);
  border-left: 3px solid var(--high);
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
}

.risk-alert-item strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.risk-alert-item p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- QA Section */

.qa-section {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  margin-top: 0.5rem;
}

.qa-section h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

