* { box-sizing: border-box; }
:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #151515; background: #f5f5f3; }
body { margin: 0; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 48px auto 80px; }
.narrow { width: min(720px, calc(100% - 32px)); }
h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin-top: 0; }
.lede, .muted { color: #666; }
.card, .scene-card { background: white; border: 1px solid #ddd; border-radius: 14px; padding: 24px; }
.card { margin-top: 24px; }
label { display: block; font-weight: 650; margin: 16px 0 7px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #bbb; border-radius: 8px; background: white; }
textarea { resize: vertical; }
button, .button-link { border: 0; border-radius: 8px; padding: 11px 17px; font: inherit; font-weight: 700; cursor: pointer; background: #151515; color: white; text-decoration: none; display: inline-block; }
button:disabled { opacity: .38; cursor: default; }
button.secondary { background: #e9e9e6; color: #151515; }
.secondary-link { background: #e9e9e6; color: #151515; }
form button { margin-top: 18px; }
progress { width: 100%; height: 18px; }
.error { color: #a00000; }
.notice { background: #fff6d9; border: 1px solid #e6ce79; padding: 12px 14px; border-radius: 8px; margin: 18px 0; }
.hidden { display: none !important; }
.page-header { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.header-actions, .bottom-actions { display: flex; gap: 10px; flex-shrink: 0; }
.storyboard-page-header { margin-bottom: 0; }
.storyboard-reset-row { display: flex; justify-content: flex-end; margin: -4px 0 18px; }
.overlay-style-card { margin: 16px 0 22px; padding: 18px 22px; }
.overlay-style-card h2 { margin: 0 0 12px; font-size: .94rem; text-transform: uppercase; letter-spacing: .08em; }
.overlay-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; align-items: start; }
.overlay-style-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.overlay-style-grid label, .overlay-color-control { display: block; margin: 0; font-weight: 650; font-size: .9rem; }
.overlay-style-grid select { display: block; margin-top: 6px; padding: 8px 10px; }
.overlay-choice-control { min-width: 0; }
.overlay-choice-label { display: block; margin: 0 0 6px; font-weight: 650; font-size: .9rem; }
.overlay-choice-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.overlay-choice-row .music-arrow { width: 34px; height: 34px; min-width: 34px; }
.overlay-choice-value { min-width: 0; display: block; padding: 8px 10px; background: #f0f0ee; border: 1px solid #c8c8c4; border-radius: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.overlay-color-control > span { display: block; margin-bottom: 6px; }
.overlay-color-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; font-size: .88rem; text-align: left; }
.overlay-color-swatch, .color-candidate { display: inline-block; flex: none; width: 23px; height: 23px; border: 1px solid #777; border-radius: 4px; }
.overlay-slider-row { display: flex; gap: 12px; align-items: center; margin-top: 5px; }
.overlay-slider-row input { flex: 1; min-width: 0; padding: 0; accent-color: #b50d1a; }
.overlay-slider-row output { min-width: 4.2em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.overlay-slider-control small { display: block; color: #777; font-weight: 400; }
.overlay-color-picker { position: fixed; z-index: 100; width: 274px; padding: 14px; background: #fff; border: 1px solid #bbb; border-radius: 10px; box-shadow: 0 12px 32px rgb(0 0 0 / 28%); }
.overlay-color-picker[hidden] { display: none; }
.color-palette { position: relative; height: 150px; border-radius: 5px; cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); }
.color-palette-marker { position: absolute; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1.5px #111, 0 1px 3px #111; transform: translate(-50%, -50%); pointer-events: none; }
.overlay-color-picker label { margin: 10px 0 4px; font-size: .8rem; }
.color-hue { padding: 0; height: 20px; appearance: none; border: 0; border-radius: 4px; background: linear-gradient(to right, red, #ff0, #0f0, #0ff, #00f, #f0f, red); }
.color-hue::-webkit-slider-thumb { appearance: none; width: 12px; height: 20px; border: 2px solid #fff; box-shadow: 0 0 0 1px #111; border-radius: 3px; background: transparent; cursor: pointer; }
.color-hex-row { display: flex; gap: 8px; align-items: center; }
.color-hex { min-width: 0; padding: 7px 9px; }
.color-picker-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 11px; }
.color-picker-actions button { padding: 7px 11px; font-size: .84rem; }
.bottom-actions.storyboard-controls { display: flex; justify-content: space-between; align-items: center; }
.storyboard-action-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: #777; }
.scene-card { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; margin: 22px 0; }
.scene-insertion { display: flex; justify-content: center; align-items: center; min-height: 24px; margin: 4px 0; position: relative; }
.scene-insertion::before { content: ""; height: 1px; background: #ddd; position: absolute; left: 12%; right: 12%; top: 50%; }
.scene-add-button { position: relative; z-index: 1; width: 32px; height: 32px; min-width: 32px; padding: 0; border: 2px solid #f5f5f3; border-radius: 50%; font-size: 1.25rem; line-height: 1; }
.scene-heading-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.scene-heading-row h2 { margin: 0; font-size: 1.25rem; }
.scene-delete-button { width: 30px; height: 30px; min-width: 30px; padding: 0; border-radius: 50%; color: #8d1018 !important; background: #f4e7e7 !important; font-size: 1.2rem; line-height: 1; }
.scene-delete-button:hover, .scene-delete-button:focus-visible { background: #e9caca !important; }
.scene-preview-placeholder { position: absolute; inset: 0; display: grid; place-content: center; padding: 20px; text-align: center; color: #eee; background: #252525; font-size: .92rem; line-height: 1.5; }
.scene-preview-placeholder[hidden] { display: none; }
.storyboard-empty-state { text-align: center; padding: 30px 20px; color: #555; }
.storyboard-empty-state p { margin: 4px; }
.scene-preview { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.scene-image-arrow { width: 36px; height: 36px; min-width: 36px; padding: 0; border-radius: 50%; font-size: .85rem; }
.scene-preview-frame { position: relative; width: 100%; aspect-ratio: 9/16; overflow: hidden; border-radius: 10px; background: #111; }
.preview-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-caption-image { position: absolute; left: 0; top: 0; display: block; cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; }
.scene-caption-image[hidden] { display: none; }
.scene-caption-image:hover { outline: 1px solid rgb(255 255 255 / 65%); }
.scene-caption-image.is-dragging { cursor: grabbing; }
.scene-caption-line { position: absolute; pointer-events: none; user-select: none; transform-origin: center center; }
.scene-caption-line[hidden] { display: none; }
.scene-warning { color: #8a5b00; margin-top: 12px; white-space: pre-line; }
.scene-status { margin-top: 10px; font-size: .92rem; }
.bottom-actions { justify-content: flex-end; margin-top: 28px; }
.voiceover-bottom-actions { align-items: center; flex-wrap: wrap; }
.voiceover-navigation { display: flex; gap: 10px; margin-left: auto; }
.tts-controls, .tts-voice-selector { display: flex; align-items: center; gap: 8px; }
.tts-controls { flex-wrap: wrap; }
.tts-voice-selector { border: 1px solid var(--border, #d8d8d4); border-radius: 8px; padding: 3px; }
.tts-voice-selector button { padding: 8px 10px; }
#tts-voice { min-width: 90px; text-align: center; }
#tts-message { font-size: .875rem; max-width: 280px; }
.result-shell { max-width: 760px; }
.result-video { width: min(420px, 100%); display: block; margin: 24px auto; background: #111; }
.recent-videos-section { margin-top: 32px; }
.recent-videos-heading { margin: 0 0 12px; font-size: 1rem; letter-spacing: .09em; text-transform: uppercase; }
.recent-videos-list { display: grid; gap: 10px; }
.recent-video-card { position: relative; display: flex; gap: 14px; align-items: center; min-width: 0; padding: 12px 48px 12px 12px; background: #fff; border: 1px solid #ddd; border-radius: 12px; }
.recent-project-thumb-wrap { display: block; flex: none; width: 68px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px; background: #202020; }
.recent-video-thumb { display: grid; width: 100%; height: 100%; object-fit: cover; }
.recent-video-placeholder { place-items: center; color: #eee; font-size: 1rem; }
.recent-video-details { flex: 1; min-width: 0; }
.recent-video-title { display: block; color: #151515; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #bbb; text-underline-offset: 2px; }
.recent-video-title:hover { text-decoration: underline; }
.recent-video-creator, .recent-video-date { display: block; margin: 5px 0 0; color: #666; font-size: .88rem; overflow-wrap: anywhere; }
.recent-videos-empty { margin: 0; padding: 16px; color: #666; background: #fff; border: 1px solid #ddd; border-radius: 12px; }
.project-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.project-action { display: grid; place-items: center; width: 36px; height: 36px; padding: 7px; border: 1px solid #d6d6d2; border-radius: 8px; color: #333; background: #f7f7f5; text-decoration: none; cursor: pointer; }
.project-action:hover, .project-action:focus-visible { background: #ececea; color: #8c1018; }
.project-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.project-action.is-disabled, .project-action:disabled { opacity: .32; cursor: not-allowed; }
.project-delete { position: absolute; top: 8px; right: 9px; display: grid; place-items: center; width: 27px; height: 27px; min-width: 27px; padding: 0; border-radius: 50%; color: #a20f1a; background: #f7e9e9; font-size: 1.25rem; line-height: 1; }
.project-delete:hover, .project-delete:focus-visible { color: #fff; background: #b50d1a; }
.project-information { position: absolute; right: 9px; bottom: 9px; z-index: 8; }
.project-info-button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid #777; border-radius: 50%; color: #34363a; background: #f3f3f0; font: 700 .78rem Georgia, serif; cursor: pointer; }
.project-info-button:hover, .project-info-button:focus-visible { color: #fff; background: #34363a; }
.project-info-tooltip { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 30; width: min(310px, calc(100vw - 40px)); padding: 13px 14px; border: 1px solid #d4d4d0; border-radius: 8px; color: #202020; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
.project-info-tooltip[hidden] { display: none; }
.project-info-tooltip h3 { margin: 0 0 10px; font-size: .95rem; }
.project-info-tooltip dl { display: grid; gap: 7px; margin: 0; font-size: .82rem; }
.project-info-tooltip dl > div { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 8px; }
.project-info-tooltip dt { color: #666; }
.project-info-tooltip dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.project-info-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.project-info-copy-status { min-height: 1em; margin: 0; color: #526b51; font-size: .78rem; }
.project-info-copy { min-width: 62px; padding: 5px 10px; font-size: .82rem; }
.project-list-status { min-height: 1.2em; margin: 5px 0 0; color: #527052; font-size: .84rem; }
.delete-project-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid #ccc; border-radius: 14px; box-shadow: 0 18px 60px rgb(0 0 0 / 25%); }
.delete-project-dialog::backdrop { background: rgb(20 20 20 / 45%); }
.delete-project-content { padding: 24px; }
.delete-project-content h2 { margin: 0 0 14px; font-size: 1.3rem; }
.delete-project-content p { color: #555; line-height: 1.5; }
.delete-project-title { color: #151515 !important; font-weight: 750; overflow-wrap: anywhere; }
.delete-project-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.delete-project-actions button { margin: 0; }
.danger-button { background: #b50d1a; }
.voiceover { line-height: 1.65; white-space: pre-wrap; }
.voiceover-shell { max-width: 940px; }
.voiceover-waveform-layout { display: flex; align-items: stretch; gap: 12px; margin: 28px 0 16px; }
.voiceover-script-card + .voiceover-waveform-layout { margin-top: 16px; }
.voiceover-waveform-frame { position: relative; flex: 1; min-width: 0; }
.voiceover-scene-labels { position: relative; height: 24px; pointer-events: none; }
.voiceover-scene-label, .voiceover-missing-marker { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: .78rem; font-weight: 600; color: #333; }
.voiceover-scene-label { overflow: hidden; text-overflow: ellipsis; text-align: center; }
.voiceover-missing-marker { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e5e5e3; font-size: 1rem; }
.voiceover-scene-boundary { position: absolute; top: 0; bottom: 0; width: 2px; background: #bfc6c8; opacity: .85; pointer-events: none; z-index: 2; }
.voiceover-scene-label[hidden], .voiceover-missing-marker[hidden], .voiceover-scene-boundary[hidden] { display: none; }
.voiceover-seek-surface { position: relative; cursor: pointer; touch-action: none; }
.voiceover-seek-surface:focus-visible { outline: 3px solid #151515; outline-offset: 2px; border-radius: 12px; }
.audio-display { display: block; width: 100%; height: 180px; background: #191919; border-radius: 12px; }
.voiceover-playhead { position: absolute; top: 0; bottom: 0; left: 0; border-left: 2px solid #f1bf39; filter: drop-shadow(0 0 2px #151515); pointer-events: none; }
.voiceover-history-controls { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.voiceover-history-button { width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 50%; font-size: 1.65rem; line-height: 1; }
.recording-overlay { position: absolute; right: 14px; bottom: 12px; z-index: 1; margin: 0; padding: 5px 8px; color: #fff; background: rgba(0,0,0,.68); border-radius: 5px; font-size: .86rem; pointer-events: none; }
.recording-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.playback-music-option { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 4px; font-size: .88rem; font-weight: 600; }
.playback-music-option input, .music-ducking-option input { width: auto; flex: none; padding: 0; margin: 0; accent-color: #b50d1a; }
.playback-music-option small { color: #777; font-size: .76rem; font-weight: 400; white-space: nowrap; }
.record-action { display: inline-flex; align-items: center; gap: 9px; min-width: 116px; justify-content: center; }
.record-action { background: #b50d1a; }
.record-action.is-recording { background: #151515; }
.record-symbol { display: inline-block; width: 17px; height: 17px; background: white; border-radius: 50%; }
.stop-symbol { display: inline-block; width: 15px; height: 15px; background: white; }
.music-settings-layout { display: block; margin-top: 24px; }
.music-browser { width: 100%; min-height: 177px; margin: 0; padding: 18px 22px; }
.music-browser .eyebrow { margin: 0 0 5px; font-size: .74rem; }
.music-title { height: 28px; margin: 0 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.1rem; }
.music-browser-row { display: flex; align-items: center; gap: 10px; }
.music-choice-display { flex: 1; min-width: 0; }
.music-arrow { width: 38px; height: 38px; min-width: 38px; padding: 0; border-radius: 50%; }
.music-preview { flex: 1; min-width: 0; height: 56px; display: flex; align-items: center; gap: 10px; padding: 4px 10px; background: #f0f0ee; border-radius: 8px; }
.music-no-track { min-height: 56px; display: grid; place-items: center; padding: 10px; color: #686868; background: #f0f0ee; border: 1px dashed #bbb; border-radius: 8px; text-align: center; }
.music-no-track[hidden], .music-preview-row[hidden], .music-preview[hidden] { display: none; }
.music-play { width: 36px; height: 36px; min-width: 36px; padding: 0; border-radius: 50%; font-size: .9rem; }
.music-waveform-frame { position: relative; isolation: isolate; flex: 1; height: 42px; min-width: 0; cursor: pointer; touch-action: none; overflow: hidden; border-radius: 3px; background: #f0f0ee; }
.music-waveform-frame:focus-visible { outline: 3px solid #151515; outline-offset: 2px; border-radius: 3px; }
#music-waveform { position: relative; z-index: 2; display: block; width: 100%; height: 42px; }
.music-playhead { z-index: 3; }
.music-final-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 22px; margin-top: 14px; }
.music-final-label { grid-column: 1 / -1; margin: 0; color: #777; font-size: .73rem; }
.music-volume-control { display: block; min-width: 0; margin: 0; font-weight: 650; font-size: .9rem; }
.music-volume-control > label { margin: 0; font: inherit; }
.music-ducking-option { display: flex; align-items: center; gap: 9px; margin: 0 0 5px; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.music-playhead { position: absolute; top: 0; bottom: 0; left: 0; border-left: 2px solid #f1bf39; filter: drop-shadow(0 0 2px #151515); pointer-events: none; }
.music-error { margin: 5px 0 0; font-size: .82rem; }
.voiceover-script-card { margin-top: 22px; }
.voiceover-script-card .voiceover { font-size: 1.17rem; white-space: normal; }
.voiceover-script-card { position: relative; }
.verification-overall { position: absolute; top: 18px; right: 22px; color: #176b32; font-size: .92rem; font-weight: 750; }
.verification-overall[hidden] { display: none; }
.script-unit { display: inline; padding: 0 2px; margin: 0; border-radius: 3px; color: #18231b; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.script-unit.verification-passed { background: #dcefe1; }
.script-unit.verification-warning, .script-unit.verification-failed { background: #f7dddd; color: #462020; }
.script-unit.verification-pending, .script-unit.verification-checking { background: rgb(180 180 180 / 12%); }
.voiceover-verification { margin-top: 24px; }
.voiceover-verification h2 { margin: 0 0 14px; font-size: 1rem; }
.voiceover-verification-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.verification-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(145px, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-left: 4px solid #b8b8b8; border-radius: 5px; background: #f5f5f3; }
.verification-scene-actions { display: flex; gap: 5px; }
.verification-scene-actions button { min-height: 32px; padding: 5px 9px; font-size: .8rem; }
button.verification-record { background: #b50d1a; color: #fff; }
button.verification-record.is-recording { background: #151515; }
.verification-scene-script { grid-column: 1 / -1; margin: 0; padding: 7px 9px; border-radius: 4px; background: #fff; font-size: .9rem; line-height: 1.4; }
.verification-row.verification-passed { border-left-color: #31834a; }
.verification-row.verification-warning { border-left-color: #c68b13; }
.verification-row.verification-failed { border-left-color: #bd3e3e; }
.verification-row.is-selected { outline: 2px solid #555; }
.verification-unit-select { padding: 2px; border: 0; background: transparent; color: #222; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.verification-unit-status { color: #555; font-size: .9rem; }
.verification-passed .verification-unit-status { color: #176b32; }
.verification-warning .verification-unit-status { color: #8a5b00; }
.verification-failed .verification-unit-status { color: #9e2525; }
.verification-play { min-height: 32px; padding: 5px 9px; font-size: .8rem; }
.verification-play:disabled { opacity: .45; cursor: not-allowed; }
.verification-message { margin: 10px 0 0; color: #5c5c5c; font-size: .9rem; }
.voiceover-verification #verification-retry { margin-top: 8px; }
@media (max-width: 1000px) {
  .scene-card { grid-template-columns: 1fr; }
  .scene-preview { width: min(420px, 100%); }
  .scene-insertion::before { left: 5%; right: 5%; }
  .page-header { align-items: stretch; flex-direction: column; }
}
@media (max-width: 900px) {
  .music-final-settings { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
}
@media (max-width: 600px) {
  .overlay-style-grid { grid-template-columns: 1fr; }
  .voiceover-waveform-layout { flex-direction: column; gap: 8px; }
  .voiceover-history-controls { flex-direction: row; justify-content: flex-end; }
  .playback-music-option { flex-basis: 100%; margin: 2px 0 0; flex-wrap: wrap; }
  .music-final-settings { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .music-ducking-option { margin: 0; }
}

/* ---------------------------------------------------------
   Top brand banner
   --------------------------------------------------------- */

.top-banner {
  width: 100%;
  background: #1B1D21;
}

.top-banner-inner {
  width: min(980px, calc(100% - 40px));
  height: 60px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.top-banner-brand {
  height: 100%;
  display: flex;
  align-items: center;
  grid-column: 2;
  justify-content: center;
}

/*
 * Both logos get the same available logo box.
 * object-fit: contain preserves their aspect ratios.
 */
.top-banner-logo {
  width: 200px;
  height: 38px;
  object-fit: contain;
}

.newsmotion-logo {
  object-position: center;
}

.top-banner-profile {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid white;
  border-radius: 50%;

  opacity: 0.95;
  cursor: default;
}

.top-banner-account { position: relative; justify-self: end; grid-column: 3; }
.user-initials-button {
  background: transparent;
  color: white;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  padding: 0;
  cursor: pointer;
}
.user-initials-button:disabled { cursor: default; }
.user-initials-button:not(:disabled):hover,
.user-initials-button:not(:disabled):focus-visible { background: rgb(255 255 255 / 15%); }
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 12px;
  background: #fff;
  color: #202020;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}
.user-menu.hidden { display: none; }
.user-menu-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.user-menu-role { margin: 0; color: #555; font-size: .9rem; }
.user-menu hr { border: 0; border-top: 1px solid #ddd; margin: 10px 0; }
.user-menu button, .user-menu a, .user-subscriptions summary {
  display: block;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.user-menu button:hover, .user-menu button:focus-visible,
.user-menu a:hover, .user-menu a:focus-visible { background: #f3f3f3; }
.user-subscriptions summary { list-style: none; }
.user-subscriptions summary::-webkit-details-marker { display: none; }
.user-subscriptions summary span { float: right; }
.user-subscriptions[open] > summary > span { transform: rotate(90deg); }
.user-subscriptions [role="group"] { padding-left: 12px; }
.user-subscriptions summary:hover, .user-subscriptions summary:focus-visible { background: #f3f3f3; }
.user-menu-error { margin: 8px 0 0; color: #a40000; font-size: .85rem; }
.subscription-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.subscription-search label { flex: 1; min-width: 200px; margin: 0; }
.subscription-search button { margin-top: 0; }
.subscription-table-wrap { overflow-x: auto; }
.subscription-table { width: 100%; border-collapse: collapse; text-align: left; }
.subscription-table th, .subscription-table td { padding: 12px 10px; border-bottom: 1px solid #ddd; vertical-align: top; }
.subscription-table input[type="checkbox"] { width: auto; padding: 0; accent-color: #b50d1a; }
.subscription-table .subscription-actions { min-width: 180px; }
.subscription-table .subscription-actions button { margin: 0 6px 6px 0; }
.subscription-table .subscription-actions p { margin: 4px 0 0; }

.settings-shell { padding-bottom: 42px; }
.settings-card { display: grid; gap: 24px; }
.settings-model-row { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(260px, 1.3fr); align-items: center; gap: 18px; }
.settings-model-row h2 { margin: 0; font-size: 1.05rem; }
.settings-selector { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px; }
.settings-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #c9c9c5; border-radius: 50%; color: #262626; background: #f6f6f3; font-size: 1.7rem; line-height: 1; }
.settings-arrow:not(:disabled) { cursor: pointer; }
.settings-arrow:not(:disabled):hover, .settings-arrow:not(:disabled):focus-visible { background: #e9e9e5; }
.settings-arrow:disabled { color: #a6a6a2; background: #f0f0ed; cursor: not-allowed; opacity: .65; }
.settings-model-value { display: grid; justify-items: center; gap: 3px; text-align: center; }
.settings-model-row.is-disabled .settings-model-value { opacity: .45; }
.settings-model-value strong { font-size: 1.1rem; }
.settings-model-value small { color: #777; font-size: .8rem; }
.settings-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #e4e4e0; }
.settings-actions button { min-width: 112px; margin: 0; }
.settings-actions button:disabled { cursor: not-allowed; opacity: .55; }

.login-shell {
  width: min(440px, calc(100% - 32px));
  margin: 60px auto;
  text-align: center;
}
.login-shell #clerk-sign-in { display: flex; justify-content: center; min-height: 280px; }
.login-shell .error { text-align: left; }

/* Compact shared workflow navigation */
.workflow-stepper-shell { width: min(1180px, calc(100% - 32px)); margin: 10px auto 0; }
.workflow-stepper { display: flex; align-items: center; justify-content: center; gap: clamp(5px, 1.5vw, 18px); min-height: 56px; margin: 0; padding: 8px 14px; list-style: none; background: rgb(255 255 255 / 72%); border: 1px solid #e5e5e2; border-radius: 10px; }
.workflow-step-slot { display: flex; min-width: 0; }
.workflow-step { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 8px; border-radius: 7px; color: #303030; text-decoration: none; font-size: .88rem; white-space: nowrap; }
.workflow-step.is-current { color: #a50d18; font-weight: 750; }
.workflow-step.is-enabled:hover { background: #f1f1ef; color: #8d1018; }
.workflow-step.is-enabled:focus-visible { outline: 2px solid #b50d1a; outline-offset: 2px; }
.workflow-step.is-disabled { color: #a6a6a3; }
.workflow-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px; }
.workflow-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.workflow-connector { color: #b7b7b4; font-size: .95rem; line-height: 1; }
.workflow-connector.is-active { color: #b50d1a; font-weight: 800; }
.workflow-progress-card { max-width: 760px; }
.workflow-progress-card p { overflow-wrap: anywhere; }
.workflow-stepper-shell + .shell { margin-top: 26px; }

/* Smaller screens */

@media (max-width: 700px) {
  .verification-row { grid-template-columns: minmax(65px, .7fr) minmax(120px, 1fr); }
  .verification-scene-actions { grid-column: 1 / -1; justify-self: start; flex-wrap: wrap; }
  .verification-overall { position: static; margin: -4px 0 8px; text-align: right; }
  .workflow-stepper-shell { width: calc(100% - 24px); margin-top: 8px; }
  .workflow-stepper { justify-content: space-between; gap: 2px; min-height: 50px; padding: 5px 6px; }
  .workflow-step { gap: 4px; min-height: 34px; padding: 4px 3px; font-size: .72rem; }
  .workflow-icon { width: 18px; height: 18px; }
  .workflow-icon svg { width: 17px; height: 17px; }
  .workflow-connector { font-size: .8rem; }
  .recent-video-card { gap: 10px; padding: 10px 40px 10px 10px; flex-wrap: wrap; }
  .recent-project-thumb-wrap { width: 58px; }
  .recent-video-details { flex-basis: calc(100% - 75px); }
  .project-actions { margin-left: auto; }
  .project-action { width: 34px; height: 34px; }
  .project-delete { top: 7px; right: 7px; }
  .settings-model-row { grid-template-columns: 1fr; gap: 9px; }
  .top-banner-inner {
    width: calc(100% - 24px);
    height: 54px;
  }

  .top-banner-logo {
    width: 130px;
    height: 30px;
  }

  .top-banner-profile {
    width: 28px;
    height: 28px;
  }

}

@media (max-width: 440px) {
  .top-banner-logo { width: 106px; height: 28px; }
  .workflow-step { flex-direction: column; gap: 1px; min-height: 42px; font-size: .61rem; line-height: 1.1; }
  .workflow-stepper { min-height: 54px; }
  .workflow-connector { align-self: center; }
}

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

/* Private tester/admin page review controls and QA project state. */
.review-launcher { position: absolute; top: 15px; left: 16px; z-index: 12; display: grid; place-items: center; width: 30px; height: 30px; padding: 6px; border: 1px solid #73757a; border-radius: 6px; background: #34363b; color: #fff; }
.review-launcher svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.review-launcher:hover { background: #505258; }
.review-launcher:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.review-dialog { width: min(560px, calc(100% - 32px)); max-height: 85vh; padding: 22px; border: 1px solid #ccc; border-radius: 14px; color: #202020; background: #fff; box-shadow: 0 18px 60px rgb(0 0 0 / 25%); }
.review-dialog::backdrop { background: rgb(20 20 20 / 45%); }
.review-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.review-dialog-header h2 { margin: 0; font-size: 1.1rem; }
.review-resolve { width: 32px; height: 32px; padding: 4px; background: #21663a; color: #fff; }
.review-resolve[hidden], .review-dialog [hidden] { display: none; }
.review-message { margin-top: 18px; padding-bottom: 12px; border-bottom: 1px solid #ddd; }
.review-message-text { margin: 0 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-message-meta { margin: 0; color: #666; font-size: .8rem; }
.review-dialog .review-reply { background: #1b1d21; color: #fff; border-color: #686a70; }
.review-reply:focus-visible { outline: 2px solid #73757a; outline-offset: 2px; }
.review-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.recent-video-card.has-unresolved-review { background: #fff0f0; border-color: #e2b7b7; }
.project-action.has-open-review, .review-launcher.has-open-review { background: #edb36b; border-color: #9c6223; color: #30200d; }
.project-action.has-open-review { opacity: 1; }
.project-action.has-open-review:hover, .project-action.has-open-review:focus-visible,
.review-launcher.has-open-review:hover { background: #e3a354; color: #30200d; }

.article-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.article-actions .article-language { margin: 0 0 0 auto; }
.article-language select { display: block; max-width: 100%; }
