:root {
  color-scheme: light;
  --font-primary: "Open Sans", Arial, sans-serif;
  --font-icons: "Material Symbols Rounded";
  --brand-primary: #9e1b32;
  --brand-neutral: #333e48;
  --text: #333e48;
  --muted: #696969;
  --page: #f7f7f7;
  --surface: #ffffff;
  --line: #cfcfcf;
  --line-soft: #e7e7e7;
  --red: #9e1b32;
  --orange: #e77204;
  --yellow: #f1c319;
  --green: #45842a;
  --blue: #007298;
  --purple: #652f6c;
  --red-highlight: #ffccd5;
  --orange-highlight: #ffe5cc;
  --yellow-highlight: #fff4cc;
  --green-highlight: #dbffcc;
  --blue-highlight: #cdf3ff;
  --purple-highlight: #f9ccff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font-primary);
  overflow: hidden;
}

.video-frame {
  width: 1280px;
  height: 720px;
  background: var(--page);
  display: grid;
  grid-template-rows: 46px 116px 1fr 74px;
  overflow: hidden;
}

.top-bar {
  background: var(--brand-neutral);
  color: #ffffff;
  display: grid;
  grid-template-columns: 1fr auto 190px;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
}

.series-lockup,
.source-lockup,
.timer {
  align-items: center;
  display: flex;
  min-width: 0;
}

.series-lockup {
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
}

.series-lockup .material-symbols-rounded {
  color: #f1c319;
  font-family: var(--font-icons);
  font-size: 23px;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 24;
}

.source-lockup {
  color: #e7e7e7;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.timer {
  justify-content: end;
  color: #cdf3ff;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 800;
}

.title-band {
  display: grid;
  grid-template-columns: 490px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 18px 32px 18px 34px;
  background:
    linear-gradient(90deg, rgba(158, 27, 50, 0.1), transparent 56%),
    #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 39px;
  font-weight: 820;
  line-height: 1.03;
}

.core-idea {
  margin: 0;
  color: #4f4f4f;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
}

.content-grid {
  display: grid;
  grid-template-columns: 306px 1fr 284px;
  gap: 18px;
  padding: 18px 24px 16px;
  min-height: 0;
}

.script-panel,
.visual-panel,
.metrics-panel {
  min-width: 0;
  min-height: 0;
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(51, 62, 72, 0.08);
}

.script-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 20px 20px 18px;
}

.beat-label {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--blue-highlight);
  color: #004d66;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 11px;
}

.script-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 820;
  line-height: 1.12;
}

.script-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  align-content: start;
}

.script-panel li {
  position: relative;
  padding-left: 20px;
  color: #4f4f4f;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.32;
}

.script-panel li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  position: absolute;
  left: 0;
  top: 7px;
}

.scene-callout {
  margin: 0;
  border-left: 0;
  background: #fff4cc;
  color: #333e48;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.3;
  padding: 11px 12px;
}

.visual-panel {
  padding: 0;
  overflow: hidden;
  position: relative;
}

#concept-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.metrics-panel {
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.metrics-panel h2 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 18px;
  font-weight: 820;
}

#metrics {
  display: grid;
  gap: 14px;
  align-content: start;
}

.metric {
  display: grid;
  gap: 6px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #4f4f4f;
  font-size: 13px;
  font-weight: 780;
}

.metric-value {
  color: #333e48;
  font-variant-numeric: tabular-nums;
}

.metric-track {
  height: 12px;
  border-radius: 999px;
  background: #e7e7e7;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: inherit;
}

.source-card {
  background: #f7f7f7;
  border: 0;
  border-radius: 8px;
  padding: 12px;
}

.source-card-label {
  color: #696969;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-tags span {
  background: #cdf3ff;
  border: 0;
  border-radius: 999px;
  color: #004d66;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  max-width: 118px;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-footer {
  background: #ffffff;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr 290px;
  align-items: center;
  gap: 24px;
  padding: 14px 26px;
}

.beat-track {
  display: grid;
  grid-template-columns: 12fr 24fr 30fr 34fr 20fr;
  gap: 7px;
}

.beat-segment {
  min-width: 0;
  height: 42px;
  border-radius: 8px;
  background: #f7f7f7;
  border: 0;
  overflow: hidden;
  position: relative;
}

.beat-segment::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  background: var(--segment-color, #cdf3ff);
}

.beat-segment span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 8px 9px 0;
  color: #333e48;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.handoff-line {
  min-width: 0;
  color: #333e48;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.svg-label {
  fill: #333e48;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 780;
  stroke: none;
}

.svg-caption {
  fill: #696969;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 720;
}

.svg-small {
  fill: #4f4f4f;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 780;
}

.svg-title {
  fill: #333e48;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.capture-watermark {
  fill: #cfcfcf;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
}

body[data-capture="1"] * {
  transition: none !important;
}

body.visual-only .video-frame {
  grid-template-rows: 1fr;
}

body.visual-only .top-bar,
body.visual-only .title-band,
body.visual-only .script-panel,
body.visual-only .metrics-panel,
body.visual-only .timeline-footer {
  display: none;
}

body.visual-only .content-grid {
  grid-row: 1;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 720px;
  padding: 0;
}

body.visual-only .visual-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 720px;
}

body:not([data-capture="1"]) .video-frame { zoom: var(--preview-scale, 1); }
