:root {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-2: #1a2235;
  --border: #2a3550;
  --text: #e8edf7;
  --muted: #8b98b8;
  --accent: #5b8def;
  --accent-2: #7c5cff;
  --success: #3ecf8e;
  --warning: #f5a623;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #151d30 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
}

.upload-panel {
  margin-top: 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.header__brand { display: flex; gap: 1rem; align-items: center; }

.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
}

.header h1 { font-size: 1.6rem; font-weight: 700; }
.header p { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.header__meta { color: var(--muted); font-size: 0.8rem; align-self: center; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  margin: 0 auto 0.75rem;
  max-width: 1100px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 23, 0.72);
  border-bottom: 1px solid rgba(42, 53, 80, 0.55);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}
.site-header__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a,
.site-nav__menu-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
  opacity: 0.9;
}
.site-nav a:hover,
.site-nav__menu-link:hover,
.site-nav a[aria-current="page"],
.site-nav__menu-link[aria-current="page"] {
  background: transparent;
  color: var(--text);
  opacity: 1;
}
.site-nav__menu {
  position: relative;
  padding-bottom: 0.35rem;
}
.site-nav__submenu {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: -0.35rem;
  z-index: 20;
  min-width: 260px;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(16, 22, 34, 0.98);
  box-shadow: 0 20px 44px rgba(0,0,0,0.34);
  display: grid;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
}
.site-nav__submenu a {
  border-radius: 12px;
  padding: 0.72rem 0.85rem;
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-nav__submenu a:hover,
.site-nav__submenu a[aria-current="page"] {
  background: rgba(91,141,239,0.13);
  border-color: rgba(91,141,239,0.2);
  color: var(--text);
}
.site-nav__menu:hover .site-nav__submenu,
.site-nav__menu:focus-within .site-nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile menu toggle + drawer */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
}

.site-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
}
.site-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.site-drawer.is-open {
  transform: translateX(0);
}
.site-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.site-drawer__close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.site-drawer__nav {
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.site-drawer__link {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.site-drawer__link[aria-current="page"] {
  background: rgba(91, 141, 239, 0.15);
}
.site-drawer__group {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.site-drawer__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.35rem 0.5rem 0.5rem;
}
.site-drawer__group a {
  display: block;
  padding: 0.65rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  border-radius: 8px;
}
.site-drawer__group a:hover,
.site-drawer__group a[aria-current="page"] {
  background: rgba(91, 141, 239, 0.12);
}

body.nav-open {
  overflow: hidden;
}
  transform: translateY(0);
  pointer-events: auto;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.upload-card h2 { margin-bottom: 0.5rem; }
.upload-card > p { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.92rem; }

.start-hero {
  text-align: center;
  padding: 1.25rem 0.5rem 0.5rem;
}
.start-hero[hidden] { display: none !important; }
.start-hero__eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.start-hero h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-bottom: 0.55rem;
}
.start-hero .upload-card__intro {
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.btn--record-hero {
  max-width: 360px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding: 1.15rem 1.75rem;
}
.link-btn {
  display: inline-block;
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--text); }

.upload-only {
  margin-top: 0.5rem;
  text-align: center;
}
.upload-only[hidden] { display: none !important; }
.upload-only .file-drop {
  min-height: 160px;
  margin-bottom: 0.75rem;
}

.post-capture {
  margin-top: 1.25rem;
  animation: fadeIn 0.35s ease;
}
.post-capture[hidden] { display: none !important; }
.post-capture .audio-preview {
  margin-top: 0;
}
.deliver-step {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}
.deliver-email {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.deliver-email input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.deliver-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.btn--analyze {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 1.05rem;
  padding: 0.95rem 1.25rem;
}

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.75rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 0;
  min-height: 180px;
  height: 100%;
  box-sizing: border-box;
}

.file-drop:hover, .file-drop.dragover {
  border-color: var(--accent);
  background: rgba(91, 141, 239, 0.06);
}

.file-drop__icon { font-size: 2rem; }
.file-drop__text { color: var(--muted); font-size: 0.92rem; text-align: center; }

.capture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.capture-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.capture-panel__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.capture-panel__badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(62, 207, 142, 0.15);
  color: var(--success);
  border: 1px solid rgba(62, 207, 142, 0.35);
}

.capture-panel--record {
  justify-content: flex-start;
  border-color: rgba(62, 207, 142, 0.35);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.08);
}

.capture-panel--record .recorder {
  flex: 1;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
}

.capture-panel--record .btn {
  width: 100%;
}

