.drop {
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.audio-app-shell {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(520px, 1.12fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  min-height: 650px;
  padding: 18px 0 30px;
}

.audio-intro {
  display: grid;
  align-content: center;
  gap: 20px;
}

.product-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--teal-dark);
  font-size: 18px;
}

.product-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--teal), #c2556b);
  box-shadow: 0 12px 30px rgba(20, 124, 130, .25);
  font-weight: 850;
}

.audio-intro h1 {
  max-width: 590px;
  margin: 0;
  font-size: clamp(44px, 6vw, 72px);
  line-height: .96;
  letter-spacing: -.045em;
}

.audio-intro .lede {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.audio-wave {
  height: 130px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.audio-wave span {
  width: 12px;
  height: var(--h);
  min-height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--teal), #c4872d);
  opacity: .75;
  transform-origin: center;
  animation: audio-pulse 1.5s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes audio-pulse {
  0%, 100% { transform: scaleY(.7); opacity: .52; }
  50% { transform: scaleY(1); opacity: 1; }
}

.transcription-workspace {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(215, 222, 233, .95);
  border-radius: 9px;
  box-shadow: 0 24px 70px rgba(24, 33, 47, .14);
}

.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
}

.workspace-toolbar > div:first-child,
.workspace-model {
  display: grid;
  gap: 3px;
}

.workspace-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.workspace-model {
  grid-template-columns: auto auto;
  align-items: center;
}

.workspace-model i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 4px rgba(34, 160, 107, .13);
}

.transcription-workspace form {
  display: grid;
  gap: 17px;
  padding: 22px;
}

.transcription-workspace .drop {
  min-height: 205px;
  margin: 0;
  padding: 28px;
  border-radius: 8px;
  background: #fbfcfe;
}

.transcription-workspace .drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.primary-action {
  width: 100%;
}

.source-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.source-divider::before,
.source-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.url-source {
  display: grid;
  gap: 7px;
}

.url-source > label,
.url-source > small {
  margin: 0;
}

