:root {
  color-scheme: light;
  --ink: #10251f;
  --muted: #60716b;
  --forest: #183f36;
  --forest-2: #23594c;
  --mint: #d9eee4;
  --cream: #f6f4ed;
  --paper: #fffefa;
  --line: #dbe2dd;
  --lime: #c7e85b;
  --amber: #f3be5b;
  --red: #b8433d;
  --shadow: 0 24px 70px rgba(24, 63, 54, 0.12);
  --shadow-soft: 0 16px 44px rgba(16, 37, 31, 0.08);
  --shadow-lifted: 0 28px 80px rgba(16, 37, 31, 0.13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--cream);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(35, 89, 76, 0.3);
  outline-offset: 3px;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}
.ambient-one { top: -17rem; right: -10rem; background: #d8efdd; }
.ambient-two { bottom: -22rem; left: -16rem; background: #ece7c3; }

.eyebrow {
  margin: 0 0 0.22rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow.accent { color: var(--forest-2); }
.brand-lockup { display: flex; align-items: center; gap: 0.8rem; color: var(--ink); text-decoration: none; }
.header-brand { min-height: 2.75rem; }
.brand-logo { display: block; width: 12rem; max-width: 100%; height: auto; }
.brand-logo-login { width: min(18rem, 68vw); }
.product-name {
  padding-left: 0.8rem;
  border-left: 1px solid rgba(24, 63, 54, 0.2);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-card {
  width: min(100%, 52rem);
  padding: clamp(2rem, 6vw, 5rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 2rem;
  background: rgba(255, 254, 250, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-copy { margin: 4rem 0 2rem; max-width: 40rem; }
.login-copy h1, .hero-row h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.login-copy > p:last-child { max-width: 36rem; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.step-pill { display: inline-flex; padding: 0.45rem 0.75rem; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: 0.78rem; font-weight: 800; }
.login-form label, .field label { display: block; margin-bottom: 0.45rem; color: var(--ink); font-size: 0.77rem; font-weight: 800; }
.login-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.75rem; align-items: end; }
.login-fields .button { min-height: 3rem; }
input {
  width: 100%;
  min-height: 3rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid #cbd6d0;
  border-radius: 0.8rem;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(35, 89, 76, 0.12); }
.form-error { min-height: 1.2rem; margin: 0.6rem 0 0; color: var(--red); font-size: 0.85rem; }

.button {
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.button:disabled { cursor: wait; opacity: 0.55; transform: none; }
.button-primary { color: white; background: var(--forest); }
.button-primary:hover { background: var(--forest-2); box-shadow: 0 10px 24px rgba(24, 63, 54, 0.16); }
.button-secondary { border-color: rgba(24, 63, 54, 0.06); color: var(--forest); background: var(--mint); }
.button-secondary:hover { border-color: rgba(24, 63, 54, 0.12); background: #cce7da; }
.button-quiet { color: var(--muted); background: transparent; }
.button-outline { border-color: var(--line); color: var(--ink); background: white; }
.button-outline:hover { border-color: #becbc4; background: #fbfcfa; }
.button-publish { min-height: 3.35rem; padding-inline: 1.45rem; color: var(--forest); background: var(--lime); box-shadow: 0 10px 24px rgba(127, 158, 30, 0.2); }
.button-publish:hover { background: #d4ee78; box-shadow: 0 14px 30px rgba(127, 158, 30, 0.26); }
.mobile-label, .checking-label, .check-spinner { display: none; }
.button-secondary.is-checking { opacity: 1; }
.button-secondary.is-checking .desktop-label,
.button-secondary.is-checking .mobile-label { display: none; }
.button-secondary.is-checking .checking-label,
.button-secondary.is-checking .check-spinner { display: inline-block; }
.check-spinner {
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.4rem;
  border: 2px solid rgba(24, 63, 54, 0.25);
  border-top-color: var(--forest);
  border-radius: 50%;
  vertical-align: -0.12rem;
  animation: spin 850ms linear infinite;
}

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

@media (hover: hover) {
  .button:hover { transform: translateY(-1px); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  padding: 0.8rem max(1.25rem, calc((100vw - 80rem) / 2));
  border-bottom: 1px solid rgba(24, 63, 54, 0.09);
  background: rgba(246, 244, 237, 0.9);
  box-shadow: 0 8px 30px rgba(16, 37, 31, 0.025);
  backdrop-filter: blur(20px);
}
.header-actions { display: flex; align-items: center; gap: 0.45rem; }
.automation-status {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.25rem;
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}
.automation-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #68ad70;
  box-shadow: 0 0 0 4px rgba(104, 173, 112, 0.13);
}
.content-shell { width: min(100% - 2.5rem, 80rem); margin: 0 auto; padding: 3.2rem 0 6rem; }
.hero-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border: 1px solid rgba(24, 63, 54, 0.09);
  border-radius: 1.8rem;
  background:
    radial-gradient(circle at 92% 10%, rgba(199, 232, 91, 0.28), transparent 26%),
    linear-gradient(135deg, #fdfcf7 0%, #f4f8f1 100%);
  box-shadow: var(--shadow-soft);
}
.hero-row::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(24, 63, 54, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(24, 63, 54, 0.025), 0 0 0 6rem rgba(24, 63, 54, 0.018);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 48rem; }
.hero-row h1 {
  max-width: 46rem;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.hero-subtitle { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.summary-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(6.6rem, 1fr)); gap: 0.65rem; }
.summary-card {
  min-width: 6.6rem;
  padding: 1rem;
  border: 1px solid rgba(24, 63, 54, 0.11);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px rgba(16, 37, 31, 0.045);
  backdrop-filter: blur(12px);
}
.summary-card.ready { border-color: rgba(103, 145, 45, 0.24); background: rgba(248, 255, 229, 0.9); }
.summary-card.working { border-color: rgba(177, 128, 35, 0.18); background: rgba(255, 249, 232, 0.9); }
.summary-value { display: block; font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.summary-label { display: block; margin-top: 0.4rem; color: var(--ink); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.01em; }
.summary-detail { display: block; margin-top: 0.22rem; color: var(--muted); font-size: 0.63rem; line-height: 1.25; }
.check-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  margin: 0 0 3.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid #c9d8d0;
  border-radius: 0.95rem;
  color: var(--forest);
  background: rgba(225, 241, 233, 0.82);
}
.check-status.queued, .check-status.running { border-color: #e2c98c; background: #fbefcf; }
.check-status.error { border-color: #e5b9b5; color: #6c2521; background: #f7d8d5; }
.check-status-icon {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-content: center;
  border-radius: 50%;
  color: white;
  background: var(--forest-2);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.check-status.queued .check-status-icon,
.check-status.running .check-status-icon { color: var(--forest); background: var(--amber); }
.check-status.error .check-status-icon { background: var(--red); }
.check-status.running .check-status-icon::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(24, 63, 54, 0.25);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}
.check-status strong { display: inline; font-size: 0.88rem; }
.check-status p { display: inline; margin: 0 0 0 0.35rem; color: inherit; font-size: 0.82rem; line-height: 1.45; }
.check-status .check-status-time { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.check-status.error .check-status-time { color: #8c4d48; }
.check-status-copy { min-width: 0; padding-top: 0.35rem; }
.check-progress { margin-top: 0.85rem; }
.check-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.45rem; color: var(--forest); font-size: 0.72rem; font-weight: 800; }
.check-progress-meta span:last-child { color: var(--muted); font-weight: 700; }
.check-progress progress { display: block; width: 100%; height: 0.55rem; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: rgba(24, 63, 54, 0.12); }
.check-progress progress::-webkit-progress-bar { border-radius: 999px; background: rgba(24, 63, 54, 0.12); }
.check-progress progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--forest-2), #78a958); transition: width 350ms ease; }
.check-progress progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--forest-2), #78a958); }
.check-progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin: 0.65rem 0 0; padding: 0; list-style: none; }
.check-progress-steps li { position: relative; padding-left: 0.9rem; color: #8b8170; font-size: 0.65rem; font-weight: 750; line-height: 1.25; }
.check-progress-steps li::before { content: ""; position: absolute; top: 0.28rem; left: 0; width: 0.48rem; height: 0.48rem; border-radius: 50%; background: #d4c8ad; }
.check-progress-steps li.is-complete, .check-progress-steps li.is-active { color: var(--forest); }
.check-progress-steps li.is-complete::before { background: #78a958; }
.check-progress-steps li.is-active::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(243, 190, 91, 0.25); }
.notice { position: sticky; top: 5.8rem; z-index: 8; margin: 0 0 2rem; padding: 0.9rem 1rem; border: 1px solid #c3d9ce; border-radius: 0.85rem; color: var(--forest); background: #e1f1e9; box-shadow: var(--shadow-soft); font-weight: 750; }
.notice.error { color: #6c2521; background: #f7d8d5; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.2rem; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 500; letter-spacing: -0.04em; }
.section-heading > p { max-width: 28rem; margin: 0 0 0.25rem; color: var(--muted); line-height: 1.55; }
.section-heading.compact { margin-bottom: 1rem; }
.heading-line { display: flex; align-items: center; gap: 0.75rem; }
.count-pill { display: inline-flex; min-height: 1.75rem; align-items: center; padding: 0.3rem 0.62rem; border-radius: 999px; color: var(--forest); background: var(--lime); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.02em; }
.count-pill:empty { display: none; }
.review-list { display: grid; gap: 1.5rem; }
.review-card { overflow: hidden; border: 1px solid rgba(24, 63, 54, 0.14); border-radius: 1.6rem; background: var(--paper); box-shadow: var(--shadow-lifted); }
.review-card.busy { opacity: 0.66; pointer-events: none; }
.card-top { position: relative; display: flex; align-items: start; justify-content: space-between; gap: 1.25rem; padding: clamp(1.35rem, 3vw, 2rem); background: linear-gradient(135deg, #fffefa 0%, #f7faf4 100%); }
.card-top::after { content: ""; position: absolute; top: 0; left: 0; width: 0.35rem; height: 100%; background: var(--lime); }
.card-kicker { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.55rem; color: var(--forest-2); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.card-kicker::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; opacity: 0.45; }
.card-title { max-width: 48rem; margin: 0; font-family: Georgia, serif; font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
.card-meta-row { display: flex; flex-wrap: wrap; gap: 0.45rem 1.2rem; margin-top: 0.8rem; color: var(--muted); font-size: 0.83rem; }
.card-meta-row span { display: inline-flex; align-items: center; gap: 0.4rem; }
.card-meta-row span + span::before { content: "•"; margin-right: 0.35rem; color: #a8b5ae; }
.card-meta { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.status-badge { flex: none; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.46rem 0.68rem; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; }
.status-badge::before { content: ""; width: 0.48rem; height: 0.48rem; border-radius: 50%; background: currentColor; }
.status-badge.processing, .status-badge.rebuild_requested { color: #775315; background: #fae8b9; }
.status-badge.error { color: #7c2925; background: #f7d8d5; }
.adjustment-ready {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  color: var(--forest);
  border-top: 1px solid #bdd8c9;
  background: linear-gradient(90deg, #e6f4eb 0%, #f3f8ec 100%);
}
.adjustment-ready-icon { display: grid; width: 2rem; height: 2rem; place-content: center; border-radius: 50%; color: var(--forest); background: var(--lime); font-weight: 900; }
.adjustment-ready strong { display: block; font-size: 0.88rem; }
.adjustment-ready p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.review-body { padding: clamp(1.25rem, 3vw, 2rem); border-top: 1px solid var(--line); }
.review-panel { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 1.15rem; background: #fafbf8; }
.listen-panel { display: grid; grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr); gap: clamp(1rem, 3vw, 2rem); align-items: center; padding: clamp(1.2rem, 3vw, 1.65rem); color: white; border-color: var(--forest); background: linear-gradient(145deg, #173d34 0%, #245a4d 100%); box-shadow: 0 14px 34px rgba(16, 37, 31, 0.12); }
.listen-content { min-width: 0; }
.panel-heading { display: flex; align-items: start; gap: 0.75rem; margin-bottom: 1rem; }
.listen-panel .panel-heading { margin-bottom: 0; }
.panel-number { display: inline-grid; flex: none; width: 1.75rem; height: 1.75rem; place-content: center; border-radius: 50%; color: white; background: var(--forest); font-size: 0.7rem; font-weight: 900; }
.listen-panel .panel-number { color: var(--forest); background: var(--lime); }
.panel-heading h4 { margin: 0; font-size: 0.95rem; letter-spacing: -0.01em; }
.panel-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.listen-panel .panel-heading p { color: rgba(255, 255, 255, 0.68); }
.audio-panel { display: grid; gap: 0.8rem; }
.audio-panel audio { width: 100%; min-width: 0; height: 2.65rem; filter: saturate(0.7) contrast(0.95); }
.edge-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.edge-button { min-height: 2.65rem; padding: 0.5rem 0.7rem; border: 1px solid rgba(255,255,255,0.22); border-radius: 0.7rem; color: white; background: rgba(255,255,255,0.09); font-size: 0.74rem; font-weight: 800; transition: background 120ms ease, transform 120ms ease; }
.edge-button:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.listen-tip { margin: 0.85rem 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.72rem; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field.wide { grid-column: 1 / -1; }
.field-help { margin: 0.38rem 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.4; }
.field-help-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.field-help-row .field-help { flex: 1; }
.field-reset { min-height: 2.15rem; padding: 0.35rem 0.55rem; border: 0; border-radius: 0.55rem; color: var(--forest-2); background: transparent; font-size: 0.66rem; font-weight: 800; }
.field-reset:hover { background: var(--mint); }
.cut-editor {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: rgba(250, 251, 248, 0.92);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.cut-editor[open] { border-color: #c9d8d0; box-shadow: 0 14px 34px rgba(16, 37, 31, 0.06); }
.cut-editor.has-changes { border-color: #e6c77d; }
.cut-editor.has-error { border-color: #e0aaa5; }
.cut-editor-summary {
  position: relative;
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 3.5rem 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  transition: background 140ms ease;
}
.cut-editor-summary::-webkit-details-marker { display: none; }
.cut-editor-summary:hover { background: #f4f8f4; }
.cut-editor-summary::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 1rem;
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-content: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint);
  font-size: 1rem;
  font-weight: 900;
  transform: translateY(-50%);
  transition: transform 150ms ease;
}
.cut-editor[open] .cut-editor-summary { border-bottom: 1px solid var(--line); background: #f7faf7; }
.cut-editor[open] .cut-editor-summary::after { transform: translateY(-50%) rotate(180deg); }
.cut-editor.has-changes .cut-editor-summary { background: #fff9eb; }
.cut-editor.has-error .cut-editor-summary { background: #fff5f3; }
.cut-summary-copy { display: flex; min-width: 0; align-items: center; gap: 0.75rem; }
.cut-summary-copy strong { display: block; font-size: 0.88rem; }
.cut-summary-copy p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.cut-summary-range { margin-left: auto; color: var(--forest-2); font-size: 0.75rem; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.original-preview {
  padding: 1.25rem;
  background: #fafbf8;
}
.original-preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.original-preview-copy strong { display: block; font-size: 0.88rem; }
.original-preview-copy p { max-width: 42rem; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.5; }
.original-clock-badge {
  flex: none;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  color: var(--forest);
  background: var(--mint);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.original-preview-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr); gap: 1rem; align-items: start; }
.original-video {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-content: center;
  border: 1px solid #c7d5ce;
  border-radius: 0.8rem;
  background: #10251f;
}
.original-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.original-video-placeholder { max-width: 18rem; padding: 1.25rem; color: rgba(255, 255, 255, 0.72); font-size: 0.72rem; line-height: 1.5; text-align: center; }
.original-player-shell { min-width: 0; }
.original-transport { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.55rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 0.75rem; background: white; }
.original-transport-button { min-height: 2.35rem; padding: 0.4rem 0.7rem; border: 1px solid #bfd0c7; border-radius: 0.62rem; color: white; background: var(--forest); font-size: 0.7rem; font-weight: 850; }
.original-transport-button:hover { background: var(--forest-2); }
.original-transport-button:disabled { cursor: wait; opacity: 0.5; }
.original-current-time { color: var(--forest); font-size: 0.74rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.original-preview-sidebar { display: grid; gap: 0.75rem; min-width: 0; }
.cut-point { padding: 0.85rem; border: 1px solid var(--line); border-radius: 0.85rem; background: white; }
.cut-point input { min-height: 2.8rem; background: white; font-variant-numeric: tabular-nums; }
.cut-point .field-help { min-height: 1.9em; }
.original-preview-button {
  width: 100%;
  min-height: 2.65rem;
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c7d5ce;
  border-radius: 0.7rem;
  color: var(--forest);
  background: white;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
}
.original-preview-button:hover { border-color: #9fb8ac; background: #f4faf6; }
.set-current-button { width: 100%; min-height: 2.65rem; margin-top: 0.5rem; padding: 0.55rem 0.65rem; border: 1px solid var(--forest); border-radius: 0.7rem; color: white; background: var(--forest); font-size: 0.7rem; font-weight: 850; line-height: 1.25; }
.set-current-button:hover { background: var(--forest-2); }
.set-current-button:disabled { cursor: wait; opacity: 0.42; }
.original-preview-status { min-height: 2.1em; margin: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.original-source-link { align-self: end; color: var(--forest-2); font-size: 0.7rem; font-weight: 800; }
.cut-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: #f4f7f2; }
.cut-editor-footer p { margin: 0; color: var(--muted); font-size: 0.74rem; line-height: 1.45; }
.cut-editor-footer .button { min-width: 10rem; }
.cut-editor:not(.has-changes) .cut-editor-footer .button:disabled { opacity: 0.45; }
.advanced-fields { margin-top: 1rem; border: 1px solid var(--line); border-radius: 0.95rem; background: #fafbf8; }
.advanced-fields summary { display: flex; min-height: 3rem; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; color: var(--forest-2); cursor: pointer; font-size: 0.8rem; font-weight: 800; list-style: none; }
.advanced-fields summary::-webkit-details-marker { display: none; }
.advanced-fields summary::after { content: "+"; display: grid; width: 1.5rem; height: 1.5rem; place-content: center; border-radius: 50%; background: var(--mint); font-size: 1rem; }
.advanced-fields[open] summary::after { content: "−"; }
.advanced-fields[open] summary { border-bottom: 1px solid var(--line); }
.advanced-fields .field-grid { padding: 1rem; }
.confidence { display: flex; align-items: center; gap: 0.6rem; margin: 0.85rem 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
.confidence-track { flex: none; width: 4rem; height: 0.35rem; overflow: hidden; border-radius: 999px; background: var(--line); }
.confidence-fill { height: 100%; border-radius: inherit; background: var(--forest-2); }
.confidence-0 { width: 0; }
.confidence-1 { width: 10%; }
.confidence-2 { width: 20%; }
.confidence-3 { width: 30%; }
.confidence-4 { width: 40%; }
.confidence-5 { width: 50%; }
.confidence-6 { width: 60%; }
.confidence-7 { width: 70%; }
.confidence-8 { width: 80%; }
.confidence-9 { width: 90%; }
.confidence-10 { width: 100%; }
.card-error { margin: 0.85rem 0 0; padding: 0.8rem; border: 1px solid #e5b9b5; border-radius: 0.75rem; color: #792925; background: #f8dfdc; font-size: 0.8rem; line-height: 1.45; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 1rem; padding: 1.05rem 1.15rem; border-radius: 1rem; background: #f0f5ed; }
.card-actions.has-changes { background: #fff5db; }
.card-actions.has-error { background: #fbe9e7; }
.review-card .button:disabled { cursor: not-allowed; }
.approval-copy { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.approval-copy strong { display: block; font-size: 0.88rem; }
.approval-copy p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.72rem; }
.approval-actions { display: flex; align-items: center; gap: 0.55rem; }
.source-link { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--forest-2); font-size: 0.76rem; font-weight: 800; }
.empty-state { padding: clamp(2.5rem, 6vw, 4rem) 2rem; border: 1px dashed #b8c8bf; border-radius: 1.4rem; text-align: center; background: rgba(255,255,255,0.58); }
.empty-icon { display: grid; width: 3rem; height: 3rem; margin: 0 auto 1rem; place-content: center; border-radius: 50%; color: var(--forest); background: var(--lime); font-size: 1.4rem; font-weight: 900; }
.empty-state h3 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; letter-spacing: -0.03em; }
.empty-state p { max-width: 34rem; margin: 0.65rem auto 0; color: var(--muted); line-height: 1.55; }
.activity-section { margin-top: 3.75rem; }
.activity-section:not(.hidden) + .ready-section { margin-top: 3.75rem; }
.activity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.activity-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.1rem; background: rgba(255, 255, 255, 0.72); box-shadow: 0 10px 30px rgba(16, 37, 31, 0.045); }
.activity-card.is-active { grid-column: 1 / -1; align-items: start; padding: 1.25rem; border-color: #e2c98c; background: #fbefcf; }
.activity-card.error { border-color: #e5c2be; background: #fff9f8; }
.activity-icon { position: relative; display: grid; width: 2.7rem; height: 2.7rem; place-content: center; border-radius: 0.85rem; color: #735217; background: #fae8b9; font-size: 0.85rem; font-weight: 900; }
.activity-icon.is-spinning::before { content: ""; width: 1rem; height: 1rem; border: 2px solid rgba(115, 82, 23, 0.2); border-top-color: #735217; border-radius: 50%; animation: spin 850ms linear infinite; }
.activity-card.error .activity-icon { color: #7c2925; background: #f7d8d5; }
.activity-copy { min-width: 0; }
.activity-copy h3 { overflow: hidden; margin: 0.35rem 0 0.2rem; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.025em; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy p { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.activity-copy .activity-message { margin-top: 0.7rem; color: var(--forest); font-size: 0.82rem; }
.activity-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.8rem 0 0.45rem; color: var(--forest); font-size: 0.72rem; }
.activity-progress-meta strong { font-weight: 850; }
.activity-progress-meta span { color: var(--muted); font-weight: 700; }
.activity-progress-bar { display: block; width: 100%; height: 0.55rem; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: rgba(24, 63, 54, 0.12); }
.activity-progress-bar::-webkit-progress-bar { border-radius: 999px; background: rgba(24, 63, 54, 0.12); }
.activity-progress-bar::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--forest-2), #78a958); transition: width 350ms ease; }
.activity-progress-bar::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--forest-2), #78a958); }
.activity-progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin: 0.65rem 0 0; padding: 0; list-style: none; }
.activity-progress-steps li { position: relative; padding-left: 0.9rem; color: #8b8170; font-size: 0.65rem; font-weight: 750; line-height: 1.25; }
.activity-progress-steps li::before { content: ""; position: absolute; top: 0.28rem; left: 0; width: 0.48rem; height: 0.48rem; border-radius: 50%; background: #d4c8ad; }
.activity-progress-steps li.is-complete, .activity-progress-steps li.is-active { color: var(--forest); }
.activity-progress-steps li.is-complete::before { background: #78a958; }
.activity-progress-steps li.is-active::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(243, 190, 91, 0.25); }
.activity-copy .activity-error { margin-top: 0.45rem; color: #8b3b36; }
.activity-card .source-link { justify-self: end; }
.history-section { margin-top: 4.5rem; }
.history-toolbar { display: grid; grid-template-columns: minmax(14rem, 1fr) auto auto; gap: 0.65rem; align-items: center; margin: 1.1rem 0 0.85rem; }
.history-search input, .history-source-filter select { min-height: 2.9rem; border: 1px solid #cbd6d0; border-radius: 0.8rem; color: var(--ink); background: rgba(255,255,255,0.88); }
.history-search input { padding-left: 2.6rem; background-image: radial-gradient(circle, transparent 45%, var(--muted) 47%, var(--muted) 58%, transparent 60%), linear-gradient(45deg, transparent 45%, var(--muted) 46%, var(--muted) 55%, transparent 56%); background-position: 0.92rem 0.88rem, 1.62rem 1.62rem; background-size: 0.88rem 0.88rem, 0.48rem 0.48rem; background-repeat: no-repeat; }
.history-source-filter select { min-width: 9.5rem; padding: 0.65rem 2.2rem 0.65rem 0.85rem; }
.history-results { min-width: 5.5rem; color: var(--muted); font-size: 0.75rem; font-weight: 800; text-align: right; }
.history-list { overflow: hidden; border: 1px solid var(--line); border-radius: 1.2rem; background: rgba(255,255,255,0.7); box-shadow: 0 10px 36px rgba(16, 37, 31, 0.04); }
.history-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-height: 4.5rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.history-row.busy { opacity: 0.62; pointer-events: none; }
.history-row.is-editing { padding-bottom: 1.1rem; background: rgba(255, 255, 255, 0.78); }
.history-row:last-child { border-bottom: 0; }
.history-row.is-older { display: none; }
.history-row.is-filtered-out { display: none !important; }
.history-list.is-expanded .history-row.is-older { display: grid; }
.history-date { color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.history-title { margin: 0; font-size: 0.9rem; font-weight: 800; letter-spacing: -0.012em; }
.history-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.76rem; }
.history-source-badge { display: inline-flex; align-items: center; min-height: 1.35rem; padding: 0.12rem 0.42rem; border-radius: 999px; color: var(--forest-2); background: var(--mint); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.025em; text-transform: uppercase; }
.history-source-badge.audio { color: #6d5b2c; background: #fff0c9; }
.history-actions { display: flex; align-items: center; gap: 0.35rem; }
.history-link { display: inline-flex; min-height: 2.75rem; align-items: center; padding: 0.4rem 0.65rem; border-radius: 0.65rem; color: var(--forest-2); font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.history-link:hover { background: var(--mint); }
.history-edit-button, .history-close-button { min-height: 2.75rem; padding: 0.45rem 0.75rem; border: 1px solid #c8d5ce; border-radius: 0.65rem; color: var(--forest); background: white; font-size: 0.76rem; font-weight: 850; }
.history-edit-button:hover, .history-close-button:hover { border-color: #a9bdb3; background: #f3f8f4; }
.history-edit-button[aria-expanded="true"] { border-color: var(--forest-2); color: white; background: var(--forest-2); }
.history-editor { grid-column: 1 / -1; width: 100%; margin-top: 0.15rem; overflow: hidden; border: 1px solid #cbd8d1; border-radius: 1rem; background: #fbfcf9; box-shadow: 0 18px 42px rgba(16, 37, 31, 0.07); }
.history-editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; padding: 1.2rem 1.25rem; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f0f7ef, #f8faef); }
.history-editor-heading h3 { margin: 0.15rem 0 0.25rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; letter-spacing: -0.035em; }
.history-editor-heading p:last-child { max-width: 44rem; margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.history-editor-fields { padding: 1.25rem; }
.history-details-footer, .history-audio-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: #f5f8f3; }
.history-save-status { margin: 0; color: var(--muted); font-size: 0.74rem; line-height: 1.45; }
.history-audio-editor { margin: 0 1.25rem 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: 0.9rem; background: white; }
.history-audio-editor > summary { position: relative; display: flex; min-height: 4.25rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 3.5rem 0.85rem 1rem; cursor: pointer; list-style: none; }
.history-audio-editor > summary::-webkit-details-marker { display: none; }
.history-audio-editor > summary::after { content: "⌄"; position: absolute; top: 50%; right: 1rem; display: grid; width: 1.85rem; height: 1.85rem; place-content: center; border-radius: 50%; color: var(--forest); background: var(--mint); font-weight: 900; transform: translateY(-50%); transition: transform 150ms ease; }
.history-audio-editor[open] > summary { border-bottom: 1px solid var(--line); background: #f7faf7; }
.history-audio-editor[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
.history-audio-editor.has-changes > summary { background: #fff8e6; }
.history-audio-editor.has-error > summary { background: #fff5f3; }
.history-audio-editor > summary strong { display: block; font-size: 0.84rem; }
.history-audio-editor > summary p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.history-audio-range { color: var(--forest-2); font-size: 0.72rem; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-cut-note { margin: 0; padding: 0.8rem 1.25rem; color: #695524; background: #fff7df; font-size: 0.72rem; line-height: 1.5; }
.history-audio-editor .original-preview { border-radius: 0; }
.history-audio-footer { border-top: 1px solid var(--line); }
.history-toggle { display: block; min-height: 2.75rem; margin: 0.8rem auto 0; padding: 0.55rem 0.85rem; border: 0; color: var(--forest-2); background: transparent; font-size: 0.78rem; font-weight: 800; }
.history-no-results { margin: 0; padding: 2.5rem 1rem; border: 1px dashed #c9d5cf; border-radius: 1rem; color: var(--muted); background: rgba(255,255,255,0.55); text-align: center; }

@media (max-width: 960px) {
  .automation-status { display: none; }
  .hero-row { grid-template-columns: 1fr; align-items: start; }
  .summary-grid { width: min(100%, 26rem); }
  .listen-panel { grid-template-columns: 1fr; }
  .listen-panel .panel-heading { margin-bottom: 0.25rem; }
  .original-preview-layout { grid-template-columns: 1fr; }
  .activity-list { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .login-shell { padding: 1rem; }
  .login-card { padding: 1.5rem; border-radius: 1.35rem; }
  .login-card .brand-lockup { gap: 0.55rem; }
  .login-card .brand-logo-login { width: min(11.5rem, 55vw); }
  .login-card .product-name { padding-left: 0.55rem; font-size: 0.72rem; }
  .login-copy { margin: 3rem 0 1.5rem; }
  .login-fields { grid-template-columns: 1fr; }
  .site-header { min-height: 4.25rem; padding: 0.65rem 0.75rem; }
  .header-brand { min-width: 0; }
  .header-brand .brand-logo { width: 7.8rem; }
  .header-brand .product-name { display: none; }
  .header-actions { flex: none; gap: 0.15rem; }
  .header-actions .button { min-height: 2.75rem; padding: 0.5rem 0.65rem; font-size: 0.73rem; }
  .desktop-label { display: none; }
  .mobile-label { display: inline; }
  .content-shell { width: min(100% - 1.25rem, 80rem); padding: 1.25rem 0 4.5rem; }
  .hero-row { gap: 1.5rem; margin-bottom: 0.75rem; padding: 1.35rem; border-radius: 1.25rem; }
  .hero-row h1 { font-size: clamp(2.25rem, 11vw, 3.35rem); }
  .hero-subtitle { font-size: 0.9rem; line-height: 1.55; }
  .summary-grid { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
  .summary-card { min-width: 0; padding: 0.8rem 0.65rem; }
  .summary-value { font-size: 1.7rem; }
  .summary-label { font-size: 0.62rem; }
  .summary-detail { display: none; }
  .check-status { margin: 0 0 2.75rem; padding: 0.8rem; }
  .check-status-icon { width: 2.1rem; height: 2.1rem; }
  .check-status strong, .check-status p { display: block; }
  .check-status p { margin: 0.15rem 0 0; }
  .check-progress-meta { align-items: start; flex-direction: column; gap: 0.15rem; }
  .check-progress-steps { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .notice { top: 4.85rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 0.7rem; }
  .section-heading h2 { font-size: 2.15rem; }
  .heading-line { flex-wrap: wrap; gap: 0.45rem 0.65rem; }
  .review-card { border-radius: 1.25rem; }
  .card-top { display: block; padding: 1.25rem; }
  .card-title { font-size: clamp(1.85rem, 9vw, 2.55rem); }
  .card-meta-row span + span::before { display: none; }
  .status-badge { margin-top: 0.85rem; }
  .review-body { padding: 1rem; }
  .review-panel { padding: 1rem; }
  .edge-button { flex: 1; }
  .field-grid { grid-template-columns: 1fr; }
  .field-help-row { align-items: start; flex-direction: column; gap: 0.2rem; }
  .field-reset { padding-left: 0; }
  .cut-editor-summary { align-items: start; flex-direction: column; gap: 0.65rem; }
  .cut-summary-range { margin-left: 2.5rem; }
  .original-preview-heading { display: grid; }
  .original-clock-badge { justify-self: start; }
  .cut-editor-footer { align-items: stretch; flex-direction: column; }
  .cut-editor-footer .button { width: 100%; }
  .field.wide { grid-column: auto; }
  .card-actions { align-items: stretch; flex-direction: column; padding: 1rem; }
  .approval-actions { display: grid; grid-template-columns: 1fr; }
  .approval-actions .button, .approval-actions .source-link { width: 100%; justify-content: center; }
  .button-publish { width: 100%; }
  .empty-state { padding: 2.75rem 1.25rem; }
  .activity-section { margin-top: 3.25rem; }
  .activity-section:not(.hidden) + .ready-section { margin-top: 3.25rem; }
  .activity-card { grid-template-columns: auto minmax(0, 1fr); }
  .activity-card .source-link { grid-column: 2; justify-self: start; min-height: 2rem; }
  .activity-copy h3 { white-space: normal; }
  .activity-progress-meta { align-items: start; flex-direction: column; gap: 0.15rem; }
  .activity-progress-steps { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .history-section { margin-top: 3.75rem; }
  .history-toolbar { grid-template-columns: 1fr auto; }
  .history-results { grid-column: 1 / -1; text-align: left; }
  .history-row { grid-template-columns: 1fr auto; }
  .history-date { grid-column: 1 / -1; }
  .history-actions { align-self: start; }
  .history-editor-heading { align-items: stretch; flex-direction: column; gap: 0.85rem; }
  .history-close-button { align-self: start; }
  .history-details-footer, .history-audio-footer { align-items: stretch; flex-direction: column; }
  .history-details-footer .button, .history-audio-footer .button { width: 100%; }
  .history-audio-editor > summary { align-items: start; flex-direction: column; }
  .history-audio-range { padding-left: 0; }
}

@media (max-width: 390px) {
  .site-header { padding-inline: 0.65rem; }
  .header-brand .brand-logo { width: 7rem; }
  .header-actions .button { padding-inline: 0.52rem; }
  .content-shell { width: calc(100% - 1.25rem); }
  .summary-grid { gap: 0.3rem; }
  .summary-card { padding-inline: 0.5rem; }
  .edge-buttons { grid-template-columns: 1fr; }
  .original-preview { padding: 1rem; }
  .original-transport { align-items: stretch; flex-direction: column-reverse; }
  .original-transport-button { width: 100%; }
  .original-current-time { text-align: center; }
  .cut-summary-range { font-size: 0.7rem; }
  .activity-card { padding: 0.9rem; }
  .history-row { padding-inline: 0.9rem; }
  .history-toolbar { grid-template-columns: 1fr; }
  .history-source-filter select { width: 100%; }
  .history-results { grid-column: auto; }
  .history-row { grid-template-columns: 1fr; }
  .history-date { grid-column: auto; }
  .history-actions { width: 100%; }
  .history-actions > * { flex: 1; justify-content: center; }
  .history-editor-fields, .history-editor-heading { padding: 1rem; }
  .history-audio-editor { margin-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .check-spinner, .check-status.running .check-status-icon::before, .activity-icon.is-spinning::before { animation: none !important; }
}