.recorder {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.recorder__status { color: var(--danger); font-size: 0.85rem; font-family: var(--mono); text-align: center; }
.recorder__hint { color: var(--muted); font-size: 0.8rem; margin-top: 0.75rem; }

.capture-area {
  position: relative;
  margin-bottom: 1.25rem;
}
.capture-area--recording .capture-grid {
  visibility: hidden;
  height: 0;
  overflow: hidden;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.recording-live {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem 1.25rem 1.5rem;
  min-height: 280px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 182, 167, 0.45);
  background: linear-gradient(160deg, rgba(23, 182, 167, 0.12), rgba(46, 124, 246, 0.1));
  box-shadow: 0 0 40px rgba(46, 124, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  animation: recordingFadeIn 0.35s ease;
}
.recording-live[hidden] { display: none !important; }

@keyframes recordingFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.recording-live__glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 45%, rgba(23, 182, 167, 0.25), transparent 55%);
  animation: recordingGlow 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes recordingGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.recording-live__orb {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.recording-live__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.recording-live__ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}
.recording-live__ring-fill {
  fill: none;
  stroke: url(#recordingGradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.35s linear;
}
.recording-live__mic {
  font-size: 2.2rem;
  animation: recordingMicPulse 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(23, 182, 167, 0.6));
}
@keyframes recordingMicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.recording-live__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 48px;
  width: 100%;
  max-width: 220px;
  z-index: 1;
}
.recording-live__bar {
  flex: 1;
  max-width: 10px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #17b6a7, #2e7cf6);
  transform: scaleY(0.2);
  transform-origin: bottom;
  transition: transform 0.05s ease-out;
  opacity: 0.85;
}
.recording-live__bar:nth-child(odd) {
  animation: barIdle 1.1s ease-in-out infinite;
}
.recording-live__bar:nth-child(even) {
  animation: barIdle 1.1s ease-in-out infinite 0.15s;
}
.recording-live--active .recording-live__bar:nth-child(odd),
.recording-live--active .recording-live__bar:nth-child(even) {
  animation: none;
}
@keyframes barIdle {
  0%, 100% { transform: scaleY(0.15); }
  50% { transform: scaleY(0.45); }
}

.recording-live__label {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  z-index: 1;
}
.recording-live__timer {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(135deg, #17b6a7, #5b8def);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: 1;
}
.recording-live__timer::after {
  content: "s";
  font-size: 1rem;
  margin-left: 2px;
  opacity: 0.7;
}
.recording-live__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  z-index: 1;
}

.btn--stop {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 280px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.35);
  z-index: 1;
  transition: transform 0.1s, filter 0.2s;
}
.btn--stop:hover {
  filter: brightness(1.06);
}
.btn--stop:active {
  transform: scale(0.98);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: end;
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 0;
}

.form-row input, .form-row select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.65rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  width: 100%;
}

.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--record {
  background: linear-gradient(135deg, #17b6a7, #2e7cf6);
  color: #fff;
  border: none;
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 20px rgba(46, 124, 246, 0.35);
  animation: recordPulse 2.5s ease-in-out infinite;
}

.btn--record:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn--record:active:not(:disabled) {
  transform: scale(0.98);
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(46, 124, 246, 0.35); }
  50% { box-shadow: 0 4px 28px rgba(23, 182, 167, 0.55); }
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto;
}
.loading__title {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.loading__sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.loading__sub strong { color: var(--text); }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(13, 148, 136, 0.35);
  background:
    linear-gradient(120deg, rgba(13, 148, 136, 0.14), rgba(46, 124, 246, 0.08)),
    var(--surface);
  animation: fadeIn 0.45s ease;
}
.report-actions[hidden] { display: none !important; }
.report-actions__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.report-actions__copy strong {
  font-size: 0.98rem;
  color: var(--text);
}
.report-actions__copy span {
  color: var(--muted);
  font-size: 0.85rem;
}
.btn--pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  border: none;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn--pdf:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #fff;
}
.btn--pdf__icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  line-height: 1;
}
@media (max-width: 640px) {
  .report-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn--pdf { justify-content: center; width: 100%; }
}

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

.hero-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.hero-card--health { border-top: 3px solid var(--success); }
.hero-card--comm { border-top: 3px solid var(--accent); }
.hero-card--risk { border-top: 3px solid var(--warning); }

.hero-card__label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.hero-card__value {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: var(--mono);
}

.hero-card__value--text { font-size: 1.6rem; }

