:root {
  --bg: #f9fafb;
  --bg-subtle: #f1f5f9;
  --header-bg: rgba(249, 250, 251, 0.9);
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-hover: #f1f5f9;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-shell: 0 2px 8px rgba(0, 0, 0, 0.04), 0 18px 38px -18px rgba(0, 0, 0, 0.09);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);

  --text: #000000;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  /* Crisp multi-color UI accents */
  --yellow: #facc15;
  --yellow-hover: #eab308;
  --yellow-soft: #fef9c3;
  --yellow-ink: #713f12;

  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eff6ff;
  --blue-ink: #1e40af;

  --green: #16a34a;
  --green-soft: #dcfce7;
  --green-ink: #166534;

  --purple: #7c3aed;
  --purple-soft: #f3e8ff;
  --purple-ink: #5b21b6;

  --coral: #e11d48;
  --coral-soft: #ffe4e6;
  --coral-ink: #9f1239;

  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --teal-ink: #115e59;

  --active-cue: #fef9c3;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Minimal Non-Sticky Top Bar */
.site-header {
  height: 54px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  flex-shrink: 0;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #000000;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
}

.main-nav a:hover {
  background: var(--bg-subtle);
  text-decoration: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
}

/* Hero */
.main-shell {
  flex: 1;
}

.hero-band {
  padding: 36px 0 32px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumbs a {
  color: var(--text);
  font-weight: 500;
}

.eyebrow-clean {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
}

.hero-head {
  margin-bottom: 22px;
}

.hero-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 3.8vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.highlight-underline {
  display: inline;
  padding: 0 3px;
  border-radius: 4px;
  background: linear-gradient(transparent 60%, rgba(250, 204, 21, 0.78) 60%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-sub {
  margin: 0;
  max-width: 660px;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

/* Quick Chips */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.dot-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.dot-chip:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dot-blue { background: var(--blue); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }
.dot-purple { background: var(--purple); }
.dot-coral { background: var(--coral); }
.dot-teal { background: var(--teal); }

/* Studio Shell & Cool Drag & Drop Zone */
.studio-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-shell);
  border-radius: 18px;
  padding: 20px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 38px 24px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.dropzone-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dropzone-badge {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--yellow);
  color: #000000;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px -6px rgba(234, 179, 8, 0.5);
  transition: transform 0.2s ease;
}

.dz-ring {
  position: absolute;
  inset: -4px;
  border-radius: 19px;
  background: linear-gradient(135deg, var(--yellow), var(--blue), var(--green), var(--purple));
  opacity: 0.3;
  z-index: -1;
}

.dropzone:hover .dropzone-badge,
.dropzone.drag-over .dropzone-badge {
  transform: translateY(-2px) scale(1.04);
}

.dropzone-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.dropzone-sub {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-actions {
  margin-bottom: 16px;
}

.btn-drop {
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-drop:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  filter: brightness(1.04);
}

.format-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.fmt-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.limits-note {
  margin: 14px 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.limits-note strong {
  color: var(--text);
  font-weight: 600;
}

.dropzone-preopts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  cursor: default;
}

.dropzone-translate-switch {
  height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  gap: 8px;
}

.dropzone-translate-switch .switch-label {
  font-size: 0.8rem;
}

.dropzone-lang-select {
  width: auto;
  min-width: 150px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 999px;
}

/* Tactile Buttons & Press Animations */
@keyframes pressPop {
  0% { transform: scale(0.95); }
  55% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.is-pressed {
  animation: pressPop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease, filter 0.15s ease, background-color 0.15s ease;
}

.btn:active:not(:disabled),
.btn-dl:active,
.btn-outline-sm:active,
.speed-btn:active,
.tab-btn:active,
.tool-toggle:active,
.cue-time:active {
  transform: translateY(1px) scale(0.96);
}

.btn-action {
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
}

.btn-yellow {
  background: var(--yellow);
  color: #000000;
  border-color: #eab308;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.25);
}

.btn-yellow:hover:not(:disabled) {
  background: var(--yellow-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-yellow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-pill-green { background: var(--green-soft); color: var(--green-ink); }
.btn-pill-teal { background: var(--teal-soft); color: var(--teal-ink); }
.btn-pill-yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.btn-pill-purple { background: var(--purple-soft); color: var(--purple-ink); }
.btn-pill-coral { background: var(--coral-soft); color: var(--coral-ink); }

.btn-pill-green:hover,
.btn-pill-teal:hover,
.btn-pill-yellow:hover,
.btn-pill-purple:hover,
.btn-pill-coral:hover {
  filter: brightness(0.95);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
  height: 40px;
}

/* Controls Panel (Submission) */
.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.auto-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 0.72rem;
  font-weight: 600;
}

.btn-outline-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #000000;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #000000;
  cursor: pointer;
}

.btn-outline-sm:hover {
  background: #000000;
  color: #ffffff;
}

.file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  margin-bottom: 16px;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-type-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--blue);
  color: #ffffff;
}

.file-type-badge.badge-video {
  background: var(--blue);
  color: #ffffff;
}

.file-type-badge.badge-audio {
  background: var(--purple);
  color: #ffffff;
}

.file-name {
  font-size: 0.93rem;
  font-weight: 600;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

.retry-actions-row {
  display: flex;
  justify-content: flex-end;
}

.retry-actions-row .btn-action {
  min-width: 190px;
  width: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #000000;
}

.select-input,
.text-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.86rem;
  color: #000000;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  outline: none;
}

.select-input:disabled {
  opacity: 0.48;
  background: #f3f4f6;
  cursor: not-allowed;
}

.select-input:focus,
.text-input:focus {
  border-color: #000000;
}

/* Styled Toggle Switch */
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background-color 0.18s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.switch-input:checked + .switch-track {
  background: var(--purple);
}

.switch-input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.switch-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: #000000;
}

/* Circular Progress Ring & Per-Step Timers */
.progress-box {
  padding: 20px 22px;
  border: 2px solid #000000;
  border-radius: 14px;
  background: #ffffff;
}

.progress-ring-layout {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.progress-ring-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 6;
}

.progress-ring-fg {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 194.78;
  stroke-dashoffset: 194.78;
  transition: stroke-dashoffset 0.35s ease;
}

.progress-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 700;
  color: #000000;
}

.progress-details {
  flex: 1;
  min-width: 0;
}

.progress-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.progress-filename {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-cancel-job {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 0.74rem;
}

.progress-stage {
  font-size: 1.05rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
}

.pipeline-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.pipe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pipe-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.pipe-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
}

.pipe-row.active {
  color: var(--blue);
}

.pipe-row.active .pipe-label {
  font-weight: 700;
}

.pipe-row.active .pipe-indicator {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.pipe-row.done {
  color: #000000;
}

.pipe-row.done .pipe-indicator {
  background: var(--green);
}

.pipe-timer {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pipe-row.active .pipe-timer {
  color: var(--blue);
}

.pipe-row.done .pipe-timer {
  color: var(--green);
}

.error-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--danger-bg);
  border: 1.5px solid var(--danger-border);
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

.notice-warning {
  margin-bottom: 16px;
  padding: 12px 15px;
  border-radius: 10px;
  background: var(--yellow-soft);
  border: 1.5px solid #eab308;
  color: #000000;
  font-size: 0.86rem;
  font-weight: 500;
}

/* Standalone High-Contrast Results Studio Window */
.results-studio {
  background: #ffffff;
  border: 2px solid #111827;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.22);
}

.results-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #111827;
  color: #ffffff;
}

.results-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-done-pill {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--green);
  color: #ffffff;
  flex-shrink: 0;
}

