@font-face {
  font-family: "StreamPal UI";
  src: url("/brand-assets/fonts/Poppins-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101212;
  --sidebar: #121414;
  --surface: #171919;
  --surface-2: #1d2020;
  --surface-3: #252828;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e5e4dd;
  --muted: #a3a39e;
  --muted-2: #747873;
  --accent: #b14cff;
  --accent-strong: #c36cff;
  --accent-soft: rgba(177, 76, 255, .12);
  --green: #53fc18;
  --green-dark: #2a9e12;
  --green-soft: rgba(83, 252, 24, .1);
  --blue: #5aabff;
  --yellow: #ffc744;
  --red: #ff5c67;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img, video { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2d353d; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3b4650; }

.app-shell { width: 100%; height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar); padding: 16px 12px 12px; }
.brand-mark { height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 8px 14px; border-bottom: 1px solid var(--line); }
.brand-glyph { width: 36px; height: 36px; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 6px; font-family: "StreamPal UI", "Arial Black", sans-serif; font-weight: 900; font-size: 14px; }
.brand-mark > span:last-child { display: grid; gap: 2px; min-width: 0; }
.brand-mark strong { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 16px; line-height: 1; }
.brand-mark strong span { color: #8d34ff; }
.brand-mark small { color: var(--muted); font-size: 11px; }

.nav-stack { padding-top: 10px; display: flex; flex-direction: column; gap: 3px; overflow: auto; }
.nav-label { padding: 14px 10px 6px; color: var(--muted-2); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.nav-item { min-height: 41px; width: 100%; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid transparent; background: transparent; color: #b9b9b3; border-radius: 6px; padding: 0 10px; text-align: left; cursor: pointer; font-size: 12px; transition: background .16s ease, color .16s ease, transform .16s ease; }
.nav-item:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-item.active { color: #fff; background: var(--accent); font-weight: 800; box-shadow: 0 7px 18px rgba(177, 76, 255, .18); }
.nav-item svg { width: 17px; height: 17px; }
.nav-item kbd, .nav-item b { min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; font-size: 9px; font-weight: 800; opacity: .65; background: transparent; }
.nav-item b:empty { display: none; }
.nav-item .nav-new { border-color: #337b31; background: #102811; color: var(--green); opacity: 1; }
.nav-item.active .nav-new { border-color: rgba(255,255,255,.55); background: rgba(0,0,0,.16); color: #fff; }
.nav-group { min-width: 0; display: grid; }
.nav-group-toggle { width: 100%; min-height: 40px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 15px; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b9b9b3; font-size: 12px; text-align: left; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.nav-group-toggle:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.nav-group-toggle > svg:first-child { width: 17px; height: 17px; }
.nav-group-toggle > span { font-weight: 750; }
.nav-group-toggle > b { min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 9px; }
.nav-group-toggle > b:empty { display: none; }
.nav-group-toggle .chevron { width: 13px; height: 13px; color: var(--muted-2); transform: rotate(90deg); transition: transform .18s ease, color .18s ease; }
.nav-group.open .nav-group-toggle { border-color: var(--line); background: #191c1c; color: #fff; }
.nav-group.open .nav-group-toggle .chevron { color: var(--green); transform: rotate(-90deg); }
.nav-group:has(.nav-item.active) .nav-group-toggle { color: #fff; }
.nav-group:has(.nav-item.active) .nav-group-toggle > svg:first-child { color: var(--green); }
.nav-group-items { min-width: 0; max-height: 0; display: grid; gap: 2px; margin-left: 8px; padding-left: 8px; overflow: hidden; border-left: 1px solid transparent; opacity: 0; transform: translateY(-3px); transition: max-height .22s ease, opacity .16s ease, transform .16s ease, padding .16s ease, border-color .16s ease; }
.nav-group.open .nav-group-items { max-height: 280px; padding-top: 4px; padding-bottom: 5px; border-color: var(--line); opacity: 1; transform: none; }
.nav-group-items .nav-item { min-height: 36px; padding-left: 9px; font-size: 11px; }
.nav-group-items .nav-item.active { background: rgba(177,76,255,.16); border-color: rgba(177,76,255,.5); box-shadow: inset 3px 0 0 var(--accent); }

.sidebar-footer { margin-top: auto; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 11px; }
.control-link { min-height: 48px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transition: border-color .16s ease, background .16s ease; }
.control-link:hover { border-color: var(--green-dark); background: var(--green-soft); }
.control-link > span { min-width: 0; display: grid; gap: 2px; }
.control-link strong { font-size: 12px; }
.control-link small { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.control-link .chevron { width: 14px; height: 14px; color: var(--muted); }
.service-state { display: flex; align-items: center; gap: 9px; padding: 4px 10px; }
.service-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.service-state span { display: grid; gap: 1px; }
.service-state strong { font-size: 10px; }
.service-state small { color: var(--muted); font-size: 9px; }

.workspace-shell { min-width: 0; min-height: 0; height: 100dvh; display: grid; grid-template-rows: 68px auto minmax(0, 1fr); }
.topbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px 0 22px; border-bottom: 1px solid var(--line); background: rgba(8, 10, 12, .95); }
.page-heading { min-width: 0; display: grid; gap: 2px; }
.page-heading > span { color: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 21px; line-height: 1.1; }
.topbar-actions { min-width: 0; display: flex; align-items: center; gap: 9px; }
.global-search-wrap { width: clamp(230px, 27vw, 380px); position: relative; }
.global-search { width: 100%; height: 36px; display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.global-search svg { width: 15px; height: 15px; }
.global-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.global-search kbd { border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 6px; color: var(--muted); font-size: 9px; }
.command-palette { width: min(420px, calc(100vw - 24px)); max-height: 390px; position: absolute; z-index: 80; top: 43px; right: 0; display: grid; align-content: start; gap: 4px; padding: 7px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 7px; background: #111414; box-shadow: 0 18px 52px rgba(0,0,0,.55); }
.command-palette > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px 7px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.command-palette > header kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; font-size: 7px; }
.command-item { width: 100%; min-width: 0; min-height: 45px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.command-item:hover, .command-item.selected { border-color: rgba(177,76,255,.4); background: rgba(177,76,255,.09); }
.command-item > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: #222626; color: var(--green); }
.command-item > span:first-child svg { width: 14px; height: 14px; }
.command-item > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.command-item strong { font-size: 10px; }
.command-item small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.command-item > em { color: var(--muted-2); font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }

.primary-button, .secondary-button, .text-button, .icon-button, .profile-button { border: 0; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease, opacity .14s ease; }
.primary-button, .secondary-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 6px; padding: 0 13px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.primary-button { background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.render-button.primary-button { background: var(--green); color: #071007; }
.render-button.primary-button:hover { background: #70ff43; }
.secondary-button { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.secondary-button:hover { border-color: #53606b; background: var(--surface-3); }
.primary-button svg, .secondary-button svg { width: 15px; height: 15px; }
.primary-button:disabled, .secondary-button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; position: relative; border-radius: 6px; background: var(--surface); color: #c4cbd1; border: 1px solid var(--line); }
.icon-button:hover { background: var(--surface-3); border-color: var(--line-strong); color: white; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button i { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: none; }
.icon-button i.visible { display: block; }
.text-button { min-height: 28px; display: inline-flex; align-items: center; gap: 3px; background: transparent; color: var(--muted); padding: 0 3px; font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--accent-strong); }
.text-button svg { width: 13px; height: 13px; }
.profile-button { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 9px 0 4px; border-radius: 6px; background: transparent; }
.profile-button:hover { background: var(--surface); }
.profile-button span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: #242b32; border: 1px solid #3a434d; font-weight: 900; }
.profile-button small { font-size: 10px; color: var(--muted); }

.announcement-bar { min-height: 43px; margin: 9px 14px 0; padding: 7px 9px 7px 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 32px; align-items: center; gap: 9px; border: 1px solid #6b521b; background: #211a0c; border-radius: 6px; color: var(--yellow); }
.announcement-bar > div { min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.announcement-bar strong { font-size: 11px; }
.announcement-bar span { min-width: 0; color: #d4c18d; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announcement-bar .icon-button { width: 28px; height: 28px; background: transparent; border-color: transparent; }

.view-stack { min-width: 0; min-height: 0; height: 100%; padding: 15px 18px 18px; overflow: hidden; }
.view { display: none; min-width: 0; min-height: 0; height: 100%; animation: view-in .18s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.metric-strip { height: 90px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.metric-strip article { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; gap: 1px 8px; padding: 14px 16px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip span { align-self: start; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.metric-strip strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 31px; }
.metric-strip small { color: var(--muted-2); font-size: 10px; }
.overview-grid { height: calc(100% - 102px); margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); grid-template-rows: minmax(0, 1.1fr) minmax(190px, .9fr); gap: 12px; }
.panel { min-width: 0; min-height: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.panel-head { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.panel-head > div { min-width: 0; display: grid; gap: 3px; }
.panel-head > div.segmented { display: flex; }
.panel-head h2, .form-panel h2, .settings-section h2, .toolbar-copy h2, .modal h2 { margin: 0; font-size: 15px; line-height: 1.2; }
.eyebrow { color: var(--green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.project-list, .pipeline-list, .compact-clip-list, .activity-list { height: calc(100% - 58px); overflow: auto; }
.recent-panel { grid-row: span 1; }
.pipeline-panel { grid-row: span 1; display: grid; grid-template-rows: 58px minmax(0, 1fr) auto; }
.pipeline-panel .pipeline-list { height: auto; }
.quick-create { min-height: 60px; margin: 0 10px 10px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 10px; border: 1px solid #2e4c2d; border-radius: 6px; background: var(--green-soft); color: var(--text); padding: 8px 10px; text-align: left; cursor: pointer; }
.quick-create > span { width: 34px; height: 34px; display: grid; place-items: center; background: var(--green); color: #071007; border-radius: 5px; }
.quick-create > div { min-width: 0; display: grid; gap: 2px; }
.quick-create strong { font-size: 11px; }
.quick-create small { color: #9dac9f; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-create .chevron { width: 14px; color: var(--muted); }

.project-row { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 13px; border-bottom: 1px solid #1d2329; cursor: pointer; }
.project-row:hover { background: var(--surface-2); }
.project-thumb { width: 38px; height: 46px; display: grid; place-items: center; border-radius: 4px; background: #1a2025; overflow: hidden; color: var(--green); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.project-thumb.wide { height: 28px; }
.project-copy { min-width: 0; display: grid; gap: 3px; }
.project-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.project-copy small { color: var(--muted); font-size: 9px; }
.status-chip { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-chip.ready, .status-chip.approved, .status-chip.completed { color: var(--green); border-color: #276f24; background: #0f2110; }
.status-chip.review, .status-chip.needs_review, .status-chip.warning { color: var(--yellow); border-color: #6b521b; background: #211a0c; }
.status-chip.failed, .status-chip.danger, .status-chip.changes_requested { color: var(--red); border-color: #6a2830; background: #271014; }
.status-chip.running { color: var(--blue); border-color: #28547b; background: #0f1e2c; }
.empty-state, .empty-block, .drawer-empty { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; padding: 22px; }
.drawer-empty svg { width: 25px; height: 25px; color: var(--green); }
.drawer-empty strong { color: var(--text); font-size: 12px; }
.drawer-empty span { font-size: 10px; line-height: 1.45; max-width: 240px; }

.pipeline-item { min-height: 54px; display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 12px; border-bottom: 1px solid #1d2329; }
.pipeline-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 5px; background: #121f2b; color: var(--blue); }
.pipeline-icon svg { width: 14px; height: 14px; }
.pipeline-copy { min-width: 0; display: grid; gap: 4px; }
.pipeline-copy > div { display: flex; justify-content: space-between; gap: 8px; }
.pipeline-copy strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-copy small { color: var(--muted); font-size: 9px; }
.mini-progress { height: 3px; border-radius: 3px; overflow: hidden; background: #222a31; }
.mini-progress i { display: block; height: 100%; background: var(--green); transition: width .3s ease; }

.compact-clip { min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #1d2329; }
.compact-clip > div { min-width: 0; display: grid; gap: 3px; }
.compact-clip strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-clip small { color: var(--muted); font-size: 9px; }
.velocity { color: var(--green); font-size: 10px; font-weight: 900; white-space: nowrap; }
.activity-item { min-height: 45px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 7px 12px; border-bottom: 1px solid #1d2329; }
.activity-item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.activity-item > i.success { background: var(--green); }
.activity-item > i.warning { background: var(--yellow); }
.activity-item > i.danger { background: var(--red); }
.activity-item > div { min-width: 0; display: grid; gap: 2px; }
.activity-item strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-item small, .activity-item time { color: var(--muted); font-size: 8px; }

.create-view.active { display: grid; grid-template-rows: 48px minmax(0, 1fr); gap: 10px; }
.studio-toolbar { display: grid; grid-template-columns: minmax(320px, 1fr) auto auto auto; gap: 9px; align-items: center; }
.url-field { min-width: 0; height: 44px; display: grid; grid-template-columns: 19px minmax(0, 1fr) 34px auto; align-items: center; gap: 8px; padding: 0 4px 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--muted); }
.url-field input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.url-field .secondary-button { min-height: 34px; }
.url-field .url-upload-button { width: 34px; height: 34px; border-color: transparent; background: var(--surface-3); }
.url-field .url-upload-button:hover, .url-field .url-upload-button.uploading { border-color: rgba(83,252,24,.35); color: var(--green); }
.segmented { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.segmented button { min-height: 36px; border: 0; border-radius: 4px; padding: 0 12px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; white-space: nowrap; }
.segmented button small { margin-left: 4px; color: var(--muted-2); font-size: 8px; }
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.segmented button.active small { color: var(--green); }
.segmented.compact button { min-height: 29px; padding: 0 10px; font-size: 10px; }
.render-button { min-height: 44px; padding-inline: 17px; }

.studio-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: 284px minmax(360px, 1fr) 312px; gap: 10px; }
.studio-pane, .canvas-pane { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.studio-pane { display: flex; flex-direction: column; }
.pane-head, .canvas-head { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 11px; border-bottom: 1px solid var(--line); }
.pane-head > span, .canvas-head > span { font-weight: 900; font-size: 11px; }
.pane-head small, .canvas-head small, .canvas-head > div > span:first-child { color: var(--muted); font-size: 9px; }
.source-pane { padding-bottom: 11px; }
.source-pane > :not(.pane-head) { margin-left: 11px; margin-right: 11px; }
.source-card { flex: 0 0 164px; margin-top: 11px; margin-bottom: 10px; position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #080a0b; }
.source-card.upload-drop-active { border-color: var(--green); box-shadow: inset 0 0 0 1px rgba(83,252,24,.35); }
.source-card img { width: 100%; height: 100%; object-fit: cover; }
.source-card::after { content: ""; position: absolute; inset: auto 0 0; height: 52%; background: linear-gradient(transparent, rgba(0,0,0,.78)); pointer-events: none; }
.source-duplicate-badge { max-width: calc(100% - 16px); min-height: 25px; position: absolute; z-index: 3; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; overflow: hidden; border: 1px solid rgba(255,199,68,.48); border-radius: 5px; background: rgba(28,19,5,.92); color: #ffe09a; font-size: 8px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.source-duplicate-badge.clear { border-color: rgba(83,252,24,.34); background: rgba(8,28,8,.9); color: #cffff0; }
.source-duplicate-badge svg { width: 13px; height: 13px; }
.source-banner-badge { min-height: 25px; position: absolute; z-index: 3; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border: 1px solid rgba(83,252,24,.42); border-radius: 5px; background: rgba(5,24,8,.92); color: #cffff0; font-size: 8px; font-weight: 900; white-space: nowrap; }
.source-banner-badge svg { width: 13px; height: 13px; color: var(--green); }
.source-meta { position: absolute; inset: auto 9px 8px; z-index: 1; min-width: 0; display: grid; gap: 3px; }
.source-meta strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-meta span { color: #c1c8ce; font-size: 9px; }
.source-placeholder { height: 100%; display: grid; align-content: center; justify-items: center; gap: 7px; padding: 20px; text-align: center; color: var(--muted); }
.source-placeholder svg { width: 25px; height: 25px; color: var(--green); }
.source-placeholder strong { color: var(--text); font-size: 11px; }
.source-placeholder span { font-size: 9px; line-height: 1.45; }
.source-upload-art { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: linear-gradient(145deg, #111712, #080a0b 68%); color: var(--green); }
.source-upload-art svg { width: 34px; height: 34px; }
.source-upload-art span { color: #8d9991; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.field-label { display: grid; gap: 6px; position: relative; color: #aeb7bf; font-size: 10px; font-weight: 800; }
.field-label + .field-label { margin-top: 10px; }
.field-label input:not([type="range"]), .field-label textarea, .field-label select, .form-panel input, .form-panel select, .settings-section input, .settings-section select, .toolbar-actions select, .filter-bar input, .filter-bar select, .preset-row select, .word-style-row input:not([type="color"]) { width: 100%; border: 1px solid var(--line-strong); border-radius: 5px; background: #0c0f12; color: var(--text); outline: 0; }
.field-label input:not([type="range"]), .field-label select, .form-panel input, .form-panel select, .settings-section input, .settings-section select, .toolbar-actions select, .filter-bar input, .filter-bar select, .preset-row select { height: 36px; padding: 0 9px; }
.field-label textarea { min-height: 76px; resize: none; padding: 8px 9px 20px; line-height: 1.35; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus, .form-panel input:focus, .form-panel select:focus, .settings-section input:focus, .settings-section select:focus { border-color: var(--green-dark); box-shadow: 0 0 0 2px var(--green-soft); }
.field-label > span:last-child:not(:first-child) { position: absolute; right: 8px; bottom: 6px; color: var(--muted-2); font-size: 8px; }
.source-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 7px; }
.source-actions .secondary-button { flex: 1; }
.full-button { width: 100%; }
.trim-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.trim-row .field-label + .field-label { margin-top: 0; }
.trim-row input { height: 34px !important; }

.canvas-pane { display: grid; grid-template-rows: 42px minmax(0, 1fr) 57px; background: #0a0c0e; }
.canvas-head > div { display: flex; align-items: center; gap: 8px; }
.canvas-stage { min-height: 0; display: grid; place-items: center; padding: 10px; background-color: #090b0d; background-image: linear-gradient(#151a1e 1px, transparent 1px), linear-gradient(90deg, #151a1e 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; }
.preview-frame { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; position: relative; overflow: hidden; border: 1px solid #35404a; border-radius: 7px; background: #050607; box-shadow: var(--shadow); transition: aspect-ratio .2s ease, width .2s ease, height .2s ease; }
.preview-frame.format-x { width: min(96%, 760px); height: auto; max-height: 100%; aspect-ratio: 16 / 9; }
.preview-backdrop { position: absolute; inset: 0; background: #10151a center / cover no-repeat; filter: brightness(.52) saturate(.92); }
.preview-backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.1); }
.preview-frame video { display: none; width: 100%; height: 100%; position: absolute; inset: 0; z-index: 6; object-fit: contain; background: #000; }
.preview-frame.has-source-video video { display: block; z-index: 2; object-fit: contain; }
.preview-frame.has-source-video .preview-backdrop, .preview-frame.has-source-video .preview-empty { display: none; }
.preview-frame.has-video video { display: block; }
.preview-frame.has-video { border-color: #000; background: #000; }
.preview-frame.has-video .preview-backdrop, .preview-frame.has-video .caption-overlay, .preview-frame.has-video .watermark-overlay, .preview-frame.has-video .banner-overlay, .preview-frame.has-video .fallback-preview-banner, .preview-frame.has-video .preview-empty { display: none; }
.preview-empty { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.preview-empty svg { width: 30px; height: 30px; color: #46515b; }
.preview-frame.loaded .preview-empty { display: none; }
.caption-overlay { width: max-content; max-width: 88%; position: absolute; z-index: 4; left: 50%; top: 7%; transform: translateX(-50%); padding: .22em .45em; border-radius: 7px; background: #fff; color: #050505; font-family: "Arial Black", Arial, sans-serif; font-size: clamp(12px, 1.55vw, 24px); font-weight: 900; line-height: 1.12; text-align: center; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255,255,255,.3); cursor: grab; user-select: none; touch-action: none; overflow-wrap: normal; word-break: normal; white-space: normal; }
.caption-overlay.dragging, .watermark-overlay.dragging { cursor: grabbing; outline: 1px solid var(--green); }
.watermark-overlay { width: 22%; position: absolute; z-index: 5; left: 3%; top: 3%; opacity: .78; filter: saturate(1.45) brightness(1.18) contrast(1.08) drop-shadow(0 2px 2px rgba(0,0,0,.82)); cursor: grab; user-select: none; touch-action: none; }
.banner-overlay { width: 100%; height: auto; position: absolute; z-index: 3; left: 0; bottom: 0; object-fit: fill; }
.banner-overlay:not([src]), .banner-overlay[src=""] { display: none; }
.fallback-preview-banner { width: 100%; height: 10%; min-height: 18px; position: absolute; z-index: 3; left: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 7%; background: #000; font-family: "Arial Black", Arial, sans-serif; }
.fallback-preview-banner b { color: var(--green); font-size: clamp(9px, 1.4vw, 20px); }
.fallback-preview-banner span { min-width: 0; color: #fff; font-size: clamp(4px, .65vw, 9px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canvas-footer { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface); }
.job-progress { min-width: 0; flex: 1; display: grid; gap: 6px; }
.job-progress > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }
.job-progress span { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-progress strong { color: var(--green); }
.job-progress > i { height: 4px; display: block; overflow: hidden; border-radius: 4px; background: #252c33; }
.job-progress b { width: 0; height: 100%; display: block; background: var(--green); transition: width .25s ease; }
.render-result-actions { display: flex; gap: 7px; }
.render-result-actions a { min-height: 32px; }

.inspector-tabs { min-height: 42px; display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.inspector-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 9px; font-weight: 900; cursor: pointer; }
.inspector-tabs button.active { color: var(--green); border-bottom-color: var(--green); background: var(--green-soft); }
.inspector-content { display: none; min-height: 0; overflow: auto; padding: 12px; gap: 12px; }
.inspector-content.active { display: grid; align-content: start; }
.preset-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 7px; }
.range-label > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: static !important; color: #aeb7bf !important; font-size: 10px !important; }
.range-label b { color: var(--green); font-size: 9px; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.color-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.color-row label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
input[type="color"] { width: 100%; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 5px; background: #0c0f12; cursor: pointer; }
.toggle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.toggle-row label { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 9px; cursor: pointer; }
.toggle-row input { display: none; }
.toggle-row span { width: 25px; height: 14px; position: relative; border-radius: 10px; background: #323b44; }
.toggle-row span::after { content: ""; width: 10px; height: 10px; position: absolute; left: 2px; top: 2px; border-radius: 50%; background: #8a949d; transition: left .15s ease, background .15s ease; }
.toggle-row input:checked + span { background: var(--green-dark); }
.toggle-row input:checked + span::after { left: 13px; background: var(--green); }
.section-note { padding: 9px; border-left: 2px solid var(--green); background: var(--green-soft); color: #aab6ac; font-size: 9px; line-height: 1.45; }
.watermark-master-toggle { min-height: 48px; padding-top: 0; }
.watermark-controls { display: grid; gap: 12px; transition: opacity .15s ease; }
.watermark-controls.disabled { opacity: .38; }
.watermark-controls.disabled button, .watermark-controls.disabled input { cursor: not-allowed; }
.position-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.position-grid button { min-height: 32px; border: 1px solid var(--line); border-radius: 5px; background: #0c0f12; color: var(--muted); cursor: pointer; font-size: 9px; }
.position-grid button:hover { border-color: var(--green-dark); color: var(--green); }
.word-style-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 7px; }
.word-style-row input:not([type="color"]) { height: 38px; padding: 0 9px; }
.word-style-row input[type="color"] { height: 38px; }
.word-preview { min-height: 72px; display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: #080a0c; font-family: "Arial Black", Arial, sans-serif; font-size: 15px; text-align: center; }
.transcript-panel { grid-template-rows: auto auto auto auto minmax(120px, 1fr) auto auto auto; }
.transcript-provider { min-height: 38px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: #121414; }
.transcript-provider span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.transcript-provider strong { font-size: 10px; }
.transcript-provider em { color: var(--green); font-size: 9px; font-style: normal; font-weight: 800; }
.transcript-status { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #121414; color: var(--muted); font-size: 10px; }
.transcript-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.transcript-status.working i { background: var(--yellow); animation: radar-pulse .7s ease infinite alternate; }
.transcript-status.ready i { background: var(--green); }
.transcript-status.failed i { background: var(--red); }
.transcript-panel .field-label { min-height: 0; }
.transcript-panel textarea { min-height: 130px; height: 100%; resize: vertical; }
.transcript-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.transcript-meta span { min-height: 23px; display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 9px; }
.transcript-toggle { min-height: 50px; }
.transcript-actions { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 7px; }
.transcript-actions .icon-button { width: 40px; height: 36px; }

.view-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.toolbar-copy { min-width: 0; display: grid; gap: 4px; }
.toolbar-copy h2 { font-size: 18px; }
.toolbar-copy p, .form-panel p, .settings-section p { margin: 0; color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.toolbar-actions select { width: auto; min-width: 150px; }
.filter-bar { height: 49px; display: flex; align-items: center; gap: 10px; }
.inline-search { width: min(280px, 30vw); height: 34px; display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); }
.inline-search svg { width: 14px; height: 14px; }
.inline-search input { height: auto; border: 0; padding: 0; background: transparent; }
.muted-label { color: var(--muted); font-size: 10px; }
.count-chip { min-height: 25px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 9px; }

.clip-grid { height: calc(100% - 108px); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-rows: 240px; gap: 10px; overflow: auto; padding-top: 1px; }
.clip-card { min-width: 0; display: grid; grid-template-rows: 130px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: transform .15s ease, border-color .15s ease; }
.clip-card:hover { transform: translateY(-2px); border-color: #3b4650; }
.clip-media { position: relative; overflow: hidden; background: #07090b; }
.clip-media img { width: 100%; height: 100%; object-fit: cover; }
.clip-media .status-chip { position: absolute; top: 8px; left: 8px; background: rgba(8,10,12,.88); }
.clip-media .duration { position: absolute; right: 8px; bottom: 8px; padding: 3px 5px; border-radius: 3px; background: rgba(0,0,0,.8); font-size: 8px; font-weight: 800; }
.clip-body { min-width: 0; display: grid; grid-template-rows: auto auto 1fr auto; gap: 4px; padding: 9px; }
.clip-body > span { color: var(--green); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.clip-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.clip-stats { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 8px; }
.clip-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.clip-actions button, .clip-actions a { min-height: 29px; padding: 0 7px; font-size: 9px; }

.streamer-browser { height: calc(100% - 69px); min-height: 0; display: grid; grid-template-rows: 58px auto minmax(0, 1fr); gap: 10px; padding-top: 10px; }
.streamer-search-row { display: flex; align-items: center; }
.streamer-search-row label { width: 100%; height: 48px; display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 0 5px 0 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--muted); }
.streamer-search-row label:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 2px var(--green-soft); }
.streamer-search-row input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.streamer-search-row .primary-button { min-height: 38px; padding-inline: 18px; }
.streamer-result-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.streamer-result-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.streamer-result-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; background: var(--green); color: #071007; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 12px; }
.streamer-result-identity > div { min-width: 0; display: grid; gap: 3px; }
.streamer-result-identity strong { font-size: 12px; }
.streamer-result-identity small { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.streamer-live-meta { display: flex; align-items: center; gap: 7px; }
.streamer-clips-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 10px; overflow: auto; padding: 1px 1px 10px; }
.streamer-clip-card { min-width: 0; display: grid; grid-template-rows: 154px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); transition: transform .15s ease, border-color .15s ease; }
.streamer-clip-card:hover { transform: translateY(-2px); border-color: #3b4650; }
.streamer-clip-media { position: relative; overflow: hidden; background: #07090b; }
.streamer-clip-media img { width: 100%; height: 100%; object-fit: cover; }
.streamer-clip-media .duration { position: absolute; right: 8px; bottom: 8px; padding: 3px 5px; border-radius: 3px; background: rgba(0,0,0,.82); font-size: 8px; font-weight: 800; }
.streamer-clip-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #46515b; }
.streamer-clip-placeholder svg { width: 28px; height: 28px; }
.streamer-clip-body { min-width: 0; display: grid; grid-template-rows: auto auto 1fr; gap: 4px; padding: 9px; }
.streamer-clip-body strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.streamer-clip-body small { color: var(--muted); font-size: 8px; }
.streamer-clip-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-self: end; }
.streamer-clip-actions .primary-button, .streamer-clip-actions .secondary-button { min-height: 30px; font-size: 9px; }

.projects-layout { height: calc(100% - 69px); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 10px; padding-top: 10px; }
.project-table-wrap { min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { height: 39px; padding: 0 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: left; text-transform: uppercase; }
.data-table th:first-child { width: 38%; }
.data-table th:last-child { width: 44px; }
.data-table td { height: 58px; padding: 7px 11px; border-bottom: 1px solid #1d2329; font-size: 10px; vertical-align: middle; }
.data-table tr { cursor: pointer; }
.data-table tbody tr:hover, .data-table tbody tr.selected { background: var(--surface-2); }
.table-project { min-width: 0; display: grid; gap: 3px; }
.table-project strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-project small { color: var(--muted); font-size: 8px; }
.project-drawer { min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.drawer-video { aspect-ratio: 16 / 10; background: #000; }
.drawer-video video { width: 100%; height: 100%; object-fit: contain; }
.drawer-content { display: grid; gap: 12px; padding: 12px; }
.drawer-content h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.drawer-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.drawer-meta div { display: grid; gap: 2px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; }
.drawer-meta span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.drawer-meta strong { font-size: 10px; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.split-layout, .brands-layout { height: calc(100% - 69px); display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 10px; padding-top: 10px; }
.fill-panel { overflow: auto; }
.form-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: auto; }
.form-panel > div:first-child { display: grid; gap: 5px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feed-list, .team-list { min-height: 0; }
.publishing-list { height: calc(100% - 58px); overflow: auto; }
.publishing-row { min-height: 72px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 9px 13px; border-bottom: 1px solid #1d2329; }
.publish-date { width: 42px; height: 44px; display: grid; place-items: center; align-content: center; border: 1px solid var(--line-strong); border-radius: 5px; background: #0d1013; }
.publish-date strong { font-size: 15px; line-height: 1; }
.publish-date small { margin-top: 3px; color: var(--green); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.publish-copy { min-width: 0; display: grid; gap: 3px; }
.publish-copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.publish-copy small { color: var(--muted); font-size: 9px; }
.platform-chip { min-width: 66px; min-height: 25px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border: 1px solid #28547b; border-radius: 4px; background: #0f1e2c; color: var(--blue); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.feed-row, .team-row { min-height: 69px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid #1d2329; }
.feed-icon, .team-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; background: #142019; color: var(--green); font-weight: 900; }
.feed-copy, .team-copy { min-width: 0; display: grid; gap: 3px; }
.feed-copy strong, .team-copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-copy small, .team-copy small { color: var(--muted); font-size: 9px; }
.feed-row .icon-button, .team-row .icon-button { width: 31px; height: 31px; }
.switch { width: 35px; height: 19px; position: relative; border: 0; border-radius: 12px; background: #303941; cursor: pointer; }
.switch::after { content: ""; width: 15px; height: 15px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #8e98a1; transition: left .15s ease, background .15s ease; }
.switch.on { background: var(--green-dark); }
.switch.on::after { left: 18px; background: var(--green); }

.brand-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 142px; gap: 10px; overflow: auto; }
.brand-card { min-width: 0; display: grid; grid-template-rows: 77px 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.brand-card:hover, .brand-card.selected { border-color: var(--green-dark); transform: translateY(-2px); }
.brand-banner { display: grid; place-items: center; overflow: hidden; background: #000; }
.brand-banner img { width: 100%; height: 100%; object-fit: fill; }
.fallback-banner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-around; padding: 0 10px; background: #000; font-family: "Arial Black", Arial, sans-serif; }
.fallback-banner b { color: var(--green); font-size: 19px; }
.fallback-banner span { font-size: 9px; }
.brand-card footer { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; }
.brand-card footer div { min-width: 0; display: grid; gap: 2px; }
.brand-card strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-card small { color: var(--muted); font-size: 8px; }
.brand-inspector .brand-preview { aspect-ratio: 4.5 / 1; border: 1px solid var(--line); background: #000; overflow: hidden; }
.brand-preview img { width: 100%; height: 100%; object-fit: fill; }

.analytics-grid { height: calc(100% - 69px); display: grid; grid-template-columns: 1.4fr .8fr; grid-template-rows: 1.1fr .9fr; gap: 10px; padding-top: 10px; }
.analytics-chart-panel { grid-row: span 1; }
.bar-chart { height: calc(100% - 58px); display: flex; align-items: end; gap: 10px; padding: 18px 16px 12px; }
.bar-column { height: 100%; flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) 17px; align-items: end; gap: 6px; text-align: center; }
.bar-column > div { width: 100%; height: 100%; display: flex; align-items: end; justify-content: center; border-bottom: 1px solid var(--line); }
.bar-column i { width: min(42px, 72%); min-height: 3px; display: block; background: var(--green); border-radius: 3px 3px 0 0; transition: height .3s ease; }
.bar-column span { color: var(--muted); font-size: 8px; }
.breakdown-list { height: calc(100% - 58px); overflow: auto; padding: 8px 12px; }
.breakdown-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 30px; align-items: center; gap: 8px; min-height: 34px; }
.breakdown-row span { color: #c1c8ce; font-size: 9px; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breakdown-row i { height: 5px; border-radius: 5px; background: #232b32; overflow: hidden; }
.breakdown-row b { display: block; height: 100%; background: var(--blue); }
.breakdown-row strong { text-align: right; font-size: 10px; }
.approval-health { height: calc(100% - 58px); display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 18px; padding: 14px; }
.approval-ring { width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) var(--approval), #232b32 0); position: relative; }
.approval-ring::after { content: ""; width: 76px; height: 76px; position: absolute; border-radius: 50%; background: var(--surface); }
.approval-ring strong { z-index: 1; font-size: 18px; }
.approval-copy { display: grid; gap: 9px; }
.approval-copy div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.approval-copy strong { color: var(--text); }

.settings-grid { height: calc(100% - 69px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 10px; }
.settings-section { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-content: start; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: auto; }
.settings-section > div:first-child { display: grid; gap: 5px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.setting-toggle { min-height: 55px; display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #1d2329; cursor: pointer; }
.setting-toggle > span { display: grid; gap: 3px; }
.setting-toggle strong { font-size: 10px; }
.setting-toggle small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.setting-toggle input { display: none; }
.setting-toggle i { width: 38px; height: 21px; position: relative; border-radius: 12px; background: #303941; }
.setting-toggle i::after { content: ""; width: 17px; height: 17px; position: absolute; left: 2px; top: 2px; border-radius: 50%; background: #8e98a1; transition: left .15s ease, background .15s ease; }
.setting-toggle input:checked + i { background: var(--green-dark); }
.setting-toggle input:checked + i::after { left: 19px; background: var(--green); }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 36px)); min-height: 48px; display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #14191e; box-shadow: var(--shadow); animation: toast-in .18s ease both; pointer-events: auto; }
.toast i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.toast.success i { background: var(--green); }
.toast.danger i { background: var(--red); }
.toast.warning i { background: var(--yellow); }
.toast div { min-width: 0; display: grid; gap: 2px; }
.toast strong { font-size: 10px; }
.toast span { color: var(--muted); font-size: 9px; line-height: 1.35; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); }
.modal { width: min(560px, 100%); max-height: min(680px, 92vh); overflow: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.modal-head > div { display: grid; gap: 3px; }
.hook-variants { display: grid; gap: 8px; padding: 12px; }
.hook-option { min-height: 58px; display: grid; grid-template-columns: 26px minmax(0, 1fr) 16px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #0d1013; color: var(--text); text-align: left; cursor: pointer; }
.hook-option:hover { border-color: var(--green-dark); background: var(--green-soft); }
.hook-option > span:first-child { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--green); font-weight: 900; font-size: 10px; }
.hook-option strong { font-size: 11px; line-height: 1.35; }
.hook-option svg { width: 14px; color: var(--muted); }

/* StreamPal product refresh */
.topbar { background: rgba(16, 18, 18, .94); backdrop-filter: blur(16px); }
.topbar-actions .primary-button { min-height: 40px; padding-inline: 16px; }
.global-search { height: 40px; background: #161919; }
.global-search input { font-size: 13px; }
.profile-button small, .service-state strong, .control-link small { font-size: 10px; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .04em; }
.panel-head h2, .form-panel h2, .settings-section h2, .toolbar-copy h2, .modal h2 { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 16px; }
.toolbar-copy p, .form-panel p, .settings-section p { font-size: 11px; line-height: 1.45; }
.view-toolbar { min-height: 66px; }
.status-chip, .count-chip { font-size: 10px; }
.status-chip.ready, .status-chip.approved, .status-chip.completed { color: var(--green); border-color: rgba(83,252,24,.35); background: rgba(83,252,24,.08); }
.field-label { gap: 7px; color: #c0c0ba; font-size: 11px; }
.field-label input:not([type="range"]), .field-label textarea, .field-label select, .form-panel input, .form-panel select, .settings-section input, .settings-section select, .toolbar-actions select, .filter-bar input, .filter-bar select, .preset-row select, .word-style-row input:not([type="color"]) { background: #121414; font-size: 12px; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus, .form-panel input:focus, .form-panel select:focus, .settings-section input:focus, .settings-section select:focus { border-color: rgba(177,76,255,.72); box-shadow: 0 0 0 2px var(--accent-soft); }
.create-view.active { height: 100%; min-height: 0; grid-template-rows: 52px minmax(0, 1fr); gap: 12px; }
.studio-toolbar { grid-template-columns: minmax(360px, 1fr) auto auto auto; gap: 10px; }
.url-field { height: 48px; background: #151818; }
.url-field input { font-size: 13px; }
.render-button { min-height: 48px; }
.studio-grid { height: 100%; grid-template-columns: 300px minmax(400px, 1fr) 338px; gap: 12px; }
.studio-pane, .canvas-pane { height: 100%; border-color: rgba(255,255,255,.1); background: #161919; }
.pane-head, .canvas-head { min-height: 46px; padding-inline: 13px; }
.pane-head > span, .canvas-head > span { font-size: 12px; }
.pane-head small, .canvas-head small, .canvas-head > div > span:first-child { font-size: 10px; }
.source-pane { padding-bottom: 13px; }
.source-pane > :not(.pane-head) { margin-left: 13px; margin-right: 13px; }
.brand-mode-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 8px; }
.brand-mode-row .field-label + .field-label { margin-top: 0; }
.source-card { flex-basis: 184px; margin-top: 13px; margin-bottom: 12px; }
.source-meta strong { font-size: 12px; }
.source-meta span, .source-placeholder span { font-size: 10px; }
.source-placeholder strong { font-size: 12px; }
.field-label input:not([type="range"]), .field-label select, .preset-row select { height: 40px; }
.field-label textarea { min-height: 88px; padding: 10px 10px 22px; }
.trim-row input { height: 38px !important; }
.source-actions { padding-top: 12px; }
.canvas-pane { grid-template-rows: 46px minmax(0, 1fr) 62px; }
.canvas-stage { padding: 14px; }
.preview-frame.format-x { width: min(100%, 980px); }
.canvas-footer { padding: 10px 12px; }
.inspector-tabs { min-height: 46px; }
.inspector-tabs button { font-size: 10px; }
.inspector-tabs button.active { color: var(--accent-strong); border-bottom-color: var(--accent); background: var(--accent-soft); }
.inspector-content { padding: 14px; gap: 14px; }
.range-label > span { font-size: 11px !important; }
.range-label b { color: var(--accent-strong); font-size: 10px; }
input[type="range"] { accent-color: var(--accent); }
.toggle-row label { height: 40px; font-size: 10px; }
.toggle-row input:checked + span { background: #7722b8; }
.toggle-row input:checked + span::after { background: #d9a6ff; }

.radar-view.active { display: grid; grid-template-rows: 66px minmax(0, 1fr); }
.radar-shell { min-height: 0; display: grid; grid-template-rows: 58px 54px minmax(0, 1fr); gap: 10px; padding-top: 10px; }
.radar-add-row { min-width: 0; }
.radar-add-row label { width: 100%; height: 52px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 6px 0 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--muted); }
.radar-add-row label:focus-within { border-color: rgba(177,76,255,.72); box-shadow: 0 0 0 2px var(--accent-soft); }
.radar-add-row input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.radar-add-row .primary-button { min-height: 40px; padding-inline: 17px; }
.radar-auto-status { min-height: 30px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.radar-auto-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.radar-auto-status.refreshing i { animation: radar-pulse .7s ease infinite alternate; }
.radar-tabs { min-width: 0; display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.radar-tab { min-width: 178px; display: grid; grid-template-columns: minmax(0, 1fr) 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; transition: border-color .15s ease, background .15s ease; }
.radar-tab.active { border-color: rgba(177,76,255,.72); background: var(--accent-soft); }
.radar-tab > button { min-width: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.radar-tab > button:first-child { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 7px 6px 9px; text-align: left; }
.radar-tab-avatar { width: 32px; height: 32px; display: grid; place-items: center; position: relative; border-radius: 6px; background: #2a2d2d; color: var(--text); font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 10px; }
.radar-tab-avatar i { width: 8px; height: 8px; position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--surface); border-radius: 50%; background: #555; }
.radar-tab-avatar i.live { background: var(--green); }
.radar-tab button > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.radar-tab strong { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 11px; white-space: nowrap; }
.radar-tab small { color: var(--muted); font-size: 9px; }
.radar-tab button > b { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; background: var(--green); color: #071007; font-size: 9px; }
.radar-tab-remove { display: grid; place-items: center; border-left: 1px solid var(--line) !important; color: var(--muted) !important; }
.radar-tab-remove:hover { color: var(--red) !important; background: rgba(255,92,103,.08) !important; }
.radar-tab-remove svg { width: 13px; height: 13px; }
.radar-stage { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-top: 1px solid var(--line); }
.radar-header { min-width: 0; min-height: 74px; display: grid; grid-template-columns: minmax(200px, 1fr) auto auto; align-items: center; gap: 20px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.radar-streamer-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.radar-streamer-identity > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: #fff; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 11px; }
.radar-streamer-identity > div { min-width: 0; display: grid; gap: 4px; }
.radar-streamer-identity > div > div { display: flex; align-items: center; gap: 7px; }
.radar-streamer-identity strong { font-size: 14px; }
.radar-streamer-identity small { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-live-pill { min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid rgba(83,252,24,.35); border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.radar-header-stats { display: flex; align-items: center; gap: 22px; }
.radar-header-stats > span { display: grid; gap: 3px; }
.radar-header-stats small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.radar-header-stats strong { font-size: 12px; white-space: nowrap; }
.radar-header-actions { display: flex; gap: 7px; }
.radar-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 248px; gap: 10px; overflow: auto; padding: 10px 1px 12px; }
.radar-clip-card { min-width: 0; display: grid; grid-template-rows: 160px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: transform .15s ease, border-color .15s ease; }
.radar-clip-card:hover { transform: translateY(-2px); border-color: rgba(177,76,255,.5); }
.radar-clip-card.is-new { border-color: rgba(83,252,24,.38); }
.radar-clip-media { position: relative; overflow: hidden; background: #0b0d0d; }
.radar-clip-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.radar-clip-card:hover .radar-clip-media img { transform: scale(1.015); }
.radar-clip-media > span { height: 100%; display: grid; place-items: center; color: var(--muted); }
.radar-clip-media > b { position: absolute; left: 8px; top: 8px; padding: 4px 7px; border-radius: 4px; background: var(--green); color: #071007; font-size: 9px; text-transform: uppercase; }
.radar-clip-media time { position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; border-radius: 4px; background: rgba(0,0,0,.82); font-size: 9px; font-weight: 800; }
.radar-clip-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; }
.radar-clip-body > div:first-child { min-width: 0; display: grid; gap: 5px; }
.radar-clip-body strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.radar-clip-body small { color: var(--muted); font-size: 10px; }
.radar-clip-actions { display: flex; gap: 6px; }
.radar-clip-actions .primary-button { min-height: 32px; padding-inline: 10px; font-size: 10px; }
.radar-clip-actions .icon-button { width: 32px; height: 32px; }
.radar-empty { min-height: 100%; grid-column: 1 / -1; display: grid; place-items: center; align-content: center; gap: 9px; padding: 28px; color: var(--muted); text-align: center; }
.radar-empty strong { color: var(--text); font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 18px; }
.radar-empty > span:not(.radar-scan-visual) { font-size: 11px; }
.radar-scan-visual { width: 84px; height: 84px; display: grid; place-items: center; position: relative; border: 1px solid rgba(177,76,255,.28); border-radius: 50%; background: radial-gradient(circle, rgba(177,76,255,.13), transparent 66%); }
.radar-scan-visual::before, .radar-scan-visual::after { content: ""; position: absolute; border: 1px solid rgba(177,76,255,.22); border-radius: 50%; }
.radar-scan-visual::before { inset: 14px; }
.radar-scan-visual::after { inset: 29px; }
.radar-scan-visual i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.radar-scan-visual b { width: 40%; height: 1px; position: absolute; left: 50%; top: 50%; transform-origin: left center; background: linear-gradient(90deg, var(--accent), transparent); animation: radar-sweep 2.4s linear infinite; }
.radar-suggestions { display: flex; gap: 7px; margin-top: 4px; }
.radar-suggestions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 10px; }
.radar-suggestions button:hover { border-color: rgba(177,76,255,.65); background: var(--accent-soft); }
@keyframes radar-sweep { to { transform: rotate(360deg); } }
@keyframes radar-pulse { to { opacity: .35; } }

/* Live newsroom */
.newsroom-view.active { display: grid; grid-template-rows: 66px minmax(0, 1fr); }
.newsroom-toolbar { border-bottom: 0; }
.live-link { min-height: 30px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.live-link i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: live-link-pulse 1.4s ease infinite alternate; }
.live-link.offline i { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,199,68,.1); animation: none; }
@keyframes live-link-pulse { to { opacity: .45; } }
.intelligence-shell { min-height: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr); padding-top: 10px; }
.intelligence-tabs { display: flex; align-items: end; gap: 3px; border-bottom: 1px solid var(--line); }
.intelligence-tabs button { height: 47px; display: inline-flex; align-items: center; gap: 8px; position: relative; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 850; cursor: pointer; }
.intelligence-tabs button::after { content: ""; position: absolute; inset: 7px 3px; z-index: -1; border-radius: 5px; background: transparent; transition: background .15s ease; }
.intelligence-tabs button:hover { color: var(--text); }
.intelligence-tabs button:hover::after { background: var(--surface); }
.intelligence-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.intelligence-tabs button.active svg { color: var(--accent-strong); }
.intelligence-tabs button svg { width: 15px; height: 15px; }
.intelligence-tabs button span { min-width: 20px; height: 19px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; background: var(--surface-3); color: var(--muted); font-size: 8px; }
.intelligence-tabs button.active span { background: var(--accent-soft); color: var(--accent-strong); }
.intelligence-panels { min-width: 0; min-height: 0; }
.intelligence-panel { display: none; min-width: 0; min-height: 0; height: 100%; }
.intelligence-panel.active { display: grid; animation: view-in .16s ease both; }
.intelligence-panel[data-intelligence-panel="desk"] { grid-template-rows: 82px minmax(0, 1fr); }
.intelligence-empty { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; padding: 22px; color: var(--muted); text-align: center; }
.intelligence-empty svg { width: 28px; height: 28px; color: var(--accent-strong); }
.intelligence-empty strong { color: var(--text); font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 14px; }
.intelligence-empty span { max-width: 260px; font-size: 10px; line-height: 1.4; }
.intelligence-empty.compact { padding: 14px; }
.intelligence-empty.compact svg { width: 20px; height: 20px; }
.intelligence-empty.compact strong { font-size: 11px; }
.newsroom-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.newsroom-metrics > div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: 3px 10px; padding: 10px 16px; border-right: 1px solid var(--line); }
.newsroom-metrics > div:last-child { border-right: 0; }
.newsroom-metrics span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.newsroom-metrics strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 25px; }
.newsroom-metrics small { color: var(--muted-2); font-size: 9px; }
.viral-summary { min-width: 0; display: grid; grid-template-columns: minmax(250px, .8fr) minmax(280px, 1.2fr) auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.viral-summary-count { min-width: 0; display: flex; align-items: center; gap: 12px; }
.viral-summary-count > span { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(177,76,255,.32); border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); }
.viral-summary-count > span svg { width: 21px; height: 21px; }
.viral-summary-count > div { min-width: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 2px 5px; }
.viral-summary-count small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.viral-summary-count strong { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 14px; }
.viral-summary-count strong b { color: var(--accent-strong); font-size: 27px; }
.viral-summary-count em { grid-column: 1 / -1; color: var(--muted); font-size: 8px; font-style: normal; }
.viral-summary-copy { min-width: 0; display: grid; gap: 4px; padding-left: 22px; border-left: 1px solid var(--line); }
.viral-summary-copy strong { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 11px; }
.viral-summary-copy span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.viral-threshold { min-width: 184px; display: grid; gap: 5px; }
.viral-threshold > span { color: var(--muted); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.viral-threshold select { width: 100%; height: 35px; border: 1px solid var(--line-strong); border-radius: 5px; outline: 0; background: var(--surface); color: var(--text); padding: 0 9px; font-size: 9px; }
.viral-threshold select:focus { border-color: rgba(177,76,255,.72); box-shadow: 0 0 0 2px var(--accent-soft); }
.newsroom-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(385px, .78fr) minmax(455px, 1fr); gap: 12px; padding-top: 12px; }
.signal-feed, .newsroom-focus, .archive-results-shell, .story-selection, .story-list-shell, .story-stage { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.signal-feed { display: grid; grid-template-rows: 49px minmax(0, 1fr); }
.signal-feed > header, .archive-results-shell > header, .story-list-shell > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px 8px 13px; border-bottom: 1px solid var(--line); }
.signal-feed > header > div, .archive-results-shell > header > div, .story-list-shell > header > div { min-width: 0; display: grid; gap: 2px; }
.signal-feed > header strong, .archive-results-shell > header strong, .story-list-shell > header strong { font-size: 11px; }
.signal-feed > header small, .archive-results-shell > header small, .story-list-shell > header small { color: var(--muted); font-size: 9px; }
.signal-feed select { height: 31px; min-width: 128px; border: 1px solid var(--line-strong); border-radius: 5px; outline: 0; background: #121414; color: var(--text); padding: 0 26px 0 8px; font-size: 9px; }
.signal-list { min-height: 0; overflow: auto; }
.signal-row { min-width: 0; min-height: 96px; border-bottom: 1px solid #212424; background: transparent; transition: background .14s ease, box-shadow .14s ease; }
.signal-row:hover { background: var(--surface-2); }
.signal-row.selected { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.signal-row.pinned { box-shadow: inset 3px 0 var(--yellow); }
.signal-row.selected.pinned { box-shadow: inset 3px 0 var(--accent), inset 6px 0 var(--yellow); }
.signal-select { width: 100%; min-height: 96px; display: grid; grid-template-columns: 118px minmax(0, 1fr) 62px; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.signal-thumb { width: 118px; height: 68px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 6px; background: #0b0d0d; color: var(--muted); }
.signal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.signal-thumb > svg { width: 20px; height: 20px; }
.signal-thumb > small { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; border-radius: 3px; background: rgba(0,0,0,.8); color: #fff; font-size: 7px; font-weight: 900; }
.signal-thumb > i { min-width: 28px; height: 21px; display: grid; place-items: center; position: absolute; right: 5px; bottom: 5px; padding: 0 5px; border-radius: 4px; background: rgba(0,0,0,.82); color: var(--text); font-size: 9px; font-style: normal; font-weight: 900; }
.signal-thumb > i.breaking { color: var(--red); }
.signal-thumb > i.hot { color: var(--yellow); }
.signal-thumb > i.watch { color: var(--blue); }
.signal-copy { min-width: 0; display: grid; gap: 5px; }
.signal-copy > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.signal-copy time { margin-left: auto; color: var(--muted-2); font-weight: 500; }
.signal-copy strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.signal-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.viral-score-badge { width: 62px; height: 52px; display: grid; place-items: center; align-content: center; border: 1px solid rgba(90,171,255,.3); border-radius: 6px; background: rgba(90,171,255,.07); }
.viral-score-badge strong { color: var(--blue); font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 15px; line-height: 1; }
.viral-score-badge small { margin-top: 4px; color: var(--muted); font-size: 7px; text-transform: uppercase; }
.viral-score-badge.hot { border-color: rgba(255,199,68,.34); background: rgba(255,199,68,.07); }
.viral-score-badge.hot strong { color: var(--yellow); }
.viral-score-badge.breaking { border-color: rgba(255,92,103,.36); background: rgba(255,92,103,.08); }
.viral-score-badge.breaking strong { color: var(--red); }
.priority-dot { width: 7px; height: 7px; display: inline-block; flex: none; border-radius: 50%; background: #677078; }
.priority-dot.breaking { background: var(--red); box-shadow: 0 0 0 3px rgba(255,92,103,.09); }
.priority-dot.hot { background: var(--yellow); }
.priority-dot.watch { background: var(--blue); }
.priority-dot.developing { background: #747b80; }
.signal-pin { color: var(--yellow); }
.signal-pin svg { width: 14px; height: 14px; }
.newsroom-focus { display: grid; grid-template-rows: minmax(135px, 44%) minmax(0, 1fr); }
.focus-player { min-height: 0; position: relative; overflow: hidden; background: #050606; }
.focus-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.focus-score { width: 75px; height: 75px; display: grid; place-items: center; align-content: center; position: absolute; right: 12px; top: 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(7,9,9,.9); backdrop-filter: blur(8px); }
.focus-score b { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 20px; line-height: 1; }
.focus-score small { width: 55px; margin-top: 4px; color: var(--muted); font-size: 6px; line-height: 1.1; text-align: center; text-transform: uppercase; }
.focus-score.breaking b { color: var(--red); }
.focus-score.hot b { color: var(--yellow); }
.focus-score.watch b { color: var(--blue); }
.focus-content { min-height: 0; display: grid; align-content: start; gap: 8px; padding: 10px; overflow: auto; }
.focus-title { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.focus-title > div:first-child { min-width: 0; display: grid; gap: 5px; }
.focus-title strong { font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.focus-title small { color: var(--muted); font-size: 9px; }
.focus-labels { display: flex; align-items: center; gap: 6px; }
.confidence-label { min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 4px; background: var(--surface-3); color: var(--muted); font-size: 8px; font-weight: 850; }
.confidence-label.high { background: var(--green-soft); color: var(--green); }
.confidence-label.medium { background: rgba(90,171,255,.08); color: var(--blue); }
.confidence-label.early { background: rgba(255,199,68,.08); color: var(--yellow); }
.priority-label { width: max-content; min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.priority-label.breaking { border-color: rgba(255,92,103,.4); background: rgba(255,92,103,.09); color: var(--red); }
.priority-label.hot { border-color: rgba(255,199,68,.4); background: rgba(255,199,68,.08); color: var(--yellow); }
.priority-label.watch { border-color: rgba(90,171,255,.4); background: rgba(90,171,255,.08); color: var(--blue); }
.focus-utilities { display: flex; gap: 5px; }
.focus-utilities .icon-button { width: 31px; height: 31px; }
.icon-button.active { border-color: rgba(255,199,68,.45); background: rgba(255,199,68,.08); color: var(--yellow); }
.focus-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.focus-stats > span { min-width: 0; display: grid; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--line); }
.focus-stats > span:last-child { border-right: 0; }
.focus-stats small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.focus-stats strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.viral-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #121414; }
.viral-breakdown header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viral-breakdown header strong { font-size: 9px; }
.viral-breakdown header span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.viral-breakdown > div { min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 6px; }
.viral-breakdown > div > span { color: var(--muted); font-size: 8px; text-transform: capitalize; }
.viral-breakdown > div > i { height: 5px; overflow: hidden; border-radius: 4px; background: #292d2d; }
.viral-breakdown > div > i > b { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.viral-breakdown > div > strong { color: #c8cbc5; font-size: 8px; text-align: right; }
.signal-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.signal-reasons span { min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #121414; color: #bbbdb8; font-size: 8px; font-weight: 750; }
.signal-reasons i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.signal-reasons .new i, .signal-reasons .live i, .signal-reasons .fresh i { background: var(--green); }
.signal-reasons .thread i { background: var(--accent); }
.signal-reasons .audience i, .signal-reasons .velocity i { background: var(--yellow); }
.focus-actions { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) 36px; gap: 7px; }
.focus-actions .primary-button, .focus-actions .secondary-button { min-height: 34px; font-size: 9px; }

.intelligence-panel[data-intelligence-panel="archive"] { grid-template-rows: 63px minmax(0, 1fr); }
.archive-searchbar { min-width: 0; display: grid; grid-template-columns: minmax(320px, 1fr) 155px 135px 145px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.archive-searchbar > label { height: 43px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 0 5px 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--muted); }
.archive-searchbar > label:focus-within { border-color: rgba(177,76,255,.7); box-shadow: 0 0 0 2px var(--accent-soft); }
.archive-searchbar input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.archive-searchbar .primary-button { min-height: 33px; }
.archive-searchbar > select { height: 43px; min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; background: var(--surface); color: var(--text); padding: 0 8px; font-size: 10px; }
.archive-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(540px, 1fr) 310px; gap: 12px; padding-top: 12px; }
.archive-results-shell { display: grid; grid-template-rows: 49px minmax(0, 1fr); }
.archive-results { min-height: 0; overflow: auto; }
.archive-row { min-width: 0; min-height: 91px; display: grid; grid-template-columns: 28px 116px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid #212424; transition: background .14s ease; }
.archive-row:hover { background: var(--surface-2); }
.archive-row.selected { background: var(--accent-soft); }
.archive-selector { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #111313; color: var(--muted); cursor: pointer; }
.archive-selector i { width: 100%; height: 100%; display: grid; place-items: center; font-style: normal; }
.archive-selector svg { width: 13px; height: 13px; }
.archive-row.selected .archive-selector { border-color: var(--accent); background: var(--accent); color: white; }
.archive-thumb { width: 116px; height: 66px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 5px; background: #0b0d0d; color: var(--muted); }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.archive-thumb small { position: absolute; right: 5px; bottom: 5px; padding: 2px 4px; border-radius: 3px; background: rgba(0,0,0,.8); color: white; font-size: 7px; font-weight: 900; }
.archive-copy { min-width: 0; display: grid; gap: 5px; }
.archive-copy > span { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.archive-copy > span b { color: var(--accent-strong); }
.archive-copy > span time { color: var(--muted-2); }
.archive-copy > span em { min-height: 17px; display: inline-flex; align-items: center; padding: 0 5px; border-radius: 3px; background: var(--green-soft); color: var(--green); font-size: 7px; font-style: normal; font-weight: 900; }
.archive-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.archive-copy > small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.archive-actions { display: flex; gap: 5px; }
.archive-actions .secondary-button { min-height: 31px; padding-inline: 9px; font-size: 9px; }
.archive-actions .icon-button { width: 31px; height: 31px; }
.story-selection { display: grid; grid-template-rows: 55px minmax(0, 1fr) 62px; }
.story-selection > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.story-selection > header > div { display: grid; gap: 2px; }
.story-selection > header strong { font-size: 11px; }
.story-selection > header .icon-button { width: 30px; height: 30px; }
.story-selection-list { min-height: 0; overflow: auto; }
.story-selection-list article { min-height: 59px; display: grid; grid-template-columns: 23px minmax(0, 1fr) 28px; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #212424; }
.story-selection-list article > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); font-size: 8px; font-weight: 900; }
.story-selection-list article > div { min-width: 0; display: grid; gap: 3px; }
.story-selection-list article strong { overflow: hidden; text-overflow: ellipsis; font-size: 9px; white-space: nowrap; }
.story-selection-list article small { color: var(--muted); font-size: 8px; }
.story-selection-list .icon-button { width: 27px; height: 27px; }
.story-selection > footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px solid var(--line); }
.story-selection > footer span { color: var(--muted); font-size: 8px; }
.story-selection > footer .primary-button { min-height: 34px; font-size: 9px; }

.intelligence-panel[data-intelligence-panel="stories"] { padding-top: 12px; }
.stories-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 12px; }
.story-list-shell { display: grid; grid-template-rows: 55px minmax(0, 1fr); }
.story-list { min-height: 0; overflow: auto; }
.story-row { min-width: 0; border-bottom: 1px solid #212424; }
.story-row > button { width: 100%; min-height: 86px; display: grid; grid-template-columns: 82px minmax(0, 1fr) 15px; align-items: center; gap: 10px; padding: 9px 11px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.story-row:hover { background: var(--surface-2); }
.story-row.selected { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.story-stack { width: 82px; height: 54px; display: block; position: relative; }
.story-stack img { width: 68px; height: 44px; position: absolute; left: calc(var(--i) * 7px); top: calc(var(--i) * 5px); z-index: calc(3 - var(--i)); border: 1px solid #444; border-radius: 4px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.story-row-copy { min-width: 0; display: grid; gap: 5px; }
.story-row-copy > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; font-weight: 800; }
.story-row-copy time { margin-left: auto; color: var(--muted-2); font-weight: 500; }
.story-row-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.story-row-copy small { color: var(--muted); font-size: 8px; }
.story-row > button > svg { width: 14px; color: var(--muted); }
.story-stage { display: grid; grid-template-rows: 68px minmax(210px, 1fr) 94px 53px; }
.story-stage-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.story-stage-head > div:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 9px; align-items: center; }
.story-stage-head .priority-label { grid-row: 1 / 3; }
.story-stage-head strong { overflow: hidden; text-overflow: ellipsis; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 12px; white-space: nowrap; }
.story-stage-head small { color: var(--muted); font-size: 8px; }
.story-stage-head .secondary-button { min-height: 32px; font-size: 9px; }
.story-player { min-height: 0; position: relative; overflow: hidden; background: #050606; }
.story-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-player > div { min-width: 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px; position: absolute; left: 10px; right: 10px; bottom: 9px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 5px; background: rgba(5,7,7,.82); backdrop-filter: blur(9px); }
.story-player > div span { color: var(--accent-strong); font-size: 8px; font-weight: 900; }
.story-player > div strong { font-size: 9px; }
.story-player > div small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.story-timeline { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 9px 11px; overflow-x: auto; border-top: 1px solid var(--line); background: #121414; }
.story-timeline button { width: 94px; flex: 0 0 94px; display: grid; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.story-timeline button > span { width: 94px; height: 53px; display: grid; place-items: center; position: relative; overflow: hidden; border: 2px solid transparent; border-radius: 5px; background: #080a0a; }
.story-timeline button.active > span { border-color: var(--accent); }
.story-timeline img { width: 100%; height: 100%; object-fit: cover; }
.story-timeline b { width: 18px; height: 18px; display: grid; place-items: center; position: absolute; left: 4px; top: 4px; border-radius: 3px; background: rgba(0,0,0,.8); color: white; font-size: 7px; }
.story-timeline small { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.story-controls { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 11px; border-top: 1px solid var(--line); }
.story-controls .icon-button:first-child svg { transform: rotate(180deg); }
.story-controls .primary-button { min-width: 155px; }
.story-controls .secondary-button { margin-left: auto; }
.story-controls button:disabled { opacity: .35; cursor: not-allowed; }

.autopilot-view.active, .vod-view.active, .performance-view.active { display: grid; grid-template-rows: 66px 72px minmax(0, 1fr); gap: 10px; }
.feature-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-metrics article { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 16px; border-right: 1px solid var(--line); }
.feature-metrics article:last-child { border-right: 0; }
.feature-metrics span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.feature-metrics strong { overflow: hidden; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 24px; text-overflow: ellipsis; white-space: nowrap; }
.three-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.three-fields .field-label + .field-label { margin-top: 0; }
.mini-switch { display: inline-flex; cursor: pointer; }
.mini-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mini-switch i { width: 37px; height: 21px; position: relative; border-radius: 11px; background: #303536; transition: background .16s ease; }
.mini-switch i::after { content: ""; width: 15px; height: 15px; position: absolute; left: 3px; top: 3px; border-radius: 50%; background: #a9adaa; transition: transform .16s ease, background .16s ease; }
.mini-switch input:checked + i { background: var(--green-dark); }
.mini-switch input:checked + i::after { transform: translateX(16px); background: white; }
.compact-toggle { min-height: 47px; margin: 1px 0; padding: 7px 9px; }
.local-engine-chip, .model-state { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 850; }
.local-engine-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.model-state.ready { border-color: #2b6f28; background: var(--green-soft); color: var(--green); }
.live-link.paused i { background: var(--muted-2); box-shadow: 0 0 0 4px rgba(255,255,255,.05); animation: none; }

.autopilot-layout { min-width: 0; min-height: 0; display: grid; grid-template-columns: 355px minmax(0, 1fr); gap: 10px; }
.automation-console, .draft-console, .vod-browser, .vod-search-console, .performance-form, .pattern-panel, .result-panel { min-height: 0; display: grid; }
.automation-console { grid-template-rows: 55px auto minmax(0, 1fr); }
.automation-console > header, .draft-console > header, .vod-browser > header, .vod-search-console > header, .performance-form > header, .pattern-panel > header, .result-panel > header { min-width: 0; min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.automation-console > header > div:first-child, .draft-console > header > div:first-child, .vod-browser > header > div:first-child, .vod-search-console > header > div:first-child, .performance-form > header > div:first-child, .pattern-panel > header > div:first-child, .result-panel > header > div:first-child { min-width: 0; display: grid; gap: 3px; }
.automation-console h2, .draft-console h2, .vod-browser h2, .vod-search-console h2, .performance-form h2, .pattern-panel h2, .result-panel h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 13px; }
.autopilot-form { display: grid; gap: 8px; padding: 10px 11px; border-bottom: 1px solid var(--line); background: #111313; }
.autopilot-form .field-label input, .autopilot-form .field-label select { height: 35px; font-size: 10px; }
.monitor-list { min-height: 0; overflow: auto; }
.monitor-row { min-width: 0; display: grid; grid-template-columns: 33px minmax(0, 1fr) 29px; gap: 7px; padding: 9px 10px; border-bottom: 1px solid #222626; }
.monitor-row.paused { opacity: .62; }
.monitor-avatar { width: 33px; height: 33px; display: grid; place-items: center; position: relative; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11px; font-weight: 900; }
.monitor-avatar i { width: 8px; height: 8px; position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--surface); border-radius: 50%; background: var(--muted-2); }
.monitor-avatar i.live { background: var(--green); }
.monitor-copy { min-width: 0; display: grid; gap: 2px; align-content: center; }
.monitor-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-copy small { color: var(--muted); font-size: 8px; }
.monitor-row > .icon-button { width: 29px; height: 29px; }
.monitor-rules { grid-column: 1 / -1; display: grid; grid-template-columns: 74px minmax(86px, 1fr) 64px 64px; gap: 5px; }
.monitor-rules label { display: grid; gap: 3px; color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.monitor-rules input, .monitor-rules select { min-width: 0; height: 28px; border: 1px solid var(--line); border-radius: 4px; outline: 0; background: #0d0f0f; color: var(--text); padding: 0 6px; font-size: 9px; }
.monitor-rules .secondary-button { min-height: 28px; align-self: end; padding: 0 6px; font-size: 8px; }
.monitor-auto { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; cursor: pointer; }
.monitor-auto input { position: absolute; opacity: 0; }
.monitor-auto span { width: 24px; height: 14px; position: relative; border-radius: 8px; background: #303536; }
.monitor-auto span::after { content: ""; width: 10px; height: 10px; position: absolute; left: 2px; top: 2px; border-radius: 50%; background: #aaa; transition: transform .15s ease; }
.monitor-auto input:checked + span { background: var(--green-dark); }
.monitor-auto input:checked + span::after { transform: translateX(10px); background: white; }
.draft-console { grid-template-rows: 55px minmax(0, 1fr); }
.autopilot-drafts { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(300px, 1fr)); grid-auto-rows: 128px; gap: 8px; padding: 9px; overflow: auto; align-content: start; }
.autopilot-drafts > .drawer-empty { grid-column: 1 / -1; min-height: 100%; }
.autopilot-draft { min-width: 0; display: grid; grid-template-columns: 145px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 38px; gap: 7px 9px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #111313; }
.draft-thumb { grid-row: 1 / 3; min-width: 0; position: relative; overflow: hidden; border-radius: 5px; background: #070909; }
.draft-thumb > img { width: 100%; height: 100%; object-fit: cover; }
.draft-thumb > svg { position: absolute; left: 50%; top: 50%; color: var(--muted); transform: translate(-50%, -50%); }
.draft-thumb > small { position: absolute; right: 5px; bottom: 5px; padding: 2px 4px; border-radius: 3px; background: rgba(0,0,0,.8); color: white; font-size: 7px; }
.viral-score { position: absolute; left: 5px; top: 5px; padding: 3px 5px; border-radius: 4px; background: var(--green); color: #071007; font-size: 8px; font-weight: 950; }
.draft-copy { min-width: 0; display: grid; align-content: start; gap: 5px; }
.draft-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.draft-copy > div > span { overflow: hidden; color: var(--accent-strong); font-size: 8px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.draft-copy strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.draft-copy small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.draft-progress { height: 3px; overflow: hidden; border-radius: 2px; background: #292d2d; }
.draft-progress b { display: block; height: 100%; background: var(--green); }
.draft-actions { min-width: 0; display: flex; align-items: end; gap: 5px; }
.draft-actions .primary-button, .draft-actions .secondary-button { min-height: 30px; padding: 0 8px; font-size: 8px; }
.draft-actions .icon-button { width: 30px; height: 30px; margin-left: auto; }
.status-chip.rendering, .status-chip.indexing { color: var(--blue); border-color: #28547b; background: #0f1e2c; }
.status-chip.rendered { color: var(--green); border-color: #276f24; background: #0f2110; }

.vod-layout { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(360px, .8fr) minmax(480px, 1.2fr); gap: 10px; }
.vod-browser, .vod-search-console { grid-template-rows: 55px 55px minmax(0, 1fr); }
.vod-search-head { min-width: 0; display: flex; align-items: center; gap: 8px; }
.vod-search-head .segmented { flex: 0 0 auto; }
.vod-search-head .segmented button { min-height: 25px; padding-inline: 8px; font-size: 8px; }
.vod-search-head .muted-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-search { min-width: 0; height: 42px; display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 7px 9px 6px; padding: 0 4px 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #101212; color: var(--muted); }
.feature-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.feature-search .primary-button { min-height: 32px; font-size: 9px; }
.feature-search.large { margin-inline: 11px; }
.vod-replay-list, .vod-search-results { min-height: 0; overflow: auto; border-top: 1px solid var(--line); }
.vod-replay { min-width: 0; min-height: 85px; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid #222626; }
.vod-thumb { width: 112px; height: 63px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 5px; background: #080a0a; color: var(--muted); }
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vod-thumb small { position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 3px; background: rgba(0,0,0,.82); color: white; font-size: 7px; }
.vod-copy { min-width: 0; display: grid; gap: 4px; }
.vod-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.vod-copy span, .vod-copy em { overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.vod-copy em { color: var(--blue); }
.vod-replay > .secondary-button { min-height: 30px; padding: 0 8px; font-size: 8px; }
.danger-button { color: var(--red); border-color: #6a2830; }
.vod-result { min-width: 0; min-height: 78px; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid #222626; }
.vod-result.visual { box-shadow: inset 2px 0 var(--accent); }
.vod-result-scene { width: 96px; height: 54px; display: grid; place-items: center; position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #080a0a; color: white; }
.vod-result-scene img { width: 100%; height: 100%; object-fit: cover; opacity: .76; transition: opacity .16s ease, transform .16s ease; }
.vod-result-scene:hover img { opacity: 1; transform: scale(1.035); }
.vod-result-scene > svg { width: 17px; color: var(--muted); }
.vod-result-scene strong { position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 3px; background: rgba(0,0,0,.82); font-size: 8px; }
.vod-result-scene span { position: absolute; left: 4px; top: 4px; padding: 2px 4px; border-radius: 3px; background: var(--accent); color: white; font-size: 6px; font-weight: 900; text-transform: uppercase; }
.vod-result.speech .vod-result-scene span { background: #17669a; }
.vod-result > div { min-width: 0; display: grid; gap: 5px; }
.vod-result > div span { overflow: hidden; color: var(--accent-strong); font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.vod-result > div strong { display: -webkit-box; overflow: hidden; font-size: 10px; font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.vod-result > div small { color: var(--muted); font-size: 7px; }
.vod-result .icon-button { width: 31px; height: 31px; }
.vod-result-actions { display: flex !important; align-items: center; gap: 4px !important; }

.performance-layout { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; }
.performance-insights { min-width: 0; min-height: 0; display: grid; grid-template-rows: 72px minmax(140px, 1fr) minmax(130px, .9fr); gap: 8px; }
.recommendation-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; overflow: hidden; }
.recommendation-card { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.recommendation-card > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); }
.recommendation-card > span svg { width: 14px; }
.recommendation-card > div { min-width: 0; display: grid; gap: 3px; }
.recommendation-card strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-card small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.recommendation-card:only-child { grid-column: span 2; }
.pattern-panel, .result-panel { grid-template-rows: 55px minmax(0, 1fr); }
.performance-patterns, .performance-results { min-height: 0; overflow: auto; }
.performance-patterns article { min-width: 0; min-height: 49px; display: grid; grid-template-columns: 23px minmax(0, 1fr) 42px; align-items: center; gap: 8px; padding: 6px 11px; border-bottom: 1px solid #222626; }
.performance-patterns article > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--muted); font-size: 8px; font-weight: 900; }
.performance-patterns article > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 8px; }
.performance-patterns strong { font-size: 9px; }
.performance-patterns small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.performance-patterns i { grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 2px; background: #292d2d; }
.performance-patterns i b { display: block; height: 100%; background: var(--accent); }
.performance-patterns em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 900; text-align: right; }
.performance-result { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 38px auto 29px; align-items: center; gap: 7px; padding: 6px 10px; border-bottom: 1px solid #222626; }
.platform-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: 8px; font-weight: 900; }
.performance-result > div { min-width: 0; display: grid; gap: 2px; }
.performance-result > div strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.performance-result > div small { color: var(--muted); font-size: 7px; }
.performance-result > em { color: var(--green); font-size: 9px; font-style: normal; font-weight: 900; text-align: right; }
.performance-result .icon-button { width: 29px; height: 29px; }
.performance-form { grid-template-rows: 55px minmax(0, 1fr); }
.performance-form > div { min-height: 0; display: grid; align-content: start; gap: 6px; padding: 8px 10px; overflow: hidden; }
.performance-form .field-label + .field-label { margin-top: 0; }
.performance-form .field-label { gap: 3px; font-size: 8px; }
.performance-form .field-label input:not([type="range"]), .performance-form .field-label select { height: 32px; padding-inline: 7px; font-size: 9px; }
.performance-form .primary-button { min-height: 34px; }

/* X source workspace */
.x-stealer-view.active { display: grid; grid-template-rows: 66px minmax(0, 1fr); }
.x-stealer-toolbar { padding-inline: 2px; }
.watermark-lock { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(83,252,24,.24); border-radius: 6px; background: rgba(83,252,24,.06); color: #c9eac0; font-size: 10px; font-weight: 800; }
.watermark-lock svg { width: 14px; height: 14px; color: var(--green); }
.x-stealer-shell { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(560px, 1fr) 350px; gap: 12px; padding-top: 12px; }
.x-source-panel, .x-setup-panel { min-width: 0; min-height: 0; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); background: #161919; overflow: hidden; }
.x-source-panel { display: grid; grid-template-rows: 58px 54px minmax(0, 1fr) 64px; }
.x-source-url { min-width: 0; display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 9px 11px 0; padding: 0 5px 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: #101212; color: var(--muted); }
.x-source-url:focus-within { border-color: rgba(177,76,255,.72); box-shadow: 0 0 0 2px var(--accent-soft); }
.x-source-url > svg { width: 17px; height: 17px; }
.x-source-url input { min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.x-source-url .primary-button { min-height: 38px; }
.x-player-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.x-player-head > div { min-width: 0; display: grid; gap: 3px; }
.x-player-head span { color: var(--accent-strong); font-size: 10px; font-weight: 900; }
.x-player-head strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.x-player-head .icon-button { width: 32px; height: 32px; }
.x-player-stage { min-width: 0; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; background-color: #080a0a; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; }
.x-player-stage video { display: none; width: 100%; height: 100%; min-width: 0; min-height: 0; position: absolute; inset: 0; object-fit: contain; object-position: center; background: #000; }
.x-player-stage.has-video video { display: block; }
.x-player-empty, .x-player-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; }
.x-player-stage.has-video .x-player-empty { display: none; }
.x-player-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #3b3f40; border-radius: 8px; background: #101313; color: #fff; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 22px; box-shadow: 0 14px 34px rgba(0,0,0,.34); }
.x-player-empty strong, .x-player-loading strong { font-size: 13px; }
.x-player-empty small, .x-player-loading small { max-width: 330px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.x-player-loading { z-index: 3; background: rgba(8,10,10,.94); }
.x-player-loading i { width: 32px; height: 32px; border: 3px solid #2a2e2e; border-top-color: var(--accent); border-radius: 50%; animation: x-source-spin .75s linear infinite; }
@keyframes x-source-spin { to { transform: rotate(360deg); } }
.x-source-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #121414; }
.x-source-facts > span { min-width: 0; display: grid; align-content: center; gap: 4px; padding: 9px 12px; border-right: 1px solid var(--line); }
.x-source-facts > span:last-child { border-right: 0; }
.x-source-facts small { color: var(--muted); font-size: 9px; }
.x-source-facts strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.x-setup-panel { display: grid; grid-template-rows: 56px minmax(0, 1fr) 62px; }
.x-setup-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.x-setup-panel > header > div { display: grid; gap: 3px; }
.x-setup-panel h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 15px; }
.x-setup-body { min-height: 0; display: grid; align-content: start; gap: 6px; padding: 8px 12px; overflow: hidden; }
.x-setup-body > .field-label + .field-label { margin-top: 0; }
.x-setup-body .field-label { gap: 4px; font-size: 9px; }
.x-setup-body .field-label > em { position: absolute; top: 0; right: 0; color: var(--muted); font-size: 8px; font-style: normal; font-weight: 600; }
.x-setup-body .field-label input:not([type="range"]), .x-setup-body .field-label select { height: 35px; }
.x-setup-body .field-label textarea { min-height: 56px; max-height: 56px; padding: 7px 9px 18px; }
.x-format-segment { width: 100%; height: 40px; }
.x-format-segment button { flex: 1; padding-inline: 8px; }
.x-brand-banner-row { min-width: 0; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 7px; }
.x-brand-banner-row .field-label + .field-label { margin-top: 0; }
.x-brand-banner-row select { min-width: 0; padding-inline: 7px !important; font-size: 9px !important; }
.x-setting-hint { margin: -3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.x-trim-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 35px; align-items: end; }
.x-trim-row .icon-button { width: 35px; height: 35px; }
.x-locked-setting { min-width: 0; min-height: 45px; display: grid; grid-template-columns: 29px minmax(0, 1fr) 16px; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid rgba(83,252,24,.2); border-radius: 6px; background: rgba(83,252,24,.055); }
.x-locked-setting > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 5px; background: rgba(83,252,24,.1); color: var(--green); }
.x-locked-setting > span svg { width: 16px; height: 16px; }
.x-locked-setting > div { min-width: 0; display: grid; gap: 2px; }
.x-locked-setting strong { font-size: 10px; }
.x-locked-setting small { color: #9eb19c; font-size: 8px; line-height: 1.35; }
.x-lock-icon { width: 14px; height: 14px; color: var(--green); }
.x-setup-panel > footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #121414; }
.x-setup-panel > footer .primary-button { flex: 1; min-height: 40px; }
.x-setup-panel > footer .secondary-button { min-height: 40px; }

/* X scheduling and analytics */
.x-autopost-view.active { display: grid; grid-template-rows: minmax(0, 1fr); }
.x-autopost-view > .view-toolbar { display: none; }
.x-autopost-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 58px minmax(0, 1fr); gap: 9px; }
.x-autopost-bar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #121515; }
.x-studio-tabs { min-width: 0; display: flex; align-items: stretch; gap: 5px; }
.x-studio-tabs > div { min-width: 0; height: 42px; position: relative; display: flex; align-items: end; gap: 2px; padding-top: 12px; }
.x-studio-tabs > div > span { position: absolute; top: 0; left: 7px; color: var(--muted-2); font-size: 7px; font-weight: 900; text-transform: uppercase; }
.x-studio-tabs button { min-width: 68px; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 850; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.x-studio-tabs button svg { width: 13px; height: 13px; }
.x-studio-tabs button:hover { border-color: var(--line); background: #1a1d1d; color: var(--text); }
.x-studio-tabs button.active { border-color: rgba(177,76,255,.48); background: rgba(177,76,255,.13); color: #f2e4ff; box-shadow: inset 0 -2px 0 var(--accent); }
.x-connection-badge { min-width: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.x-connection-badge i { width: 8px; height: 8px; border-radius: 50%; background: #5c6469; box-shadow: 0 0 0 4px rgba(92,100,105,.1); }
.x-connection-badge.ready { color: #cdecc4; }
.x-connection-badge.ready i { background: var(--green); box-shadow: 0 0 0 4px rgba(83,252,24,.11); }
.x-connection-badge.failed { color: #ffadb4; }
.x-connection-badge.failed i { background: var(--red); box-shadow: 0 0 0 4px rgba(255,82,96,.1); }
.x-autopost-panel { display: none; min-width: 0; min-height: 0; height: 100%; }
.x-autopost-panel.active { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 10px; animation: view-in .16s ease both; }
.x-autopost-panel[data-x-autopost-panel="optimize"].active { grid-template-columns: minmax(0, 1fr); }
.x-autopost-compose, .x-autopost-queue, .x-tracker-lookup, .x-tracker-report { min-width: 0; min-height: 0; display: grid; }
.x-autopost-compose { grid-template-rows: 56px auto minmax(0, 1fr) 58px; }
.x-autopost-compose > header, .x-autopost-queue > header, .x-tracker-lookup > header, .x-tracker-report > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.x-autopost-compose > header > div, .x-autopost-queue > header > div, .x-tracker-lookup > header > div, .x-tracker-report > header > div { min-width: 0; display: grid; gap: 3px; }
.x-autopost-compose h2, .x-autopost-queue h2, .x-tracker-lookup h2, .x-tracker-report h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 14px; }
.x-connection-guide { display: none; margin: 7px 10px 0; padding: 8px 9px; border: 1px solid #624518; border-radius: 6px; background: #21180b; color: #ead6a9; }
.x-connection-guide.visible { display: grid; gap: 5px; }
.x-connection-guide > strong { font-size: 11px; }
.x-connection-guide > p { margin: 0; color: #c5b184; font-size: 9px; line-height: 1.45; }
.x-connection-guide details { display: grid; gap: 6px; }
.x-connection-guide summary { color: #d5a4ff; font-size: 9px; font-weight: 900; cursor: pointer; }
.x-connection-guide ol { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: #d9c79d; font-size: 9px; line-height: 1.35; }
.x-connection-guide code { padding: 1px 4px; border-radius: 3px; background: #090b0c; color: #fff; }
.x-connection-guide a { color: #d5a4ff; font-weight: 800; }
.x-autopost-form { min-height: 0; display: grid; align-content: start; gap: 6px; padding: 8px 11px; overflow: auto; }
.x-autopost-form .field-label + .field-label { margin-top: 0; }
.x-autopost-form .field-label { gap: 3px; font-size: 9px; }
.x-autopost-form .field-label input:not([type="range"]), .x-autopost-form .field-label select { height: 32px; }
.x-autopost-form textarea { min-height: 56px; resize: none; }
.x-autopost-compose > footer { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; padding: 9px 11px; border-top: 1px solid var(--line); background: #121414; }
.x-autopost-compose > footer button { min-height: 39px; }
.x-autopost-queue { grid-template-rows: 56px minmax(0, 1fr); }
.x-schedule-list { min-height: 0; display: grid; align-content: start; gap: 7px; padding: 9px; overflow: auto; }
.x-schedule-row { min-width: 0; display: grid; grid-template-columns: 43px minmax(150px, 1fr) minmax(110px, .45fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #101313; }
.x-schedule-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: #191c1d; color: var(--muted); }
.x-schedule-icon svg { width: 18px; height: 18px; }
.x-schedule-copy, .x-schedule-time { min-width: 0; display: grid; gap: 3px; }
.x-schedule-copy > span { display: flex; align-items: center; gap: 7px; }
.x-schedule-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.x-schedule-copy small, .x-schedule-time small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-schedule-time strong { font-size: 10px; }
.x-schedule-progress { height: 3px; overflow: hidden; border-radius: 2px; background: #272b2c; }
.x-schedule-progress b { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.x-schedule-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.x-schedule-actions .icon-button { width: 31px; height: 31px; }
.status-chip.scheduled { color: #d6c6ff; border-color: #62468c; background: #1d142b; }
.status-chip.uploading { color: #9fd8ff; border-color: #28547b; background: #0f1e2c; }
.status-chip.published { color: var(--green); border-color: #276f24; background: #0f2110; }
.status-chip.cancelled { color: var(--muted); }
.x-autopost-panel[data-x-autopost-panel="tracker"].active { grid-template-columns: 286px minmax(0, 1fr); gap: 12px; }
.x-tracker-lookup { grid-template-rows: 60px auto 35px minmax(0, 1fr); align-content: start; overflow: hidden; }
.x-tracker-live { display: inline-flex; align-items: center; gap: 6px; color: #ccefc3; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.x-tracker-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.x-tracker-lookup-body { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.x-tracker-search { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding-left: 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #0b0d0e; color: var(--muted); font-weight: 900; transition: border-color .16s ease, box-shadow .16s ease; }
.x-tracker-search:focus-within { border-color: rgba(177,76,255,.78); box-shadow: 0 0 0 3px var(--accent-soft); }
.x-tracker-search input { min-width: 0; height: 43px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 750; }
.x-tracker-search button { min-height: 35px; margin-right: 4px; }
.x-tracker-lookup-body > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.48; }
.x-tracker-integrity { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px; border: 1px solid rgba(83,252,24,.2); border-radius: 6px; background: rgba(83,252,24,.055); }
.x-tracker-integrity > svg { width: 18px; height: 18px; justify-self: center; color: var(--green); }
.x-tracker-integrity > span { min-width: 0; display: grid; gap: 2px; }
.x-tracker-integrity strong { font-size: 10px; }
.x-tracker-integrity small { color: #aabda6; font-size: 9px; line-height: 1.35; }
.x-tracker-saved-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px; }
.x-tracked-accounts { min-height: 0; display: grid; align-content: start; gap: 7px; padding: 7px 11px 11px; overflow: auto; }
.x-tracked-account { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #101313; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.x-tracked-account:hover { border-color: var(--line-strong); background: #171a1a; transform: translateY(-1px); }
.x-tracked-account.selected { border-color: rgba(177,76,255,.55); background: rgba(177,76,255,.08); box-shadow: inset 3px 0 0 var(--accent); }
.x-tracked-account img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: #25292a; }
.x-tracked-account > span { min-width: 0; display: grid; gap: 3px; }
.x-tracked-account strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracked-account small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracked-account .icon-button { width: 29px; height: 29px; }
.x-tracker-report { min-width: 0; min-height: 0; display: grid; grid-template-rows: 62px minmax(0, 1fr); gap: 9px; }
.x-tracker-report > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #141717; }
.x-tracker-profile { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; }
.x-tracker-profile > img, .x-tracker-avatar-fallback { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; background: #25292a; }
.x-tracker-avatar-fallback { display: grid; place-items: center; color: var(--accent); font-family: "StreamPal UI", "Arial Black", sans-serif; }
.x-tracker-profile > span { min-width: 0; display: grid; gap: 3px; }
.x-tracker-profile-title { min-width: 0; display: flex; align-items: center; gap: 6px; }
.x-tracker-profile-title strong { overflow: hidden; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-profile-title i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #071018; }
.x-tracker-profile-title i svg { width: 10px; height: 10px; stroke-width: 3; }
.x-tracker-profile small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-header-actions { display: flex; align-items: center; gap: 7px; }
.x-data-status { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); font-size: 9px; font-weight: 900; white-space: nowrap; }
.x-data-status svg { width: 14px; height: 14px; }
.x-data-status.verified { border-color: rgba(83,252,24,.28); background: var(--green-soft); color: #cff5c5; }
.x-data-status.estimated { border-color: rgba(255,199,68,.3); background: rgba(255,199,68,.08); color: #ffe2a0; }
.x-data-status.limited { border-color: rgba(255,92,103,.3); background: rgba(255,92,103,.08); color: #ffb6bb; }
.x-tracker-content { min-width: 0; min-height: 0; display: grid; grid-template-rows: 102px minmax(0, 1fr); gap: 9px; overflow: hidden; }
.x-tracker-content > .drawer-empty { grid-row: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); background: #131616; }
.x-tracker-summary { min-width: 0; display: grid; grid-template-columns: minmax(170px, 1.6fr) repeat(4, minmax(80px, 1fr)); gap: 7px; }
.x-tracker-summary article { min-width: 0; display: grid; align-content: center; gap: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: #131616; }
.x-tracker-summary article > span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-summary article > strong { overflow: hidden; font-size: 19px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-tracker-summary article > small { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-summary .x-tracker-primary-metric { position: relative; border-color: rgba(83,252,24,.28); background: #101810; box-shadow: inset 3px 0 0 var(--green); }
.x-tracker-primary-metric > span { display: flex; align-items: center; gap: 6px; color: #b8d9b0 !important; }
.x-tracker-primary-metric > span svg { width: 14px; height: 14px; color: var(--green); }
.x-tracker-summary .x-tracker-primary-metric > strong { color: #f1ffed; font-size: 27px; }
.x-tracker-dashboard { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(270px, .9fr) minmax(310px, 1.1fr); gap: 9px; }
.x-tracker-analysis-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(110px, .9fr) minmax(127px, 1.1fr); gap: 9px; }
.x-tracker-daily-card, .x-tracker-breakdown, .x-tracker-posts { min-width: 0; min-height: 0; display: grid; border: 1px solid var(--line); border-radius: 7px; background: #131616; overflow: hidden; }
.x-tracker-daily-card { grid-template-rows: 34px minmax(40px, 1fr) 33px; }
.x-tracker-breakdown, .x-tracker-posts { grid-template-rows: 36px minmax(0, 1fr); }
.x-tracker-daily-card > header, .x-tracker-breakdown > header, .x-tracker-posts > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 9px; border-bottom: 1px solid var(--line); }
.x-tracker-daily-card > header > span:first-child, .x-tracker-breakdown > header > span:first-child, .x-tracker-posts > header > span:first-child { min-width: 0; display: grid; gap: 2px; }
.x-tracker-daily-card header strong, .x-tracker-breakdown header strong, .x-tracker-posts header strong { font-size: 10px; }
.x-tracker-daily-card header small, .x-tracker-breakdown header small, .x-tracker-posts header small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-quality-chip, .x-tracker-breakdown > header > span:last-child { display: inline-flex; align-items: center; gap: 5px; color: #b9c3b6; font-size: 8px; font-weight: 900; white-space: nowrap; }
.x-quality-chip svg { width: 13px; height: 13px; color: var(--green); }
.x-daily-chart { min-width: 0; min-height: 0; display: flex; align-items: stretch; gap: 4px; padding: 4px 9px 2px; }
.x-daily-column { min-width: 0; flex: 1; display: grid; grid-template-rows: 11px minmax(24px, 1fr) 10px; align-items: end; text-align: center; }
.x-daily-column > span { overflow: hidden; color: var(--muted); font-size: 7px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.x-daily-column > i { width: 100%; height: 100%; position: relative; display: block; border-bottom: 1px solid #313737; }
.x-daily-column > i b { width: min(15px, 70%); min-height: 2px; position: absolute; bottom: 0; left: 50%; border-radius: 3px 3px 0 0; background: #52605a; transform: translateX(-50%); transition: height .2s ease, background .2s ease; }
.x-daily-column:hover > i b { background: var(--green); }
.x-daily-column.best > i b { background: var(--accent); }
.x-daily-column.best > span { color: #dfb7ff; }
.x-daily-column > small { overflow: hidden; padding-top: 3px; color: var(--muted-2); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-daily-card > footer { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 7px; padding: 4px 9px; border-top: 1px solid var(--line); background: rgba(83,252,24,.035); }
.x-tracker-daily-card > footer > svg { width: 15px; height: 15px; color: var(--green); }
.x-tracker-daily-card > footer > span { min-width: 0; display: grid; gap: 1px; }
.x-tracker-daily-card > footer strong { font-size: 9px; }
.x-tracker-daily-card > footer small { overflow: hidden; color: #9bab96; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-streamer-list, .x-tracker-post-list { min-height: 0; display: grid; align-content: start; gap: 4px; padding: 5px; overflow: hidden; }
.x-tracker-streamer-row { min-width: 0; min-height: 22px; display: grid; grid-template-columns: minmax(82px, 1fr) minmax(62px, 1.25fr) auto; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 5px; background: #191c1c; }
.x-tracker-streamer-row > span { min-width: 0; display: grid; gap: 1px; }
.x-tracker-streamer-row strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-streamer-row small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-streamer-row > i { height: 4px; overflow: hidden; border-radius: 2px; background: #292d2e; }
.x-tracker-streamer-row > i b { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.x-tracker-streamer-row em { color: #d8e9d3; font-size: 9px; font-style: normal; font-weight: 900; }
.x-tracker-post-list { gap: 5px; padding: 6px 7px; }
.x-tracker-post-row { min-width: 0; min-height: 44px; display: grid; grid-template-columns: 18px 36px minmax(0, 1fr) auto 28px; align-items: center; gap: 6px; padding: 4px 5px; border: 1px solid transparent; border-radius: 6px; background: #191c1c; transition: border-color .15s ease, background .15s ease; }
.x-tracker-post-row:hover { border-color: var(--line-strong); background: #1d2121; }
.x-post-rank { color: var(--muted-2); font-size: 9px; font-weight: 900; text-align: center; }
.x-tracker-post-row > img, .x-post-media-fallback { width: 36px; height: 32px; border-radius: 5px; object-fit: cover; background: #242929; }
.x-post-media-fallback { display: grid; place-items: center; color: var(--muted); }
.x-post-media-fallback svg { width: 15px; height: 15px; }
.x-tracker-post-row > div { min-width: 0; display: grid; gap: 3px; }
.x-tracker-post-row strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-post-row small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-tracker-post-row em { color: #f0ffe9; font-size: 10px; font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
.x-tracker-post-row .icon-button { width: 28px; height: 28px; }
.x-tracker-mini-empty { min-height: 64px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px; color: var(--muted); }
.x-tracker-mini-empty > svg { width: 20px; height: 20px; }
.x-tracker-mini-empty > span { display: grid; gap: 2px; }
.x-tracker-mini-empty strong { color: var(--text); font-size: 10px; }
.x-tracker-mini-empty small { font-size: 8px; }

/* X Optimize Lab */
.x-optimize-shell { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: 64px 46px 66px minmax(0, 1fr); gap: 8px; }
.x-optimize-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #121515; }
.x-optimize-head > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 10px; row-gap: 2px; }
.x-optimize-head h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 15px; }
.x-optimize-head p { grid-column: 1 / -1; margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-head > label { min-width: 220px; display: grid; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.x-optimize-head select { width: 100%; height: 34px; }
.x-optimize-url { background: #0d1010; }
.x-optimize-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.x-optimize-metrics article { min-width: 0; display: grid; align-content: center; gap: 3px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #121515; }
.x-optimize-metrics article:first-child { border-color: rgba(83,252,24,.24); box-shadow: inset 3px 0 0 var(--green); }
.x-optimize-metrics span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.x-optimize-metrics strong { overflow: hidden; font-size: 19px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-optimize-metrics strong.clear { color: var(--green); }
.x-optimize-metrics strong.warning { color: var(--yellow); }
.x-optimize-metrics small { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(245px, .72fr) minmax(390px, 1.18fr) minmax(270px, .85fr); gap: 8px; }
.x-optimize-post { min-width: 0; min-height: 0; display: grid; grid-template-rows: 68px 68px minmax(0, 1fr) 48px; align-content: start; }
.x-optimize-post > header { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.x-optimize-post > header > img, .x-optimize-post > header > span { width: 62px; height: 52px; border-radius: 5px; object-fit: cover; background: #252929; }
.x-optimize-post > header > span { display: grid; place-items: center; color: var(--muted); }
.x-optimize-post > header > div { min-width: 0; display: grid; gap: 3px; }
.x-optimize-post > header strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.x-optimize-post > header small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-post-score { min-width: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(83,252,24,.035); }
.x-optimize-post-score > span { display: flex; align-items: baseline; }
.x-optimize-post-score > span strong { color: #eaffdf; font-size: 30px; line-height: 1; }
.x-optimize-post-score > span small { color: var(--muted); font-size: 8px; }
.x-optimize-post-score > div { min-width: 0; display: grid; gap: 2px; }
.x-optimize-post-score em { width: fit-content; padding: 2px 5px; border-radius: 3px; background: var(--green); color: #071006; font-size: 7px; font-style: normal; font-weight: 950; text-transform: uppercase; }
.x-optimize-post-score > div strong { font-size: 11px; }
.x-optimize-post-score > div small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-post-signals { min-height: 0; display: grid; align-content: center; gap: 5px; padding: 7px 9px; overflow: hidden; }
.x-optimize-post-signals > span { min-width: 0; display: grid; grid-template-columns: 4px minmax(0, 1fr) 24px; align-items: center; gap: 7px; }
.x-optimize-post-signals i { width: 4px; height: 24px; display: block; border-radius: 3px; background: linear-gradient(to top, var(--accent) var(--score), #292d2d var(--score)); }
.x-optimize-post-signals strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-post-signals small { color: #e5cefa; font-size: 9px; font-weight: 900; text-align: right; }
.x-optimize-post > footer { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 7px; padding: 6px 9px; border-top: 1px solid var(--line); background: #111414; }
.x-optimize-post > footer.recovered { background: rgba(83,252,24,.045); }
.x-optimize-post > footer > svg { width: 16px; height: 16px; color: var(--muted); }
.x-optimize-post > footer.recovered > svg { color: var(--green); }
.x-optimize-post > footer span { min-width: 0; display: grid; gap: 2px; }
.x-optimize-post > footer strong, .x-optimize-post > footer small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-post > footer small { color: var(--muted); }
.x-optimize-recuts { min-width: 0; min-height: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr) 45px; }
.x-optimize-recuts > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.x-optimize-recuts > header > div { display: grid; gap: 2px; }
.x-optimize-recuts h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 12px; }
.x-optimize-recut-list { min-height: 0; display: grid; align-content: start; gap: 4px; padding: 5px; overflow: auto; }
.x-optimize-recut { width: 100%; min-width: 0; min-height: 61px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 44px; align-items: center; gap: 7px; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; background: #191c1c; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.x-optimize-recut:hover { border-color: var(--line-strong); background: #1e2222; transform: translateX(2px); }
.x-optimize-recut.selected { border-color: rgba(83,252,24,.4); background: rgba(83,252,24,.055); box-shadow: inset 3px 0 0 var(--green); }
.x-optimize-recut-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; background: #272b2b; color: var(--muted); font-size: 9px; font-weight: 900; }
.x-optimize-recut.selected .x-optimize-recut-rank { background: var(--green); color: #071006; }
.x-optimize-recut > div { min-width: 0; display: grid; gap: 2px; }
.x-optimize-recut > div > span { display: flex; align-items: center; gap: 6px; }
.x-optimize-recut em { padding: 2px 4px; border-radius: 3px; background: rgba(177,76,255,.11); color: #dbb4ff; font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.x-optimize-recut > div > span small, .x-optimize-recut > div > small { color: var(--muted); font-size: 7px; }
.x-optimize-recut > div > strong { font-size: 10px; }
.x-optimize-recut p { margin: 0; overflow: hidden; color: #e5e7e3; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-recut > div > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-lift { display: grid; justify-items: end; gap: 2px; }
.x-optimize-lift strong { color: #e9ffdf; font-size: 16px; }
.x-optimize-lift small { padding: 2px 4px; border-radius: 3px; background: var(--green-soft); color: var(--green); font-size: 7px; font-weight: 900; }
.x-optimize-recuts > footer { display: grid; grid-template-columns: .85fr 1.15fr; gap: 6px; padding: 6px 7px; border-top: 1px solid var(--line); background: #111414; }
.x-optimize-recuts > footer button { min-height: 32px; padding-inline: 8px; font-size: 9px; }
.x-optimize-loading { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.x-optimize-loading i { width: 30px; height: 30px; border: 3px solid #2c3030; border-top-color: var(--green); border-radius: 50%; animation: x-source-spin .75s linear infinite; }
.x-optimize-loading strong { color: var(--text); font-size: 10px; }
.x-optimize-loading small { font-size: 8px; }
.x-optimize-intel { min-width: 0; min-height: 0; display: grid; grid-template-rows: 40px minmax(0, 1fr); }
.x-optimize-intel > header { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 5px; border-bottom: 1px solid var(--line); }
.x-optimize-intel > header button { min-width: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 8px; font-weight: 900; cursor: pointer; }
.x-optimize-intel > header button:hover { background: #202424; color: var(--text); }
.x-optimize-intel > header button.active { background: rgba(177,76,255,.15); color: #e7d0fb; }
#xOptimizeIntel { min-height: 0; overflow: hidden; }
.x-optimize-forecast, .x-optimize-dna, .x-optimize-lineage { min-height: 100%; display: grid; }
.x-optimize-forecast { grid-template-rows: 74px 58px minmax(0, 1fr); }
.x-optimize-forecast > section { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(83,252,24,.035); }
.x-optimize-forecast > section > span { display: grid; justify-items: center; }
.x-optimize-forecast > section > span strong { color: #e8ffdf; font-size: 24px; line-height: 1; }
.x-optimize-forecast > section > span small { color: var(--muted); font-size: 7px; }
.x-optimize-forecast > section > div { min-width: 0; display: grid; gap: 3px; }
.x-optimize-forecast > section > div strong { font-size: 13px; }
.x-optimize-forecast > section > div small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-forecast > div { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.x-optimize-forecast > div article { min-width: 0; display: grid; gap: 3px; padding: 8px 9px; border-right: 1px solid var(--line); }
.x-optimize-forecast > div article:last-child { border-right: 0; }
.x-optimize-forecast article span, .x-optimize-forecast article small { color: var(--muted); font-size: 7px; }
.x-optimize-forecast article strong { font-size: 12px; }
.x-optimize-forecast > footer { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 7px; padding: 8px 9px; }
.x-optimize-forecast > footer > svg { width: 17px; height: 17px; color: var(--green); }
.x-optimize-forecast > footer span { min-width: 0; display: grid; gap: 3px; }
.x-optimize-forecast > footer strong { font-size: 9px; }
.x-optimize-forecast > footer small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.x-optimize-forecast > footer em { width: fit-content; padding: 2px 5px; border-radius: 3px; background: var(--green-soft); color: var(--green); font-size: 7px; font-style: normal; font-weight: 900; }
.x-optimize-dna { grid-template-rows: 63px minmax(0, 1fr) auto; }
.x-optimize-dna > section { display: grid; gap: 3px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(177,76,255,.045); }
.x-optimize-dna > section strong { font-size: 11px; }
.x-optimize-dna > section small { color: var(--muted); font-size: 8px; }
.x-optimize-dna > div { min-height: 0; display: grid; align-content: start; }
.x-optimize-dna article { min-width: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 7px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.x-optimize-dna article span { color: var(--muted); font-size: 7px; }
.x-optimize-dna article strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-dna article small { grid-column: 2; color: var(--muted); font-size: 7px; }
.x-optimize-dna > footer { display: grid; gap: 5px; padding: 7px 9px; }
.x-optimize-dna > footer > span, .x-optimize-dna > footer > small { color: var(--muted); font-size: 7px; }
.x-optimize-dna > footer > div { display: flex; flex-wrap: wrap; gap: 4px; }
.x-optimize-dna > footer > div span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 4px; background: #222626; }
.x-optimize-dna > footer > div strong { font-size: 8px; }
.x-optimize-dna > footer > div small { color: var(--muted); font-size: 6px; }
.x-optimize-lineage { grid-template-rows: 68px minmax(0, 1fr); }
.x-optimize-lineage > section { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 9px; border-bottom: 1px solid var(--line); }
.x-optimize-lineage > section.clear { background: rgba(83,252,24,.04); }
.x-optimize-lineage > section.exact, .x-optimize-lineage > section.high { background: rgba(255,199,68,.055); }
.x-optimize-lineage > section > svg { width: 18px; height: 18px; color: var(--green); }
.x-optimize-lineage > section.exact > svg, .x-optimize-lineage > section.high > svg { color: var(--yellow); }
.x-optimize-lineage > section > div { min-width: 0; display: grid; gap: 2px; }
.x-optimize-lineage > section strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-lineage > section small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-lineage > div { min-height: 0; display: grid; align-content: start; padding: 5px; overflow: auto; }
.x-optimize-lineage article { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; align-items: center; gap: 6px; padding: 6px; border-bottom: 1px solid var(--line); }
.x-optimize-lineage article.current { background: rgba(177,76,255,.055); }
.x-optimize-lineage article > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; background: #272b2b; color: var(--muted); font-size: 8px; font-weight: 900; }
.x-optimize-lineage article > div { min-width: 0; display: grid; gap: 2px; }
.x-optimize-lineage article strong { font-size: 8px; }
.x-optimize-lineage article small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-optimize-lineage article a { color: var(--muted); }
.x-optimize-lineage article a svg { width: 14px; height: 14px; }

/* X intelligence */
.x-velocity-panel.active, .x-autopsy-panel.active, .x-source-finder-panel.active { grid-template-columns: minmax(0, 1fr); }
.x-velocity-shell, .x-autopsy-shell, .x-source-finder-shell { min-width: 0; min-height: 0; height: 100%; display: grid; gap: 8px; }
.x-velocity-shell { grid-template-rows: 64px 74px minmax(0, 1fr); }
.x-autopsy-shell, .x-source-finder-shell { grid-template-rows: 64px 46px minmax(0, 1fr); }
.x-intelligence-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #121515; }
.x-intelligence-toolbar > div:first-child { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 10px; row-gap: 2px; }
.x-intelligence-toolbar h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 15px; }
.x-intelligence-toolbar p { grid-column: 1 / -1; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-intelligence-toolbar > div:last-child { display: flex; align-items: end; gap: 7px; }
.x-intelligence-toolbar label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.x-intelligence-toolbar select { min-width: 160px; height: 34px; }
.x-intelligence-toolbar button { min-height: 34px; }
.x-intelligence-url { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 5px 6px 5px 11px; border: 1px solid var(--line); border-radius: 7px; background: #101313; transition: border-color .16s ease, box-shadow .16s ease; }
.x-intelligence-url:focus-within { border-color: rgba(177,76,255,.7); box-shadow: 0 0 0 3px var(--accent-soft); }
.x-intelligence-url > svg { width: 15px; height: 15px; color: var(--muted); }
.x-intelligence-url input { min-width: 0; height: 32px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.x-intelligence-url .primary-button { min-height: 34px; }
.x-intelligence-url .icon-button { width: 34px; height: 34px; }

.x-velocity-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.x-velocity-metrics article { min-width: 0; position: relative; display: grid; align-content: center; gap: 3px; padding: 9px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #121515; }
.x-velocity-metrics article:first-child { border-color: rgba(83,252,24,.25); box-shadow: inset 3px 0 0 var(--green); }
.x-velocity-metrics span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.x-velocity-metrics strong { overflow: hidden; font-size: 20px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-velocity-metrics article:first-child strong { color: #e8ffe2; }
.x-velocity-metrics small { overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-velocity-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(430px, 1.08fr); gap: 8px; }
.x-velocity-leaderboard { min-width: 0; min-height: 0; display: grid; grid-template-rows: 50px minmax(0, 1fr); overflow: hidden; }
.x-velocity-leaderboard > header, .x-source-finder-results > header, .x-autopsy-factors > header, .x-autopsy-actions-panel > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.x-velocity-leaderboard > header > div, .x-source-finder-results > header > div, .x-autopsy-factors > header > div, .x-autopsy-actions-panel > header > div { min-width: 0; display: grid; gap: 2px; }
.x-velocity-leaderboard h2, .x-source-finder-results h2, .x-autopsy-factors h2, .x-autopsy-actions-panel h2 { margin: 0; font-family: "StreamPal UI", "Arial Black", sans-serif; font-size: 12px; }
.x-velocity-list { min-height: 0; display: grid; align-content: start; gap: 4px; padding: 6px; overflow: auto; }
.x-velocity-row { width: 100%; min-width: 0; min-height: 52px; display: grid; grid-template-columns: 20px 45px minmax(100px, 1fr) auto 58px; align-items: center; gap: 7px; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; background: #181b1b; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.x-velocity-row:hover { border-color: var(--line-strong); background: #1d2121; transform: translateX(2px); }
.x-velocity-row.selected { border-color: rgba(83,252,24,.34); background: rgba(83,252,24,.055); box-shadow: inset 3px 0 0 var(--green); }
.x-velocity-rank { color: var(--muted-2); font-size: 9px; font-weight: 900; text-align: center; }
.x-velocity-row > img, .x-velocity-row > .x-post-media-fallback { width: 45px; height: 38px; border-radius: 5px; object-fit: cover; }
.x-velocity-row > span:nth-of-type(2) { min-width: 0; display: grid; gap: 3px; }
.x-velocity-row > span:nth-of-type(2) strong, .x-velocity-row > span:nth-of-type(2) small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-velocity-row > span:nth-of-type(2) strong { font-size: 9px; }
.x-velocity-row > span:nth-of-type(2) small { color: var(--muted); font-size: 8px; }
.x-velocity-row > em { color: #e8ffe2; font-size: 10px; font-style: normal; font-weight: 900; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-velocity-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 7px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.x-velocity-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.x-velocity-status.breakout { border-color: rgba(83,252,24,.4); background: rgba(83,252,24,.08); color: var(--green); }
.x-velocity-status.rising { border-color: rgba(67,173,255,.38); background: rgba(67,173,255,.08); color: #83caff; }
.x-velocity-status.steady { color: #c4caca; }
.x-velocity-status.slowing { border-color: rgba(255,199,68,.32); background: rgba(255,199,68,.06); color: #ffd773; }
.x-velocity-status.learning { border-color: rgba(177,76,255,.34); background: rgba(177,76,255,.07); color: #d5a4ff; }
.x-velocity-detail { min-width: 0; min-height: 0; display: grid; grid-template-rows: 59px 62px minmax(0, 1fr) 44px; overflow: hidden; }
.x-velocity-detail > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.x-velocity-focus-title { min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; }
.x-velocity-focus-title > img, .x-velocity-focus-title > span { width: 48px; height: 40px; border-radius: 5px; object-fit: cover; background: #242929; }
.x-velocity-focus-title > span { display: grid; place-items: center; color: var(--muted); }
.x-velocity-focus-title > div { min-width: 0; display: grid; gap: 4px; }
.x-velocity-focus-title > div > span { display: flex; align-items: center; gap: 7px; }
.x-velocity-focus-title > div > span small { color: var(--muted); font-size: 8px; }
.x-velocity-focus-title strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.x-velocity-focus-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #101313; }
.x-velocity-focus-metrics article { min-width: 0; display: grid; align-content: center; gap: 4px; padding: 8px 10px; border-right: 1px solid var(--line); }
.x-velocity-focus-metrics article:last-child { border-right: 0; }
.x-velocity-focus-metrics span { color: var(--muted); font-size: 8px; }
.x-velocity-focus-metrics strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-velocity-focus-metrics strong.positive { color: var(--green); }
.x-velocity-focus-metrics strong.negative { color: #ff8992; }
.x-velocity-chart { min-width: 0; min-height: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr); padding: 8px 10px 9px; }
.x-velocity-chart > header { min-width: 0; display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.x-velocity-chart > header > span:first-child { min-width: 0; display: grid; gap: 2px; }
.x-velocity-chart header strong { font-size: 10px; }
.x-velocity-chart header small, .x-velocity-chart > header > span:last-child { color: var(--muted); font-size: 8px; }
.x-velocity-chart > div { min-height: 0; display: flex; align-items: end; gap: 4px; padding: 7px 6px 0; border-bottom: 1px solid #343a3a; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 100% 33%; }
.x-velocity-chart > div > i { min-width: 3px; flex: 1; height: 100%; position: relative; }
.x-velocity-chart > div > i b { width: 100%; max-width: 18px; min-height: 3px; position: absolute; bottom: 0; left: 50%; border-radius: 3px 3px 0 0; background: var(--green); transform: translateX(-50%); }
.x-velocity-learning { flex: 1; align-self: stretch; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); }
.x-velocity-learning > svg { width: 20px; height: 20px; }
.x-velocity-learning > span { display: grid; gap: 2px; }
.x-velocity-learning strong { color: var(--text); font-size: 10px; }
.x-velocity-learning small { color: var(--muted); font-size: 8px; }
.x-velocity-detail > footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 6px 10px; border-top: 1px solid var(--line); background: #101313; }
.x-velocity-detail > footer button { min-height: 32px; }
.x-velocity-actions { display: flex; align-items: center; gap: 5px; }
.x-velocity-actions button { padding-inline: 8px; font-size: 9px; }
.x-velocity-detail > footer > span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.x-autopsy-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 8px; }
.x-autopsy-post { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto auto 42px; align-content: start; overflow: hidden; }
.x-autopsy-post > header { min-width: 0; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px; border-bottom: 1px solid var(--line); }
.x-autopsy-post > header > img, .x-autopsy-post > header > span { width: 68px; height: 56px; border-radius: 6px; object-fit: cover; background: #242929; }
.x-autopsy-post > header > span { display: grid; place-items: center; color: var(--muted); }
.x-autopsy-post > header > div { min-width: 0; display: grid; gap: 4px; }
.x-autopsy-post > header strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.x-autopsy-post > header small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-autopsy-score { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); background: rgba(83,252,24,.035); }
.x-autopsy-score > span { display: flex; align-items: baseline; }
.x-autopsy-score > span strong { color: #eaffdf; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.x-autopsy-score > span small { color: var(--muted); font-size: 9px; }
.x-autopsy-score > div { min-width: 0; display: grid; gap: 3px; }
.x-autopsy-score em { width: fit-content; padding: 3px 6px; border-radius: 4px; background: var(--green); color: #071006; font-size: 8px; font-style: normal; font-weight: 950; text-transform: uppercase; }
.x-autopsy-score > div strong { font-size: 12px; }
.x-autopsy-score > div small { color: var(--muted); font-size: 8px; }
.x-autopsy-benchmarks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.x-autopsy-benchmarks article { min-width: 0; display: grid; gap: 4px; padding: 9px 8px; border-right: 1px solid var(--line); }
.x-autopsy-benchmarks article:last-child { border-right: 0; }
.x-autopsy-benchmarks span, .x-autopsy-benchmarks small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-autopsy-benchmarks strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.x-autopsy-post > a { align-self: end; margin: 6px 9px; }
.x-autopsy-report { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(370px, 1.15fr) minmax(260px, .85fr); gap: 8px; }
.x-autopsy-report > .drawer-empty { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 7px; background: #121515; }
.x-autopsy-factors, .x-autopsy-actions-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: 50px minmax(0, 1fr); overflow: hidden; }
.x-autopsy-factors > div { min-height: 0; display: grid; align-content: start; gap: 3px; padding: 5px 6px; overflow: auto; }
.x-autopsy-factor { min-width: 0; min-height: 36px; display: grid; grid-template-columns: 27px minmax(0, 1fr) 28px; align-items: center; gap: 7px; padding: 3px 7px; border-radius: 6px; background: #191c1c; }
.x-autopsy-factor > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(177,76,255,.24); border-radius: 5px; background: rgba(177,76,255,.07); color: #d5a4ff; }
.x-autopsy-factor > span svg { width: 14px; height: 14px; }
.x-autopsy-factor > div { min-width: 0; display: grid; gap: 3px; }
.x-autopsy-factor strong, .x-autopsy-factor small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-autopsy-factor strong { font-size: 9px; }
.x-autopsy-factor small { color: var(--muted); font-size: 7px; }
.x-autopsy-factor i { height: 3px; overflow: hidden; border-radius: 2px; background: #2c3131; }
.x-autopsy-factor i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.x-autopsy-factor > em { color: #eee1ff; font-size: 10px; font-style: normal; font-weight: 900; text-align: center; }
.x-autopsy-actions-panel > div { min-height: 0; display: grid; align-content: start; gap: 6px; padding: 7px; overflow: auto; }
.x-autopsy-actions-panel > div > article { min-width: 0; display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #171a1a; }
.x-autopsy-actions-panel > div > article > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 5px; background: var(--green); color: #071006; font-size: 10px; font-weight: 950; }
.x-autopsy-actions-panel article > div { min-width: 0; display: grid; gap: 3px; }
.x-autopsy-actions-panel article strong { font-size: 9px; }
.x-autopsy-actions-panel article small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.x-autopsy-actions-panel > footer { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px 9px; border-top: 1px solid var(--line); background: rgba(83,252,24,.035); }
.x-autopsy-actions-panel > footer svg { width: 16px; height: 16px; color: var(--green); }
.x-autopsy-actions-panel > footer span { min-width: 0; display: grid; gap: 2px; }
.x-autopsy-actions-panel > footer strong, .x-autopsy-actions-panel > footer small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.x-autopsy-actions-panel > footer small { color: var(--muted); }

.x-source-finder-workspace { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(300px, .72fr) minmax(460px, 1.28fr); gap: 8px; }
.x-source-finder-preview { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(130px, 1fr) auto 48px; overflow: hidden; }
.x-source-finder-preview > video { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #050606; }
.x-source-preview-copy { min-width: 0; display: grid; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); }
.x-source-preview-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 5px; background: #0d1010; }
.x-source-preview-switch button { min-height: 25px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: 8px; font-weight: 900; cursor: pointer; }
.x-source-preview-switch button:hover:not(:disabled) { background: #202424; color: var(--text); }
.x-source-preview-switch button.active { border-color: rgba(83,252,24,.28); background: rgba(83,252,24,.08); color: #dfffd6; }
.x-source-preview-switch button:disabled { opacity: .35; cursor: not-allowed; }
.x-source-preview-copy > span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-source-preview-copy strong { color: #d7b0ff; font-size: 9px; }
.x-source-preview-copy small { color: var(--muted); font-size: 8px; }
.x-source-preview-copy p { margin: 0; overflow: hidden; color: #dce1df; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.x-source-coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #101313; }
.x-source-coverage > span { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 6px 8px; border-right: 1px solid var(--line); }
.x-source-coverage > span:last-child { border-right: 0; }
.x-source-coverage strong { font-size: 11px; }
.x-source-coverage small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.x-source-finder-results { min-width: 0; min-height: 0; display: grid; grid-template-rows: 50px minmax(0, 1fr); overflow: hidden; }
.x-source-result-list { min-height: 0; display: grid; align-content: start; gap: 5px; padding: 6px; overflow: auto; }
.x-source-result { min-width: 0; min-height: 64px; display: grid; grid-template-columns: 72px minmax(150px, 1fr) 42px auto; align-items: center; gap: 8px; padding: 6px; border: 1px solid transparent; border-radius: 6px; background: #181b1b; transition: border-color .15s ease, background .15s ease; }
.x-source-result:hover { border-color: rgba(177,76,255,.38); background: #1d2020; }
.x-source-result.selected { border-color: rgba(83,252,24,.42); background: rgba(83,252,24,.045); box-shadow: inset 3px 0 0 var(--green); }
.x-source-result > img, .x-source-result > .x-post-media-fallback { width: 72px; height: 50px; border-radius: 5px; object-fit: cover; }
.x-source-result > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.x-source-result > div:nth-child(2) > span { display: flex; align-items: center; gap: 7px; }
.x-source-result em { padding: 2px 5px; border-radius: 3px; background: rgba(255,199,68,.1); color: #ffd773; font-size: 7px; font-style: normal; font-weight: 950; text-transform: uppercase; }
.x-source-result em.strong { background: rgba(83,252,24,.1); color: var(--green); }
.x-source-result > div:nth-child(2) > span small, .x-source-result > div:nth-child(2) > small { color: var(--muted); font-size: 7px; }
.x-source-result > div:nth-child(2) > strong, .x-source-result > div:nth-child(2) > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-source-result > div:nth-child(2) > strong { font-size: 9px; }
.x-source-result > div:nth-child(2) > i { height: 3px; overflow: hidden; border-radius: 2px; background: #2c3030; }
.x-source-result > div:nth-child(2) > i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.x-source-result > strong { color: #e7d3ff; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.x-source-result-actions { display: flex; align-items: center; gap: 5px; }
.x-source-result-actions .primary-button, .x-source-result-actions .secondary-button { min-height: 31px; padding-inline: 8px; font-size: 8px; }
.x-source-result-actions .icon-button { width: 31px; height: 31px; }
.x-source-scanning { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.x-source-scanning > span { width: 180px; height: 34px; position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #0d1010; }
.x-source-scanning > span i { width: 2px; height: 100%; position: absolute; top: 0; left: 0; background: var(--green); box-shadow: 0 0 14px var(--green); animation: x-source-scan 1.8s ease-in-out infinite; }
.x-source-scanning > span b { position: absolute; inset: 7px; background: repeating-linear-gradient(90deg, #252a2a 0 7px, transparent 7px 12px); opacity: .65; }
.x-source-scanning strong { color: var(--text); font-size: 11px; }
.x-source-scanning small { max-width: 320px; color: var(--muted); font-size: 8px; }
@keyframes x-source-scan { 0%, 100% { left: 0; } 50% { left: calc(100% - 2px); } }

.hidden { display: none !important; }

@media (max-width: 1180px) {
  .studio-grid { grid-template-columns: 235px minmax(280px, 1fr) 275px; }
  .x-stealer-shell { grid-template-columns: minmax(430px, 1fr) 320px; }
  .x-autopost-panel.active { grid-template-columns: 320px minmax(0, 1fr); }
  .x-autopost-panel[data-x-autopost-panel="tracker"].active { grid-template-columns: 270px minmax(0, 1fr); }
  .x-tracker-details { grid-template-columns: 1fr; }
  .global-search-wrap { width: 210px; }
  .global-search { width: 100%; }
  .radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radar-header { grid-template-columns: minmax(180px, 1fr) auto; }
  .radar-header-stats { display: none; }
  .newsroom-workspace { grid-template-columns: minmax(350px, .75fr) minmax(390px, 1fr); }
  .archive-searchbar { grid-template-columns: minmax(280px, 1fr) 130px 120px 125px; }
  .archive-workspace { grid-template-columns: minmax(480px, 1fr) 280px; }
  .stories-workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .autopilot-layout { grid-template-columns: 330px minmax(0, 1fr); }
  .autopilot-drafts { grid-template-columns: 1fr; }
  .performance-layout { grid-template-columns: minmax(0, 1fr) 315px; }
}

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding-inline: 9px; }
  .brand-mark { justify-content: center; padding-inline: 0; }
  .brand-mark > span:last-child, .nav-label, .nav-item span, .nav-item kbd, .nav-item b, .nav-group-toggle span, .nav-group-toggle b, .nav-group-toggle .chevron, .control-link span, .control-link .chevron, .service-state span { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-group-toggle { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-group-items { margin-left: 0; padding-left: 0; border-left: 0; }
  .control-link { grid-template-columns: 1fr; justify-items: center; }
  .service-state { justify-content: center; }
  .studio-grid { grid-template-columns: 235px minmax(300px, 1fr) 275px; }
  .global-search-wrap { width: 220px; }
  .global-search { width: 100%; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .app-shell { min-height: 100%; height: auto; display: block; }
  .sidebar { width: 100%; height: 58px; position: sticky; top: 0; z-index: 30; flex-direction: row; align-items: center; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-mark { width: 52px; height: 44px; border-bottom: 0; padding: 0; }
  .nav-stack { flex: 1; flex-direction: row; padding: 0; overflow-x: auto; }
  .nav-group { display: contents; }
  .nav-group-toggle { display: none; }
  .nav-group-items, .nav-group.open .nav-group-items { max-height: none; display: flex; flex: 0 0 auto; gap: 2px; margin: 0; padding: 0; overflow: visible; border: 0; opacity: 1; transform: none; }
  .nav-item { min-width: 42px; height: 42px; }
  .sidebar-footer { margin: 0; padding: 0; border: 0; }
  .service-state { display: none; }
  .control-link { width: 42px; min-height: 42px; }
  .workspace-shell { min-height: calc(100vh - 58px); display: block; }
  .topbar { height: 58px; padding-inline: 12px; }
  .global-search-wrap, .profile-button small { display: none; }
  .view-stack { min-height: calc(100vh - 116px); }
  .view { height: auto; min-height: calc(100vh - 140px); }
  .metric-strip { height: auto; grid-template-columns: 1fr 1fr; }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article { min-height: 78px; border-bottom: 1px solid var(--line); }
  .overview-grid, .studio-grid, .split-layout, .brands-layout, .analytics-grid, .settings-grid, .projects-layout { height: auto; grid-template-columns: 1fr; grid-template-rows: auto; }
  .x-stealer-view.active { display: block; }
  .x-stealer-shell { grid-template-columns: 1fr; }
  .x-source-panel { min-height: 620px; }
  .x-setup-panel { min-height: 600px; }
  .x-setup-body { overflow: auto; }
  .x-autopost-view.active { display: block; }
  .x-autopost-workspace { min-height: 840px; }
  .x-autopost-panel.active, .x-autopost-panel[data-x-autopost-panel="tracker"].active { grid-template-columns: 1fr; }
  .x-optimize-shell { height: auto; grid-template-rows: auto; }
  .x-optimize-head { align-items: flex-start; flex-direction: column; }
  .x-optimize-head > label { width: 100%; }
  .x-optimize-metrics { grid-template-columns: 1fr 1fr; }
  .x-optimize-workspace { grid-template-columns: 1fr; }
  .x-optimize-post, .x-optimize-recuts, .x-optimize-intel { min-height: 430px; }
  .x-autopost-compose, .x-tracker-lookup { min-height: 430px; }
  .x-autopost-queue, .x-tracker-report { min-height: 520px; }
  .x-tracker-content { overflow: visible; }
  .radar-view.active { display: block; }
  .newsroom-view.active { display: block; }
  .intelligence-shell { min-height: 900px; display: block; }
  .intelligence-tabs { overflow-x: auto; }
  .intelligence-tabs button { flex: 0 0 auto; }
  .intelligence-panels, .intelligence-panel { height: auto; min-height: 820px; }
  .intelligence-panel[data-intelligence-panel="desk"] { grid-template-rows: auto auto; }
  .newsroom-metrics { grid-template-columns: 1fr 1fr; }
  .newsroom-metrics > div:nth-child(2) { border-right: 0; }
  .newsroom-metrics > div { min-height: 68px; border-bottom: 1px solid var(--line); }
  .viral-summary { grid-template-columns: 1fr; gap: 10px; padding: 12px 0; }
  .viral-summary-copy { padding: 9px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .viral-threshold { min-width: 0; }
  .newsroom-workspace, .archive-workspace, .stories-workspace { grid-template-columns: 1fr; }
  .signal-feed, .archive-results-shell, .story-list-shell { min-height: 520px; }
  .newsroom-focus, .story-stage { min-height: 650px; }
  .archive-searchbar { grid-template-columns: 1fr 1fr; gap: 7px; padding: 9px 0; }
  .archive-searchbar > label { grid-column: 1 / -1; }
  .story-selection { min-height: 420px; }
  .stories-workspace { padding-bottom: 20px; }
  .radar-shell { min-height: 720px; grid-template-rows: 58px 54px auto; }
  .radar-header { grid-template-columns: 1fr; align-items: start; }
  .radar-header-actions { position: absolute; right: 24px; }
  .radar-grid { grid-template-columns: 1fr; grid-auto-rows: 270px; overflow: visible; }
  .overview-grid .panel { min-height: 270px; }
  .create-view.active { display: block; }
  .studio-toolbar { grid-template-columns: 1fr; margin-bottom: 10px; }
  .studio-grid { display: grid; }
  .studio-pane { min-height: 430px; }
  .canvas-pane { min-height: 680px; }
  .inspector-pane { min-height: 440px; }
  .clip-grid { height: auto; min-height: 600px; }
  .streamer-browser { height: auto; min-height: 700px; }
  .streamer-clips-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; overflow: visible; }
  .project-drawer { min-height: 480px; }
  .form-panel { min-height: 430px; }
  .analytics-grid .panel { min-height: 280px; }
  .settings-section { min-height: 360px; }
  .autopilot-view.active, .vod-view.active, .performance-view.active { display: block; }
  .feature-metrics { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
  .feature-metrics article { min-height: 65px; border-bottom: 1px solid var(--line); }
  .feature-metrics article:nth-child(2) { border-right: 0; }
  .autopilot-layout, .vod-layout, .performance-layout { grid-template-columns: 1fr; }
  .automation-console, .draft-console, .vod-browser, .vod-search-console, .performance-form { min-height: 520px; margin-bottom: 10px; }
  .performance-insights { min-height: 760px; grid-template-rows: auto 320px 320px; }
  .recommendation-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .x-studio-tabs button { min-width: 59px; padding-inline: 6px; }
  .x-optimize-workspace { grid-template-columns: minmax(220px, .68fr) minmax(340px, 1.2fr) minmax(235px, .82fr); }
  .x-velocity-workspace { grid-template-columns: minmax(330px, .86fr) minmax(390px, 1.14fr); }
  .x-autopsy-workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .x-autopsy-report { grid-template-columns: minmax(320px, 1.15fr) minmax(230px, .85fr); }
  .x-source-finder-workspace { grid-template-columns: minmax(270px, .7fr) minmax(420px, 1.3fr); }
  .x-tracker-summary { grid-template-columns: minmax(150px, 1.45fr) repeat(4, minmax(68px, 1fr)); }
  .x-tracker-summary .x-tracker-primary-metric > strong { font-size: 24px; }
  .x-tracker-dashboard { grid-template-columns: minmax(245px, .9fr) minmax(280px, 1.1fr); }
  .x-tracker-post-row { grid-template-columns: 16px 36px minmax(0, 1fr) auto 28px; gap: 5px; }
  .x-tracker-post-row > img, .x-post-media-fallback { width: 36px; height: 36px; }
}

@media (max-width: 900px) {
  .x-autopost-workspace { min-height: 1760px; }
  .x-autopost-bar { align-items: flex-start; flex-direction: column; }
  .x-studio-tabs { width: 100%; overflow-x: auto; }
  .x-studio-tabs > div { flex: 0 0 auto; }
  .x-velocity-shell, .x-autopsy-shell, .x-source-finder-shell { height: auto; grid-template-rows: auto; }
  .x-intelligence-toolbar { align-items: flex-start; flex-direction: column; }
  .x-intelligence-toolbar > div:last-child { width: 100%; }
  .x-intelligence-toolbar label { flex: 1; }
  .x-intelligence-toolbar select { width: 100%; }
  .x-velocity-metrics { grid-template-columns: 1fr 1fr; }
  .x-velocity-workspace, .x-autopsy-workspace, .x-autopsy-report, .x-source-finder-workspace { grid-template-columns: 1fr; }
  .x-velocity-leaderboard, .x-velocity-detail, .x-autopsy-post, .x-autopsy-factors, .x-autopsy-actions-panel, .x-source-finder-preview, .x-source-finder-results { min-height: 420px; }
  .x-autopsy-post { min-height: 340px; }
  .x-intelligence-url { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .x-intelligence-url .icon-button { grid-column: 3; }
  .x-tracker-lookup { min-height: 410px; }
  .x-tracker-report { min-height: 940px; grid-template-rows: 62px auto; }
  .x-tracker-content { grid-template-rows: auto auto; overflow: visible; }
  .x-tracker-summary { grid-template-columns: 1fr 1fr; grid-auto-rows: 92px; }
  .x-tracker-summary .x-tracker-primary-metric { grid-column: 1 / -1; }
  .x-tracker-dashboard { grid-template-columns: 1fr; }
  .x-tracker-analysis-column { min-height: 420px; grid-template-rows: 220px 190px; }
  .x-tracker-posts { min-height: 340px; }
  .x-tracker-streamer-list, .x-tracker-post-list { overflow: visible; }
}

@media (max-width: 520px) {
  .x-tracker-report > header { align-items: flex-start; }
  .x-data-status { max-width: 36px; padding-inline: 9px; overflow: hidden; font-size: 0; }
  .x-tracker-summary { grid-template-columns: 1fr; }
  .x-tracker-summary .x-tracker-primary-metric { grid-column: auto; }
  .x-tracker-post-row { grid-template-columns: 16px 36px minmax(0, 1fr) auto; }
  .x-tracker-post-row > em { grid-column: 3; }
  .x-tracker-post-row > .icon-button { grid-column: 4; grid-row: 1 / span 2; }
}