.modules { display: flex; flex-direction: column; gap: 1.25rem; }

.module {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.module h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.score-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.score-item__label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.score-item__value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--mono);
}

.score-item__sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.score-item__bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.score-item__bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.feature-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.feature-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.85rem;
}

.feature-row span:first-child { color: var(--muted); }
.feature-row span:last-child { font-family: var(--mono); font-weight: 500; }

.transcript {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 3rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
}

#new-analysis-btn { margin-top: 1.5rem; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 100;
  max-width: 90vw;
}

.toast.success { background: var(--success); color: #0b0f17; }
.toast a { color: #fff; text-decoration: underline; font-weight: 600; }

.score-item--locked {
  opacity: 0.72;
  filter: saturate(0.7);
  position: relative;
}
.score-item--locked::after {
  content: "🔒";
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  font-size: 0.85rem;
}
.score-item__bar-fill--locked {
  width: 100% !important;
  background: repeating-linear-gradient(
    -45deg,
    #2a3550,
    #2a3550 6px,
    #1a2235 6px,
    #1a2235 12px
  ) !important;
}

.paywall {
  grid-column: 1 / -1;
  margin: 0.5rem 0 1rem;
}
.paywall--top {
  margin: 0 0 1.25rem;
}
.unlock-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 124, 246, 0.35);
  background: linear-gradient(135deg, rgba(23, 182, 167, 0.16), rgba(46, 124, 246, 0.18));
  position: sticky;
  top: 0.75rem;
  z-index: 50;
}
.unlock-banner[hidden],
.paywall[hidden] {
  display: none !important;
}
.unlock-banner__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.unlock-banner__copy strong {
  color: var(--text);
  font-size: 0.98rem;
}
.unlock-banner__copy span {
  color: var(--muted);
  font-size: 0.86rem;
}
.unlock-banner .btn {
  width: auto;
  white-space: nowrap;
}
.audio-preview {
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.audio-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.audio-preview audio {
  width: 100%;
  display: block;
}
.audio-preview__hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.paywall__card {
  background: linear-gradient(135deg, rgba(23,182,167,0.12), rgba(46,124,246,0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.paywall__card h3 { margin-bottom: 0.4rem; }
.paywall__card > p { color: var(--muted); margin-bottom: 0.85rem; }
.paywall__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.paywall__list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.req { color: #f87171; font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.paywall__currency {
  margin: 0 0 1rem;
}
.paywall__currency-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.paywall__currency-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.paywall__currency-opt {
  cursor: pointer;
  margin: 0;
}
.paywall__currency-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.paywall__currency-opt span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--text);
}
.paywall__currency-opt span small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.paywall__currency-opt input:checked + span {
  border-color: var(--accent);
  background: rgba(91, 141, 239, 0.12);
  box-shadow: 0 0 0 1px var(--accent);
}
.paywall__currency-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.paywall__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.paywall__form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.paywall__form input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font: inherit;
}
.paywall__note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.payment-return__meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
@media (max-width: 700px) {
  .paywall__form { grid-template-columns: 1fr; }
  .unlock-banner {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }
  .unlock-banner .btn { width: 100%; }
}

.risk-low { color: var(--success); }
.risk-medium { color: var(--warning); }
.risk-high, .risk-critical { color: var(--danger); }

@media (max-width: 700px) {
  .hero-scores { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .capture-grid { grid-template-columns: 1fr; }
  .capture-panel { min-height: 0; }
}

/* ------------------------------------------------------------------ */
/* Site chrome: header, nav, footer                                    */
/* ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}
.site-header__name { font-weight: 700; font-size: 1.15rem; }
.logo--sm { width: 34px; height: 34px; font-size: 1rem; border-radius: 9px; }
.logo-img { display: block; border-radius: 10px; }
.logo-img--sm { border-radius: 8px; }

.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 1.25rem 1rem;
}
.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; gap: 0.75rem; align-items: center; }
.site-footer__brand p { color: var(--muted); font-size: 0.85rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.site-footer__links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-footer__links a:hover { color: var(--text); }
.site-footer__contact {
  margin: 0.85rem auto 0;
  max-width: 1100px;
  padding: 0 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.site-footer__contact a { color: var(--accent); text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; }
.site-footer__copy a { color: var(--accent); text-decoration: none; }
.site-footer__copy a:hover { text-decoration: underline; }
.site-footer__copy {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Home hero + content sections                                        */
/* ------------------------------------------------------------------ */
.hero { text-align: center; padding: 1.5rem 0 2rem; }
.hero--intro {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 2rem;
}
.hero h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 0.75rem; }
.upload-card h2 {
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}
.hero__lead {
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.6;
}
.hero__lead strong { color: var(--text); }

.content-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.content-section h2 { font-size: 1.4rem; margin: 1.5rem 0 0.75rem; }
.content-section p { color: var(--muted);  line-height: 1.7; }
.content-section a { color: var(--accent); }

.howto-section { margin-top: 2rem; }
.howto-steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.8;
}
.howto-steps li { margin-bottom: 0.35rem; }
.howto-steps strong { color: var(--text); }