.results-filename {
  font-size: 0.96rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.meta-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #d1d5db;
}

.meta-summary strong {
  color: #ffffff;
}

.results-body {
  padding: 20px;
}

.results-split {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 22px;
  align-items: start;
}

.results-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-player-wrap {
  background: #000000;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #111827;
}

.media-player-wrap audio,
.media-player-wrap video {
  width: 100%;
  max-height: 220px;
  display: block;
}

.sidebar-actions-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-soft);
}

.action-pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-combo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.export-select {
  height: 40px;
  font-size: 0.82rem;
  font-weight: 500;
}

.compact-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.mini-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000000;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.inline-check input {
  accent-color: var(--blue);
  margin: 0;
}

.results-main {
  min-width: 0;
}

.tabs-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 10px;
}

.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.tab-underline {
  position: relative;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-underline:hover {
  color: var(--text);
}

.tab-underline.active {
  color: #000000;
}

.tab-underline.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1.5px;
  height: 2.5px;
  border-radius: 99px;
  background: var(--blue);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.search-filter {
  height: 38px;
  font-size: 0.84rem;
}

.search-count {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.output-viewport {
  max-height: 520px;
  overflow-y: auto;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 14px;
}

.output-viewport mark {
  background: var(--yellow);
  color: #000000;
  padding: 0 2px;
  border-radius: 3px;
}

.cue-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.cue-row-notime {
  grid-template-columns: 1fr;
}

.cue-row:last-child {
  border-bottom: none;
}

.cue-row:hover {
  background: var(--surface-hover);
}

.cue-row.active-cue {
  background: var(--active-cue);
}

.cue-time {
  display: inline-block;
  text-align: center;
  border: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--blue-ink);
  background: var(--blue-soft);
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
}

.cue-time:hover {
  background: var(--blue);
  color: #ffffff;
}

.cue-text {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
}

.cue-editable {
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px dashed var(--blue);
  background: var(--surface-soft);
  outline: none;
  cursor: text;
}

.cue-translation {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--purple);
  font-weight: 500;
}

