@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #040812;
  --panel: #08111d;
  --panel-2: #0d1828;
  --panel-3: #13243a;
  --line: #20314d;
  --text: #f5f7fb;
  --muted: #91a4bd;
  --soft: #d3d8e2;
  --brand-navy: #071f3d;
  --brand-blue: #0878ff;
  --brand-blue-2: #2ea0ff;
  --green: #16a34a;
  --green-2: #052f19;
  --green-3: #0b5d2b;
  --red: #ef4444;
  --red-2: #431313;
  --yellow: #f8c14a;
  --focus: #2ea0ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  --motion: cubic-bezier(0.16, 1, 0.3, 1);
  --cue-default: #475569;
  --cue-current: #475569;
  --cue-next: #334155;
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -12%, rgba(8, 120, 255, 0.2), transparent 34%),
    radial-gradient(circle at 80% -20%, rgba(46, 160, 255, 0.1), transparent 32%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080b10;
  color: var(--text);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

input:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}

.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;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 8px;
  background: rgba(3, 5, 8, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.92));
  border: 1px solid rgba(46, 160, 255, 0.28);
  color: #f4f4f5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(8, 120, 255, 0.16);
}

.brand-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.rail-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.rail-button.active,
.rail-button:hover {
  background: rgba(8, 120, 255, 0.12);
  color: var(--text);
}

.rail-button.active {
  box-shadow: inset 3px 0 0 var(--brand-blue);
}

.shell {
  height: 100%;
  margin-left: 56px;
  overflow: hidden;
}

.view {
  display: none;
  min-height: 100%;
}

.view.active {
  display: block;
}

#login-view[hidden] {
  display: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% -10%, rgba(8, 120, 255, 0.24), transparent 36%),
    radial-gradient(circle at 20% 80%, rgba(46, 160, 255, 0.12), transparent 34%),
    #040812;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.login-logo {
  width: min(288px, 82%);
  height: auto;
  margin: 0 0 2px;
  padding: 10px 12px;
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.92));
  border: 1px solid rgba(46, 160, 255, 0.24);
  filter: drop-shadow(0 12px 28px rgba(8, 120, 255, 0.18));
}

.login-copy,
.dashboard-user,
.login-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-status.error {
  color: var(--red);
}

.login-status.success {
  color: #4ade80;
}

.login-actions,
.dashboard-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-actions > * {
  justify-content: center;
}

.login-guest-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

body.login-mode .rail,
body.login-mode .shell {
  display: none;
}

#rundown-view.active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
}

#dashboard-view {
  max-width: 1180px;
  height: 100vh;
  padding: 48px 28px 70px;
  margin: 0 auto;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

#dashboard-view::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dashboard-head,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-logo {
  width: 208px;
  height: auto;
  margin: 0 0 12px;
  padding: 8px 10px;
  object-fit: contain;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.9));
  border: 1px solid rgba(46, 160, 255, 0.2);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
}

.primary-action,
.publish-button,
.start-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-weight: 800;
  transition:
    transform 180ms var(--motion),
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.primary-action:hover,
.publish-button:hover,
.start-button:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.22);
}

.publish-button {
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand-blue), #0f5fd4);
}

.publish-button:hover {
  background: linear-gradient(135deg, #2ea0ff, #0878ff);
}

.output-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: #18181c;
  border: 1px solid #34343b;
  color: var(--text);
  font-weight: 800;
}

.output-button:hover {
  background: #25252b;
}

.status-control {
  position: relative;
}

.status-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid currentColor;
  background: rgba(10, 16, 26, 0.82);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 45;
  width: 170px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(46, 160, 255, 0.2);
  border-radius: 8px;
  background: #05070b;
  box-shadow: var(--shadow);
}

.status-menu[hidden] {
  display: none;
}

.status-menu button {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  font-weight: 800;
}

.status-menu button:hover {
  filter: brightness(1.15);
}

.status-draft {
  color: #cbd5e1;
}

.status-awaiting {
  color: #fb923c;
}

.status-approved {
  color: #4ade80;
}

.status-finalized {
  color: #60a5fa;
}

.status-rejected {
  color: #f87171;
}

.start-button.running {
  background: #991b1b;
}

.start-button.paused {
  background: var(--yellow);
  color: #101010;
}

.dashboard-tools {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin: 30px 0 18px;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--panel);
}

.ghost-button,
.cue-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--soft);
  transition:
    transform 180ms var(--motion),
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.ghost-button:hover,
.cue-button:hover {
  background: var(--panel-3);
  color: var(--text);
  transform: translateY(-1px);
}

.ghost-button.active {
  border-color: rgba(96, 165, 250, 0.7);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.24);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(260px, 1.6fr);
  gap: 10px;
  margin: 18px 0 24px;
}

.summary-card {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.9), rgba(9, 12, 17, 0.92));
}

.summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card.wide strong {
  font-size: 16px;
}

.dashboard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 8px 0 12px;
}

.dashboard-breadcrumb button,
.dashboard-tabs button,
.rundown-card-actions button,
.mini-danger {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--soft);
  font-weight: 800;
}

.dashboard-breadcrumb button:hover,
.dashboard-tabs button:hover,
.rundown-card-actions button:hover {
  background: var(--panel-3);
  color: var(--text);
}

.dashboard-breadcrumb input {
  min-width: min(420px, 60vw);
  height: 38px;
  padding: 0 12px;
  font-size: 18px;
  font-weight: 900;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.event-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 1px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--event-color) 56%, transparent), transparent 52%),
    rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.event-card > button:first-child {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  text-align: left;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.94), rgba(6, 9, 13, 0.96));
}

.event-card > button:first-child:hover {
  background: linear-gradient(180deg, rgba(20, 27, 38, 0.96), rgba(8, 12, 18, 0.98));
}

.event-card span,
.event-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card strong {
  font-size: 18px;
  line-height: 1.18;
}

.mini-danger {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
  border-color: rgba(248, 113, 113, 0.25);
  font-size: 11px;
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.dashboard-tabs button.active {
  background: #172033;
  border-color: rgba(96, 165, 250, 0.6);
  color: var(--text);
}

.dashboard-tabs button:disabled {
  opacity: 0.42;
}

.rundown-card-list {
  display: grid;
  gap: 10px;
}

.dashboard-rundown-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.86);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  transition:
    transform 220ms var(--motion),
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 220ms ease;
}

.dashboard-rundown-card:hover,
.dashboard-rundown-card.active {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(18, 24, 33, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.dashboard-rundown-card.active {
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.26),
    inset 3px 0 0 var(--red);
}

.rundown-card-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rundown-title-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.rundown-title-input:focus {
  border: 0;
  box-shadow: none;
  color: #dbeafe;
}

.card-time {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
}

.rundown-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.rundown-card-actions select {
  max-width: 180px;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.danger-text {
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.25) !important;
}

.empty-dashboard {
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(13, 17, 23, 0.5);
}

.section-label::before,
.section-label::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.rundown-card {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 20px;
  text-align: left;
  background: var(--panel);
  border: 1px solid #202026;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.rundown-card:hover {
  background: #18181b;
  border-color: #393943;
}

.card-kicker {
  color: var(--muted);
  font-size: 13px;
}

.card-title {
  font-size: 22px;
  font-weight: 800;
}

.card-meta {
  color: var(--soft);
  font-size: 14px;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 900;
}

.topbar {
  position: relative;
  flex: 0 0 auto;
  z-index: 10;
  padding: 12px 16px;
  background: rgba(5, 5, 6, 0.98);
  border-bottom: 1px solid #17171a;
}

.topbar-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title h1 {
  overflow: hidden;
  max-width: 520px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.view-only-mode .rail,
.view-only-mode .showbar,
.view-only-mode .rundown-settings {
  display: none;
}

.view-only-mode .shell {
  margin-left: 0;
}

.view-only-mode .topbar {
  padding: 14px 18px;
}

.view-only-mode .table-wrap {
  padding-left: 18px;
}

.view-only-mode .append-cue-row {
  display: none;
}

body.output-mode {
  overflow: auto;
}

body.output-mode .rail,
body.output-mode #dashboard-view,
body.output-mode #rundown-view {
  display: none;
}

body.output-mode .shell {
  margin-left: 0;
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.output-view.active {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background:
    radial-gradient(circle at 18% -12%, rgba(8, 120, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #040812, #020408 42%);
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  scroll-behavior: smooth;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.output-title-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.output-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 241, 255, 0.9));
  border: 1px solid rgba(46, 160, 255, 0.2);
  padding: 5px;
}

.output-head h1 {
  max-width: 58vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(22px, 2.7vw, 38px);
  letter-spacing: 0;
}

.output-metrics {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

.output-clock {
  min-width: 164px;
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 8px;
  background: rgba(7, 13, 22, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.output-clock span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.output-clock strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.output-clock strong.late,
.output-clock strong#output-over-under.late {
  color: #ff5f63;
}

.output-clock strong.under,
.output-clock strong#output-over-under.early {
  color: #22c55e;
}

.output-message {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 8px;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 700;
}

.output-message.is-bold { font-weight: 900; }
.output-message.is-underlined { text-decoration: underline; text-underline-offset: 0.14em; }

.output-message.blue {
  background: #1d4ed8;
}

.output-message.green {
  background: #15803d;
}

.output-message.yellow {
  background: #ca8a04;
  color: #090909;
}

.output-message.red {
  background: #b91c1c;
}

.output-content {
  flex: 1;
  min-height: 0;
  padding-top: 22px;
  scroll-behavior: smooth;
}

.output-list {
  display: grid;
  gap: 12px;
  padding-bottom: 90vh;
}

.output-list-head,
.output-list-row {
  display: grid;
  grid-template-columns: var(--output-grid, 80px repeat(var(--output-cols, 3), minmax(140px, 1fr)));
  gap: 4px;
  scroll-margin-block: 42vh;
  transition:
    transform 520ms var(--motion),
    opacity 280ms ease,
    filter 420ms ease;
}

.output-list-row {
  position: relative;
}

.output-list-row.current,
.output-list-row.next {
  margin-top: 22px;
}

.output-list-row.current::before,
.output-list-row.next::before {
  content: "CURRENT CUE";
  position: absolute;
  left: 0;
  right: 0;
  top: -17px;
  height: 16px;
  color: #ff5f63;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.output-list-row.next::before {
  content: "NEXT CUE";
  color: #dbeafe;
}

.output-list-row.current::after,
.output-list-row.next::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 1px;
  background: linear-gradient(90deg, #ff4448, rgba(255, 68, 72, 0.2), transparent);
  pointer-events: none;
}

.output-list-row.next::after {
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.9), rgba(219, 234, 254, 0.22), transparent);
}

.output-list-head {
  color: #9ab2d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.output-list-row > div,
.single-cue-card,
.prompter-card {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 6px;
  background: rgba(8, 13, 22, 0.92);
}

.output-list-row > div {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.24;
  transition:
    background-color 420ms var(--motion),
    border-color 360ms ease,
    color 180ms ease,
    box-shadow 420ms var(--motion);
}

.output-list-row.past > div {
  background: color-mix(in srgb, var(--cue-bg, var(--cue-default)) 84%, #020408);
  border-color: rgba(148, 163, 184, 0.22);
  opacity: 0.84;
}

.output-list-row.current > div {
  background: var(--cue-bg, var(--cue-default));
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow:
    0 0 0 1px rgba(46, 160, 255, 0.18),
    0 16px 42px rgba(8, 120, 255, 0.12);
}

.output-list-row.next > div {
  background: color-mix(in srgb, var(--cue-bg, var(--cue-default)) 52%, #020408);
  border-color: rgba(255, 255, 255, 0.22);
}

.output-list-row.overtime > div {
  border-color: rgba(248, 113, 113, 0.72);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.26);
}

.output-list-row.current {
  animation: output-focus-in 560ms var(--motion);
}

.output-list-row .output-number {
  justify-content: center;
  background: #07111e;
  font-size: 18px;
  font-weight: 900;
}

.output-list-row.current .output-number,
.output-list-row.overtime .output-number {
  background: #ef4444;
  border-color: #ff7777;
}

.output-list-row:not(.current):not(.next):not(.past) > div {
  background: color-mix(in srgb, var(--cue-bg, var(--cue-default)) 58%, #020408);
}

.output-time {
  justify-content: flex-start;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.output-duration {
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.output-duration.under,
.output-duration.under-used {
  color: #4ade80;
}

.output-duration.late,
.output-duration.over-used {
  color: #fecaca;
}

.output-main {
  font-size: 18px;
  font-weight: 900;
}

.output-pgm,
.output-remarks,
.output-custom-0,
.output-custom-1,
.output-custom-2 {
  font-size: 15px;
}

@keyframes output-focus-in {
  0% {
    transform: translateY(16px) scale(0.99);
    opacity: 0.64;
    filter: saturate(0.72);
  }
  62% {
    transform: translateY(-2px) scale(1.002);
    opacity: 1;
    filter: saturate(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: saturate(1);
  }
}

.single-output-stack {
  min-height: 68vh;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  gap: 14px;
}

.single-cue-card {
  min-height: 56vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 70px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cue-bg, var(--cue-default)) 86%, #020408), #040812);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.single-cue-label {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.single-cue-meta {
  display: flex;
  gap: 18px;
  color: #bbf7d0;
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 900;
}

.single-cue-title {
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.98;
  font-weight: 950;
}

.single-cue-detail {
  color: #dcfce7;
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 800;
}

.single-next-card {
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  border: 1px solid rgba(219, 234, 254, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.08), transparent),
    color-mix(in srgb, var(--cue-bg, var(--cue-default)) 42%, #020408);
}

.single-next-card .single-cue-label {
  background: rgba(219, 234, 254, 0.1);
  color: #dbeafe;
}

.single-next-title {
  font-size: clamp(24px, 3vw, 46px);
  font-weight: 900;
}

.single-next-meta {
  color: rgba(245, 247, 251, 0.68);
  font-size: 15px;
  font-weight: 800;
}

.prompter-card {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 90px);
  background: #070707;
  border-color: #2b2b31;
}

.prompter-card p {
  max-width: 1100px;
  margin: 0;
  text-align: center;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 1.05;
  font-weight: 950;
}

.back-button {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--soft);
}

.clock-strip {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

.output-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.layout-options,
.column-options {
  display: grid;
  gap: 8px;
}

.layout-options label,
.column-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b0b0d;
  color: var(--soft);
  font-weight: 700;
}

.clock-box {
  min-width: 176px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
}

.clock-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.clock-box select {
  height: 28px;
  padding: 0 8px;
}

.clock-box strong {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.showbar {
  position: relative;
  flex: 0 0 auto;
  z-index: 9;
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    104px
    132px
    52px
    112px
    minmax(176px, max-content)
    minmax(176px, max-content);
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #080809;
  border-bottom: 1px solid #17171a;
}

.showbar:has(#pause-toggle[hidden]) {
  grid-template-columns:
    minmax(260px, 1fr)
    104px
    132px
    112px
    minmax(176px, max-content)
    minmax(176px, max-content);
}

#tracker {
  grid-column: 1;
}

#prev-cue {
  grid-column: 2;
}

#show-toggle {
  grid-column: 3;
}

#pause-toggle {
  grid-column: 4;
}

#next-cue {
  grid-column: 5;
}