.faq-section { margin-top: 2rem; }

.notice-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.notice-banner strong { color: var(--text); }
.notice-banner a { color: var(--accent); }

.consent-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1rem 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent-check input { margin-top: 0.2rem; flex-shrink: 0; }
.consent-check a { color: var(--accent); }

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
/* Author display:flex otherwise overrides [hidden] and buttons appear broken */
.consent-banner[hidden] {
  display: none !important;
}
.consent-banner p {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.consent-banner a { color: var(--accent); }
.consent-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn--sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  width: auto;
}

.promo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(91, 141, 239, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91,141,239,0.12), rgba(124,92,255,0.12));
}
.promo-banner__copy {
  display: grid;
  gap: 0.2rem;
}
.promo-banner__title {
  font-size: 0.95rem;
  font-weight: 700;
}
.promo-banner__text {
  font-size: 0.88rem;
  color: var(--muted);
}
.promo-banner__link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.9rem; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
}
details summary { cursor: pointer; font-weight: 600; }
details p { margin-top: 0.5rem; }

/* ------------------------------------------------------------------ */
/* Blog + article + legal pages                                        */
/* ------------------------------------------------------------------ */
.page { max-width: 820px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.page--center { text-align: center; }
.page__header { margin-bottom: 1.5rem; }
.page__header h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 0.5rem; }
.page__header p { color: var(--muted); }
.page__meta { font-size: 0.85rem; color: var(--muted); font-family: var(--mono); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.1s;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.post-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.post-card__meta { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); }

.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb span { margin: 0 0.35rem; }

.article-body { color: var(--text); line-height: 1.75; }
.article-body h2 { font-size: 1.35rem; margin: 1.75rem 0 0.6rem; }
.article-body h3 { font-size: 1.1rem; margin: 1.25rem 0 0.4rem; }
.article-body p, .article-body li { color: #c7d0e4; }
.article-body ul, .article-body ol { margin: 0.5rem 0 1rem 1.4rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body a { color: var(--accent); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.article-body th { background: var(--surface-2); }

.cta-box {
  margin-top: 2.5rem;
  background: linear-gradient(135deg, rgba(91,141,239,0.12), rgba(124,92,255,0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}
.cta-box h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.cta-box p { color: var(--muted); margin-bottom: 1rem; }
.cta-box .btn { display: inline-block; text-decoration: none; width: auto; }

.tool-panel {
  display: grid;
  gap: 1rem;
}
.tool-panel label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.tool-panel input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
}
.tool-result {
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

@media (max-width: 700px) {
  .app {
    padding: 0.75rem 1rem 3rem;
  }
  .hero--intro {
    padding: 1.25rem 0 1.5rem;
    margin-top: 0.25rem;
  }
  .hero--intro h1 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }
  .hero__lead {
    font-size: 0.92rem;
    line-height: 1.55;
  }
  .upload-card {
    padding: 1.25rem;
  }
  .upload-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
  }
  .upload-card__intro small {
    display: block;
    margin-top: 0.35rem;
    line-height: 1.4;
  }
  .capture-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .capture-panel--record {
    order: -1;
  }
  .capture-panel {
    min-height: 0;
  }
  .file-drop {
    min-height: 140px;
  }
  .btn--record {
    font-size: 1.1rem;
    padding: 1.1rem 1.25rem;
    min-height: 48px;
  }
  .recording-live {
    min-height: 260px;
    padding: 1.75rem 1rem 1.25rem;
  }
  .recording-live__timer {
    font-size: 2.2rem;
  }
  .btn--primary,
  .btn--secondary {
    min-height: 48px;
  }
  .hero h1 { font-size: 1.6rem; }
  .site-header {
    position: sticky;
    top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
  }
  .site-nav--desktop {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .site-footer__inner { flex-direction: column; }
  .promo-banner { flex-direction: column; align-items: flex-start; }
  .promo-banner__link { white-space: normal; }
}
