:root {
  --bg: #07090d;
  --bg-elevated: #0b0e14;
  --surface: #11151d;
  --surface-2: #171c25;
  --surface-3: #202633;
  --text: #f4f6f8;
  --muted: #8b94a3;
  --line: rgb(255 255 255 / 9%);
  --line-strong: rgb(255 255 255 / 16%);
  --brand: #b8ff3d;
  --brand-ink: #10140a;
  --brand-soft: rgb(184 255 61 / 11%);
  --cyan: #61dfff;
  --violet: #8b7cff;
  --accent: #ff6d52;
  --warning: #ffc45c;
  --danger: #ff6b72;
  --shadow: 0 24px 70px rgb(0 0 0 / 32%);
  --radius: 22px;
  color-scheme: dark;
  font-family: Inter, Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.image-studio { margin-block: 20px; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.account-workspace { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; padding: 20px; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.account-workspace label { display: grid; gap: 8px; flex: 1 1 250px; min-width: 0; }
.account-workspace select { min-height: 44px; max-width: 100%; }
.account-workspace p { flex-basis: 100%; margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.threads-admin { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.threads-admin summary { min-height: 44px; cursor: pointer; }
.threads-admin label { display: grid; gap: 8px; margin-block: 16px; }
.threads-admin input { width: 100%; min-width: 0; }
.connection-account-note { color: var(--muted); }
.image-studio summary { cursor: pointer; min-height: 44px; font-weight: 650; }
.image-studio summary .pill { margin-left: 8px; }
.image-studio p, .image-studio small { color: var(--muted); overflow-wrap: anywhere; }
.image-studio label { display: grid; gap: 8px; min-width: 0; }
.image-studio input:not([type=checkbox]), .image-studio select, .image-studio textarea { width: 100%; min-height: 44px; }
.image-connection { margin-block: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.image-connection button { margin-top: 12px; }
.image-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.image-wide { grid-column: 1 / -1; }
.image-studio .image-consent { display: flex; align-items: start; padding-block: 8px; }
.image-consent input { width: 24px; height: 24px; flex-shrink: 0; }
.image-versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.image-versions figure { margin: 0; min-width: 0; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.image-versions img { display: block; width: 100%; height: 230px; object-fit: contain; border-radius: 8px; }
.image-versions figcaption { margin-block: 12px; }
.image-versions button { width: 100%; }
.image-studio [data-image-feedback]:not(:empty) { padding: 12px; border-left: 2px solid var(--brand); color: var(--text); }
@media (max-width: 600px) { .image-controls { grid-template-columns: minmax(0, 1fr); } .image-studio { padding: 14px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(circle at 78% 0%, rgb(97 223 255 / 8%), transparent 29rem),
    radial-gradient(circle at 8% 75%, rgb(139 124 255 / 7%), transparent 32rem),
    var(--bg);
  color: var(--text);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .22;
  background-image: linear-gradient(rgb(255 255 255 / 2.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 2.5%) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 10px 14px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-weight: 850; transform: translateY(-160%); transition: transform .18s ease; }
.skip-link:focus { transform: translateY(0); }
a { color: inherit; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgb(8 10 15 / 88%);
  backdrop-filter: blur(24px);
}
.sidebar::after {
  position: absolute;
  right: -130px;
  bottom: 10%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  content: "";
  background: var(--violet);
  opacity: .08;
  filter: blur(40px);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 13px; margin: 0 8px 38px; color: inherit; text-decoration: none; }
.brand-mark {
  position: relative;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(184 255 61 / 35%);
  border-radius: 14px;
  background: linear-gradient(145deg, #1b2512, #0c0f0b);
  box-shadow: inset 0 0 22px rgb(184 255 61 / 10%), 0 0 24px rgb(184 255 61 / 8%);
}
.brand-mark i { position: absolute; width: 22px; height: 7px; border: 2px solid var(--brand); border-radius: 99px; transform: rotate(-34deg); }
.brand-mark i:nth-child(1) { translate: -5px -7px; }
.brand-mark i:nth-child(2) { translate: 0 0; opacity: .78; }
.brand-mark i:nth-child(3) { translate: 5px 7px; opacity: .5; }
.brand strong { display: block; font-size: 15px; letter-spacing: .18em; }
.brand small { display: block; margin-top: 4px; color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
nav { display: grid; gap: 6px; }
.sidebar nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #8f98a6;
  text-decoration: none;
  transition: .2s ease;
}
.nav-link span { width: 21px; color: #596272; font-size: 13px; text-align: center; transition: .2s ease; }
.nav-link:hover { color: white; background: rgb(255 255 255 / 4%); }
.nav-link.is-active { border-color: rgb(184 255 61 / 13%); background: linear-gradient(90deg, rgb(184 255 61 / 13%), rgb(184 255 61 / 3%)); color: white; }
.nav-link.is-active span { color: var(--brand); text-shadow: 0 0 14px rgb(184 255 61 / 50%); }
.nav-link .nav-badge { min-width: 20px; height: 20px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #190508; font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-foot { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: auto; color: #858e9d; font-size: 12px; }
.provider-mini { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #444c58; box-shadow: 0 0 0 4px rgb(255 255 255 / 2%); }
.status-dot.on { background: var(--brand); box-shadow: 0 0 0 4px rgb(184 255 61 / 10%), 0 0 14px rgb(184 255 61 / 44%); }
.sidebar-foot small { margin-top: 5px; padding-top: 13px; border-top: 1px solid var(--line); color: #626b78; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

main { width: min(1540px, 100%); padding: 26px clamp(18px, 3.4vw, 54px) 72px; }
.topbar, .section-heading, .top-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar {
  position: relative;
  min-height: 245px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 38%, rgb(184 255 61 / 18%) 0 2%, transparent 2.5%),
    radial-gradient(circle at 86% 38%, transparent 0 13%, rgb(184 255 61 / 10%) 13.2% 13.6%, transparent 13.9%),
    radial-gradient(circle at 86% 38%, transparent 0 23%, rgb(97 223 255 / 9%) 23.2% 23.6%, transparent 23.9%),
    linear-gradient(128deg, #151a23 0%, #0f1219 56%, #111a18 100%);
  box-shadow: var(--shadow);
}
.topbar::before {
  position: absolute;
  top: 29%;
  right: 6.2%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  content: "";
  background: var(--brand);
  box-shadow: 0 0 28px 12px rgb(184 255 61 / 24%);
}
.topbar > div { position: relative; z-index: 1; }
.top-actions { align-self: flex-start; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 13px; font-size: clamp(36px, 5vw, 66px); line-height: .98; letter-spacing: -.062em; }
h1 span { color: #777f8c; }
h2 { margin-bottom: 0; font-size: clamp(20px, 2vw, 25px); letter-spacing: -.035em; }
h3 { margin-bottom: 8px; letter-spacing: -.018em; }
.hero-copy { max-width: 670px; margin-bottom: 0; color: #939baa; font-size: 15px; line-height: 1.55; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.hero-tags span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; background: rgb(255 255 255 / 3%); color: #aab1bc; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow { margin-bottom: 8px; color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; width: fit-content; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; background: rgb(255 255 255 / 4%); color: #9da5b2; font-size: 11px; font-weight: 800; }
.pill.success { border-color: rgb(184 255 61 / 18%); background: var(--brand-soft); color: var(--brand); }
.pill.warning { border-color: rgb(255 196 92 / 18%); background: rgb(255 196 92 / 10%); color: var(--warning); }
.pill.danger { border-color: rgb(255 107 114 / 18%); background: rgb(255 107 114 / 10%); color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card, .panel { border: 1px solid var(--line); background: linear-gradient(150deg, rgb(20 24 33 / 96%), rgb(14 17 24 / 96%)); box-shadow: 0 16px 50px rgb(0 0 0 / 17%); }
.stat-card { position: relative; min-height: 142px; display: grid; align-content: space-between; padding: 19px; overflow: hidden; border-radius: 18px; }
.stat-card::after { position: absolute; right: -20px; bottom: -34px; width: 95px; height: 95px; border-radius: 50%; content: ""; background: var(--card-glow, var(--brand)); opacity: .06; filter: blur(3px); }
.stat-card:nth-child(2) { --card-glow: var(--cyan); }
.stat-card:nth-child(3) { --card-glow: var(--violet); }
.stat-card:nth-child(4) { --card-glow: var(--accent); }
.stat-card > span, .stat-card small { color: var(--muted); }
.stat-card > span { font-size: 12px; font-weight: 700; }
.stat-card strong { font-size: 38px; line-height: 1; letter-spacing: -.055em; }
.stat-card small { font-size: 11px; }
.meter { height: 3px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--brand)); box-shadow: 0 0 10px var(--brand); }

.workspace { display: grid; grid-template-columns: minmax(330px, .76fr) minmax(410px, 1.24fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: clamp(19px, 2.3vw, 28px); border-radius: var(--radius); margin-bottom: 18px; }
.section-heading { margin-bottom: 20px; align-items: flex-start; }
.section-note { max-width: 860px; margin: -8px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
form { display: grid; gap: 15px; }
label, legend { color: #858e9d; font-size: 11px; font-weight: 800; letter-spacing: .025em; }
textarea, select, input:not([type]), input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="email"], input[type="number"], input[type="datetime-local"] {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0e14;
  color: var(--text);
  outline: none;
  transition: .2s ease;
}
textarea::placeholder, input::placeholder { color: #555e6b; }
textarea:focus, select:focus, input:focus { border-color: rgb(184 255 61 / 58%); box-shadow: 0 0 0 3px rgb(184 255 61 / 8%); }
textarea { resize: vertical; line-height: 1.45; }
label small { display: block; margin-top: 7px; color: #616a77; font-size: 10px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; }
.channel-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.channel-picker label { display: flex; gap: 7px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #0b0e14; color: #b0b7c2; transition: .2s ease; }
.channel-picker label:has(input:checked) { border-color: rgb(184 255 61 / 24%); background: var(--brand-soft); color: var(--text); }
.channel-picker input, .switch input { accent-color: var(--brand); }
.switch { display: flex; align-items: center; gap: 9px; color: #c7ccd4; }
.button { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; background: var(--surface-3); color: var(--text); font-weight: 850; font-size: 12px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); border-color: var(--line-strong); background: #292f3c; }
.button:disabled { cursor: wait; opacity: .5; transform: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgb(184 255 61 / 72%); outline-offset: 3px; }
body.is-busy .button.primary { box-shadow: 0 0 0 1px rgb(184 255 61 / 10%), 0 0 30px rgb(184 255 61 / 12%); }
body.is-busy::after { position: fixed; top: 0; left: 0; z-index: 999; width: 34%; height: 3px; content: ""; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: busy-slide 1.1s ease-in-out infinite; }
@keyframes busy-slide { from { transform: translateX(-110%); } to { transform: translateX(310%); } }
.button.primary { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 24px rgb(184 255 61 / 13%); }
.button.primary:hover { background: #c5ff60; }
.button.ghost { background: rgb(255 255 255 / 3%); }
.button.danger { color: var(--danger); }
.button.wide { width: 100%; padding-block: 14px; }

.brand-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .88fr); gap: 20px; }
.brand-form { align-content: start; }
.input-action { display: flex; gap: 7px; margin-top: 7px; }
.input-action input { margin-top: 0; }
.input-action .button { white-space: nowrap; }
.brand-summary { position: relative; align-self: stretch; padding: 23px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: radial-gradient(circle at 100% 0%, rgb(139 124 255 / 23%), transparent 45%), linear-gradient(145deg, #171b25, #0b0e14); color: var(--text); }
.brand-summary::after { position: absolute; right: -58px; bottom: -58px; width: 150px; height: 150px; border: 1px solid rgb(184 255 61 / 16%); border-radius: 50%; content: ""; box-shadow: 0 0 0 24px rgb(184 255 61 / 3%), 0 0 0 48px rgb(184 255 61 / 2%); }
.brand-summary > * { position: relative; z-index: 1; }
.brand-summary-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.brand-summary-head strong { display: block; line-height: 1.45; }
.brand-summary > p { color: #9ea6b3; line-height: 1.55; }
.brand-swatch { flex: 0 0 auto; width: 51px; height: 51px; border: 2px solid rgb(255 255 255 / 75%); border-radius: 15px; background: linear-gradient(135deg, var(--brand-primary) 0 62%, var(--brand-accent) 62%); box-shadow: 0 10px 30px rgb(0 0 0 / 28%); }
.brand-summary dl { display: grid; gap: 15px; margin: 0; }
.brand-summary dl > div { display: grid; gap: 7px; }
.brand-summary dt { color: var(--brand); font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.brand-summary dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; color: #b6bdc8; font-size: 12px; line-height: 1.55; }
.brand-summary dd > span:not(.pill) { display: block; width: 100%; }
.brand-summary .pill { background: rgb(255 255 255 / 6%); color: #dce0e6; }
.inline-warning { padding: 11px 13px; border: 1px solid rgb(255 196 92 / 14%); border-radius: 11px; background: rgb(255 196 92 / 8%); color: var(--warning) !important; font-size: 12px; }

.content-library { scroll-margin-top: 18px; background: radial-gradient(circle at 94% 5%, rgb(139 124 255 / 8%), transparent 28rem), linear-gradient(150deg, rgb(20 24 33 / 98%), rgb(10 13 19 / 98%)); }
.library-toolbar { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(135px, .7fr)) auto; gap: 9px; align-items: end; margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #0b0e14; }
.library-toolbar input, .library-toolbar select { margin-top: 5px; }
.library-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.library-summary article { display: flex; align-items: baseline; gap: 7px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgb(255 255 255 / 2%); }
.library-summary strong { color: var(--brand); font-size: 20px; font-variant-numeric: tabular-nums; }
.library-summary span { color: var(--muted); font-size: 10px; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.library-card { min-width: 0; min-height: 282px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #131821, #0b0e14); transition: border-color .2s ease, background .2s ease; }
.library-card:hover { border-color: rgb(139 124 255 / 25%); background: linear-gradient(145deg, #171d28, #0d1017); }
.library-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.library-card h3 { margin-bottom: 7px; font-size: 16px; line-height: 1.3; }
.library-card p { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; color: #9da6b2; font-size: 11px; line-height: 1.55; }
.library-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.library-tags span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: rgb(255 255 255 / 3%); color: #aeb5bf; font-size: 9px; font-weight: 750; }
.library-tags .is-media { border-color: rgb(97 223 255 / 15%); background: rgb(97 223 255 / 6%); color: var(--cyan); }
.library-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #737d8a; font-size: 9px; }
.library-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.library-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; }
.library-empty strong, .library-empty span { display: block; }
.library-empty span { color: var(--muted); }

.preflight { margin: 18px 0; padding: 18px; border: 1px solid var(--line-strong); border-radius: 18px; background: radial-gradient(circle at 100% 0%, rgb(97 223 255 / 7%), transparent 28rem), #0b0e14; }
.preflight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.preflight-head h3 { margin-bottom: 0; }
.preflight-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.preflight-summary > span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.preflight-summary strong { margin-right: 3px; color: var(--text); font-variant-numeric: tabular-nums; }
.preflight-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preflight-channel { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: rgb(255 255 255 / 2%); }
.preflight-channel.warning { border-color: rgb(255 196 92 / 20%); }
.preflight-channel.danger { border-color: rgb(255 107 114 / 22%); }
.preflight-channel summary { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.preflight-channel summary::-webkit-details-marker { display: none; }
.preflight-channel summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preflight-checks { display: grid; gap: 8px; padding: 0 12px 12px; }
.preflight-check { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.check-indicator { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--brand); }
.preflight-check.warning .check-indicator { background: var(--warning); }
.preflight-check.blocked .check-indicator { background: var(--danger); }
.preflight-check strong, .preflight-check small { display: block; }
.preflight-check strong { margin-bottom: 2px; font-size: 11px; }
.preflight-check small { color: #929ba8; font-size: 10px; line-height: 1.45; }

.control-center { scroll-margin-top: 18px; background: radial-gradient(circle at 95% 8%, rgb(184 255 61 / 6%), transparent 27rem), linear-gradient(150deg, rgb(20 24 33 / 98%), rgb(10 13 19 / 98%)); }
.control-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.control-summary article { min-height: 104px; display: grid; align-content: space-between; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #0b0e14; }
.control-summary span, .control-summary small { color: var(--muted); }
.control-summary span { font-size: 11px; font-weight: 750; }
.control-summary strong { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.control-summary small { font-size: 10px; }
.operation-list { display: grid; gap: 9px; }
.operation-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 2%); }
.operation-item.error { border-color: rgb(255 107 114 / 20%); background: linear-gradient(90deg, rgb(255 107 114 / 7%), rgb(255 255 255 / 1.5%)); }
.operation-item.warning { border-color: rgb(255 196 92 / 18%); }
.operation-marker { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 5px rgb(255 196 92 / 7%); }
.operation-item.error .operation-marker { background: var(--danger); box-shadow: 0 0 0 5px rgb(255 107 114 / 7%); }
.operation-copy { min-width: 0; }
.operation-copy > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.operation-copy p { margin: 5px 0 3px; color: #c0c6cf; font-size: 12px; overflow-wrap: anywhere; }
.operation-copy > small { color: var(--muted); font-size: 10px; }
.operation-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; max-width: 380px; }
.control-empty { min-height: 112px; display: flex; align-items: center; gap: 15px; padding: 18px; border: 1px dashed rgb(184 255 61 / 20%); border-radius: 15px; background: var(--brand-soft); }
.control-empty strong, .control-empty small { display: block; }
.control-empty small { max-width: 620px; margin-top: 4px; color: #a4acb7; }
.control-ok { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--brand-ink); }
.control-ok svg { width: 22px; }

.style-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr) minmax(260px, .7fr); gap: 14px; align-items: stretch; }
.style-card, .style-profile { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #0b0e14; }
.style-card h3, .style-profile h3 { margin: 3px 0 14px; }
.style-profile { overflow: hidden; background: radial-gradient(circle at 100% 0%, rgb(184 255 61 / 12%), transparent 50%), #0b0e14; }
.style-profile > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.55; }
.style-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 0; }
.style-metrics div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / 2.5%); }
.style-metrics dt { color: var(--brand); font-size: 24px; font-weight: 950; }
.style-metrics dd { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.style-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.style-example { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 1.8%); }
.style-example > div { display: flex; flex-wrap: wrap; gap: 6px; }
.style-example strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-example p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.style-example .button { align-self: end; justify-self: start; margin-top: auto; }

.threads-panel { position: relative; overflow: hidden; background: radial-gradient(circle at 92% 4%, rgb(139 124 255 / 13%), transparent 34%), var(--surface); }
.threads-panel::before { position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; content: ""; background: linear-gradient(90deg, var(--violet), var(--cyan), var(--brand)); opacity: .85; }
.threads-heading-actions, .threads-card-head, .subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.threads-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 18px 0 12px; }
.threads-stats article { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgb(255 255 255 / 2%); }
.threads-stats span, .threads-stats strong { display: block; }
.threads-stats span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.threads-stats strong { margin-top: 5px; color: var(--text); font-size: 24px; }
.threads-growth-console { margin: 14px 0 18px; padding: 17px; border: 1px solid rgb(97 223 255 / 14%); border-radius: 18px; background: linear-gradient(145deg, rgb(97 223 255 / 4%), rgb(139 124 255 / 3%) 45%, #0a0d13); }
.threads-growth-heading { margin-bottom: 4px; }
.threads-growth-grid { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(340px, 1.18fr); gap: 10px; margin-top: 14px; }
.threads-growth-settings, .threads-watch-card, .threads-learning-card { min-height: 100%; }
.threads-growth-settings .form-grid { grid-template-columns: 1fr; }
.threads-watch-form { display: grid; grid-template-columns: .72fr 1.28fr; align-items: end; gap: 8px; }
.threads-watch-form .button { grid-column: 1 / -1; }
.threads-watch-list { display: grid; gap: 6px; max-height: 286px; overflow: auto; }
.threads-watch-item { min-height: 54px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgb(255 255 255 / 2%); }
.threads-watch-item strong, .threads-watch-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads-watch-item strong { font-size: 11px; }
.threads-watch-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.threads-learning-card { grid-column: 1 / -1; background: radial-gradient(circle at 100% 0%, rgb(184 255 61 / 9%), transparent 46%), #0b0e14; }
.threads-learning-card h3 { margin: 3px 0 14px; }
.threads-learning-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.threads-learning-metrics div { padding: 9px; border-radius: 9px; background: rgb(255 255 255 / 3%); }
.threads-learning-metrics dt { color: var(--brand); font-size: 17px; font-weight: 900; }
.threads-learning-metrics dd { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.threads-learning-progress { height: 7px; overflow: hidden; border-radius: 99px; background: rgb(255 255 255 / 6%); }
.threads-learning-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--brand)); transition: width .25s ease; }
.threads-learning-card ul { display: grid; gap: 7px; margin: 0; padding-left: 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.threads-signal-heading { margin-top: 16px; }
.threads-signal-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.threads-signal-card { min-width: 0; display: grid; align-content: start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #0b0e14; }
.threads-signal-card.is-drafted { border-color: rgb(184 255 61 / 18%); background: rgb(184 255 61 / 2%); }
.threads-signal-card.is-dismissed { opacity: .58; }
.threads-signal-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.threads-signal-meta strong, .threads-signal-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads-signal-meta strong { font-size: 11px; }
.threads-signal-meta small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.threads-signal-card > p { display: -webkit-box; margin: 0; overflow: hidden; color: #bdc3cc; font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 9; }
.threads-signal-evidence { display: flex; flex-wrap: wrap; gap: 5px; }
.threads-signal-evidence span { padding: 5px 7px; border-radius: 7px; background: rgb(97 223 255 / 6%); color: #9edbea; font-size: 10px; font-weight: 800; }
.threads-signal-actions, .threads-reply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: auto; }
.threads-signal-actions .button, .threads-reply-actions .button { min-height: 44px; }
.connection-divider { position: relative; text-align: center; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.connection-divider::before { position: absolute; inset: 50% 0 auto; height: 1px; content: ""; background: var(--line); }
.connection-divider span { position: relative; padding: 0 8px; background: var(--surface); }
.oauth-button { width: 100%; min-height: 48px; }
.oauth-button:disabled { cursor: not-allowed; }
.connection-setup-notice { display: grid; gap: 8px; padding: 13px; border: 1px solid rgb(255 196 92 / 18%); border-radius: 12px; background: rgb(255 196 92 / 8%); color: #d8dce3; font-size: 12px; line-height: 1.55; }
.connection-setup-notice strong { color: var(--warning); }
.connection-setup-notice p { margin: 0; }
.connection-setup-notice label { display: grid; gap: 6px; color: #aeb5c0; }
.connection-setup-notice a { color: var(--cyan); text-underline-offset: 3px; }
.connection-setup-notice code { display: block; max-width: 100%; padding: 8px 9px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; background: rgb(0 0 0 / 24%); color: #e8ecf2; font-size: 11px; user-select: all; }
.connection-setup-notice small { color: var(--muted); }
.threads-workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(240px, .72fr); gap: 11px; }
.threads-card { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #0b0e14; }
.threads-card h3 { margin: 3px 0 0; }
.threads-kit-form { background: radial-gradient(circle at 100% 0%, rgb(139 124 255 / 12%), transparent 40%), #0b0e14; }
.threads-autopilot { background: radial-gradient(circle at 100% 0%, rgb(184 255 61 / 8%), transparent 42%), #0b0e14; }
.threads-output-list { display: flex; flex-wrap: wrap; gap: 6px; }
.threads-output-list span { padding: 6px 8px; border: 1px solid rgb(139 124 255 / 18%); border-radius: 8px; background: rgb(139 124 255 / 7%); color: #beb6ff; font-size: 9px; font-weight: 800; }
.threads-columns { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; margin-top: 18px; }
.threads-columns > section { min-width: 0; }
.subsection-heading { min-height: 40px; margin-bottom: 8px; }
.subsection-heading h3 { margin: 0; }
.threads-reference-list, .threads-kit-list, .threads-reply-list { display: grid; gap: 9px; }
.threads-reference-card, .threads-kit-card, .threads-reply-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #0b0e14; }
.threads-reference-card h4, .threads-kit-card h4 { margin: 10px 0; font-size: 16px; line-height: 1.35; }
.threads-card-head small { color: var(--muted); font-size: 10px; }
.text-button { min-height: 44px; padding: 0 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.text-button:hover, .text-button:focus-visible { color: var(--text); }
.text-button.danger { color: var(--danger); }
.threads-hook { padding-left: 12px; border-left: 2px solid var(--violet); color: #d7d9df; font-size: 13px; line-height: 1.5; }
.threads-reference-card dl { display: grid; gap: 9px; margin: 14px 0 0; }
.threads-reference-card dl div { display: grid; gap: 4px; }
.threads-reference-card dt { color: var(--cyan); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.threads-reference-card dd { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.threads-voice { color: var(--muted); font-size: 11px; line-height: 1.5; }
.threads-details { margin-top: 9px; border: 1px solid var(--line); border-radius: 11px; background: rgb(255 255 255 / 1.6%); }
.threads-details summary { min-height: 44px; display: flex; align-items: center; padding: 0 12px; cursor: pointer; color: #c6cbd3; font-size: 11px; font-weight: 800; }
.threads-details ol { display: grid; gap: 7px; margin: 0; padding: 0 12px 12px; list-style: none; counter-reset: thread-items; }
.threads-details li { display: grid; gap: 3px; padding: 9px; border-radius: 8px; background: rgb(255 255 255 / 2.5%); color: var(--muted); font-size: 11px; line-height: 1.45; counter-increment: thread-items; }
.threads-details li span { color: var(--brand); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.threads-posts { display: grid; gap: 8px; margin-top: 9px; }
.threads-post { display: grid; gap: 10px; padding: 12px; border: 1px solid rgb(184 255 61 / 12%); border-radius: 11px; background: rgb(184 255 61 / 2.5%); }
.threads-post > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.threads-post p { max-height: 168px; margin: 0; overflow: auto; white-space: pre-line; color: #bac1ca; font-size: 11px; line-height: 1.55; }
.threads-post .button { justify-self: start; }
.threads-post.is-blocked { border-color: rgb(255 107 114 / 20%); background: rgb(255 107 114 / 4%); }
.similarity { color: var(--brand); font-size: 9px; font-weight: 850; }
.similarity.danger { color: var(--danger); }
.threads-performance { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.threads-weekly-memo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 13px; margin-bottom: 10px; padding: 17px; border: 1px solid rgb(97 223 255 / 16%); border-radius: 15px; background: radial-gradient(circle at 100% 0%, rgb(97 223 255 / 11%), transparent 42%), #0b0e14; }
.memo-head { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.memo-head h3 { margin: 0; }
.memo-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.memo-metrics div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgb(255 255 255 / 2.5%); }
.memo-metrics strong, .memo-metrics span { display: block; }
.memo-metrics strong { color: var(--cyan); font-size: 21px; font-variant-numeric: tabular-nums; }
.memo-metrics span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.memo-insight { grid-column: 2; grid-row: 2; display: grid; align-content: center; gap: 5px; padding: 12px; border-left: 2px solid var(--cyan); background: rgb(97 223 255 / 4%); }
.memo-insight strong { font-size: 12px; }
.memo-insight span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.threads-weekly-memo ul { grid-column: 1 / -1; display: grid; gap: 6px; margin: 0; padding: 12px 12px 12px 29px; border-top: 1px solid var(--line); color: #aab2bd; font-size: 11px; line-height: 1.5; }
.threads-analytics-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.threads-analytics-card { display: grid; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #0b0e14; }
.threads-analytics-card > div strong, .threads-analytics-card > div small { display: block; }
.threads-analytics-card > div small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.threads-analytics-card dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0; }
.threads-analytics-card dl div { padding: 7px; border-radius: 8px; background: rgb(255 255 255 / 2.5%); }
.threads-analytics-card dt { color: var(--cyan); font-size: 15px; font-weight: 900; }
.threads-analytics-card dd { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.threads-reply-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 9px; }
.threads-reply-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.threads-reply-card blockquote { margin: 12px 0; color: #d2d6dd; font-size: 12px; line-height: 1.5; }
.threads-reply-card p { color: var(--muted); white-space: pre-line; font-size: 11px; line-height: 1.5; }
.threads-reply-card.is-published { border-color: rgb(184 255 61 / 16%); }
.empty-state.compact { padding: 22px 14px; }

.cycle-list { display: grid; gap: 9px; }
.radar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.radar-card { position: relative; min-height: 246px; display: grid; align-content: start; padding: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #171c25, #0d1016); }
.radar-card::after { position: absolute; right: -48px; bottom: -48px; width: 120px; height: 120px; border-radius: 50%; content: ""; background: var(--cyan); opacity: .045; }
.radar-card.is-production { border-color: rgb(184 255 61 / 24%); background: linear-gradient(145deg, rgb(184 255 61 / 9%), #0d1016 58%); }
.radar-meta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.radar-score { width: 50px; min-height: 46px; display: grid; place-items: center; gap: 0; padding: 4px; border: 1px solid rgb(97 223 255 / 20%); border-radius: 13px; background: rgb(97 223 255 / 8%); color: var(--cyan); font-weight: 900; line-height: 1; }
.radar-score small { margin: 0; color: #88aeb8; font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.radar-card h3 { font-size: 18px; line-height: 1.24; }
.radar-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.radar-card > small { display: block; margin-bottom: 15px; color: #747e8d; line-height: 1.4; }
.radar-card .button { position: relative; z-index: 1; align-self: end; margin-top: auto; }
.empty-state { padding: 42px 18px; text-align: center; color: #68717e; border: 1px dashed var(--line-strong); border-radius: 14px; background: rgb(255 255 255 / 1.4%); }
.cycle-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #0c0f15; color: var(--text); text-align: left; transition: .18s ease; }
.cycle-card:hover, .cycle-card.is-selected { border-color: rgb(184 255 61 / 28%); background: linear-gradient(90deg, rgb(184 255 61 / 9%), #10141b); }
.cycle-card strong { display: block; margin-bottom: 6px; }
.cycle-card small { color: var(--muted); }
.cycle-card .pill { align-self: center; }

.detail-panel { scroll-margin-top: 18px; }
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 20px; }
.stage { position: relative; min-height: 76px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #0b0e14; }
.stage::after { position: absolute; right: -14px; bottom: -16px; width: 45px; height: 45px; border-radius: 50%; content: ""; background: var(--brand); opacity: 0; }
.stage span { display: block; color: #596271; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.stage strong { display: block; margin-top: 8px; font-size: 12px; }
.stage.done { border-color: rgb(184 255 61 / 18%); background: var(--brand-soft); }
.stage.done::after { opacity: .07; }
.stage.done span { color: var(--brand); }
.detail-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 18px; }
.atom-card { padding: 22px; border: 1px solid rgb(139 124 255 / 20%); border-radius: 17px; background: radial-gradient(circle at 100% 0%, rgb(139 124 255 / 17%), transparent 38%), #0b0e14; color: var(--text); }
.atom-card blockquote { margin: 20px 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.4; letter-spacing: -.025em; }
.atom-card p { color: #979fac; line-height: 1.65; }
.atom-evidence { display: grid; gap: 6px; margin-top: 14px; color: #b8bec8; font-size: 12px; }
.atom-evidence strong { color: var(--brand); }
.atom-evidence a { color: var(--cyan); }
.risk-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.variants { display: grid; gap: 9px; }
.variant { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0b0e14; }
.variant[open] { border-color: var(--line-strong); background: #0e1219; }
.variant summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 15px; cursor: pointer; font-weight: 850; }
.variant-body { padding: 0 15px 15px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.variant-editor { display: grid; gap: 12px; padding: 0 15px 15px; }
.copy-assistant, .copy-review { border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; background: var(--surface-2); overflow-wrap: anywhere; }
.copy-assistant-content { display: grid; gap: 12px; padding-top: 12px; }
.copy-assistant summary, .copy-hook-options summary { min-height: 44px; cursor: pointer; align-content: center; }
.copy-review small, .copy-hook-options small, [data-copy-proposal] li small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.copy-review ul, [data-copy-proposal] ul, .copy-hook-options ul { padding-left: 20px; }
.copy-review li, [data-copy-proposal] li, .copy-hook-options li { margin: 8px 0; }
.copy-learn { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.copy-learn input { width: 20px; height: 20px; flex: 0 0 20px; }
.copy-feedback { min-height: 24px; color: var(--cyan); margin: 0; }
.copy-proposed-body { white-space: pre-wrap; font-size: 16px; line-height: 1.65; }
.copy-proposed-title { font-weight: 650; }
.copy-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
[data-copy-proposal] { min-width: 0; animation: copy-reveal 180ms ease-out; }
@keyframes copy-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { [data-copy-proposal] { animation: none; } }
.variant-editor textarea { min-height: 210px; font-size: 13px; line-height: 1.6; }
.variant-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.variant-editor-actions small { max-width: 470px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.slide-plan { display: grid; gap: 8px; margin: 0; padding: 0 15px 15px; list-style: none; counter-reset: slides; }
.slide-plan li { position: relative; display: grid; gap: 4px; padding: 12px 12px 12px 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); counter-increment: slides; }
.slide-plan li::before { position: absolute; top: 12px; left: 12px; color: var(--brand); font-size: 10px; font-weight: 900; content: counter(slides, decimal-leading-zero); }
.slide-plan strong, .slide-plan span, .slide-plan small { display: block; }
.slide-plan span, .slide-plan small { color: var(--muted); line-height: 1.4; }
.asset-links { display: flex; flex-wrap: wrap; gap: 7px; }
.asset-links a { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgb(184 255 61 / 18%); border-radius: 9px; background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.asset-actions, .detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.assets { display: grid; gap: 8px; margin-top: 14px; }
.asset { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #0b0e14; color: #9da5b2; }
.asset-video { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.asset-video video { grid-column: 1 / -1; width: min(100%, 360px); max-height: 520px; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: #050608; }
.asset a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; color: var(--brand); font-weight: 800; }
.schedule-control { display: inline-flex; align-items: center; gap: 7px; }
.schedule-control input { width: auto; margin: 0; }

.connection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.autopilot-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid rgb(184 255 61 / 22%); border-radius: 15px; background: radial-gradient(circle at 100% 0%, rgb(184 255 61 / 13%), transparent 45%), #0b0e14; }
.autopilot-banner::before { width: 13px; height: 13px; border-radius: 50%; content: ""; background: var(--brand); box-shadow: 0 0 0 7px rgb(184 255 61 / 8%), 0 0 26px rgb(184 255 61 / 35%); }
.autopilot-banner strong, .autopilot-banner small { display: block; }
.autopilot-banner small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.connection-card { min-height: 116px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; align-items: start; gap: 9px 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #0b0e14; }
.connection-card-actions { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.connection-card .button { padding: 7px 9px; font-size: 10px; }
.connection-card.is-ready { border-color: rgb(184 255 61 / 22%); background: var(--brand-soft); }
.connection-card strong, .connection-card small { display: block; }
.connection-card small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.launch-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.launch-plan article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / 1.8%); }
.launch-plan article > span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgb(184 255 61 / 18%); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 950; }
.launch-plan strong, .launch-plan small { display: block; }
.launch-plan strong { margin: 2px 0 6px; font-size: 12px; }
.launch-plan small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.error-text { color: var(--danger) !important; }

.connection-dialog { width: min(580px, calc(100vw - 30px)); max-height: min(820px, calc(100vh - 30px)); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 22px; background: #10141b; color: var(--text); box-shadow: 0 40px 120px rgb(0 0 0 / 72%); }
.connection-dialog::backdrop { background: rgb(2 4 8 / 76%); backdrop-filter: blur(8px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 22px 17px; border-bottom: 1px solid var(--line); background: rgb(16 20 27 / 92%); backdrop-filter: blur(16px); }
.dialog-close { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; }
.connect-guide { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 20px 22px 0; }
.connect-guide span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgb(184 255 61 / 20%); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 950; }
.connect-guide p { align-self: center; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.connect-guide a { color: var(--brand); }
.connection-form { padding: 20px 22px; }
.connection-form > div { display: grid; gap: 13px; }
.connection-result { margin: 0 22px 18px; padding: 14px; border: 1px solid rgb(184 255 61 / 20%); border-radius: 13px; background: var(--brand-soft); color: #cfeaa2; font-size: 12px; line-height: 1.5; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 22px; }
.autopilot-settings { margin: 0 22px 22px; padding: 18px; border: 1px solid rgb(139 124 255 / 22%); border-radius: 16px; background: radial-gradient(circle at 100% 0%, rgb(139 124 255 / 12%), transparent 44%), #0b0e14; }
.autopilot-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.autopilot-settings-head h3 { margin: 0; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.weekday-picker label { display: grid; place-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 10px; }
.weekday-picker label:has(input:checked) { border-color: rgb(184 255 61 / 24%); background: var(--brand-soft); color: var(--brand); }

.funnel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.funnel-card { position: relative; padding: 19px; overflow: hidden; border: 1px solid rgb(139 124 255 / 20%); border-radius: 16px; background: radial-gradient(circle at 100% 0%, rgb(139 124 255 / 15%), transparent 42%), #0b0e14; color: white; }
.funnel-card p, .funnel-card small { color: #939baa; line-height: 1.5; }
.code-word { display: inline-flex; margin: 5px 0 15px; padding: 9px 12px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-size: 17px; font-weight: 950; letter-spacing: .08em; box-shadow: 0 8px 24px rgb(184 255 61 / 13%); }
.bot-flow { margin: 13px 0 0; padding-left: 19px; color: #b9c0ca; font-size: 12px; line-height: 1.6; }

.calendar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.calendar-card { position: relative; min-height: 122px; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0b0e14; }
.calendar-card::before { display: block; width: 28px; height: 3px; margin-bottom: 13px; border-radius: 99px; content: ""; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.calendar-card strong, .calendar-card small { display: block; }
.calendar-card small { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 15px; padding: 13px 0; border-top: 1px solid var(--line); }
.activity-item time { color: #5f6875; font-size: 11px; }
.activity-item span { min-width: 0; color: #aab1bc; font-size: 13px; overflow-wrap: anywhere; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(390px, calc(100vw - 44px)); padding: 14px 17px; border: 1px solid rgb(184 255 61 / 20%); border-radius: 13px; background: #151b10; color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgb(255 107 114 / 20%); background: #241114; }

.login-page { min-height: 100vh; background: radial-gradient(circle at 76% 18%, rgb(139 124 255 / 16%), transparent 34%), radial-gradient(circle at 18% 84%, rgb(184 255 61 / 9%), transparent 32%), #080a0f; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 480px); padding: clamp(26px, 5vw, 42px); border: 1px solid var(--line-strong); border-radius: 24px; background: rgb(15 19 26 / 90%); box-shadow: 0 40px 120px rgb(0 0 0 / 52%); backdrop-filter: blur(18px); }
.login-card .brand { display: inline-flex; margin-bottom: 42px; }
.login-card h1 { margin: 7px 0 14px; font-size: clamp(38px, 8vw, 58px); }
.login-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.login-card form { gap: 18px; }

@media (max-width: 1150px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .workspace, .detail-grid, .brand-layout, .style-layout { grid-template-columns: 1fr; }
  .radar-grid, .funnel-grid, .connection-grid, .style-examples { grid-template-columns: repeat(2, 1fr); }
  .launch-plan { grid-template-columns: repeat(2, 1fr); }
  .calendar-grid { grid-template-columns: repeat(3, 1fr); }
  .threads-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .threads-signal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .threads-workspace { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .threads-autopilot { grid-column: 1 / -1; }
  .preflight-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-toolbar label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .shell { width: 100%; grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
  .sidebar { position: sticky; width: 100%; min-width: 0; max-width: 100vw; height: auto; min-height: 72px; flex-direction: row; align-items: center; gap: 16px; padding: 13px 15px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  main > section[id], main > .panel[id] { scroll-margin-top: 88px; }
  .brand { min-width: max-content; margin: 0; }
  .brand small, .sidebar-foot { display: none; }
  .sidebar nav { display: flex; min-width: max-content; overflow: visible; }
  .nav-link { padding: 10px; }
  main { width: 100%; min-width: 0; padding: 18px 14px 48px; }
  .topbar { min-height: 0; display: block; padding-top: 78px; }
  .top-actions { position: absolute !important; top: 18px; right: 18px; }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .threads-columns { grid-template-columns: 1fr; }
  .threads-growth-grid, .threads-signal-list { grid-template-columns: 1fr; }
  .threads-learning-card { grid-column: auto; }
  .threads-watch-form { grid-template-columns: 1fr; }
  .threads-analytics-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-item { grid-template-columns: 10px minmax(0, 1fr); }
  .operation-actions { grid-column: 2; justify-content: flex-start; max-width: none; }
  .library-grid { grid-template-columns: 1fr; }
  .threads-weekly-memo { grid-template-columns: 1fr; }
  .memo-insight { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .stats, .form-grid, .calendar-grid, .radar-grid, .funnel-grid, .connection-grid, .launch-plan, .style-examples, .control-summary, .preflight-channels, .library-toolbar { grid-template-columns: 1fr; }
  .topbar { padding: 78px 20px 24px; }
  h1 { font-size: 40px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .activity-item { grid-template-columns: 1fr; gap: 4px; }
  .panel { padding: 18px; }
  .input-action { align-items: stretch; flex-direction: column; }
  .asset, .connection-card { align-items: flex-start; }
  .autopilot-banner { grid-template-columns: auto minmax(0, 1fr); }
  .autopilot-banner .button { grid-column: 1 / -1; }
  .connection-card { grid-template-columns: auto minmax(0, 1fr); }
  .connection-card-actions { grid-column: 1 / -1; grid-row: auto; width: 100%; justify-content: flex-end; }
  .schedule-control { width: 100%; align-items: stretch; flex-direction: column; }
  .schedule-control input { width: 100%; }
  .variant-editor-actions { align-items: stretch; flex-direction: column; }
  .variant-editor-actions .button { width: 100%; }
  .threads-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .threads-workspace, .threads-analytics-list, .threads-reply-list { grid-template-columns: 1fr; }
  .threads-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .threads-autopilot { grid-column: auto; }
  .threads-analytics-card dl { grid-template-columns: repeat(2, 1fr); }
  textarea, select, input:not([type]), input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="email"], input[type="number"], input[type="datetime-local"] { font-size: 16px; }
  label, legend, .threads-details summary { font-size: 12px; }
  label small, .threads-watch-item small, .threads-card-head small { font-size: 11px; }
  .threads-signal-card > p, .threads-reference-card dd, .threads-voice, .threads-reply-card p, .video-control-card > p { font-size: 13px; }
  .preflight { padding: 14px; }
  .preflight-head { align-items: flex-start; flex-direction: column; }
  .operation-item { align-items: start; padding: 13px; }
  .operation-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .operation-actions .button { width: 100%; }
  .library-toolbar label:first-child { grid-column: auto; }
  .library-summary, .memo-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Video Studio prototype */
.video-studio { scroll-margin-top: 18px; overflow: clip; background: radial-gradient(circle at 91% 8%, rgb(97 223 255 / 8%), transparent 28rem), linear-gradient(150deg, rgb(20 24 33 / 98%), rgb(10 13 19 / 98%)); }
.video-studio-heading { align-items: flex-start; margin-bottom: 18px; }
.video-studio-heading .section-note { max-width: 720px; margin: 10px 0 0; }
.video-gate-badge { min-height: 38px; display: inline-flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid rgb(255 196 92 / 22%); border-radius: 99px; background: rgb(255 196 92 / 8%); color: #ffd58a; font-size: 11px; font-weight: 850; white-space: nowrap; }
.video-gate-badge > span { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 5px rgb(255 196 92 / 8%); }
.video-quality-gate { min-height: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid rgb(255 196 92 / 17%); border-radius: 15px; background: linear-gradient(90deg, rgb(255 196 92 / 8%), rgb(255 255 255 / 1.5%)); }
.video-quality-gate > svg { width: 23px; color: var(--warning); }
.video-quality-gate strong, .video-quality-gate small { display: block; }
.video-quality-gate strong { margin-bottom: 4px; font-size: 13px; }
.video-quality-gate small { color: #9ca3ae; line-height: 1.45; }
.video-quality-gate > span { padding: 7px 9px; border-radius: 8px; background: rgb(255 196 92 / 10%); color: var(--warning); font-size: 10px; font-weight: 850; }
.video-studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); gap: 20px; align-items: start; }
.video-control-stack { min-width: 0; display: grid; gap: 12px; }
.video-pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.video-pipeline > div { min-height: 61px; display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #0a0d13; color: #68717f; }
.video-pipeline span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); font-size: 9px; font-weight: 900; }
.video-pipeline strong { font-size: 10px; }
.video-pipeline .is-ready { color: #cde8a0; border-color: rgb(184 255 61 / 15%); background: var(--brand-soft); }
.video-pipeline .is-ready span { background: var(--brand); color: var(--brand-ink); }
.video-pipeline .is-current { color: white; border-color: rgb(97 223 255 / 25%); background: rgb(97 223 255 / 7%); box-shadow: inset 0 0 0 1px rgb(97 223 255 / 4%); }
.video-pipeline .is-current span { background: var(--cyan); color: #061217; }
.video-control-card { min-width: 0; margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: rgb(8 11 16 / 70%); }
.video-control-card legend { display: flex; align-items: center; gap: 9px; padding: 0 8px; color: #f1f4f7; font-size: 13px; font-weight: 900; }
.video-control-card legend span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgb(184 255 61 / 16%); border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 9px; }
.video-control-card > p { margin: 2px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.video-brief { display: grid; gap: 12px; }
.video-style-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.video-style-option, .video-choice, .video-voice, .video-hook { min-height: 48px; border: 1px solid var(--line); background: #0c0f15; color: var(--text); text-align: left; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.video-style-option:hover, .video-choice:hover, .video-voice:hover, .video-hook:hover { border-color: var(--line-strong); background: #111620; }
.video-style-option:focus-visible, .video-choice:focus-visible, .video-voice:focus-visible, .video-hook:focus-visible, .timeline-scenes button:focus-visible, .video-preview-toolbar button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.video-style-option { min-height: 106px; display: grid; align-content: start; gap: 5px; padding: 10px; border-radius: 11px; }
.video-style-option.is-selected, .video-choice.is-selected, .video-voice.is-selected, .video-hook.is-selected { border-color: rgb(184 255 61 / 34%); background: linear-gradient(145deg, rgb(184 255 61 / 10%), #0c0f15); box-shadow: inset 0 0 0 1px rgb(184 255 61 / 5%); }
.style-swatch { height: 34px; display: block; margin-bottom: 3px; border-radius: 7px; background: var(--swatch); }
.style-swatch.founder { --swatch: linear-gradient(120deg, #d8ff8c 0 33%, #1a2014 33% 62%, #75834f 62%); }
.style-swatch.editorial { --swatch: linear-gradient(135deg, #f1eee8 0 48%, #201f25 48% 56%, #8b7cff 56%); }
.style-swatch.cinematic { --swatch: linear-gradient(135deg, #06080c, #83623b 52%, #e6b764); }
.style-swatch.screen { --swatch: linear-gradient(90deg, #10151d 0 30%, #61dfff 30% 34%, #171f2b 34% 64%, #b8ff3d 64% 68%, #11151d 68%); }
.style-swatch.kinetic { --swatch: linear-gradient(135deg, #ff6d52 0 45%, #f2eee5 45% 58%, #101216 58%); }
.style-swatch.custom { --swatch: repeating-linear-gradient(135deg, #202633 0 8px, #2b3342 8px 16px); }
.video-style-option strong, .video-style-option small, .video-choice strong, .video-choice small, .video-voice strong, .video-voice small { display: block; }
.video-style-option strong { font-size: 11px; }
.video-style-option small { color: #77808d; font-size: 9px; line-height: 1.35; }
.video-choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.video-choice { min-height: 70px; padding: 12px; border-radius: 11px; }
.video-choice strong { font-size: 11px; }
.video-choice small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.video-voice-list, .video-hook-list { display: grid; gap: 7px; }
.video-voice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; }
.video-voice strong { font-size: 11px; }
.video-voice small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.video-voice b { padding: 5px 7px; border-radius: 7px; background: rgb(255 255 255 / 4%); color: #828b98; font-size: 8px; text-transform: uppercase; }
.video-voice.is-selected b { background: var(--brand-soft); color: var(--brand); }
.voice-wave { width: 42px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; background: var(--surface-2); }
.voice-wave i { width: 2px; height: var(--wave, 12px); border-radius: 4px; background: #697483; }
.voice-wave i:nth-child(1), .voice-wave i:nth-child(5) { --wave: 8px; }
.voice-wave i:nth-child(2), .voice-wave i:nth-child(4) { --wave: 17px; }
.voice-wave i:nth-child(3) { --wave: 24px; }
.video-voice.is-selected .voice-wave i { background: var(--brand); }
.video-hook { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; padding: 11px 12px; border-radius: 11px; }
.video-hook > span { grid-row: 1 / 3; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: #9ca5b2; font-size: 10px; font-weight: 900; }
.video-hook strong { align-self: end; font-size: 11px; line-height: 1.4; }
.video-hook small { color: #77808d; font-size: 9px; }
.video-hook.is-selected > span { background: var(--brand); color: var(--brand-ink); }
.video-preview-column { position: sticky; top: 18px; min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #080b10; box-shadow: 0 22px 70px rgb(0 0 0 / 24%); }
.video-preview-toolbar, .timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.video-preview-toolbar { min-height: 34px; color: #8f98a5; font-size: 10px; font-weight: 800; }
.video-preview-toolbar button { min-width: 54px; min-height: 34px; border: 0; border-radius: 8px; background: rgb(255 255 255 / 4%); color: #929ba7; font-size: 9px; }
.video-phone { --video-accent: var(--brand); position: relative; width: min(100%, 330px); aspect-ratio: 9 / 16; justify-self: center; overflow: hidden; border: 1px solid rgb(255 255 255 / 15%); border-radius: 21px; background: #121710; box-shadow: 0 18px 50px rgb(0 0 0 / 48%); isolation: isolate; transition: background .25s ease; }
.video-preview-photo, .video-preview-shade, .video-safe-zone { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-preview-photo { z-index: -3; object-fit: cover; object-position: 52% 48%; transform: scale(1.02); transition: filter .25s ease, opacity .25s ease, transform .25s ease; }
.video-preview-shade { z-index: -2; background: linear-gradient(to bottom, rgb(4 6 8 / 18%) 0 34%, rgb(4 6 8 / 33%) 51%, rgb(4 6 8 / 94%) 91%), linear-gradient(120deg, transparent 50%, color-mix(in srgb, var(--video-accent) 22%, transparent)); }
.video-safe-zone { inset: 5% 5% 12%; z-index: 8; width: 90%; height: 83%; border: 1px dashed rgb(255 255 255 / 13%); border-radius: 12px; pointer-events: none; opacity: .42; }
.video-preview-brand, .video-preview-counter { position: absolute; top: 28px; z-index: 2; display: flex; align-items: center; gap: 6px; color: white; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.video-preview-brand { left: 25px; }
.video-preview-brand span { width: 7px; height: 7px; border-radius: 2px; background: var(--video-accent); box-shadow: 0 0 16px color-mix(in srgb, var(--video-accent) 65%, transparent); }
.video-preview-counter { right: 25px; color: rgb(255 255 255 / 68%); letter-spacing: .08em; }
.video-preview-copy { position: absolute; left: 25px; right: 25px; bottom: 140px; z-index: 2; }
.video-preview-copy small { display: block; margin-bottom: 9px; color: var(--video-accent); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.video-preview-copy h3 { margin: 0; font-size: 24px; line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.video-preview-copy em { color: var(--video-accent); font-style: normal; }
.video-caption { position: absolute; left: 25px; right: 25px; bottom: 58px; z-index: 2; min-height: 56px; display: grid; align-items: center; padding: 9px 11px; border-left: 2px solid var(--video-accent); background: rgb(8 10 14 / 78%); color: #f7f8fa; font-size: 9px; font-weight: 700; line-height: 1.35; backdrop-filter: blur(8px); }
.video-preview-progress { position: absolute; left: 25px; right: 25px; bottom: 31px; height: 2px; border-radius: 99px; background: rgb(255 255 255 / 18%); }
.video-preview-progress i { display: block; width: 18%; height: 100%; border-radius: inherit; background: var(--video-accent); }
.video-phone.style-editorial { --video-accent: #9f90ff; background: #f1eee7; }
.video-phone.style-editorial .video-preview-photo { filter: grayscale(1) contrast(1.04); opacity: .74; }
.video-phone.style-editorial .video-preview-shade { background: linear-gradient(to bottom, rgb(15 14 18 / 8%), rgb(15 14 18 / 93%) 88%); }
.video-phone.style-cinematic { --video-accent: #ffc45c; }
.video-phone.style-cinematic .video-preview-photo { filter: saturate(.7) contrast(1.2) sepia(.12); transform: scale(1.09); }
.video-phone.style-screen { --video-accent: var(--cyan); background: linear-gradient(135deg, #0d1219, #151f2c); }
.video-phone.style-screen .video-preview-photo { opacity: .22; filter: grayscale(1) blur(1px); }
.video-phone.style-screen .video-preview-shade { background: linear-gradient(rgb(97 223 255 / 5%) 1px, transparent 1px), linear-gradient(90deg, rgb(97 223 255 / 5%) 1px, transparent 1px), linear-gradient(to bottom, transparent, #070a0f 91%); background-size: 28px 28px, 28px 28px, auto; }
.video-phone.style-kinetic { --video-accent: #ff765e; background: #181311; }
.video-phone.style-kinetic .video-preview-photo { opacity: .32; filter: grayscale(1) contrast(1.2); }
.video-phone.style-kinetic .video-preview-copy h3 { font-size: 29px; text-transform: uppercase; }
.video-phone.style-custom { --video-accent: #e28cff; background: #161019; }
.video-phone.avatar-none .video-preview-photo { opacity: 0; }
.video-phone.avatar-avatar .video-preview-photo { filter: contrast(1.06) saturate(.82); transform: scale(1.07); }
.video-timeline { display: grid; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #0c0f15; }
.timeline-head strong { font-size: 10px; }
.timeline-head span { color: #737c89; font-size: 9px; font-variant-numeric: tabular-nums; }
.timeline-scenes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.timeline-scenes button { min-width: 0; min-height: 62px; display: grid; align-content: start; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: #11151d; color: #98a1ae; text-align: left; }
.timeline-scenes button.is-active { border-color: rgb(184 255 61 / 30%); background: var(--brand-soft); color: white; }
.timeline-scenes span, .timeline-scenes small { color: #67707e; font-size: 7px; }
.timeline-scenes strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
.video-readiness { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #0c0f15; }
.readiness-score { width: 70px; min-height: 70px; display: grid; grid-template-columns: auto auto; place-content: center; align-items: baseline; border: 1px solid rgb(255 196 92 / 18%); border-radius: 50%; background: rgb(255 196 92 / 6%); }
.readiness-score strong { color: var(--warning); font-size: 23px; font-variant-numeric: tabular-nums; }
.readiness-score > span { color: #777f8c; font-size: 9px; }
.readiness-score small { grid-column: 1 / -1; color: #8c95a2; font-size: 7px; text-align: center; text-transform: uppercase; }
.video-readiness ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.video-readiness li { display: flex; align-items: center; gap: 7px; color: #7d8693; font-size: 9px; }
.video-readiness li > span { width: 7px; height: 7px; border: 1px solid #545d69; border-radius: 50%; }
.video-readiness li.is-ready { color: #c4cfb4; }
.video-readiness li.is-ready > span { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 8px rgb(184 255 61 / 30%); }
.video-studio-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 7px; }
.video-studio-actions .button { min-height: 44px; padding-inline: 10px; font-size: 9px; }
.video-studio-actions .button:disabled { cursor: not-allowed; border-color: var(--line); background: #151922; color: #5e6672; box-shadow: none; opacity: .72; }
.video-studio-actions small { grid-column: 1 / -1; color: #747d89; font-size: 8px; line-height: 1.4; }

@media (max-width: 1280px) {
  .video-studio-grid { grid-template-columns: minmax(0, 1fr) minmax(310px, 370px); }
  .video-style-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-pipeline strong { display: none; }
  .video-pipeline > div { justify-content: center; }
}
@media (max-width: 980px) {
  .video-studio-grid { grid-template-columns: 1fr; }
  .video-preview-column { position: static; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); align-items: start; }
  .video-preview-toolbar, .video-studio-actions { grid-column: 1 / -1; }
  .video-phone { grid-row: 2 / 5; }
}
@media (max-width: 680px) {
  .video-studio-heading, .video-quality-gate { align-items: flex-start; }
  .video-studio-heading { flex-direction: column; }
  .video-quality-gate { grid-template-columns: auto minmax(0, 1fr); }
  .video-quality-gate > span { grid-column: 2; width: fit-content; }
  .video-pipeline > div { min-height: 48px; padding: 7px; }
  .video-pipeline span { width: 23px; height: 23px; }
  .video-style-picker, .video-choice-row { grid-template-columns: 1fr 1fr; }
  .video-preview-column { grid-template-columns: 1fr; }
  .video-preview-toolbar, .video-studio-actions { grid-column: auto; }
  .video-phone { grid-row: auto; width: min(100%, 340px); }
  .video-studio-actions { grid-template-columns: 1fr; }
  .video-studio-actions small { grid-column: auto; }
}
@media (max-width: 420px) {
  .video-style-picker, .video-choice-row { grid-template-columns: 1fr; }
  .video-voice { grid-template-columns: auto minmax(0, 1fr); }
  .video-voice b { grid-column: 2; justify-self: start; }
  .video-hook strong { font-size: 10px; }
  .timeline-scenes { grid-template-columns: repeat(5, 64px); overflow-x: auto; padding-bottom: 4px; }
}