.para-item {
  margin-bottom: 14px;
}

.para-time {
  margin-bottom: 5px;
}

.para-block {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.7;
}

.para-translated {
  margin-bottom: 12px;
  color: var(--purple);
}

.translation-divider {
  margin: 18px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--purple);
}

.words-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  line-height: 1.8;
}

.word-token {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.word-token:hover {
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.word-token.active-word {
  background: var(--yellow);
  color: #000000;
  font-weight: 600;
}

.empty-msg {
  margin: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.code-view {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.79rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Clean Boxed Content Sections (Desktop + Mobile) */
.content-band {
  padding: 22px 0;
}

.section-header {
  margin-bottom: 14px;
}

.section-header-sm {
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0 0 3px;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.content-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.steps-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-clean-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.step-clean-body {
  min-width: 0;
}

.step-clean-item h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.step-clean-item p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.step-num-clean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #000000;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-blue { background: var(--blue); }
.step-purple { background: var(--purple); }
.step-green { background: var(--green); }

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.editorial-item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.editorial-item p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.directory-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.preview-head h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.text-link {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.link-list {
  border-top: 1px solid var(--border);
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.link-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.link-row:hover {
  text-decoration: none;
  background: var(--surface-soft);
}

.link-row-title {
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Landing Specs & Steps */
.seo-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.spec-list {
  margin: 0;
  border-top: 1px solid var(--border);
}

.spec-row {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-row dt {
  color: var(--text-secondary);
  font-weight: 600;
}

.spec-row dd {
  margin: 0;
  color: var(--text);
}

.ordered-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ordered-steps li {
  font-size: 0.88rem;
  color: var(--text);
}

/* FAQ */
.faq-clean {
  padding-top: 6px;
  padding-bottom: 6px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.faq-item p {
  margin: 7px 0 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.related-block {
  margin-top: 16px;
}

.related-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Directory Cards */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.directory-card {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.directory-card:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.directory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.directory-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.directory-arrow {
  font-weight: 600;
  color: var(--blue);
}

.directory-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Docs & Guides */
.prose {
  max-width: none;
}

.prose-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.meta-dot,
.read-time {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.prose h1 {
  margin: 6px 0 10px;
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--text);
}

.prose-lead {
  margin: 0 0 22px;
  max-width: 68ch;
  color: var(--text-secondary);
}

.prose h2 {
  margin: 22px 0 6px;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--text);
}

.prose p {
  margin: 0 0 11px;
  max-width: 70ch;
  font-size: 0.92rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

.prose a {
  color: var(--blue);
  font-weight: 500;
}

.prose-bullets {
  margin: 4px 0 14px;
  padding-left: 20px;
  max-width: 70ch;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.66;
}

.prose-bullets li {
  margin-bottom: 6px;
}

.guide-section {
  margin-top: 18px;
}

.guide-code {
  margin: 10px 0 14px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto;
}

.guide-cta-box {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guide-cta-box strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text);
  margin-bottom: 2px;
}

.guide-cta-box p {
  margin: 0;
  font-size: 0.84rem;
}

.guide-cta-box .btn {
  color: #ffffff;
  flex-shrink: 0;
}

.related-guides-wrap {
  margin-top: 24px;
}

.related-guides-wrap .related-label {
  margin-bottom: 10px;
}

.prose code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--text);
}

.prose-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prose-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.prose-row:last-child {
  border-bottom: none;
}

.prose-row h2 {
  margin: 0 0 3px;
}

.prose-row p {
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  margin-top: 12px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.84rem;
  font-weight: 500;
}

.footer-nav a {
  color: var(--text);
}

.footer-nav a:hover {
  color: var(--blue);
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .steps-clean,
  .editorial-grid,
  .directory-preview-grid,
  .seo-two-col,
  .directory-grid,
  .pipeline-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .step-clean-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 14px;
  }
  .hero-band {
    padding: 18px 0 14px;
  }
  .hero-head {
    margin-bottom: 14px;
  }
  .hero-head h1 {
    font-size: 1.6rem;
    line-height: 1.24;
  }
  .hero-sub {
    font-size: 0.88rem;
    line-height: 1.55;
  }
  .studio-shell {
    padding: 12px;
    border-radius: 14px;
  }
  .dropzone {
    padding: 22px 14px;
    border-radius: 11px;
  }
  .dropzone-badge {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
  }
  .dropzone-title {
    font-size: 1rem;
  }
  .dropzone-sub {
    font-size: 0.79rem;
    margin-bottom: 14px;
  }
  .dropzone-preopts {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .dropzone-lang-select {
    width: 100%;
    max-width: 240px;
  }
  .retry-actions-row .btn-action {
    width: 100%;
  }
  .results-split {
    grid-template-columns: 1fr;
  }
  .content-band {
    padding: 16px 0;
  }
  .content-box {
    padding: 15px 16px;
    border-radius: 12px;
  }
  .faq-clean {
    padding: 4px 16px;
  }
  .section-header {
    margin-bottom: 10px;
  }
  .section-header h2 {
    font-size: 1.18rem;
  }
  .section-header p {
    font-size: 0.84rem;
  }
  .progress-box {
    padding: 16px 14px;
  }
  .progress-ring-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .progress-details {
    width: 100%;
  }
  .pipe-row {
    text-align: left;
  }
  .results-studio {
    border-width: 1px;
    border-color: #cbd5e1;
    border-radius: 14px;
  }
  .results-topbar {
    padding: 12px 14px;
    gap: 8px;
  }
  .results-file-info {
    width: 100%;
  }
  .results-top-actions {
    width: 100%;
    justify-content: space-between;
  }
  .results-body {
    padding: 12px;
  }
  .action-pair {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
  }
  .output-viewport {
    max-height: 380px;
    padding: 10px;
  }
  .cue-row {
    grid-template-columns: 52px 1fr;
    gap: 8px;
    padding: 8px 6px;
  }
  .spec-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .prose h1 {
    font-size: 1.48rem;
  }
  .guide-cta-box .btn {
    width: 100%;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 8px;
  }
  .main-nav a {
    padding: 5px 7px;
    font-size: 0.8rem;
  }
  .btn-drop {
    width: 100%;
  }
  .format-dots {
    display: none;
  }
  .limits-note {
    margin-top: 6px;
    font-size: 0.72rem;
    line-height: 1.5;
  }
  .file-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 12px;
  }
  .file-meta {
    width: 100%;
  }
  .meta-summary {
    font-size: 0.74rem;
  }
}