.subtract-duration {
  grid-column: 6;
}

.add-duration {
  grid-column: 7;
}

.showbar:has(#pause-toggle[hidden]) #next-cue {
  grid-column: 4;
}

.showbar:has(#pause-toggle[hidden]) .subtract-duration {
  grid-column: 5;
}

.showbar:has(#pause-toggle[hidden]) .add-duration {
  grid-column: 6;
}

.tracker {
  min-height: 44px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--green-2);
  border: 1px solid var(--green-3);
}

.tracker.over {
  background: var(--red-2);
  border-color: #7f1d1d;
}

.tracker.neutral {
  background: var(--panel-2);
  border-color: var(--line);
}

.tracker span {
  color: var(--soft);
  font-size: 13px;
}

.tracker strong {
  font-variant-numeric: tabular-nums;
  color: #bbf7d0;
}

.tracker.over strong {
  color: #fecaca;
}

.tracker.neutral strong {
  color: var(--soft);
}

.duration-control,
.add-duration {
  display: flex;
  align-items: stretch;
  min-width: 176px;
}

.duration-control button,
.add-duration button {
  min-width: 72px;
  padding: 0 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-weight: 800;
}

.cue-button,
.start-button,
.pause-button {
  min-height: 44px;
  width: 100%;
  white-space: nowrap;
}

.start-button {
  min-width: 132px;
  display: grid;
  place-items: center;
  justify-self: stretch;
  padding: 0 16px;
  text-align: center;
  line-height: 1;
}

.pause-button {
  width: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(46, 160, 255, 0.3);
  background: rgba(8, 120, 255, 0.14);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(46, 160, 255, 0.08);
}

.pause-button::before {
  content: "";
  width: 14px;
  height: 18px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.pause-button[data-state="resume"]::before {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 16px solid currentColor;
  border-right: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.pause-button:hover {
  background: rgba(8, 120, 255, 0.24);
}

.pause-button.paused {
  background: rgba(248, 193, 74, 0.22);
  border-color: rgba(248, 193, 74, 0.5);
  color: #fde68a;
}

.pause-button[hidden] {
  display: none;
}

.duration-control select,
.add-duration select {
  width: 104px;
  padding: 0 8px;
}

.subtract-duration select {
  border-radius: 6px 0 0 6px;
}

.subtract-duration button {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.add-duration button {
  border-radius: 6px 0 0 6px;
}

.add-duration select {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.rundown-settings {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #17171a;
  color: var(--muted);
  font-size: 13px;
}

.rundown-settings strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.group-toggle-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.group-toggle-actions button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.82);
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.group-toggle-actions button:hover {
  border-color: rgba(46, 160, 255, 0.72);
  color: var(--text);
  background: rgba(30, 41, 59, 0.98);
}

.selection-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  overflow-x: auto;
  border-bottom: 1px solid #17171a;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  scrollbar-width: thin;
}

.selection-bar[hidden] {
  display: none;
}

.selection-bar strong {
  min-width: 126px;
  color: var(--text);
  font-size: 13px;
}

.selection-bar button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.selection-bar button:hover {
  background: rgba(30, 41, 59, 0.94);
  color: var(--text);
}

.selection-bar button:disabled {
  opacity: 0.45;
}

.selection-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.selection-swatches .swatch {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
}

.table-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 40px 16px;
}

.rundown-end-panel {
  min-width: max-content;
  margin: 24px 0 28px;
  padding: 0 0 0 8px;
}

.end-metrics {
  display: flex;
  align-items: flex-start;
  gap: 54px;
  margin: 0 0 14px;
}

.end-metrics div {
  display: grid;
  gap: 2px;
}

.end-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.end-metrics strong {
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.end-metrics strong.changed {
  color: rgba(245, 247, 251, 0.82);
  text-decoration: line-through;
}

.end-metrics strong.late {
  color: #ef4444;
}

.end-metrics strong.early {
  color: #22c55e;
}

.append-cue-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.split-add-cue {
  position: relative;
  display: flex;
}

.split-add-cue > button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
}

#append-cue-button {
  border-radius: 5px 0 0 5px;
  font-weight: 700;
}

#append-cue-button span {
  color: var(--soft);
  font-size: 24px;
  line-height: 1;
}

#append-cue-menu-toggle {
  width: 42px;
  justify-content: center;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}

#append-cue-menu-toggle.active,
.split-add-cue > button:hover {
  background: var(--panel-3);
}

.append-cue-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  width: 170px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #050506;
  box-shadow: var(--shadow);
}

.append-cue-menu[hidden] {
  display: none;
}

.append-cue-menu button {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.append-cue-menu button:hover {
  background: var(--panel-2);
}

.append-cue-menu span {
  width: 14px;
  color: var(--soft);
  text-align: center;
  font-weight: 800;
}

.append-count {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 18px;
}

.append-count input {
  width: 64px;
  height: 38px;
  padding: 0 10px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.rundown-grid {
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 100%;
}

.header-row {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 0 6px;
  background: #050506;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.header-row > div,
.header-row > input,
.header-row > button {
  min-height: 32px;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  overflow: hidden;
}

.header-row > input {
  width: 100%;
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
}

.column-header-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
}

.column-header-control input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 88px 0 0;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.move-column-button {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 24px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #aab5c3;
  font-family: "DM Mono", monospace;
  font-size: 14px;
  line-height: 1;
  opacity: 0.82;
}

.move-column-left { right: 56px; }
.move-column-right { right: 32px; }

.move-column-button:hover:not(:disabled) {
  border-color: rgba(24, 87, 255, 0.5);
  background: rgba(24, 87, 255, 0.16);
  color: #f3f7ff;
  opacity: 1;
}

.move-column-button:disabled {
  cursor: not-allowed;
  opacity: 0.26;
}

.delete-column-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: #fecaca;
  font-size: 16px;
  line-height: 1;
  opacity: 0.78;
}

.delete-column-button:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.22);
}