.url-source > small {
  color: var(--muted);
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.url-row input {
  min-width: 0;
}

.processing-options,
.analysis-depth {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.processing-options legend,
.analysis-depth legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pasted-transcript-source {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.pasted-transcript-source .section-head {
  align-items: end;
}

.pasted-transcript-source h3,
.pasted-transcript-source .eyebrow {
  margin: 0;
}

.pasted-transcript-source [data-transcript-count],
.pasted-transcript-source > small {
  color: var(--muted);
  font-size: 12px;
}

.pasted-transcript-source textarea {
  min-height: 210px;
  resize: vertical;
  background: #fff;
  font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pasted-analysis-action {
  width: 100%;
}

.pasted-credit-estimate {
  width: 100%;
  margin: 4px 0 0;
}

.analysis-history-label {
  display: grid;
  gap: 2px;
}

.analysis-history-label small {
  color: var(--muted);
}

.analysis-method-card {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #c9dede;
  border-radius: 8px;
  background: #f2f9f8;
}

.analysis-method-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.analysis-method-card strong {
  color: var(--teal-dark);
}

.analysis-method-card small {
  color: var(--muted);
}

.processing-options .options {
  gap: 10px 22px;
}

.processing-options .options label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  margin: 0;
}

.processing-options .options small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 500;
}

.analysis-controls {
  display: grid;
  gap: 13px;
  padding-top: 4px;
}

.analysis-controls h3,
.analysis-controls .eyebrow {
  margin: 0;
}

.analysis-mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.analysis-mode-buttons button.selected {
  background: var(--teal);
  color: white;
  box-shadow: 0 0 0 3px rgba(20, 124, 130, .13);
}

.analysis-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.analysis-depth.inactive {
  opacity: .68;
}

.analysis-preset-grid label {
  margin: 0;
  cursor: pointer;
}

.analysis-preset-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.analysis-preset-grid span {
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.analysis-preset-grid input:checked + span {
  border-color: var(--teal);
  background: #eef8f7;
  box-shadow: 0 0 0 2px rgba(20, 124, 130, .1);
}

.analysis-preset-grid small {
  color: var(--muted);
  font-weight: 500;
}

.analysis-preset-grid em {
  color: var(--teal-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.custom-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.custom-toggle input {
  width: auto;
  margin-top: 4px;
}

.custom-toggle span,
.custom-toggle small {
  display: block;
}

.custom-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.custom-prompt {
  margin: 0;
}

.custom-prompt[hidden] {
  display: none;
}

.account-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 19px 22px;
  margin: 10px 0 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.account-strip p,
.account-strip strong,
.account-strip span {
  margin: 0;
}

.account-strip strong,
.account-strip span {
  display: block;
}

.account-strip span,
.analysis-meta {
  color: var(--muted);
}

.credit-history-scroll {
  max-height: 535px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.credit-history-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
}

.credit-history-scroll tbody tr {
  height: 49px;
}

.bounded-table {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bounded-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
}

.bounded-table tbody tr {
  height: 49px;
}

.processing-history-scroll {
  max-height: 365px;
}

.audit-log-scroll {
  max-height: 290px;
}

.admin-ledger-scroll {
  max-height: 780px;
}

.worker-queue-scroll {
  max-height: 1025px;
}

.drop > strong {
  color: var(--teal-dark);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.drop > span,
.muted {
  color: var(--muted);
}

.drop.drag-active {
  background: #eaf7f6;
  border-color: var(--teal);
  transform: translateY(-2px);
}

.drop.has-file {
  background: #f2fbfa;
  border-color: var(--teal);
  border-style: solid;
}

.credit-estimate {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.credit-estimate[hidden] {
  display: none;
}

.credit-estimate > div span,
.credit-estimate > div strong {
  display: block;
}

.credit-estimate > div span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.credit-estimate > div strong {
  font-size: 18px;
  margin-top: 3px;
}

.credit-estimate > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.credit-estimate.sufficient {
  background: #eef9f4;
  border-color: #9dd7bd;
}

.credit-estimate.insufficient {
  background: #fff0f2;
  border-color: #e5a4af;
}

.credit-estimate.insufficient > p {
  color: #8d2638;
  font-weight: 700;
}

button[data-credit-blocked="true"] {
  cursor: not-allowed;
}

.job-progress {
  margin: 22px 0;
}

.job-progress > div:first-child {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 7px;
}

.job-progress .progress {
  margin: 0;
}

.job-progress.transcribing .progress span,
.job-progress.analyzing .progress span {
  animation: processing-pulse 1.5s ease-in-out infinite;
}

.job-progress.failed .progress span,
.job-progress.cancelled .progress span {
  background: var(--bad);
}

@keyframes processing-pulse {
  50% { opacity: .55; }
}

.job-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(230px, 1.35fr);
}

.result-actions > strong {
  font-size: 16px;
}

.result-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.result-actions button {
  font-size: 13px;
  padding: 8px 11px;
}

.analysis-content {
  display: grid;
  gap: 16px;
}

.analysis-content article {
  background: #f9fbfb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.analysis-content h3 {
  color: var(--teal-dark);
  font-size: 18px;
  margin: 0 0 10px;
}

.analysis-content p {
  margin: 0;
  white-space: pre-wrap;
}

.analysis-content ul {
  margin: 0;
  padding-left: 22px;
}

.analysis-content li + li {
  margin-top: 8px;
}

.analysis-content dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.analysis-content dl > div {
  border-left: 3px solid #c9dede;
  padding-left: 12px;
}

.analysis-content dt {
  color: var(--teal-dark);
  font-weight: 750;
}

.analysis-content dd {
  margin: 3px 0 0;
}

.financial-analysis-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.financial-analysis-panel > .section-head {
  margin-bottom: 18px;
}

.financial-analysis-panel > .section-head h2 {
  margin-top: 0;
}

.financial-report {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.financial-report-panel {
  overflow: hidden;
  border: 1px solid rgba(215, 222, 233, .95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 33, 47, .14);
}

.financial-report-panel h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #d7dee9;
  background: #f6f8fb;
  font-size: 17px;
  letter-spacing: 0;
}

.financial-panel-body {
  padding: 18px;
}

.financial-summary {
  margin: 0;
  color: #27364a;
  font-size: 15px;
  line-height: 1.62;
}

.financial-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.financial-stat {
  padding: 12px;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  background: #fbfcfe;
}

.financial-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.financial-stat span {
  display: block;
  margin-top: 6px;
  color: #627084;
  font-size: 12px;
}

.financial-item-list,
.financial-plain-list {
  display: grid;
  gap: 10px;
}

.financial-security-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.financial-security,
.financial-item,
.financial-note {
  padding: 14px;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  background: #fbfcfe;
}

.financial-security {
  min-width: 0;
  padding: 12px;
}

.financial-security-head,
.financial-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.financial-symbol {
  color: #0f525c;
  font-size: 18px;
  font-weight: 900;
}

.financial-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf1f6;
  color: #34445a;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.financial-pill.high { color: #fff; background: #c2556b; }
.financial-pill.medium { color: #fff; background: #c4872d; }
.financial-pill.low { color: #fff; background: #16775f; }

.financial-statement {
  margin: 0;
  color: #263348;
  font-size: 15px;
  line-height: 1.65;
}

.financial-security .financial-statement {
  font-size: 13px;
  line-height: 1.45;
}

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

.financial-detail {
  overflow-wrap: anywhere;
  padding: 10px;
  border: 1px solid #e3e9f0;
  border-radius: 8px;
  background: #fff;
  color: #627084;
  font-size: 13px;
  line-height: 1.45;
}

.financial-reasoning {
  margin-top: 10px;
}

.financial-detail b {
  display: block;
  margin-bottom: 3px;
  color: #18212f;
  font-size: 12px;
}

.financial-report blockquote {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #147c82;
  background: #eff7f7;
  color: #31445a;
  font-size: 13px;
  line-height: 1.55;
}

.financial-security blockquote {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.financial-empty {
  margin: 0;
  color: #627084;
  font-size: 14px;
}

@media (max-width: 900px) {
  .audio-app-shell { grid-template-columns: 1fr; }
  .audio-intro { min-height: auto; }
  .job-stats { grid-template-columns: 1fr 1fr; }
  .result-actions { grid-column: 1 / -1; }
  .financial-stat-row,
  .financial-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .financial-security-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .audio-intro h1 { font-size: 44px; }
  .audio-wave { height: 90px; gap: 5px; }
  .audio-wave span { width: 8px; }
  .transcription-workspace form { padding: 16px; }
  .url-row,
  .analysis-mode-buttons,
  .analysis-preset-grid { grid-template-columns: 1fr; }
  .account-strip { display: grid; }
  .credit-estimate { grid-template-columns: 1fr; }
  .credit-estimate > p { grid-column: auto; }
  .job-stats { grid-template-columns: 1fr; }
  .result-actions { grid-column: auto; }
  .result-actions > div { display: grid; }
  .result-actions button { width: 100%; }
  .financial-security-list { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .nav,
  .no-print,
  .job-progress,
  .transcript-panel,
  .timestamps,
  #toast { display: none !important; }
  main { max-width: none; padding: 0; }
  .job-heading { display: block; }
  .job-heading a,
  .job-heading .pill { display: none; }
  .job-heading h1 { font-size: 24px; }
  .job-stats { grid-template-columns: repeat(3, 1fr); break-inside: avoid; }
  .job-stats .result-actions { display: none; }
  .analysis-panel { border: 0; box-shadow: none; margin-top: 16px; padding: 0; }
  .analysis-content article { background: #fff; break-inside: avoid; box-shadow: none; }
  .financial-report-panel { box-shadow: 0 24px 70px rgba(24, 33, 47, .14); }
  .financial-security,
  .financial-item,
  .financial-note,
  .financial-stat { break-inside: avoid; page-break-inside: avoid; }
  .financial-stat-row { grid-template-columns: repeat(3, 1fr); }
  .financial-security-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .financial-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
