:root {
  color-scheme: dark;
  --bg: #101110;
  --surface: #181a17;
  --raised: #20231e;
  --line: #32362e;
  --text: #f1f3ea;
  --muted: #a4ac9b;
  --lime: #d4ef78;
  --lime-ink: #25300c;
  --danger: #ffb2a2;
  --radius: 14px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--lime);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.2;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
}
p {
  color: var(--muted);
}
small,
.hint {
  font-size: 12px;
  color: var(--muted);
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 15px;
  padding: 12px;
  background: var(--lime);
  color: var(--lime-ink);
  z-index: 100;
}
.skip-link:focus {
  top: 8px;
}
.startup {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 20px;
  text-align: center;
}
.wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 3px;
  background: var(--lime);
  transform: rotate(-12deg);
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #11130fee;
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(16px);
}
.company {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  min-width: 0;
}
.company label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.company select {
  background: transparent;
  border: 0;
  font-weight: 650;
  padding: 4px 25px 4px 0;
  max-width: 240px;
  min-height: 30px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: var(--raised);
  color: var(--lime);
  border: 1px solid var(--line);
  font-weight: 700;
}
.private-label {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
  color: var(--muted);
}
.workspacebar {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px 32px 0;
}
.product-picker {
  display: flex;
  gap: 8px;
  align-items: center;
}
.product-picker select {
  min-width: 210px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow: auto;
}
.tab {
  border: 0;
  background: transparent;
  padding: 13px 17px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.tab.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
main.workspace {
  padding: 28px 32px 40px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.eyebrow {
  color: var(--lime);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-heading p {
  margin-top: 8px;
  max-width: 750px;
}
.heading-actions,
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
}
.control-panel {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 22px;
}
.panel-section {
  display: grid;
  gap: 14px;
}
.panel-section + .panel-section {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.section-number {
  border: 1px solid #485039;
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.field > span,
.field > label {
  font-size: 12px;
  font-weight: 550;
  color: #c8cec0;
}
input:not([type="checkbox"]):not([type="range"]),
select,
textarea {
  width: 100%;
  border: 1px solid #3b4035;
  background: #121510;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 42px;
}
input::placeholder,
textarea::placeholder {
  color: #777f6f;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
input[type="checkbox"] {
  accent-color: var(--lime);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
input[type="range"] {
  accent-color: var(--lime);
  width: 100%;
}
.btn {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  background: #2d3226;
  border-color: #586147;
  text-decoration: none;
}
.btn.primary {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}
.btn.primary:hover:not(:disabled) {
  background: #e0ff8a;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--danger);
}
.btn.compact {
  padding: 6px 10px;
  min-height: 33px;
}
.full {
  width: 100%;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.segments {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 9px;
}
.segment {
  background: none;
  border: none;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.segment.active {
  background: #313829;
  color: var(--lime);
}
.count {
  font-size: 11px;
  background: #151a10;
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 6px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 16px;
}
.media-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.media-card.selected {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime);
}
.media-stage {
  aspect-ratio: 3/4;
  position: relative;
  background: #080a07;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media-stage video,
.media-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
.media-stage video {
  max-height: 420px;
}
.media-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 7px;
  background: #13160ee8;
  backdrop-filter: blur(8px);
  border-radius: 5px;
  font-size: 10px;
  color: #e7eadf;
  pointer-events: none;
}
.media-check {
  position: absolute;
  right: 9px;
  top: 9px;
  background: #171c12dd;
  border-radius: 5px;
  padding: 4px;
  display: flex;
  align-items: center;
  z-index: 1;
}
.media-info {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.media-name {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-info .row {
  gap: 6px;
}
.media-info .btn {
  flex: 1;
}
.empty {
  border: 1px dashed #3f4835;
  border-radius: var(--radius);
  min-height: 340px;
  padding: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 14px;
  background: radial-gradient(ellipse at 50% 10%, #20271b55, transparent 65%);
}
.empty-icon {
  height: 58px;
  width: 58px;
  background: #252d1b;
  border: 1px solid #455331;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-size: 28px;
  margin-bottom: 5px;
}
.empty p {
  max-width: 400px;
  font-size: 13px;
}
.notice {
  border: 1px solid #4c5135;
  background: #242719;
  color: #d6dcb9;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 12px;
}
.error {
  border: 1px solid #704537;
  background: #2c1e19;
  color: var(--danger);
  padding: 13px 16px;
  border-radius: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notifications {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(560px, calc(100% - 30px));
  pointer-events: none;
}
.toast {
  padding: 14px 18px;
  background: #e0f5b7;
  color: #202813;
  border-radius: 9px;
  box-shadow: 0 10px 40px #0007;
  margin-top: 8px;
  font-size: 13px;
}
.toast.error {
  background: #47281f;
  color: #ffcdc0;
}
.mini-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 270px;
  overflow: auto;
}
.reference {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #10140c;
  cursor: pointer;
}
.reference img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reference input {
  position: absolute;
  top: 4px;
  left: 4px;
}
.reference:has(input:checked) {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 2px var(--lime);
}
details > summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
details[open] > summary {
  margin-bottom: 14px;
}
.stack {
  display: grid;
  gap: 16px;
}
.scripts-layout {
  display: grid;
  grid-template-columns: 230px minmax(280px, 1fr) minmax(250px, 0.75fr);
  gap: 20px;
  align-items: start;
}
.script-list {
  display: grid;
  gap: 8px;
}
.script-item {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
  color: var(--text);
  display: grid;
  gap: 4px;
}
.script-item.active {
  border-color: var(--lime);
  background: #252c1c;
}
.script-copy {
  min-height: 280px;
  line-height: 1.7;
}
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.speech-player {
  width: 100%;
  height: 42px;
}
.caption-preview {
  aspect-ratio: 9/12;
  max-height: 340px;
  display: grid;
  align-items: center;
  justify-items: center;
  background: radial-gradient(ellipse at 50% 30%, #303b23, #0a0d08 85%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  overflow: hidden;
}
.caption-preview p {
  color: white;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 800;
  text-shadow: 0 2px 5px #000;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.caption-list {
  display: grid;
  gap: 10px;
  max-height: 400px;
  overflow: auto;
}
.caption-row {
  display: grid;
  grid-template-columns: 72px 72px 1fr auto;
  gap: 7px;
  align-items: start;
}
.caption-row input {
  padding: 8px !important;
  min-height: 35px !important;
}
.caption-row textarea {
  min-height: 58px;
  padding: 8px;
}
.batch-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}
.script-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.script-choice span {
  display: grid;
  gap: 4px;
}
.total {
  font-size: 44px;
  font-weight: 650;
  letter-spacing: -2px;
  color: var(--lime);
  line-height: 1.1;
}
.total small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.job {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 14px;
}
.job-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.job-title {
  display: grid;
  gap: 3px;
}
.status {
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--muted);
}
.status.complete,
.status.completed,
.status.connected,
.status.kept {
  color: var(--lime);
  border-color: #46562e;
  background: #252f1a;
}
.status.failed,
.status.error,
.status.unknown {
  color: var(--danger);
  border-color: #664337;
  background: #322019;
}
progress {
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #30362a;
}
progress::-webkit-progress-bar {
  background: #30362a;
}
progress::-webkit-progress-value {
  background: var(--lime);
  border-radius: 6px;
}
progress::-moz-progress-bar {
  background: var(--lime);
}
.job-outputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.job-outputs video {
  width: 100%;
  aspect-ratio: 9/16;
  background: #090b07;
  border-radius: 7px;
  max-height: 290px;
}
.job-outputs .media-stage {
  aspect-ratio: 9/16;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.settings-grid .panel {
  display: grid;
  gap: 18px;
}
.connection {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.member {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.member .status {
  margin-left: auto;
}
.member-info {
  display: grid;
  overflow-wrap: anywhere;
  min-width: 0;
}
.secret-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
  padding: 14px;
  border: 1px solid #4b5a31;
  background: #18210e;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-story {
  padding: 10vw 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 30%, #344125 0%, #141810 65%);
  border-right: 1px solid var(--line);
}
.auth-story h1 {
  font-size: clamp(34px, 4vw, 62px);
  letter-spacing: -2px;
  margin: 65px 0 22px;
  max-width: 530px;
}
.auth-story h1 span {
  color: var(--lime);
}
.auth-story p {
  max-width: 390px;
}
.auth-box {
  padding: 50px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 500px;
  width: 100%;
  margin: auto;
  gap: 25px;
}
.auth-box form {
  display: grid;
  gap: 18px;
}
.auth-box .wordmark {
  display: none;
}
.auth-footer {
  font-size: 11px;
  margin-top: 45px;
}
.modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #48513c;
  border-radius: 18px;
  padding: 0;
  max-width: 650px;
  width: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  box-shadow: 0 30px 100px #0009;
}
.modal::backdrop {
  background: #080b06c9;
  backdrop-filter: blur(7px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  padding: 24px;
  display: grid;
  gap: 18px;
  overflow: auto;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.qa-modal {
  max-width: 900px;
  height: calc(100dvh - 32px);
  overflow: hidden;
}
.qa-layout {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.qa-stage {
  min-height: 0;
  background: #050704;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 12px;
}
.qa-stage video,
.qa-stage img {
  height: 100%;
  width: 100%;
  min-height: 0;
  object-fit: contain;
}
.qa-footer {
  padding: 15px 24px 20px;
  display: grid;
  gap: 12px;
  background: var(--surface);
}
.qa-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.qa-actions .btn {
  min-height: 48px;
}
.qa-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.busy {
  opacity: 0.6;
  pointer-events: none;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.loading::before {
  content: "";
  display: block;
  width: 25px;
  height: 25px;
  border: 2px solid var(--line);
  border-top-color: var(--lime);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding: 0 20px;
    gap: 20px;
  }
  .workspacebar {
    padding: 18px 20px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  .tabs {
    margin-left: 0;
    width: 100%;
  }
  .workspacebar .product-picker {
    width: 100%;
  }
  main.workspace {
    padding: 24px 20px;
  }
  .scripts-layout {
    grid-template-columns: 200px 1fr;
  }
  .scripts-layout > .speech-column {
    grid-column: 2;
  }
  .split {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 18px;
  }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .company {
    padding-left: 18px;
  }
  .private-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 70px;
    padding: 0 14px;
    gap: 15px;
  }
  .topbar > .wordmark {
    font-size: 17px;
  }
  .company {
    padding-left: 13px;
    gap: 0;
    flex: 1;
  }
  .company > div {
    min-width: 0;
    width: 100%;
  }
  .company select {
    font-size: 12px;
    max-width: 100%;
    padding-right: 18px;
  }
  .company label {
    font-size: 9px;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions > .btn {
    font-size: 0;
    padding: 8px;
  }
  .top-actions > .btn::after {
    content: "Exit";
    font-size: 11px;
  }
  .avatar {
    display: none;
  }
  .workspacebar {
    padding: 14px 14px 0;
  }
  .product-picker {
    display: grid !important;
    grid-template-columns: 1fr auto auto;
  }
  .product-picker select {
    min-width: 0;
  }
  .tabs {
    gap: 0;
  }
  .tab {
    padding: 11px 12px;
    font-size: 12px;
  }
  main.workspace {
    padding: 23px 14px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .split,
  .batch-layout {
    grid-template-columns: 1fr;
  }
  .control-panel {
    position: static;
    padding: 18px;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .media-info {
    padding: 10px;
  }
  .media-name {
    font-size: 11px;
  }
  .media-info .btn {
    font-size: 11px;
    padding: 7px;
  }
  .media-stage {
    aspect-ratio: 3/4;
  }
  .panel {
    padding: 18px;
  }
  .mini-picker {
    grid-template-columns: repeat(5, 1fr);
    max-height: 170px;
  }
  .empty {
    min-height: 270px;
    padding: 25px;
  }
  .scripts-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .scripts-layout > .speech-column {
    grid-column: auto;
  }
  .script-list {
    display: flex;
    overflow: auto;
    padding-bottom: 5px;
  }
  .script-item {
    min-width: 150px;
    max-width: 220px;
  }
  .script-copy {
    min-height: 240px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .auth-wrap {
    display: block;
  }
  .auth-story {
    display: none;
  }
  .auth-box {
    min-height: 100dvh;
    padding: 30px;
  }
  .auth-box .wordmark {
    display: flex;
    margin-bottom: 25px;
  }
  .caption-row {
    grid-template-columns: 64px 64px 1fr auto;
  }
  .caption-preview {
    max-height: 270px;
    aspect-ratio: auto;
    min-height: 220px;
  }
  .modal {
    max-height: calc(100dvh - 16px);
    width: calc(100% - 16px);
  }
  .modal-head {
    padding: 15px;
  }
  .modal-body {
    padding: 18px;
  }
  .qa-modal {
    height: calc(100dvh - 16px);
  }
  .qa-footer {
    padding: 12px 14px max(14px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  .qa-meta {
    font-size: 11px;
  }
  .qa-actions {
    gap: 8px;
  }
  .qa-stage {
    padding: 0;
  }
  .qa-stage video {
    max-height: 100%;
  }
  .job {
    padding: 15px;
  }
  .toolbar .segments {
    width: 100%;
  }
  .segment {
    flex: 1;
    padding: 7px 9px;
  }
  .notifications {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  .auth-footer {
    margin-top: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.site-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.site-legal-footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}
.site-legal-footer a:hover,
.site-legal-footer a[aria-current="page"] {
  color: var(--lime);
}

/* Brand and company team management */
.auth-wrap { grid-template-columns: 1.1fr 1fr; background: #101110; }
.auth-story { background: #101110; padding: 32px 6vw 44px; align-items: center; text-align: center; }
.auth-logo { display: block; width: min(100%, 420px); height: auto; }
.auth-story h1 { margin: 16px 0; font-size: clamp(28px, 2.6vw, 40px); letter-spacing: -1.4px; }
.auth-story p { margin: 0; }
.auth-story .auth-footer { margin-top: 26px; }
.auth-logo-mobile { display: none; }
.invitation-context { padding: 16px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; display: grid; gap: 6px; }
.invitation-context small { color: var(--muted); }
.team-panel h3 { margin-top: 24px; }
.team-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.team-row .member-info { min-width: 160px; flex: 1; overflow-wrap: anywhere; }
.team-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.team-controls .field { gap: 4px; }
.team-controls .field > span { font-size: 11px; }
.team-controls select { min-width: 130px; }
.team-panel .secret-output { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .auth-logo-mobile { display: block; width: 200px; height: auto; align-self: center; }
  .auth-box { min-height: auto; gap: 22px; padding: 24px 26px 38px; }
  .auth-box .auth-footer { margin-top: 8px; }
}

.auth-logo, .auth-logo-mobile {
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}

/* Company reporting stays separate from the product generation workflow. */
.report-company-scope {
  color: var(--muted);
  font-size: 12px;
}
.reports,
.report-content,
.report-messages {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.report-messages:empty {
  display: none;
}
.report-controls,
.report-overview,
.report-inventory,
.report-drilldown {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.report-filter-summary {
  display: none;
}
.report-controls:not([open]) > :not(summary) {
  display: none;
}
.report-filter-current {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.report-filter-current strong {
  font-size: 13px;
}
.report-filter-current small {
  font-weight: 400;
}
.report-filter-toggle {
  flex: 0 0 auto;
  color: var(--lime);
  font-size: 11px;
}
.report-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr 1fr;
  gap: 14px;
}
.report-filter-grid > .field:last-child {
  grid-column: 1 / -1;
}
.report-date-range {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.report-date-hint {
  flex-basis: 100%;
}
.report-scope-label {
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.report-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.report-pagination p {
  flex: 1;
  min-width: 180px;
}
.report-date-range .field {
  flex: 1;
  min-width: 160px;
  max-width: 260px;
}
.report-filter-error {
  color: var(--danger);
}
.report-sync {
  margin-top: -10px;
}
.report-section-heading,
.report-bucket-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.report-section-heading > div {
  flex: 1;
  min-width: 180px;
}
.report-section-heading .field {
  flex: 0 1 220px;
}
.report-section-heading h2 + p {
  margin-top: 4px;
}
.report-badge {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  padding: 4px 8px;
  border: 1px solid #5c513a;
  border-radius: 6px;
  background: #28241c;
  color: #e4d2a8;
}
.report-badge.complete {
  color: #cfdfab;
  border-color: #48573c;
  background: #20271c;
}
.report-coverage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--muted);
}
.report-coverage-summary strong {
  color: var(--text);
}
.report-bucket {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.report-bucket-heading .hint {
  flex: 1;
  min-width: 160px;
  overflow-wrap: anywhere;
}
.report-metrics,
.report-inventory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.report-metric,
.report-inventory-grid > div {
  min-width: 0;
}
.report-metrics dt,
.report-inventory-grid dt,
.report-facts dt {
  color: var(--muted);
  font-size: 12px;
}
.report-metrics dd {
  margin: 5px 0 0;
  font-size: clamp(19px, 1.8vw, 29px);
  font-weight: 650;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.report-no-metrics {
  padding: 22px 0;
  color: var(--muted);
}
.report-contribution {
  display: grid;
  gap: 16px;
}
.report-contribution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.report-contribution-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  min-width: 0;
}
.report-contribution-card.generated {
  border-color: #64733c;
}
.report-contribution-card > .btn {
  margin-top: auto;
}
.report-contribution-card .report-bucket-heading .hint {
  min-width: 0;
  width: 100%;
  flex-basis: 100%;
  font-size: 10px;
}
.report-metrics.compact {
  grid-template-columns: 1fr;
  gap: 8px;
}
.report-metrics.compact .report-metric {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}
.report-metrics.compact dd {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
  text-align: right;
}
.report-inventory-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.report-inventory-grid dd {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.report-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.report-breadcrumbs .btn {
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
  justify-content: start;
}
.report-breadcrumbs [aria-current] {
  color: var(--lime);
}
.report-table-wrap {
  overflow-x: auto;
}
.report-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table-caption {
  text-align: left;
  color: var(--muted);
  padding: 0 0 16px;
  font-size: 11px;
}
.report-table th,
.report-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.report-table thead th {
  text-align: right;
  font-size: 10px;
  color: var(--muted);
}
.report-table thead th:first-child,
.report-table .report-group-name {
  text-align: left;
  width: 34%;
}
.report-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-group-name {
  font-weight: 400;
  overflow-wrap: anywhere;
}
.report-group-link {
  color: var(--lime);
  justify-content: start;
  padding: 0;
  min-height: 32px;
  text-align: left;
  border: 0;
  font-size: 14px;
}
.report-group-name > strong {
  display: block;
  padding: 5px 0;
}
.report-row-context {
  margin: 7px 0;
  font-size: 10px;
}
.report-script-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-variant-evidence,
.report-family-wordings {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.report-family-wordings {
  margin-top: 12px;
}
.report-family-wordings ul {
  display: grid;
  gap: 12px;
  padding-left: 18px;
}
.report-family-wordings .report-group-link {
  font-size: 12px;
  white-space: normal;
}
.report-script-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}
.report-group-name .report-script-text {
  margin-top: 10px;
}
.report-script-text pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: var(--text);
  margin-bottom: 0;
}
.report-ad-detail {
  padding: 20px;
  border: 1px solid #64733c;
  background: #1d2217;
  border-radius: 10px;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.report-ad-detail .report-metrics.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.report-ad-detail .report-metric {
  display: block !important;
}
.report-ad-detail .report-metrics dd {
  text-align: left;
}
.report-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.report-account {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.report-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}
.report-facts > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
  gap: 12px;
}
.report-facts dd {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.report-connection-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.report-connection-accounts {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.report-connection-accounts li > span {
  display: block;
}
.report-connection-setup,
.report-management {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.report-managed-account {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 0;
}
.report-managed-account + .report-managed-account {
  border-top: 1px solid var(--line);
}
.report-management > p,
.report-family-link > p {
  margin-bottom: 16px;
}
.report-management-fields,
.report-link-fields {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.report-link-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.report-script-choices,
.report-link-fields > .btn {
  grid-column: 1 / -1;
}
.report-script-choices {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.report-script-choices legend {
  color: var(--muted);
  font-size: 12px;
  padding: 0 6px;
}
.report-script-choice,
.report-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  font-size: 12px;
  cursor: pointer;
}
.report-script-choice input,
.report-confirmation input {
  flex: 0 0 auto;
  margin: 3px 0;
}
.report-script-choice > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.report-management-history {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}
.report-management-history h4 {
  margin: 4px 0 0;
  font-size: 12px;
}
.report-history-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
}
.report-history-list li > p,
.report-history-list blockquote {
  margin-top: 5px;
}
.report-history-list blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report-management-form {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}
.report-management-earlier {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
@media (max-width: 1100px) {
  .report-filter-grid,
  .report-contribution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .reports,
  .report-content {
    gap: 18px;
  }
  .reports .panel {
    padding: 16px;
  }
  .report-link-fields {
    grid-template-columns: 1fr;
  }
  .report-script-views .btn {
    flex: 1 1 100%;
    white-space: normal;
  }
  .report-management .btn {
    width: 100%;
    white-space: normal;
  }
  .report-family-link > summary,
  .report-management > summary {
    min-height: 32px;
  }
  .report-controls > .report-filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    list-style: none;
    margin: 0;
  }
  .report-filter-summary::-webkit-details-marker {
    display: none;
  }
  .report-filter-grid {
    gap: 12px;
  }
  .report-filter-grid > .field:nth-child(-n + 2) {
    grid-column: 1 / -1;
  }
  .report-contribution-grid,
  .report-account-grid {
    grid-template-columns: 1fr;
  }
  .report-metrics,
  .report-ad-detail .report-metrics.compact,
  .report-inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-metrics dd {
    font-size: 23px;
  }
  .report-contribution-card .report-metrics dd {
    font-size: 15px;
  }
  .report-table,
  .report-table tbody {
    display: block;
    min-width: 0;
  }
  .report-table-caption {
    display: block;
  }
  .report-table thead {
    display: none;
  }
  .report-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }
  .report-table .report-group-name {
    display: block;
    grid-column: 1 / -1;
    width: auto;
  }
  .report-table td {
    display: block;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: 14px;
  }
  .report-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    color: var(--muted);
  }
  .report-table th,
  .report-table td {
    padding: 12px;
  }
  .report-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
/* Keep bulk decisions available while browsing long image and clip lists. */
.bulk-review {
  position: sticky;
  top: 90px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, #171917);
}
.bulk-review > [role="status"] { flex-basis: 100%; }
.bulk-review > [role="status"]:empty { display: none; }
.bulk-review .row { flex-wrap: wrap; }

/* Clip banks are product-scoped; shared reporting and image controls are unchanged. */
.bank-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  min-width: 0;
}
.bank-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
.bank-toolbar > .field {
  flex: 1 1 240px;
}
.bank-style {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
}
.bank-management {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.bank-modal .modal-head h2 {
  overflow-wrap: anywhere;
  min-width: 0;
}
.bank-modal .modal-head > .btn {
  flex-shrink: 0;
}
.prompt-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121510;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  max-height: 320px;
  overflow: auto;
}
.bank-move {
  flex-basis: 100%;
  align-items: end;
}
.bank-move > .field {
  flex: 1 1 180px;
}
.batch-layout .bank-panel {
  margin: 0;
  padding: 16px;
}
.captured-bank {
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.duplicate-recovery {
  min-width: 0;
  overflow-wrap: anywhere;
}
.duplicate-recovery .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .bank-panel { padding: 16px; }
  .bank-toolbar > .row { width: 100%; }
  .bank-toolbar > .row > .btn { flex: 1; }
  .bank-move > .btn { width: 100%; }
  .bank-modal .btn { white-space: normal; }
  .bank-modal .modal-body { padding: 18px; }
}