.header-row > button {
  justify-content: center;
  border-radius: 6px;
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.header-row > button:hover {
  background: var(--panel-3);
  color: var(--text);
}

.cue-list {
  display: grid;
  gap: 6px;
  scroll-behavior: smooth;
}

.cue-row {
  position: relative;
  align-items: stretch;
  scroll-margin-block: 38vh;
  transition:
    transform 520ms var(--motion),
    opacity 260ms ease,
    filter 420ms ease;
}

.cue-row.meta-row {
  align-items: center;
}

.cue-row.group-row {
  align-items: stretch;
}

.cue-separator {
  min-width: max-content;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 6px 0 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cue-separator.next {
  color: var(--text);
}

.cue-separator::before,
.cue-separator::after {
  content: "";
  height: 2px;
  background: currentColor;
}

.cue-separator.next::before,
.cue-separator.next::after {
  height: 1px;
  opacity: 0.72;
}

.cue-tools {
  min-height: 74px;
  display: grid;
  grid-template-rows: 22px 1fr 22px;
  align-items: center;
  justify-items: center;
  gap: 3px;
}

.cue-tool-button,
.drag-handle {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 900;
}

.drag-handle {
  opacity: 0;
  cursor: grab;
  line-height: 1;
}

.cue-row:hover .drag-handle,
.cue-row.current .drag-handle,
.cue-row.next .drag-handle {
  opacity: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

body.dragging-cue,
body.dragging-cue * {
  cursor: grabbing;
}

.cue-tool-button:hover,
.drag-handle:hover,
.cue-tool-button.active {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

.cue-select {
  width: 13px;
  height: 13px;
  accent-color: var(--focus);
}

.cue-row.drag-before::before,
.cue-row.drag-after::after {
  content: "";
  position: absolute;
  left: 38px;
  right: 4px;
  height: 3px;
  z-index: 8;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(46, 160, 255, 0.18), var(--focus), rgba(46, 160, 255, 0.18));
  box-shadow: 0 0 0 1px rgba(46, 160, 255, 0.22), 0 0 18px rgba(46, 160, 255, 0.52);
  pointer-events: none;
}

.cue-row.drag-before::before {
  top: -5px;
}

.cue-row.drag-after::after {
  bottom: -5px;
}

.cue-row.group-child {
  position: relative;
}

.cue-row.group-child .cue-tools {
  position: relative;
}

.cue-row.group-child .cue-tools::before {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--group-line, #4b5563);
  opacity: 0.78;
}

.cue-row.group-child .cue-cell.number {
  border-left: 4px solid var(--group-line, #4b5563);
}

.cue-row.group-child.group-expanding {
  transform-origin: top;
  animation: group-roll-in 300ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.cue-row.group-child.group-collapsing {
  transform-origin: top;
  animation: group-roll-out 210ms cubic-bezier(0.32, 0, 0.67, 0) both;
  pointer-events: none;
}

.cue-drop-end {
  min-height: 0;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 6px 38px 8px;
  border: 1px dashed rgba(96, 165, 250, 0.42);
  border-radius: 6px;
  background: rgba(46, 160, 255, 0.05);
  color: rgba(191, 219, 254, 0.84);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: min-height 180ms var(--motion), opacity 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

body.dragging-cue .cue-drop-end {
  min-height: 42px;
  display: flex;
  opacity: 1;
}

.cue-drop-end.active {
  border-color: var(--focus);
  background: rgba(46, 160, 255, 0.14);
  box-shadow: 0 0 0 2px rgba(46, 160, 255, 0.16), 0 10px 24px rgba(46, 160, 255, 0.12);
}

.cue-row.selected .cue-cell {
  box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.35);
}

.cue-row.queued .cue-cell {
  border-color: #f8c14a;
}

.cue-row.unavailable .cue-cell {
  border-color: rgba(148, 163, 184, 0.42);
  background: color-mix(in srgb, var(--cue-bg, var(--cue-default)) 44%, #111827);
  color: rgba(226, 232, 240, 0.72);
}

.cue-row.unavailable .cue-cell.unavailable-number {
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.58);
}

.cue-cell {
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: var(--cue-bg, var(--cue-default));
  color: var(--text);
  transition:
    background-color 420ms var(--motion),
    border-color 360ms ease,
    color 180ms ease,
    box-shadow 420ms var(--motion);
}

.cue-cell.number {
  justify-content: center;
  padding: 10px;
  border-radius: 6px 0 0 6px;
  background: #334155;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.cue-cell:last-child {
  border-radius: 0 6px 6px 0;
}

.cue-cell.time,
.cue-cell.duration {
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.cue-cell.duration {
  font-size: 18px;
  font-weight: 800;
}

.cue-cell.main {
  font-size: 18px;
  font-weight: 700;
}

.cue-availability {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(251, 191, 36, 0.44);
  border-radius: 3px;
  color: #fbbf24;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cue-cell.custom {
  color: #d8dee9;
}

.cue-cell.empty-editable,
.inline-editor.empty-editable {
  border-color: rgba(148, 163, 184, 0.44);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.cue-cell.empty-editable {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    var(--cue-bg, var(--cue-default));
}

.cue-row.meta-row .cue-tools {
  min-height: 50px;
}

.cue-cell.meta-cell {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #111113;
  border-color: #27272f;
  font-size: 18px;
  font-weight: 800;
}

.cue-row.type-group .cue-cell.meta-cell {
  background: var(--cue-bg, #273243);
  border-color: #45556e;
}

.cue-cell.group-number {
  background: #1f2937;
  border-color: #45556e;
}

.cue-cell.group-cell {
  min-height: 58px;
  gap: 12px;
  flex-wrap: wrap;
}

.group-collapse {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.group-collapse:hover {
  background: rgba(255, 255, 255, 0.1);
}

.group-title {
  min-width: 140px;
  max-width: none;
  flex: 1 1 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-timing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: rgba(245, 247, 251, 0.78);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.group-duration {
  display: inline-flex;
  gap: 4px;
}

.group-duration b {
  color: inherit;
  font-weight: 700;
}

.group-range {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(245, 247, 251, 0.7);
}

.group-summary {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(245, 247, 251, 0.72);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cue-row.group-row.collapsed .group-summary {
  color: #f8c14a;
}

@media (max-width: 860px) {
  .group-timing {
    width: 100%;
    margin-left: 42px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.meta-tag {
  min-width: 76px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.meta-title {
  color: var(--text);
}

.cell-original {
  color: rgba(245, 247, 251, 0.56);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: line-through;
}

.cell-live {
  min-width: 88px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.cue-cell.add-column-space {
  background: #070708;
  border-color: #15151a;
}

.cue-cell[contenteditable="true"] {
  border-color: rgba(46, 160, 255, 0.62);
  outline: none;
}

.cue-cell.button-cell {
  cursor: pointer;
}

.cue-cell.button-cell:hover,
.cue-cell.button-cell:focus {
  border-color: rgba(46, 160, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(46, 160, 255, 0.18);
}

.cue-cell[contenteditable="true"]:empty::before {
  content: "Type...";
  color: #5f6b75;
}

.cue-row.current .cue-cell {
  background: var(--cue-current-bg, var(--cue-current));
  border-color: rgba(46, 160, 255, 0.82);
}

.cue-row.current {
  animation: cue-focus-in 560ms var(--motion);
}

.cue-row.current .cue-cell.number {
  background: var(--red);
  border-color: #ff7676;
}

.cue-row.next .cue-cell {
  background: var(--cue-next-bg, var(--cue-next));
  border-color: rgba(148, 163, 184, 0.5);
}

.cue-row.overtime .cue-cell {
  background: #4a1212;
  border-color: #8f2525;
}

.cue-row.overtime .cue-cell.number {
  background: #b91c1c;
  border-color: #ff7676;
}

.duration.negative {
  color: #fecaca;
}

.duration.positive {
  color: #f0fdf4;
}

.duration.under-used {
  color: #4ade80;
}

.duration.over-used {
  color: #fecaca;
}

@keyframes cue-focus-in {
  0% {
    transform: translateY(14px) scale(0.99);
    opacity: 0.66;
    filter: saturate(0.72);
  }
  64% {
    transform: translateY(-2px) scale(1.002);
    opacity: 1;
    filter: saturate(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: saturate(1);
  }
}

.main-stack {
  display: grid;
  width: 100%;
  gap: 7px;
}

.main-title {
  font: inherit;
}

.inline-editor {
  min-width: 180px;
  max-width: 100%;
  border: 1px solid transparent;
  outline: 0;
}

.title-editor {
  display: block;
  padding: 2px 0;
  border-radius: 4px;
}

.main-subtitle {
  width: fit-content;
  min-width: 190px;
  max-width: min(420px, 100%);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 5px;
  color: rgba(245, 247, 251, 0.52);
  font-size: 13px;
  font-weight: 700;
}

.inline-editor[contenteditable="true"]:focus {
  border-color: rgba(46, 160, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(46, 160, 255, 0.14);
}

.inline-editor.empty-editable::before {
  content: attr(data-placeholder);
  color: rgba(203, 213, 225, 0.4);
  pointer-events: none;
}

@keyframes group-roll-in {
  0% {
    opacity: 0;
    transform: translateY(-14px) scaleY(0.72);
    filter: saturate(0.78);
  }
  70% {
    opacity: 1;
    transform: translateY(2px) scaleY(1.018);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: saturate(1);
  }
}

@keyframes group-roll-out {
  0% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scaleY(0.7);
    filter: saturate(0.7);
  }
}

.cue-menu {
  position: fixed;
  z-index: 40;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050506;
  box-shadow: var(--shadow);
}

.cue-menu[hidden] {
  display: none;
}

.cue-menu button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.cue-menu button:hover {
  background: var(--panel-2);
}

.cue-menu .danger {
  color: #fecaca;
}

.cue-menu hr {
  height: 1px;
  border: 0;
  margin: 6px 0;
  background: var(--line);
}

.cue-menu small {
  color: var(--muted);
}

.menu-swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 6px 4px;
}

.swatch,
.modal-color-grid button {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  display: block;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch, #18181b);
}

.cue-menu .swatch {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 5px;
}

.default-swatch {
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), #ef4444 0, #ef4444 calc(50% + 1px), transparent 0),
    #18181b !important;
}

.swatch.active,
.modal-color-grid button.active {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wide-modal {
  width: min(820px, calc(100vw - 28px));
}

.wide-modal h3 {
  margin: 0 0 12px;
}

.colors-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.9fr);
  gap: 26px;
  align-items: start;
}

.modal-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 34px);
  gap: 10px 16px;
  margin: 14px 0 10px;
}

.modal-color-grid button {
  width: 34px;
  height: 34px;
}

.text-button {
  min-height: 32px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.color-preview {
  display: grid;
  gap: 16px;
}

#color-preview-card {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  border-radius: 5px;
  background: var(--cue-current);
  color: white;
  font-size: 18px;
}

.modal {
  width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal.wide-modal {
  width: min(820px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.modal h2 {
  margin: 0 0 8px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--soft);
}

.app-dialog {
  width: min(460px, calc(100vw - 28px));
  background:
    linear-gradient(180deg, rgba(8, 120, 255, 0.08), transparent 42%),
    var(--panel);
}

.app-dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-dialog h2::before {
  content: "SP";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: white;
  font-size: 11px;
  font-weight: 950;
}

.app-dialog #app-dialog-message {
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.field span {
  color: var(--soft);
  font-size: 13px;
}

.field input,
.field select {
  height: 40px;
  padding: 0 10px;
}

.field textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.cue-time-modal {
  width: min(330px, calc(100vw - 28px));
}

.cue-time-modal form {
  display: grid;
  gap: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 7px;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.segmented-control label {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label:has(input:checked) {
  background: var(--brand-blue);
  color: white;
}

.segmented-control label:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.compact-field {
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.compact-field span {
  font-weight: 800;
}

.duration-triplet {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.duration-triplet input {
  height: 42px;
  padding: 0 8px;
  text-align: center;
  background: #1f2937;
  border-color: rgba(148, 163, 184, 0.18);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.duration-triplet span {
  color: var(--muted);
  font-weight: 900;
}

.dialog-hint {
  min-height: 34px;
  margin: -2px 0 0 !important;
  color: rgba(245, 247, 251, 0.75) !important;
  font-size: 12px;
  line-height: 1.35;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.modal-actions .danger {
  background: var(--red);
  border-color: var(--red);
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .rail {
    width: 48px;
  }

  .shell {
    margin-left: 48px;
  }

  #dashboard-view {
    padding: 38px 16px;
  }

  .dashboard-head,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-actions,
  .topbar-actions,
  .login-actions {
    width: 100%;
  }

  .dashboard-actions > *,
  .topbar-actions > *,
  .login-actions > * {
    flex: 1 1 auto;
  }

  .topbar {
    position: static;
  }

  .dashboard-tools {
    grid-template-columns: 1fr;
  }

  .clock-strip {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .showbar {
    top: 0;
    grid-template-columns: 1fr 1fr;
  }

  #tracker,
  .showbar:has(#pause-toggle[hidden]) #tracker {
    grid-column: 1 / -1;
  }

  #prev-cue,
  .showbar:has(#pause-toggle[hidden]) #prev-cue {
    grid-column: 1;
  }

  #next-cue,
  .showbar:has(#pause-toggle[hidden]) #next-cue {
    grid-column: 2;
  }

  #show-toggle,
  .showbar:has(#pause-toggle[hidden]) #show-toggle {
    grid-column: 1;
  }

  #pause-toggle {
    grid-column: 2;
  }

  .showbar:has(#pause-toggle[hidden]) #show-toggle {
    grid-column: 1 / -1;
  }

  .subtract-duration,
  .showbar:has(#pause-toggle[hidden]) .subtract-duration {
    grid-column: 1;
  }

  .add-duration,
  .showbar:has(#pause-toggle[hidden]) .add-duration {
    grid-column: 2;
  }

  .colors-layout {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    height: auto;
    max-height: none;
  }

  .output-view.active {
    padding: 16px;
  }

  .output-head {
    align-items: stretch;
    flex-direction: column;
  }

  .output-head h1 {
    max-width: none;
    white-space: normal;
  }

  .output-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }

  .output-config-grid {
    grid-template-columns: 1fr;
  }

  .output-content {
    overflow-x: visible;
  }

  .output-list {
    gap: 14px;
    padding-bottom: 32px;
  }

  .output-list-head {
    display: none;
  }

  .output-list-row {
    min-width: 0;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px;
  }

  .output-list-row.current,
  .output-list-row.next {
    margin-top: 24px;
  }

  .output-list-row > div {
    min-height: auto;
    padding: 10px 12px;
  }

  .output-list-row .output-number {
    grid-row: 1 / span 12;
    align-self: stretch;
    min-height: 100%;
    font-size: 18px;
  }

  .output-cell {
    grid-column: 2;
    display: grid;
    align-items: start;
    justify-content: stretch;
    gap: 5px;
  }

  .output-cell::before {
    content: attr(data-output-label);
    color: #9ab2d0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .output-main {
    font-size: 17px;
  }

  .output-duration {
    justify-content: stretch;
    font-size: 17px;
  }

  .output-time {
    gap: 5px;
  }

  .single-output-stack {
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .single-cue-card,
  .prompter-card {
    min-height: 48vh;
  }

  .single-cue-title {
    font-size: clamp(32px, 12vw, 58px);
  }

  .single-cue-meta {
    flex-wrap: wrap;
    font-size: 18px;
  }

  .single-next-title {
    font-size: 24px;
  }
}

body.view-only-mode .rail,
body.view-only-mode .showbar,
body.view-only-mode .rundown-settings {
  display: none;
}

body.view-only-mode .shell {
  margin-left: 0;
}

body.view-only-mode .append-cue-row {
  display: none;
}

/* --------------------------------------------------------------------------
   Production workspace redesign
   The older neon treatment remains above for backwards compatibility; this
   layer intentionally resets it into a quieter, operator-first system.
   -------------------------------------------------------------------------- */

:root {
  --bg: #1a1c1e;
  --panel: #202326;
  --panel-2: #272a2d;
  --panel-3: #303438;
  --canvas: #f2efe8;
  --canvas-strong: #e8e3da;
  --ink: #202224;
  --text: #f5f3ee;
  --soft: #e9e5dc;
  --muted: #a4a59e;
  --line: #3d4144;
  --line-soft: #d7d1c6;
  --brand-navy: #06164f;
  --brand-blue: #0d3eea;
  --brand-blue-2: #1857ff;
  --brand-violet: #8067d7;
  --brand-pink: #cc6072;
  --green: #9fc55a;
  --green-2: #293725;
  --green-3: #4a6a36;
  --red: #ed665f;
  --red-2: #47282a;
  --yellow: #d6b05f;
  --focus: #90a4ff;
  --shadow: 0 18px 50px rgba(10, 11, 12, 0.2);
  --soft-shadow: 0 8px 24px rgba(10, 11, 12, 0.14);
  --glow-blue: 0 0 0 2px rgba(136, 161, 255, 0.18);
  --motion: cubic-bezier(0.2, 0.76, 0.2, 1);
  --radius-sm: 6px;
  --radius: 10px;
  --cue-default: #34383b;
  --cue-current: #3b4144;
  --cue-next: #303538;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body::before,
body::after {
  display: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  border-radius: 6px;
  font-weight: 700;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

input,
select,
textarea {
  background: #1b1d1f;
  border: 1px solid #484c4f;
  color: var(--text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(144, 164, 255, 0.12);
}

/* Landing ---------------------------------------------------------------- */

body.landing-mode,
body.login-mode {
  overflow-x: hidden;
}

body.landing-mode {
  background: var(--canvas);
  color: var(--ink);
}

body.landing-mode .rail,
body.landing-mode .shell,
body.login-mode .rail,
body.login-mode .shell {
  display: none;
}

.landing-screen {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
}

.landing-screen[hidden],
.login-screen[hidden] {
  display: none !important;
}

.marketing-nav,
.landing-main,
.landing-footer {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
}

.marketing-nav {
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(32, 34, 36, 0.13);
}

.marketing-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.marketing-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.marketing-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.marketing-links a,
.text-link {
  color: #5d605f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.marketing-links a:hover,
.text-link:hover {
  color: var(--ink);
}

.marketing-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.marketing-cta,
.hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #1d1f21;
  border-radius: 6px;
  background: #1d1f21;
  color: #f8f5ef;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--motion), background 180ms ease, border-color 180ms ease;
}

.marketing-cta:hover,
.hero-primary:hover {
  transform: translateY(-2px);
  background: #303438;
  border-color: #303438;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: clamp(46px, 7vw, 108px);
  align-items: center;
  min-height: 610px;
  padding: 74px 0 86px;
}

.hero-copy {
  max-width: 570px;
}

.marketing-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #6f726f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.marketing-kicker span {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: #1f2123;
}

.landing-hero h1 {
  max-width: 640px;
  margin: 0;
  color: #191b1d;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-lede {
  max-width: 510px;
  margin: 25px 0 0;
  color: #5b5e5d;
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.hero-primary {
  min-height: 48px;
  padding: 0 20px;
}

.hero-secondary {
  color: #26292a;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid #93928d;
  padding-bottom: 3px;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 48px;
  color: #71736f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-notes span::before {
  content: "\2022";
  margin-right: 7px;
  color: #3f5ac9;
}

.hero-console {
  position: relative;
  padding: 22px;
  border: 1px solid #3e4243;
  border-radius: 11px;
  background: #202325;
  color: #f2f1eb;
  box-shadow: 0 28px 56px rgba(26, 27, 27, 0.24);
}

.hero-console::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 23%;
  width: 26%;
  height: 2px;
  background: #9fc55a;
}

.console-topline,
.console-title-row,
.console-footer,
.console-cue {
  display: grid;
  align-items: center;
}

.console-topline {
  grid-template-columns: 1fr auto;
  color: #9da09e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.console-breadcrumb,
.console-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.console-dot,
.share-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8ce5e;
  box-shadow: 0 0 0 3px rgba(168, 206, 94, 0.12);
}

.console-title-row {
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 27px 0 20px;
}

.console-title-row > div:first-child {
  display: grid;
  gap: 5px;
}

.console-title-row > div:first-child strong {
  font-size: clamp(18px, 2vw, 25px);
  letter-spacing: -0.04em;
}

.console-title-row > div:first-child span {
  color: #a8aba7;
  font-size: 12px;
}

.console-clock {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.console-clock span,
.console-footer span {
  color: #8b908e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.console-clock strong {
  font-family: "DM Mono", ui-monospace, monospace;
  color: #f6f2e9;
  font-size: 16px;
  font-weight: 500;
}

.console-track {
  display: grid;
  grid-template-columns: 3fr 1.3fr repeat(5, 1fr);
  gap: 5px;
  padding: 0 0 22px;
  border-bottom: 1px solid #3a3e40;
}

.console-track span {
  height: 4px;
  background: #424648;
}

.console-track .track-complete { background: #607a42; }
.console-track .track-current { background: #efece3; }

.console-cue-list {
  padding: 10px 0 8px;
}

.console-cue {
  grid-template-columns: 32px 78px minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 47px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(248, 245, 238, 0.06);
  color: #d8d8d1;
  font-size: 12px;
}

.console-cue > span,
.console-cue time,
.console-cue em {
  color: #888d89;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
}

.console-cue strong {
  overflow: hidden;
  color: #ebebe4;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.console-cue.current {
  position: relative;
  margin: 4px -4px;
  padding-inline: 12px;
  border-radius: 5px;
  background: #3d5ac9;
  border-bottom-color: transparent;
}

.console-cue.current::before {
  content: "CURRENT";
  position: absolute;
  top: -14px;
  left: 12px;
  color: #aebcf6;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.console-cue.current > span,
.console-cue.current time,
.console-cue.current em,
.console-cue.current strong { color: #fff; }

.console-cue.next {
  border-left: 2px solid #9fc55a;
  padding-left: 11px;
}

.console-cue.completed { opacity: 0.58; }

.console-footer {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  padding-top: 16px;
  border-top: 1px solid #3a3e40;
}

.console-footer div { display: grid; gap: 5px; }
.console-footer strong { font-size: 11px; color: #e8e6df; }
.console-footer .console-early { color: #b4d975; }

.landing-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #cfcbc1;
  border-bottom: 1px solid #cfcbc1;
}

.landing-strip article {
  min-height: 225px;
  padding: 28px 32px 34px;
  border-right: 1px solid #cfcbc1;
}

.landing-strip article:last-child { border-right: 0; }
.landing-strip article > span { color: #85867f; font-family: "DM Mono", monospace; font-size: 11px; }
.landing-strip h2 { margin: 54px 0 8px; font-size: 18px; letter-spacing: -0.035em; }
.landing-strip p { max-width: 320px; margin: 0; color: #666965; font-size: 13px; line-height: 1.6; }

.landing-story {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 86px;
  padding: 130px 8.5% 120px;
}

.landing-story h2,
.landing-share h2 {
  max-width: 520px;
  margin: 0;
  color: #202224;
  font-size: clamp(31px, 3.4vw, 51px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.story-points {
  display: grid;
  gap: 0;
  border-top: 1px solid #cfcac0;
}

.story-points article {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 23px 0;
  border-bottom: 1px solid #cfcac0;
}

.story-points strong { font-size: 13px; }
.story-points p { margin: 0; color: #626460; font-size: 13px; line-height: 1.65; }

.landing-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.8fr);
  gap: 72px;
  align-items: center;
  margin-bottom: 98px;
  padding: 66px 8.5%;
  background: #e6e0d5;
}

.share-copy > p:last-child { max-width: 420px; color: #666966; line-height: 1.65; }

.share-card {
  padding: 20px;
  border: 1px solid #484b4c;
  border-radius: 8px;
  background: #242729;
  color: #f4f1e9;
  box-shadow: 0 20px 35px rgba(31, 31, 29, 0.17);
}

.share-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: #a1a49f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.share-card-head span:last-child {
  border: 1px solid #515455;
  border-radius: 999px;
  padding: 4px 7px;
}

.share-card > strong { display: block; margin-top: 45px; font-size: 26px; letter-spacing: -0.05em; }
.share-card > p { margin: 8px 0 0; color: #a9ada9; font-size: 12px; }
.share-card-rule { height: 1px; margin: 36px 0 14px; background: #444748; }
.share-card > div:last-child { display: flex; justify-content: space-between; color: #a8aaa7; font-size: 11px; }
.share-card > div:last-child strong { color: #f0ede5; font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; }

.landing-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  padding: 28px 0 36px;
  color: #777873;
  font-size: 11px;
  border-top: 1px solid #cfcbc1;
}

.landing-footer > span:first-child { color: #222426; font-weight: 800; }
.landing-footer a { color: #4a4c4b; font-weight: 800; text-decoration: none; }

/* Authentication --------------------------------------------------------- */

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  overflow: auto;
  background: #ebe6dc;
}

.login-screen::before,
.login-screen::after,
.login-card::before,
.login-card::after { display: none; }

.login-card {
  width: min(940px, 100%);
  min-height: 560px;
  max-height: none;
  display: grid;
  grid-template-columns: 1fr minmax(310px, 0.72fr);
  grid-template-areas:
    "brand email"
    "eyebrow email"
    "title password"
    "copy status"
    "copy actions";
  align-items: start;
  gap: 16px 80px;
  padding: clamp(30px, 6vw, 74px);
  border: 1px solid #d1cbc0;
  border-radius: 10px;
  background: #f8f6f1;
  box-shadow: 0 28px 70px rgba(35, 32, 27, 0.14);
  overflow: visible;
}

.login-brand { grid-area: brand; display: inline-flex; width: fit-content; }
.login-logo { width: 178px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.login-card > .eyebrow { grid-area: eyebrow; color: #6c6e69; margin: 6px 0 0; font-size: 10px; }
.login-card h1 { grid-area: title; max-width: 400px; margin: 9px 0 0; color: #1d2021; font-size: clamp(40px, 5vw, 62px); line-height: 0.96; letter-spacing: -0.06em; }
.login-copy { grid-area: copy; max-width: 420px; margin: 8px 0 0; color: #646662; font-size: 14px; line-height: 1.7; }
.login-card .field { padding: 0; border: 0; border-radius: 0; background: transparent; }
.login-card .field:nth-of-type(1) { grid-area: email; }
.login-card .field:nth-of-type(2) { grid-area: password; }
.login-card .field span { color: #686a66; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; }
.login-card .field input { min-height: 47px; margin-top: 7px; border-color: #c8c4bb; background: #fffdf8; color: #202224; }
.login-status { grid-area: status; min-height: 20px; margin: 0; color: #777872; font-size: 11px; line-height: 1.45; }
.login-status:not(:empty) { padding: 10px 11px; border: 1px solid #d4cfc5; border-radius: 5px; background: #f2eee6; }
.login-actions { grid-area: actions; display: grid; grid-template-columns: 1fr; gap: 10px; }
.login-actions .primary-action { min-height: 46px; background: #202325; border-color: #202325; color: #faf8f2; }
.login-actions .primary-action:hover { background: var(--brand-blue); border-color: var(--brand-blue); }
.login-actions .ghost-button { min-height: 43px; border-color: #bcb8b0; background: transparent; color: #2f3231; box-shadow: none !important; }
.login-actions .text-button { justify-self: start; padding: 4px 0; background: transparent; border: 0; color: var(--brand-blue); font-size: 12px; }
.login-guest-link { color: #646661; font-size: 12px; font-weight: 800; text-decoration: none; }
.login-guest-link span { margin-left: 6px; }

.login-reset-button {
  margin-top: -4px;
}

.password-update-dialog {
  width: min(450px, calc(100vw - 28px));
}

.password-update-dialog form {
  display: grid;
  gap: 13px;
}

.password-update-dialog .eyebrow {
  margin: 0;
  color: #8fa8c5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-update-dialog h2 {
  margin-bottom: 0;
}

.password-update-dialog p:not(.eyebrow):not(.password-update-status) {
  margin: 0;
  color: #bec8d2;
  font-size: 13px;
  line-height: 1.55;
}

.password-update-status {
  min-height: 18px;
  margin: 0;
  color: #b9c8d8;
  font-size: 12px;
}

.password-update-status.error { color: #ffd1ce; }
.password-update-status.success { color: #c4e790; }

.output-message-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin: 2px 0;
}

.output-message-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5df;
  font-size: 12px;
  font-weight: 700;
}

.output-message-update {
  width: fit-content;
  min-height: 34px;
  margin-top: 2px;
}

.output-message-hint {
  margin: -6px 0 0;
}

#save-status.sync-pending { color: #87b5ff; }
#save-status.sync-synced { color: #c4e790; }
#save-status.sync-error { color: #ffd1ce; }

/* Application chrome ----------------------------------------------------- */

.rail {
  width: 58px;
  padding: 15px 8px;
  gap: 12px;
  background: #141618;
  border-right: 1px solid #36393b;
  box-shadow: none;
}

.shell { margin-left: 58px; background: var(--bg); }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  padding: 5px;
  background: #f2efe7;
  box-shadow: none;
}

.rail-button {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #888b88;
  background: transparent;
}

.rail-button.active,
.rail-button:hover {
  transform: none;
  background: #303438;
  border-color: #464b4d;
  color: #f2f0e8;
  box-shadow: none;
}

.rail-button.active {
  box-shadow: inset 2px 0 0 #93b951;
}

#dashboard-view {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 42px 90px;
}

.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  padding: 0 0 28px;
  border: 0;
  border-bottom: 1px solid #414547;
  background: transparent;
}

.dashboard-logo { width: 142px; margin: 0 0 20px; padding: 7px 10px; border: 1px solid #d8d2c7; border-radius: 5px; background: #f4f1e9; }
.dashboard-head .eyebrow { margin-bottom: 7px; color: #969a97; font-size: 10px; letter-spacing: 0.09em; }
.dashboard-head h1 { margin: 0; color: #f4f1e9; font-size: clamp(31px, 3vw, 42px); letter-spacing: -0.055em; }
.dashboard-user { margin: 8px 0 0; color: #999c98; font-size: 12px; }
.dashboard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.ghost-button,
.output-button,
.publish-button,
.back-button,
.dashboard-actions button,
.dashboard-tools button,
.rundown-card-actions button,
.rundown-card-actions select {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #4b5052;
  border-radius: 5px;
  background: #262a2d;
  color: #eae8e1;
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms var(--motion);
}

.ghost-button:hover,
.output-button:hover,
.publish-button:hover,
.back-button:hover,
.dashboard-actions button:hover,
.dashboard-tools button:hover,
.rundown-card-actions button:hover,
.rundown-card-actions select:hover { transform: translateY(-1px); border-color: #858a87; background: #34393c; }

.primary-action,
.dashboard-actions .primary-action {
  border-color: #e2e0d9;
  background: #e9e6de;
  color: #202325;
}

.primary-action:hover,
.dashboard-actions .primary-action:hover { border-color: #fffdf6; background: #fffdf6; }

.dashboard-tools {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 9px;
  margin: 25px 0 22px;
}

.search-wrap { min-height: 38px; }
.search-wrap input { width: 100%; height: 38px; padding-inline: 13px; border-color: #414547; background: #202326; color: #f0eee8; }

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(280px, 2.1fr);
  gap: 1px;
  margin-bottom: 32px;
  border: 1px solid #404446;
  background: #404446;
}

.summary-card {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: #202326;
}

.summary-card span,
.card-kicker,
.section-label { color: #939692; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-card strong { color: #f1eee6; font-family: "DM Mono", ui-monospace, monospace; font-size: 24px; font-weight: 500; letter-spacing: -0.04em; }
.summary-card.wide strong { overflow: hidden; font-family: inherit; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 18px;
  color: #a5a7a3;
  font-size: 12px;
}

.dashboard-breadcrumb input { height: 32px; min-width: 180px; border: 0; background: transparent; color: #f1eee6; font-weight: 800; }
.dashboard-breadcrumb button { border: 0; background: transparent; color: #a8c76e; font-size: 11px; font-weight: 800; }

.section-label { margin: 28px 0 12px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 10px; }
.event-card { min-height: 132px; border: 1px solid #414547; border-radius: 7px; background: #222527; box-shadow: none; }
.event-card::before { background: var(--event-color, #738655); opacity: 0.85; }
.event-card:hover { transform: translateY(-2px); border-color: #777d77; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }
.event-card button { color: #f1eee6; }

.dashboard-tabs { display: flex; gap: 20px; margin-bottom: 12px; border-bottom: 1px solid #404446; }
.dashboard-tabs button { min-height: 34px; padding: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #919490; font-size: 11px; font-weight: 800; }
.dashboard-tabs button.active { color: #f0ede5; border-bottom-color: #a6c85b; }
.rundown-card-list { display: grid; gap: 8px; }
.dashboard-rundown-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px; border: 1px solid #404446; border-radius: 7px; background: #222527; box-shadow: none; }
.dashboard-rundown-card::before { display: none; }
.dashboard-rundown-card.active { border-left: 3px solid #a6c85b; background: #282c2d; }
.rundown-card-main { min-width: 0; }
.rundown-title-input { width: min(600px, 100%); min-height: 28px; padding: 0; border: 0; background: transparent; color: #f3f0e9; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.card-meta, .card-time { color: #989b97; font-size: 11px; }
.rundown-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.rundown-card-actions select { max-width: 150px; color: #b9bcb5; }
.danger-text { color: #ee857c !important; }
.empty-dashboard { padding: 34px; border: 1px dashed #4a4e4f; border-radius: 7px; background: transparent; color: #9a9c97; }

/* Editor ----------------------------------------------------------------- */

#rundown-view { background: #191b1d; }

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 15px 26px;
  border-bottom: 1px solid #3c4042;
  background: #202326;
}

.topbar-title { gap: 15px; min-width: 0; }
.back-button { flex: 0 0 auto; min-height: 32px; }
.topbar-title h1 { overflow: hidden; max-width: 650px; margin: 0; color: #f3f0e8; font-size: 14px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; text-overflow: ellipsis; }
.topbar-title p { margin: 4px 0 0; color: #929590; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.output-button { border-color: #4d6dc5; background: transparent; color: #b8c8ff; }
.publish-button { border-color: #a4bf6c; background: #344126; color: #e8f2d1; }
.status-control { position: relative; }
.status-button { min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 10px; }
.clock-strip { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 7px; }
.clock-box { min-height: 58px; padding: 7px 9px; border: 1px solid #414547; border-radius: 5px; background: #1b1d1f; }
.clock-box span { color: #959894; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.clock-box select { float: right; max-width: 94px; height: 18px; padding: 0 2px; border: 0; background: transparent; color: #c8cbc4; font-size: 9px; }
.clock-box strong { display: block; margin-top: 6px; color: #f2f0e9; font-family: "DM Mono", monospace; font-size: 15px; font-weight: 500; }

.showbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto auto auto auto;
  gap: 7px;
  align-items: stretch;
  padding: 11px 26px;
  border-bottom: 1px solid #3c4042;
  background: #17191b;
}

.tracker { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 12px; border: 1px solid #42474a; border-radius: 5px; background: #202326; }
.tracker span { color: #9ca09a; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.tracker strong { font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.cue-button, .start-button, .pause-button { min-height: 38px; border-radius: 5px; font-size: 11px; }
.cue-button { min-width: 88px; border-color: #454a4c; background: #272b2d; color: #e9e6df; }
.cue-button:hover { background: #363a3c; }
.start-button { min-width: 108px; border-color: #f07b71; background: #ed665f; color: #1d1f20; }
.start-button.running { border-color: #e8726b; background: #573134; color: #f8ded9; }
.start-button.paused { border-color: #d7b55f; background: #55472d; color: #fff3ce; }
.pause-button { width: 38px; min-width: 38px; border-color: #4b5051; background: #242729; color: #f0ede5; }
.pause-button::before { content: "II"; font-family: "DM Mono", monospace; font-size: 10px; }
.pause-button.paused::before { content: ">"; padding-left: 1px; }
.duration-control, .add-duration { display: flex; min-width: 146px; overflow: hidden; border: 1px solid #454a4c; border-radius: 5px; background: #242729; }
.duration-control select, .add-duration select { min-width: 76px; width: 76px; border: 0; border-right: 1px solid #454a4c; border-radius: 0; background: #242729; color: #d9d7d0; font-size: 11px; }
.add-duration select { order: 2; border-right: 0; border-left: 1px solid #454a4c; }
.duration-control button, .add-duration button { flex: 1; min-height: 36px; border: 0; border-radius: 0; background: transparent; color: #f2f0e8; font-size: 11px; }
.duration-control button:hover, .add-duration button:hover { background: #35393a; }

.rundown-settings { min-height: 38px; display: flex; align-items: center; gap: 17px; padding: 0 26px; border-bottom: 1px solid #383c3e; background: #1d2022; color: #8f928e; font-size: 10px; }
.rundown-settings strong { color: #e7e4dc; font-family: "DM Mono", monospace; font-weight: 500; }
.group-toggle-actions { margin-left: auto; display: flex; gap: 6px; }
.group-toggle-actions button { min-height: 25px; padding: 0 8px; border: 0; background: transparent; color: #a6bf71; font-size: 10px; }
.group-toggle-actions .auto-scroll-toggle { color: #9aa4a7; }
.group-toggle-actions .auto-scroll-toggle.is-active { color: #c5e486; background: rgba(166, 191, 113, 0.12); }

.selection-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px 26px; border-bottom: 1px solid #3b3f41; background: #24282b; }
.selection-bar strong { margin-right: 8px; color: #edf1df; font-size: 11px; }
.selection-bar button { min-height: 28px; padding: 0 9px; border: 1px solid #484d4e; border-radius: 5px; background: #2a2e31; color: #e4e3dc; font-size: 10px; }
.selection-bar button:hover { border-color: #839878; }

.table-wrap { overflow: auto; border: 0; background: #191b1d; }
.rundown-grid { column-gap: 3px; padding: 0 26px; background: transparent; }
.header-row { min-height: 32px; align-items: end; padding-bottom: 6px; border-bottom: 1px solid #44484a; color: #9fa29d; font-size: 9px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.cue-list { padding: 2px 0 16px; }
.cue-row { min-height: 56px; margin: 3px 0; align-items: stretch; transition: transform 180ms var(--motion), filter 180ms ease; }
.cue-row:hover { filter: brightness(1.09); }
.cue-row > div:not(.cue-tools) { min-width: 0; display: flex; align-items: center; border: 1px solid #45494a; border-radius: 4px; background: #2b2f31; color: #ece9e1; box-shadow: none; }
.cue-row .cue-tools { min-width: 0; display: grid; align-content: center; justify-items: center; gap: 2px; }
.cue-row .cue-tool-button, .cue-row .drag-handle, .cue-row .cue-select { color: #929792; }
.cue-row .cue-tool-button:hover, .cue-row .drag-handle:hover { color: #f0ede5; background: #33383a; }
.cue-row .number { justify-content: center; font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.cue-row .time, .cue-row .duration { justify-content: center; font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }
.cue-row .main { padding: 0 13px; font-size: 13px; font-weight: 700; letter-spacing: -0.015em; }
.cue-row .custom { padding: 0 12px; color: #d7d6ce; font-size: 12px; }
.cue-row .cue-cell[contenteditable="true"]:empty::before { content: attr(data-placeholder); color: #848884; font-weight: 500; }
.cue-row.selected > div:not(.cue-tools) { border-color: #91aa68; box-shadow: inset 0 0 0 1px rgba(159, 197, 90, 0.3); }
.cue-row.queued > div:not(.cue-tools) { border-color: #8399e3; }
.cue-row.current > div:not(.cue-tools), .cue-row.is-current > div:not(.cue-tools) { border-color: #e76d65; background: #3c292a; }
.cue-row.next > div:not(.cue-tools), .cue-row.is-next > div:not(.cue-tools) { border-color: #9fc55a; background: #293324; }
.cue-row.overtime .duration { color: #f17b72; }
.cue-row.under-time .duration { color: #b2d76f; }
.cue-separator { display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 26px; color: #aeb2ac; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
.cue-separator::before, .cue-separator::after { content: ""; height: 1px; flex: 1; background: #44484a; }
.cue-separator.current { color: #f28a82; }
.cue-separator.current::before, .cue-separator.current::after { background: #c85955; }
.cue-separator.next { color: #b7d87e; }
.cue-separator.next::before, .cue-separator.next::after { background: #6c8e45; }
.group-row { margin-top: 11px; min-height: 46px; }
.group-row > div:not(.cue-tools) { background: #25292a; border-color: #535858; }
.group-row .group-cell { color: #eff0e9; }
.group-child { margin-left: 12px; }
.group-child::before { background: var(--group-line); opacity: 0.72; }
.meta-row { background: transparent; }
.meta-row .meta-cell { border: 0 !important; background: transparent !important; color: #a8aaa5 !important; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.drop-before::before, .drop-after::after { background: #a5c963 !important; box-shadow: none; }

.rundown-end-panel { margin: 4px 26px 38px; padding: 20px 0 0; border-top: 1px solid #414547; background: transparent; }
.end-metrics { display: flex; gap: 44px; padding-bottom: 18px; }
.end-metrics div { display: grid; gap: 4px; }
.end-metrics span { color: #8f938e; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.end-metrics strong { color: #f2efe8; font-family: "DM Mono", monospace; font-size: 16px; font-weight: 500; }
.append-cue-row { display: flex; align-items: center; gap: 12px; }
.split-add-cue { border-color: #505554; border-radius: 5px; background: #272b2d; }
.split-add-cue > button { min-height: 38px; color: #ebe8df; }
.split-add-cue > button:first-child { background: #2f3436; }
.append-count { color: #a0a39e; font-size: 11px; }
.append-count input { width: 54px; height: 36px; border-radius: 5px; }
.append-cue-menu { border-color: #4e5352; border-radius: 5px; background: #242729; box-shadow: var(--soft-shadow); }
.append-cue-menu button { color: #eeebe2; }

/* Output ----------------------------------------------------------------- */

body.output-mode { background: #ece8df; }
body.output-mode .output-view,
.output-view { min-height: 100vh; padding: 38px clamp(18px, 3vw, 54px) 80px; background: #ece8df; color: #202224; }
body.output-mode .output-head,
.output-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: end; padding: 0 0 23px; border: 0; border-bottom: 1px solid #c8c3b8; border-radius: 0; background: transparent; }
.output-title-block { display: flex; align-items: center; gap: 13px; }
.output-logo { width: 37px; height: 37px; padding: 5px; border: 1px solid #d1ccc1; border-radius: 7px; background: #f7f4ed; }
.output-title-block .eyebrow { margin: 0 0 6px; color: #777a75; font-size: 10px; letter-spacing: 0.08em; }
.output-title-block h1 { margin: 0; color: #202224; font-size: clamp(24px, 3vw, 40px); letter-spacing: -0.05em; }
.output-metrics { display: grid; grid-template-columns: repeat(3, minmax(138px, 1fr)); gap: 8px; }
.output-clock { min-height: 72px; padding: 12px; border: 1px solid #c9c4ba; border-radius: 6px; background: #f7f4ed; }
.output-clock span { display: block; color: #777a75; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.output-clock strong { display: block; margin-top: 8px; color: #212426; font-family: "DM Mono", monospace; font-size: 15px; font-weight: 500; }
.output-clock strong.early, .output-clock strong.under { color: #5a7f2b; }
.output-clock strong.late { color: #b74540; }
.output-content { padding-top: 24px; }
.output-list { background: transparent; }
.output-list-head { min-height: 30px; align-items: center; color: #6d706c; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.output-list-row { gap: 3px; margin-bottom: 3px; }
.output-list-row > div { min-height: 55px; display: flex; align-items: center; border: 1px solid #cbc5b9; border-radius: 4px; background: #f7f4ed; color: #252729; box-shadow: none; }
.output-list-row .output-number { justify-content: center; font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.output-cell { padding: 0 12px; font-size: 12px; font-weight: 700; }
.output-time, .output-duration { font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }
.output-list-row.current > div { border-color: var(--cue-bg); background: var(--cue-bg); color: #fff; }
.output-list-row.next > div { border-color: var(--cue-bg); background: color-mix(in srgb, var(--cue-bg) 16%, #f7f4ed); color: #252729; }
.output-list-row.unavailable > div { border-style: dashed; border-color: #b7b1a5; background: #ece8df; color: #777a75; }
.output-list-row.unavailable .output-time { font-family: "DM Mono", monospace; font-weight: 700; }
.output-list-row.past > div { opacity: 0.56; }
.output-list-row.overtime .output-duration { color: #ffd7d2; }
.output-list-row.current .cell-original { color: rgba(255, 255, 255, 0.55); }
.output-cue-separator { display: flex; align-items: center; gap: 10px; min-height: 28px; color: #777a75; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.output-cue-separator::before, .output-cue-separator::after { content: ""; height: 1px; flex: 1; background: currentColor; opacity: 0.66; }
.output-cue-separator.current { color: var(--cue-bg, var(--brand-blue)); }
.output-cue-separator.next { color: var(--cue-bg, var(--brand-blue)); }
.single-output-stack { gap: 12px; }
body.output-mode .single-cue-card,
.single-cue-card { border: 1px solid #3e4344; border-radius: 8px; background: color-mix(in srgb, var(--cue-bg, #34383b) 68%, #202325); color: #fff; box-shadow: none; }
body.output-mode .single-next-card,
body.output-mode .prompter-card,
.single-next-card,
.prompter-card { border: 1px solid #cbc5b9; border-radius: 8px; background: #f7f4ed; color: #202224; box-shadow: none; }
.single-cue-label { color: inherit; opacity: 0.68; font-size: 10px; letter-spacing: 0.09em; }
.single-cue-meta { font-family: "DM Mono", monospace; font-size: 12px; }
.single-cue-title { letter-spacing: -0.055em; }
.single-next-card { color: #27292a; }
.single-next-card .single-cue-label { color: #6d706b; }

/* Dialogs ---------------------------------------------------------------- */

.modal { border: 1px solid #4a4e4f; border-radius: 8px; background: #25282a; color: #f0eee7; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46); }
.modal::backdrop { background: rgba(15, 16, 17, 0.67); backdrop-filter: blur(2px); }
.modal h2 { letter-spacing: -0.04em; }
.modal p, .dialog-hint { color: #b3b5ae; }
.modal .field { border: 0; background: transparent; }
.modal .field input, .modal .field select, .modal .field textarea { border-color: #515656; background: #1c1e20; }
.modal-actions button { min-height: 36px; border-radius: 5px; }
.modal-actions button:not(.ghost-button) { border-color: #e5e2db; background: #e5e2db; color: #242628; }
.modal-actions .ghost-button { background: #2c3032; border-color: #505555; }

@media (max-width: 1150px) {
  .landing-hero { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { max-width: 720px; }
  .hero-console { max-width: 760px; }
  .topbar { grid-template-columns: 1fr 1fr; }
  .topbar-title { grid-column: 1 / -1; }
  .clock-strip { justify-self: end; }
  .showbar { grid-template-columns: minmax(190px, 1fr) repeat(3, auto) minmax(142px, auto) minmax(142px, auto); }
  .showbar .subtract-duration { grid-column: 1 / span 3; }
  .showbar .add-duration { grid-column: 4 / span 3; }
}

@media (max-width: 780px) {
  .marketing-nav, .landing-main, .landing-footer { width: min(100% - 36px, 1320px); }
  .marketing-nav { grid-template-columns: 1fr auto; min-height: 70px; }
  .marketing-links { display: none; }
  .marketing-actions { gap: 11px; }
  .marketing-cta { min-height: 36px; padding-inline: 10px; font-size: 11px; }
  .landing-hero { min-height: 0; padding: 58px 0 64px; }
  .landing-hero h1 { font-size: clamp(42px, 12vw, 64px); }
  .hero-lede { font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 17px; }
  .hero-console { padding: 15px; }
  .console-cue { grid-template-columns: 28px 64px minmax(0, 1fr) auto; gap: 6px; }
  .console-cue time { font-size: 9px; }
  .landing-strip, .landing-story, .landing-share { grid-template-columns: 1fr; }
  .landing-strip article { min-height: auto; padding: 24px 0; border-right: 0; border-bottom: 1px solid #cfcbc1; }
  .landing-strip article:last-child { border-bottom: 0; }
  .landing-strip h2 { margin-top: 28px; }
  .landing-story { gap: 44px; padding: 82px 0; }
  .story-points article { grid-template-columns: 1fr; gap: 8px; }
  .landing-share { gap: 45px; margin-left: -18px; margin-right: -18px; margin-bottom: 60px; padding: 55px 18px; }
  .landing-footer { grid-template-columns: 1fr; gap: 8px; }
  .login-screen { padding: 18px; }
  .login-card { min-height: auto; grid-template-columns: 1fr; grid-template-areas: "brand" "eyebrow" "title" "copy" "email" "password" "status" "actions"; gap: 14px; padding: 32px 24px; }
  .login-card h1 { font-size: 46px; }
  .rail { width: 50px; padding-inline: 7px; }
  .shell { margin-left: 50px; }
  #dashboard-view { padding: 25px 15px 64px; }
  .dashboard-head { grid-template-columns: 1fr; align-items: start; }
  .dashboard-actions { justify-content: flex-start; }
  .dashboard-summary { grid-template-columns: 1fr 1fr; }
  .summary-card.wide { grid-column: 1 / -1; }
  .dashboard-rundown-card { grid-template-columns: 1fr; gap: 14px; }
  .rundown-card-actions { justify-content: flex-start; }
  .topbar { grid-template-columns: 1fr; padding: 14px; }
  .topbar-actions { flex-wrap: wrap; }
  .clock-strip { width: 100%; justify-self: stretch; }
  .showbar { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .tracker, .start-button { grid-column: 1 / -1; }
  .cue-button, .pause-button { width: 100%; }
  .showbar .subtract-duration, .showbar .add-duration { grid-column: auto; min-width: 0; }
  .rundown-settings { padding: 10px 14px; flex-wrap: wrap; }
  .group-toggle-actions { width: 100%; margin-left: 0; }
  .selection-bar { padding: 10px 14px; }
  .rundown-grid, .cue-separator { padding-left: 14px; padding-right: 14px; }
  .rundown-end-panel { margin-inline: 14px; }
  .end-metrics { flex-wrap: wrap; gap: 18px; }
  .output-view { padding: 24px 14px 56px; }
  .output-head { grid-template-columns: 1fr; gap: 22px; }
  .output-metrics { grid-template-columns: 1fr; }
  .output-list { overflow: visible; }
  .output-list-head { display: none; }
  .output-cue-separator { min-height: 30px; font-size: 8px; }
  .output-list-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 3px; }
  .output-list-row > div { min-height: 42px; }
  .output-list-row .output-number { grid-row: 1 / span 12; padding: 8px 4px; }
  .output-list-row .output-cell { display: grid; grid-template-columns: minmax(82px, 0.62fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; font-size: 11px; }
  .output-list-row .output-cell::before { content: attr(data-output-label); color: #777a75; font-size: 8px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
  .output-list-row.current .output-cell::before { color: rgba(255, 255, 255, 0.65); }
}

/* Tunetiq control-room visual system ------------------------------------ */

:root {
  --app-bg: #1a1c1e;
  --app-surface: #202326;
  --app-surface-raised: #2a2e31;
  --app-border: #404446;
  --app-text: #f5f3ee;
  --app-muted: #9a9d98;
  --brand-navy: #06164f;
  --brand-blue: #0d3eea;
  --brand-blue-2: #1857ff;
  --positive: #9fc55a;
  --warning: #d6b05f;
  --danger: #ed665f;
  --motion: cubic-bezier(0.22, 0.84, 0.32, 1);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.landing-mode):not(.login-mode):not(.output-mode) {
  background: var(--app-bg);
  color: var(--app-text);
}

.rail {
  background: #151719;
  border-color: #303437;
}

.rail-button.active,
.rail-button:hover {
  background: rgba(24, 87, 255, 0.16);
  border-color: rgba(24, 87, 255, 0.42);
  color: #f7f8ff;
}

.rail-button.active {
  box-shadow: inset 2px 0 0 var(--brand-blue-2);
}

.rail-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#dashboard-view,
#rundown-view,
.table-wrap {
  background: var(--app-bg);
}

.dashboard-head {
  border-bottom-color: var(--app-border);
}

.dashboard-logo {
  width: 164px;
  padding: 8px 10px;
  border-color: rgba(24, 87, 255, 0.2);
  background: #f8f6f1;
}

.dashboard-head .eyebrow,
.summary-card span,
.card-kicker,
.section-label {
  color: #a3a8ad;
}

.dashboard-head h1,
.summary-card strong,
.rundown-title-input {
  color: var(--app-text);
}

.dashboard-user,
.card-meta,
.card-time {
  color: var(--app-muted);
}

.primary-action,
.dashboard-actions .primary-action {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #fff;
}

.primary-action:hover,
.dashboard-actions .primary-action:hover {
  border-color: var(--brand-blue-2);
  background: var(--brand-blue-2);
}

.ghost-button,
.output-button,
.publish-button,
.back-button,
.dashboard-actions button,
.dashboard-tools button,
.rundown-card-actions button,
.rundown-card-actions select {
  border-color: #485057;
  background: #24282c;
  color: #f4f3ee;
}

.ghost-button:hover,
.output-button:hover,
.publish-button:hover,
.back-button:hover,
.dashboard-actions button:hover,
.dashboard-tools button:hover,
.rundown-card-actions button:hover,
.rundown-card-actions select:hover {
  border-color: rgba(24, 87, 255, 0.74);
  background: #2b3035;
}

.dashboard-summary {
  border-color: var(--app-border);
  background: var(--app-border);
}

.summary-card,
.event-card,
.dashboard-rundown-card {
  background: var(--app-surface);
  border-color: var(--app-border);
}

.event-card::before,
.dashboard-rundown-card.active {
  border-color: var(--brand-blue-2);
}

.event-card::before {
  background: var(--event-color, var(--brand-blue));
}

.dashboard-tabs button.active {
  border-bottom-color: var(--brand-blue-2);
  color: #fff;
}

.dashboard-rundown-card.active {
  border-left-color: var(--brand-blue-2);
  background: #252a30;
}

/* The editor stays visually quiet until a cue is active. */
.topbar {
  border-bottom-color: var(--app-border);
  background: var(--app-surface);
}

.topbar-title h1,
.clock-box strong {
  color: var(--app-text);
}

.topbar-title h1[contenteditable="true"] {
  width: fit-content;
  max-width: min(650px, 100%);
  margin-left: -4px;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: text;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.topbar-title h1[contenteditable="true"]:hover {
  border-color: rgba(24, 87, 255, 0.38);
  background: rgba(24, 87, 255, 0.08);
}

.topbar-title h1[contenteditable="true"]:focus {
  overflow: visible;
  white-space: normal;
  border-color: var(--brand-blue-2);
  background: #1b2025;
  box-shadow: 0 0 0 3px rgba(24, 87, 255, 0.14);
}

.topbar-title p,
.clock-box span {
  color: var(--app-muted);
}

.output-button {
  border-color: rgba(24, 87, 255, 0.75);
  color: #cbd8ff;
}

.publish-button {
  border-color: var(--brand-blue-2);
  background: var(--brand-blue-2);
  color: #fff;
}

.clock-box {
  border-color: #42484e;
  background: #1b1e21;
}

.showbar {
  grid-template-columns: minmax(220px, 1fr) 94px 128px 42px 108px minmax(142px, max-content) minmax(142px, max-content);
  grid-template-areas: "tracker prev show pause next subtract add";
  gap: 9px;
  padding: 12px 26px;
  background: #17191c;
  border-bottom-color: #34393d;
}

.showbar:has(#pause-toggle[hidden]) {
  grid-template-columns: minmax(220px, 1fr) 94px 128px 108px minmax(142px, max-content) minmax(142px, max-content);
  grid-template-areas: "tracker prev show next subtract add";
}

.showbar #tracker { grid-area: tracker !important; }
.showbar #prev-cue { grid-area: prev !important; }
.showbar #show-toggle { grid-area: show !important; }
.showbar #pause-toggle { grid-area: pause !important; }
.showbar .subtract-duration { grid-area: subtract !important; }
.showbar .add-duration { grid-area: add !important; }
.showbar #next-cue { grid-area: next !important; }

.tracker {
  border-color: #3d464e;
  background: #20252a;
}

.tracker.neutral { background: #20252a; border-color: #3d464e; }
.tracker:not(.neutral):not(.over) { background: #253321; border-color: #59753a; }
.tracker.over { background: #432526; border-color: #a14749; }
.tracker strong { color: #dce9c5; }
.tracker.over strong { color: #ffd4d1; }

.cue-button,
.pause-button,
.duration-control,
.add-duration {
  border-color: #454d54;
  background: #252a2f;
}

.cue-button,
.pause-button,
.duration-control button,
.add-duration button {
  color: #f5f3ee;
}

.cue-button:hover,
.pause-button:hover,
.duration-control button:hover,
.add-duration button:hover {
  background: #30373d;
}

.start-button {
  border-color: #ee7d77;
  background: var(--danger);
  color: #251918;
}

.start-button.running { border-color: #f08a84; background: #653438; color: #fff3f0; }
.start-button.paused { border-color: #e2bd6b; background: #5a4828; color: #fff5d8; }

.duration-control select,
.add-duration select {
  border-color: #454d54;
  background: #20252a;
  color: #dfe3e6;
}

.rundown-settings {
  border-bottom-color: #363c41;
  background: #1d2023;
  color: var(--app-muted);
}

.group-toggle-actions button { color: #bcd0ff; }

.selection-bar {
  border-bottom-color: #394048;
  background: #20262d;
}

.selection-bar strong { color: #e8efff; }
.selection-bar button { border-color: #47505a; background: #262d35; color: #f0f3f7; }
.selection-bar button:hover { border-color: var(--brand-blue-2); background: #2c3540; }

.header-row {
  border-bottom-color: #3b4249;
  color: #aab0b6;
}

.cue-row {
  transition: transform 220ms var(--motion), filter 220ms ease, opacity 220ms ease;
}

.cue-row > div:not(.cue-tools),
.cue-row .cue-cell {
  border-color: #3d454d;
  background: #252a2f;
  color: #f4f3ee;
}

.cue-row.has-cue-color > div:not(.cue-tools),
.cue-row.has-cue-color .cue-cell {
  background: color-mix(in srgb, var(--cue-bg) 18%, #252a2f);
}

.cue-row .cue-cell.number {
  background: #1f252b;
  border-color: #3d454d;
}

.cue-row .cue-cell.number[role="button"] {
  cursor: pointer;
}

.cue-row .cue-cell.number.current-number {
  cursor: default;
}

.cue-row .cue-cell.number[role="button"]:focus-visible {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--brand-blue-2);
  outline-offset: 2px;
}

.cue-row.has-cue-color .cue-cell.number {
  background: color-mix(in srgb, var(--cue-bg) 34%, #1f252b);
}

.cue-row .cue-tool-button,
.cue-row .drag-handle,
.cue-row .cue-select {
  color: #a4abb2;
}

.cue-row .cue-tool-button:hover,
.cue-row .drag-handle:hover {
  color: #fff;
  background: #2d343b;
}

.cue-row.selected > div:not(.cue-tools) {
  border-color: var(--brand-blue-2);
  box-shadow: inset 0 0 0 1px rgba(24, 87, 255, 0.3);
}

.cue-row.queued > div:not(.cue-tools) {
  border-color: #7fa2ff;
  box-shadow: inset 0 0 0 1px rgba(127, 162, 255, 0.24);
}

.cue-row.current > div:not(.cue-tools),
.cue-row.current .cue-cell {
  border-color: var(--cue-bg);
  background: color-mix(in srgb, var(--cue-bg) 72%, #1c2024);
  color: #fff;
}

.cue-row.current .cue-cell.number {
  background: var(--cue-bg);
  border-color: var(--cue-bg);
}

.cue-row.next > div:not(.cue-tools),
.cue-row.next .cue-cell {
  border-color: color-mix(in srgb, var(--cue-bg) 68%, #8da3ba);
  background: color-mix(in srgb, var(--cue-bg) 18%, #22282d);
}

.cue-row.overtime > div:not(.cue-tools),
.cue-row.overtime .cue-cell {
  border-color: #9d4143;
  background: #3d2526;
}

.cue-row.overtime .cue-cell.number { background: #b84a4b; border-color: #ca5d5e; }
.cue-row.overtime .duration,
.duration.over-used { color: #ffd1ce; }
.duration.under-used { color: #c4e790; }

.cue-separator.current { color: var(--cue-accent, var(--brand-blue-2)); }
.cue-separator.current::before,
.cue-separator.current::after { background: var(--cue-accent, var(--brand-blue-2)); }
.cue-separator.next { color: var(--cue-accent, var(--positive)); }
.cue-separator.next::before,
.cue-separator.next::after { background: var(--cue-accent, var(--positive)); }

.group-row > div:not(.cue-tools),
.group-row .cue-cell {
  border-color: #4b5660;
  background: #272d33;
}

.group-row.has-cue-color > div:not(.cue-tools),
.group-row.has-cue-color .cue-cell {
  background: color-mix(in srgb, var(--cue-bg) 20%, #272d33);
}

.meta-row .meta-cell { color: #c7d1dc !important; }
.group-summary { background: rgba(0, 0, 0, 0.22); }
.drop-before::before,
.drop-after::after { background: var(--brand-blue-2) !important; box-shadow: 0 0 0 3px rgba(24, 87, 255, 0.16); }

.rundown-end-panel { border-top-color: var(--app-border); }
.end-metrics span { color: var(--app-muted); }
.end-metrics strong { color: var(--app-text); }
.split-add-cue { border-color: #48515a; background: #252a2f; }
.split-add-cue > button:first-child { background: #29313a; }
.append-cue-menu { border-color: #46505a; background: #20252a; }

.modal {
  border-color: #4b535b;
  background: #24292e;
  color: var(--app-text);
}

.modal::backdrop { background: rgba(10, 13, 17, 0.7); }
.modal .field input,
.modal .field select,
.modal .field textarea { border-color: #4a535c; background: #1b2024; }
.modal-actions button:not(.ghost-button) { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
.modal-actions .ghost-button { border-color: #4c555e; background: #2a3036; }

.csv-import-dialog {
  width: min(580px, calc(100vw - 28px));
}

.csv-import-file {
  overflow: hidden;
  margin: 16px 0 12px;
  padding: 11px 12px;
  border: 1px solid #3b5066;
  border-radius: 7px;
  background: #172231;
  color: #e7f0fc;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.csv-import-summary > div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  align-content: center;
  padding: 10px;
  border: 1px solid #3a4654;
  border-radius: 7px;
  background: #1b2024;
}

.csv-import-summary span,
.csv-import-columns > span {
  color: #9eacbb;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.csv-import-summary strong {
  color: #f6f9fe;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.csv-import-columns {
  display: grid;
  gap: 9px;
  margin: 16px 0 20px;
}

.csv-import-columns > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.csv-import-columns > div > span {
  padding: 5px 8px;
  border: 1px solid #40536a;
  border-radius: 999px;
  background: #182434;
  color: #c7dbf2;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 480px) {
  .csv-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Public output remains intentionally lighter, but carries the same blue. */
body.output-mode,
body.output-mode .output-view,
.output-view {
  background: #f2efe8;
  color: #1d2226;
}

.output-head { border-bottom-color: #ccd0d1; }
.output-logo { border-color: rgba(24, 87, 255, 0.2); background: #fff; }
.output-clock { border-color: #c7ced3; background: #fbfaf6; }
.output-clock strong { color: #151c25; }
.output-clock strong.early,
.output-clock strong.under { color: #5d812d; }
.output-clock strong.late { color: #b94743; }
.output-list-row > div { border-color: #c8ced1; background: #fbfaf6; }
.output-list-row.next > div { background: color-mix(in srgb, var(--cue-bg) 13%, #fbfaf6); }
.single-cue-card { border-color: var(--cue-bg); background: color-mix(in srgb, var(--cue-bg) 78%, #1c2227); }

@media (max-width: 1280px) {
  .showbar,
  .showbar:has(#pause-toggle[hidden]) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "tracker tracker tracker tracker tracker tracker"
      "prev show pause next subtract add";
  }

  .showbar:has(#pause-toggle[hidden]) {
    grid-template-areas:
      "tracker tracker tracker tracker tracker tracker"
      "prev show show next subtract add";
  }
}

@media (max-width: 780px) {
  .showbar,
  .showbar:has(#pause-toggle[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "tracker tracker"
      "show show"
      "prev next"
      "pause pause"
      "subtract add";
    padding: 12px 14px;
  }

  .showbar:has(#pause-toggle[hidden]) {
    grid-template-areas:
      "tracker tracker"
      "show show"
      "prev next"
      "subtract add";
  }

  .showbar .cue-button,
  .showbar .pause-button,
  .showbar .duration-control,
  .showbar .add-duration { width: 100%; min-width: 0; }

  .dashboard-logo { width: 150px; }
  .output-metrics { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Tunetiq public output: compact, deliberate mobile control-room layout. */
.output-list-row.current::before,
.output-list-row.next::before,
.output-list-row.current::after,
.output-list-row.next::after {
  display: none;
}

.output-list-row.current,
.output-list-row.next {
  margin-top: 0;
}

@media (max-width: 780px) {
  body.output-mode .output-view,
  .output-view.active {
    min-height: 100dvh;
    padding: 18px 14px 44px;
  }

  .output-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding-bottom: 16px;
  }

  .output-title-block {
    align-items: flex-start;
    gap: 10px;
  }

  .output-logo {
    width: 42px;
    height: 42px;
  }

  .output-head h1 {
    max-width: none;
    overflow: visible;
    white-space: normal;
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.04;
  }

  .output-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .output-clock {
    min-width: 0;
    gap: 4px;
    padding: 10px;
  }

  .output-clock:first-child {
    grid-column: 1 / -1;
  }

  .output-clock span {
    font-size: 9px;
  }

  .output-clock strong {
    overflow: hidden;
    font-size: clamp(17px, 5.4vw, 23px);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .output-message {
    margin-top: 14px;
    padding: 12px 13px;
    font-size: 15px;
    line-height: 1.4;
  }

  .output-content {
    padding-top: 16px;
  }

  .output-list {
    gap: 9px;
    padding-bottom: 55vh;
  }

  .output-cue-separator {
    min-height: 26px;
    gap: 8px;
    font-size: 8px;
  }

  .output-list-row {
    gap: 3px;
  }

  .output-list-row > div {
    min-height: 40px;
    border-radius: 5px;
  }

  .output-list-row .output-number {
    min-width: 40px;
    padding: 7px 3px;
    font-size: 15px;
  }

  .output-list-row .output-cell {
    grid-template-columns: minmax(76px, 0.6fr) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 9px;
    line-height: 1.35;
  }

  .output-list-row .output-cell::before {
    font-size: 8px;
  }

  .single-output-stack {
    min-height: calc(100dvh - 250px);
    grid-template-rows: minmax(340px, 1fr) auto;
    gap: 10px;
  }

  .single-cue-card {
    min-height: 0;
    gap: 14px;
    padding: 24px 20px;
  }

  .single-cue-meta {
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 15px;
  }

  .single-cue-title {
    font-size: clamp(36px, 12vw, 60px);
    line-height: 1;
  }

  .single-cue-detail {
    font-size: clamp(17px, 5.2vw, 27px);
    line-height: 1.3;
  }

  .single-next-card {
    gap: 6px;
    padding: 15px 16px;
  }

  .single-next-title {
    font-size: clamp(21px, 6.5vw, 34px);
    line-height: 1.1;
  }

  .prompter-card {
    min-height: calc(100dvh - 210px);
    padding: 28px 18px;
  }

  .prompter-card p {
    font-size: clamp(35px, 12vw, 66px);
    line-height: 1.12;
  }
}

/* Tunetiq live controls ----------------------------------------------------
   Use named grid areas instead of positional column overrides so the controls
   retain their order without colliding at tablet and mobile breakpoints. */
.showbar {
  grid-template-columns: minmax(220px, 1fr) auto auto 52px auto minmax(146px, auto) minmax(146px, auto);
  grid-template-areas: "tracker prev start pause next subtract add";
  align-items: stretch;
}

#tracker { grid-area: tracker; }
#prev-cue { grid-area: prev; }
/* Override the legacy .showbar #show-toggle !important declaration above. */
.showbar #show-toggle { grid-area: start !important; }
#pause-toggle { grid-area: pause; }
#next-cue { grid-area: next; }
.subtract-duration { grid-area: subtract; }
.add-duration { grid-area: add; }

.showbar:has(#pause-toggle[hidden]) {
  grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(146px, auto) minmax(146px, auto);
  grid-template-areas: "tracker prev start next subtract add";
}

@media (max-width: 1180px) {
  .showbar,
  .showbar:has(#pause-toggle[hidden]) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "tracker tracker"
      "prev next"
      "start pause"
      "subtract add";
  }

  .showbar:has(#pause-toggle[hidden]) {
    grid-template-areas:
      "tracker tracker"
      "prev next"
      "start start"
      "subtract add";
  }

  .duration-control,
  .add-duration {
    min-width: 0;
    width: 100%;
  }

  .duration-control button,
  .add-duration button {
    min-width: 0;
  }

  .duration-control select,
  .add-duration select {
    min-width: 0;
    width: clamp(58px, 10vw, 84px);
  }
}

@media (max-width: 430px) {
  .showbar,
  .showbar:has(#pause-toggle[hidden]) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tracker"
      "prev"
      "next"
      "start"
      "pause"
      "subtract"
      "add";
  }

  .showbar:has(#pause-toggle[hidden]) {
    grid-template-areas:
      "tracker"
      "prev"
      "next"
      "start"
      "subtract"
      "add";
  }
}

@media (max-width: 390px) {
  .output-list-row .output-cell {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 6px;
  }

  .output-clock strong {
    font-size: 16px;
  }
}

/* Public link management inside the output generator. */
.output-link-library {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #46505a;
}

.output-link-library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.output-link-library .eyebrow {
  margin: 0 0 4px;
  color: #8fa8c5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.output-link-library h3 {
  margin: 0;
}

.output-link-status {
  margin: 0;
  color: #b7c1cb;
  font-size: 13px;
}

.output-link-list {
  display: grid;
  gap: 8px;
  max-height: min(330px, 38vh);
  overflow: auto;
  padding-right: 3px;
}

.output-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border: 1px solid #4a545e;
  border-radius: 7px;
  background: #1c2227;
}

.output-link-info {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 9px;
}

.output-link-info strong {
  overflow: hidden;
  color: #f2f5f8;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-link-type {
  grid-row: span 2;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: #1e58ff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.output-link-type.view {
  background: #52616f;
}

.output-link-meta,
.output-link-address {
  grid-column: 2;
  overflow: hidden;
  color: #a9b6c4;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-link-address {
  color: #79a8ff;
  font-family: "Manrope", sans-serif;
}

.output-link-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.compact-button,
.button-link.compact-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-blue);
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
}

.danger-outline {
  border-color: #a75050;
  background: #352326;
  color: #ffd6d4;
}

@media (max-width: 620px) {
  .output-link-library-head,
  .output-link-item {
    align-items: stretch;
    flex-direction: column;
  }

  .output-link-actions {
    justify-content: flex-start;
  }
}

/* Landing mobile guardrails -------------------------------------------------
   Keep the editorial landing page inside the viewport while preserving the
   wide, deliberate layout on desktop. */
@media (max-width: 780px) {
  body.landing-mode,
  .landing-screen {
    overflow-x: clip;
  }

  .marketing-nav,
  .landing-main,
  .landing-footer {
    width: calc(100% - 36px);
    max-width: 1320px;
  }

  .marketing-nav,
  .landing-hero,
  .hero-copy,
  .hero-console,
  .landing-strip,
  .landing-story,
  .landing-share {
    min-width: 0;
  }

  .marketing-brand,
  .marketing-actions,
  .hero-copy,
  .hero-lede,
  .landing-hero h1 {
    max-width: 100%;
  }

  .marketing-brand {
    min-width: 0;
  }

  .marketing-cta {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .landing-hero h1,
  .hero-lede,
  .console-title-row strong,
  .console-cue strong {
    overflow-wrap: anywhere;
  }

  .console-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 460px) {
  .marketing-nav {
    column-gap: 10px;
  }

  .marketing-actions .text-link {
    display: none;
  }

  .marketing-cta {
    min-height: 35px;
    padding-inline: 11px;
  }

  .marketing-cta span {
    display: none;
  }

  .landing-hero h1 {
    font-size: clamp(40px, 12vw, 52px);
  }

  .hero-console {
    padding: 13px;
  }

  .console-title-row strong {
    font-size: 20px;
  }

  .console-clock {
    min-width: 72px;
  }
}

/* Tunetiq public output ----------------------------------------------------
   The generated screen is read at a distance during a live show. Keep its
   palette darker and its contrast higher than the planning workspace. */
body.output-mode,
body.output-mode .output-view,
.output-view {
  background: #080c12;
  color: #f4f7fb;
}

body.output-mode .output-head,
.output-head {
  border-bottom-color: #253140;
}

.output-title-block .eyebrow,
.output-clock span,
.output-list-head,
.output-cue-separator {
  color: #91a0b4;
}

.output-title-block h1,
.output-head h1 {
  color: #f7f9fc;
  letter-spacing: 0;
}

.output-logo {
  border-color: rgba(91, 139, 255, 0.56);
  background: #eaf1ff;
  box-shadow: 0 0 0 4px rgba(44, 98, 255, 0.1);
}

.output-metrics {
  gap: 10px;
}

.output-clock {
  border-color: #2d3a4b;
  background: #101722;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.output-clock strong {
  color: #f5f8ff;
}

.output-clock strong.early,
.output-clock strong.under {
  color: #95df72;
}

.output-clock strong.late {
  color: #ff817b;
}

.output-message {
  border-color: #2d5b91;
  background: #10233a;
  color: #eaf3ff;
}

.output-list-head {
  border-bottom-color: #202b38;
}

.output-list-row {
  gap: 5px;
  margin-bottom: 5px;
}

.output-list-row > div {
  border-color: #29384a;
  background: #101722;
  color: #eaf0f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.output-list-row .output-number {
  background: #141e2a;
  color: #f7f9fc;
}

.output-list-row .output-cell,
.output-list-row .output-time,
.output-list-row .output-duration {
  color: inherit;
}

.output-list-row .cell-original,
.output-list-row.past .cell-original {
  color: #8492a5;
}

.output-list-row.current > div {
  border-color: var(--cue-bg, #2a6fff);
  background: color-mix(in srgb, var(--cue-bg, #2a6fff) 34%, #101722);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cue-bg, #2a6fff) 38%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.output-list-row.current .output-number {
  background: var(--cue-bg, #2a6fff);
  border-color: var(--cue-bg, #2a6fff);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.output-list-row.current .cell-original {
  color: rgba(255, 255, 255, 0.62);
}

.output-list-row.current .output-duration {
  color: #ffffff;
}

.output-list-row.next > div {
  border-color: color-mix(in srgb, var(--cue-bg, #2a6fff) 52%, #334354);
  background: color-mix(in srgb, var(--cue-bg, #2a6fff) 14%, #101722);
  color: #edf4ff;
}

.output-list-row.next .output-number {
  border-color: color-mix(in srgb, var(--cue-bg, #2a6fff) 72%, #516070);
  background: color-mix(in srgb, var(--cue-bg, #2a6fff) 32%, #141e2a);
}

.output-list-row.past > div {
  border-color: #202c3a;
  background: #0d131c;
  color: #a9b4c2;
  opacity: 0.78;
}

.output-list-row.past .output-number {
  background: #111925;
  color: #9ca9ba;
}

.output-list-row.overtime .output-duration {
  color: #ff938d;
}

.output-list-row.unavailable > div {
  border-color: #48525e;
  background: #111720;
  color: #a4afbd;
}

.output-cue-separator {
  color: #a8b5c6;
}

.output-cue-separator.current,
.output-cue-separator.next {
  color: var(--cue-bg, #6e9fff);
}

.output-cue-separator::before,
.output-cue-separator::after {
  opacity: 0.84;
}

body.output-mode .single-cue-card,
.single-cue-card {
  border-color: var(--cue-bg, #2a6fff);
  background: color-mix(in srgb, var(--cue-bg, #2a6fff) 36%, #111a26);
  color: #ffffff;
}

body.output-mode .single-next-card,
body.output-mode .prompter-card,
.single-next-card,
.prompter-card {
  border-color: #2d3a4b;
  background: #101722;
  color: #f3f7fc;
}

.single-next-card .single-cue-label,
.single-cue-label {
  color: #9cabbe;
}

@media (max-width: 780px) {
  body.output-mode .output-view,
  .output-view.active {
    background: #080c12;
  }

  .output-list-row .output-cell::before {
    color: #8c9bae;
  }

  .output-list-row.current .output-cell::before {
    color: rgba(255, 255, 255, 0.68);
  }
}
