/* IADBOM TECH: shared palette and surfaces, layered over the functional layouts. */
:root {
  --paper: #f3f7fb;
  --paper-strong: #ffffff;
  --ink: #13314b;
  --muted: #5c7185;
  --rule: #d5e2ec;
  --rule-dark: #bfd2e2;
  --coral: #006ba6;
  --coral-dark: #005484;
  --blue: #006ba6;
  --mint: #008575;
  --radius: 14px;
  --brand-navy: #092c4b;
  --brand-teal: #00a9b5;
  --brand-shadow: 0 8px 28px rgb(20 57 88 / 6%);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
body { background: var(--paper); }
.topbar {
  height: 82px; padding: 0 28px; gap: 22px;
  background: var(--brand-navy); color: #eaf4fb;
  border-bottom: 3px solid var(--brand-teal);
  box-shadow: 0 4px 20px rgb(9 44 75 / 12%);
}
.brand {
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
  padding: 0 22px 0 0; border-color: #31516c; color: white;
  font-family: inherit; font-size: 23px; font-weight: 750; letter-spacing: -.8px;
}
.brand-logo { width: 48px; height: 58px; object-fit: contain; flex-shrink: 0; padding: 3px; background: white; border-radius: 4px; }
.listen-brand { display: inline-flex; align-items: center; gap: 11px; justify-self: start; }
.listen-brand .brand-logo { width: 40px; height: 50px; }
.brand-wordmark { display: grid; gap: 5px; text-align: left; line-height: 1; }
.brand-wordmark small { color: #9bdde4; font-size: 9px; font-weight: 650; letter-spacing: 2px; }
.desktop-nav { gap: 6px; }
.desktop-nav button { padding: 10px 11px; font-size: 12px; border-radius: 8px; white-space: nowrap; color: #cedde9; }
.desktop-nav button svg { width: 16px; height: 16px; }
.desktop-nav button:hover, .desktop-nav button.is-current { background: #174560; color: #fff; box-shadow: none; }
.desktop-nav button:first-child { background: #006b89; color: white; }
.connection { color: #c3d7e7; white-space: nowrap; font-size: 11px; }
.connection span { background: #46d6be; box-shadow: 0 0 0 3px rgb(70 214 190 / 12%); }
.locale-select { background: #163c59; border-color: #406078; color: white; }
.locale-select option { background: white; color: var(--ink); }
.profile { color: #cedde9; border-color: #406078; }
.app-shell > main { width: min(1400px, calc(100% - 80px)); padding-top: 36px; }
.intro { padding-bottom: 8px; }
.intro h1, .text-audio-heading h1, .history-heading h1, .diagnostic-heading h1,
.log-heading h1, .settings-page-heading > h1, .language-gate h1 {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-weight: 750; text-transform: none; letter-spacing: -1.5px; line-height: 1.15;
  color: var(--brand-navy);
}
.intro h1 { font-size: clamp(30px, 3vw, 44px); max-width: 1120px; }
.intro p { font-size: 15px; max-width: 980px; margin-top: 10px; }
.bible-status { background: #e5f4f1; color: #23685e; border-color: #bfdfd8; font-size: 11px; }
.progress-rail { margin: 22px 0 26px; padding: 18px 22px; background: white; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--brand-shadow); }
.progress-rail li > span { width: 34px; height: 34px; flex-basis: 34px; background: #f0f5f9; border-color: #d4e1ec; color: #6b8296; font-size: 13px; }
.progress-rail li strong { color: var(--muted); font-size: 12px; }
.progress-rail li.is-active > span { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px #e8f4fa; }
.progress-rail li.is-active strong { color: var(--blue); }
.progress-rail li:not(:last-of-type)::after { background: #dce7ef; }
.rail-wave { color: var(--brand-teal); width: 78px; }
.workspace { gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); }
.video-preview { width: 100%; height: 378px; border: 1px solid #1b5778; box-shadow: var(--brand-shadow); }
.video-preview img.video-preview-brand { object-fit: contain; padding: 38px 56px; background: var(--brand-navy); }
.video-preview-placeholder { background: linear-gradient(135deg, #092c4b, #105b7b); color: #c9e3ef; }
.video-preview-placeholder > svg { color: #76d0da; }
.studio-controls { background: white; padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius); gap: 12px; box-shadow: var(--brand-shadow); }
.field > span:first-child { font-size: 12px; font-weight: 650; color: var(--ink); }
.control-wrap > svg { color: #7291a7; }
.control-wrap input, .control-wrap select { border-color: #cbdce9; background-color: #f8fbfd; border-radius: 9px; min-height: 44px; }
.primary-button { background: linear-gradient(105deg, #006ba6, #00818f); border-color: #00758f; box-shadow: 0 4px 10px rgb(0 107 166 / 14%); min-height: 46px; font-size: 13px; border-radius: 9px; }
.primary-button:hover:not(:disabled) { background: #005b87; }
.secondary-button, .pipeline-shortcut { border-color: #cbdce9; background: #f8fbfd; border-radius: 9px; }
.pipeline-shortcut { padding: 10px 13px; }
.media-dropzone { border-color: #aacddd; background: #f3fafc; }
.transcript-studio { background: white; border-color: var(--rule); box-shadow: var(--brand-shadow); margin-top: 24px; }
.transcript-column > header { height: 48px; background: #f8fbfd; border-color: var(--rule); color: var(--brand-navy); }
.transcript-column--original, .transcript-column--translated, .transcript-row { border-color: #e1eaf2; }
.transcript-row { padding-top: 8px; padding-bottom: 8px; }
.transcript-row time { color: #5d819d; }
.transcript-row > svg { color: #7b98ad; }
.translation-marker { background: #f4f8fb; color: var(--blue); }
.translation-marker svg { background: white; border-color: var(--rule); }
.audio-player { background: white; border: 1px solid #b9dce9; box-shadow: var(--brand-shadow); }
.settings-nav { top: 82px; border-color: var(--rule); background: #edf3f8; }
.settings-nav a:first-child, .settings-nav a:hover { background: #e0eff6; }
.settings-content { background: white; }
.settings-section, .settings-page-heading { border-color: var(--rule); scroll-margin-top: 95px; }
.settings-utility-section, .text-audio-form, .history-card { background: white; border-color: var(--rule); box-shadow: var(--brand-shadow); }
.settings-field input, .settings-field select, .text-audio-field input, .text-audio-field select, .text-audio-editor textarea { background: #f8fbfd; border-color: #cbdce9; border-radius: 9px; }
.language-gate { background: radial-gradient(ellipse at top, #d9f0f4, var(--paper) 65%); }
.language-gate__dialog { border-color: var(--rule); background: white; box-shadow: 0 22px 70px rgb(9 44 75 / 10%); }
.language-gate__logo { width: 100px; height: 100px; object-fit: contain; margin-bottom: 18px; }
.language-gate__brand { font-family: inherit; color: var(--brand-navy); font-weight: 750; letter-spacing: -.5px; }
.language-gate__choices button { border-color: var(--rule); }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid #00a9b5; outline-offset: 3px; }
@media (max-width: 1250px) {
  .topbar { padding-inline: 20px; gap: 14px; }
  .desktop-nav { gap: 2px; }
  .desktop-nav button { padding: 10px 7px; font-size: 11px; gap: 5px; }
  .connection { display: none; }
  .locale-select { margin-left: auto; }
  .app-shell > main { width: calc(100% - 48px); }
}
@media (max-width: 1050px) {
  .desktop-nav, .profile { display: none; }
  .mobile-actions { display: flex; color: #eaf4fb; gap: 16px; margin-left: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .video-preview { height: 330px; }
  .progress-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .progress-rail--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rail-wave { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 80px; padding: 12px 18px; flex-wrap: wrap; gap: 12px; }
  .brand { border: 0; padding: 0; font-size: 22px; }
  .brand-logo { width: 38px; height: 46px; }
  .locale-select { display: inline-flex; }
  .mobile-actions { width: 100%; justify-content: space-between; padding-top: 7px; border-top: 1px solid #31516c; }
  .mobile-actions button { padding: 5px 10px; }
  .app-shell > main { width: calc(100% - 32px); padding-top: 26px; }
  .intro h1 { font-size: 30px; letter-spacing: -1px; }
  .intro p { font-size: 13px; }
  .progress-rail { margin: 20px 0; padding: 14px 10px; gap: 4px; }
  .progress-rail li { gap: 7px; flex-direction: column; text-align: center; }
  .progress-rail li strong { font-size: 9px; white-space: normal; }
  .progress-rail li:not(:last-of-type)::after { display: none; }
  .workspace { gap: 18px; }
  .video-preview { height: 230px; }
  .studio-controls { padding: 16px; }
  .field-row { gap: 10px; }
  .transcript-studio { padding: 10px; background: white; border: 1px solid var(--rule); border-radius: var(--radius); }
  .audio-player { padding: 15px; border: 1px solid var(--rule); border-radius: var(--radius); }
  .settings-content { padding: 24px 16px 100px; }
  .language-gate h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Listen uses the same brand tokens and surfaces as Studio. */
.listen-site { background: var(--paper); color: var(--ink); --listen-blue: var(--blue); --listen-coral: var(--blue); --listen-rule: var(--rule); }
.listen-header { height: 82px; padding-inline: 28px; gap: 22px; background: var(--brand-navy); color: #eaf4fb; border-bottom: 3px solid var(--brand-teal); box-shadow: 0 4px 20px rgb(9 44 75 / 12%); }
.listen-brand { color: white; font-family: inherit; font-size: 23px; font-weight: 750; letter-spacing: -.8px; }
.listen-brand .brand-logo { width: 48px; height: 58px; }
.listen-header nav { gap: 6px; }
.listen-header nav a { padding: 10px 14px; color: #cedde9; font-size: 12px; border-radius: 8px; }
.listen-header nav a:hover { color: white; background: #174560; }
.listen-header__actions label { padding: 8px 10px; border: 1px solid #406078; border-radius: 8px; background: #163c59; }
.listen-header__actions select, .listen-header__actions button, .listen-header__actions a { color: #eaf4fb; }
.listen-header__actions select option { background: white; color: var(--ink); }
.listen-main, .listen-admin-main { width: min(1400px, calc(100% - 80px)); padding-top: 36px; }
.listen-main > h1, .listen-feature__media h2, .listen-transcript h2, .listen-latest h2, .listen-feed h3, .listen-footer strong, .listen-admin-title h1, .listen-mini-player strong { font-family: inherit; color: var(--brand-navy); font-weight: 750; }
.listen-main > h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1.15; letter-spacing: -1.5px; }
.listen-feature__media h2 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -.8px; }
.listen-language-tabs { margin: 22px 0 26px; padding: 10px; gap: 6px; background: white; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--brand-shadow); }
.listen-language-tabs button { padding: 11px 16px; border: 0; border-radius: 8px; color: var(--muted); font-size: 13px; }
.listen-language-tabs button.is-active { color: white; background: var(--blue); }
.listen-language-tabs button:hover:not(.is-active) { background: #edf5fa; color: var(--blue); }
.listen-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.listen-feature__media, .listen-feature__audio, .listen-admin-panel, .listen-admin-metrics > article { padding: 22px; background: white; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--brand-shadow); }
.listen-source-consent, .listen-source-fallback, .listen-source-embed, .listen-source-empty { border-radius: 9px; }
.listen-source-consent__play, .listen-player__controls .listen-player__play { background: linear-gradient(105deg, #006ba6, #00818f); }
.listen-translation-select, .listen-latest > header label { background: #f8fbfd; border-color: #cbdce9; border-radius: 9px; }
.listen-player { border-radius: 9px 9px 0 0; background: #f8fbfd; }
.listen-transcript { border-radius: 0 0 9px 9px; overflow: hidden; }
.listen-transcript > header { background: #f8fbfd; }
.listen-transcript h2 { font-size: 18px; }
.listen-transcript__scroll button.is-active { box-shadow: inset 4px 0 var(--brand-teal); background: #e8f4fa; color: var(--brand-navy); }
.listen-feed article { margin-top: 12px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: white; box-shadow: var(--brand-shadow); }
.listen-feed article.is-current { background: #edf7fb; border-color: #aacddd; }
.listen-feed h3 { font-size: 19px; }
.listen-feed__languages { flex-wrap: wrap; }
.listen-feed__languages button { border-color: var(--rule); border-radius: 6px; }
.listen-feed__languages button.is-active { background: #e8f4fa; }
.listen-load-more, .listen-admin-secondary { border-radius: 9px; background: #f8fbfd; }
.listen-footer { background: #edf3f8; color: var(--muted); border-color: var(--rule); }
.listen-latest, .listen-footer { scroll-margin-top: 100px; }
.listen-site select:focus-visible, .listen-site input:focus-visible { outline: 3px solid var(--brand-teal); outline-offset: 3px; }
@media (max-width: 1200px) {
  .listen-feed article { column-gap: 12px; grid-template-columns: 120px 110px minmax(140px, 1fr) auto 50px 85px; }
  .listen-feed__cover { width: 120px; }
}
@media (max-width: 900px) {
  .listen-header { height: 80px; padding-inline: 18px; gap: 12px; }
  .listen-brand { font-size: 22px; }
  .listen-brand .brand-logo { width: 38px; height: 46px; }
  .listen-header__actions { gap: 8px; }
  .listen-header nav { top: 100%; background: var(--brand-navy); border-color: #31516c; border-radius: 9px; }
  .listen-main, .listen-admin-main { width: calc(100% - 32px); padding-top: 26px; }
  .listen-main > h1 { font-size: 30px; letter-spacing: -1px; }
  .listen-feature__media, .listen-feature__audio { padding: 16px; }
  .listen-language-tabs { margin-block: 20px; }
  .listen-feed article { grid-template-columns: 30% minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; }
  .listen-feed__cover { width: 100%; }
  .listen-feed h3 { font-size: 17px; overflow-wrap: anywhere; }
  .listen-feed__languages { overflow: visible; }
}
@media (max-width: 420px) {
  .listen-header { padding-inline: 12px; gap: 6px; }
  .listen-brand { gap: 7px; font-size: 20px; }
  .listen-header__actions { gap: 4px; }
  .listen-header__actions label { padding: 6px; }
  .listen-header__actions button { width: 30px; }
  .listen-translation-select { gap: 6px; padding-inline: 10px; }
  .listen-player { padding-inline: 10px; }
  .listen-volume input { width: 44px; }
}