:root {
  color-scheme: light;
  --sp-accent: #1aa7b8;
  --sp-accent-strong: #087f91;
  --sp-radius-card: 16px;
  --sp-border-light: #e3e9ee;
  --sp-shadow-light: 0 10px 30px rgba(22, 47, 68, .055);
  --sp-sidebar-width: 184px;
  --sp-sidebar-center-offset: 92px;
}

body[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 761px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(173, 205, 220, .3) transparent;
  }

  .main-panel { min-height: 100vh; }
  .overview-content { box-sizing: border-box; width: min(100%, 1580px); margin-inline: auto; }
}

.nav-section-label {
  display: block;
  padding: 0 10px;
  margin: 0 0 7px;
  color: rgba(207, 222, 235, .56);
  font: 700 9px/1.3 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-divider { margin-block: 16px 13px; }

.topbar {
  border-bottom: 1px solid rgba(118, 139, 157, .09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(246, 249, 251, .96), rgba(246, 249, 251, .78));
  border-bottom-color: #e8edf1;
}

body[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(40, 45, 51, .96), rgba(40, 45, 51, .84));
  border-bottom-color: rgba(255, 255, 255, .055);
}

.section-title { letter-spacing: -.7px; }
.section-subtitle { max-width: 58ch; line-height: 1.55; }

.header-action {
  border: 1px solid transparent;
  border-radius: 10px;
}

.header-action:hover { transform: translateY(-1px); }

.skip-alert {
  box-sizing: border-box;
  min-width: 0;
  min-height: 36px;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(80, 197, 223, .22);
  border-radius: 9px;
  background: rgba(80, 197, 223, .08);
  font-size: 11px;
}

.skip-alert i { font-size: 12px; }

@media (max-width: 700px) {
  .skip-alert {
    min-height: 38px;
    gap: 7px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .skip-alert i { font-size: 11px; }
}

body[data-theme="light"] .header-action { color: #607285; }
body[data-theme="light"] .header-action:hover { border-color: #dce8eb; background: #f1f8f9; color: var(--sp-accent-strong); }
body[data-theme="dark"] .header-action { color: #b3c3cd; }
body[data-theme="dark"] .header-action:hover { border-color: rgba(115, 211, 224, .18); background: rgba(72, 179, 195, .1); color: #8de0eb; }

.page-content { padding-top: 18px; }
.summary-title { font-size: 17px; letter-spacing: -.25px; }

.youtube-connect-banner {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-height: 236px;
  margin-bottom: 24px;
  padding: 33px 38px 65px 34px;
  overflow: hidden;
  border: 1px solid rgba(150, 229, 237, .18);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 54% 100% at 100% 0%, rgba(0, 197, 218, .2), transparent 74%),
    radial-gradient(ellipse 55% 85% at 0% 110%, rgba(14, 79, 91, .16), transparent 74%),
    linear-gradient(120deg, #080a0d 0%, #0c1115 52%, #0a1013 100%);
  color: #f3f7f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 18px 44px rgba(0, 0, 0, .18);
  transform: perspective(1400px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transform-style: preserve-3d;
  transition: transform 220ms cubic-bezier(.2,.75,.25,1), border-color 240ms ease, box-shadow 240ms ease;
}

.youtube-connect-banner::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.025), transparent 35%, rgba(71,208,219,.035) 75%, transparent);
  content: "";
  pointer-events: none;
}

.youtube-connect-banner::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 216, 228, .28), transparent);
  content: "";
  pointer-events: none;
  opacity: .75;
}

.youtube-connect-glow {
  position: absolute;
  z-index: 0;
  display: block;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

.youtube-connect-glow-ambient {
  top: -145px;
  right: -106px;
  width: 470px;
  height: 360px;
  background: radial-gradient(ellipse at center, rgba(17, 207, 222, .27), rgba(15, 121, 137, .1) 42%, transparent 72%);
  opacity: .85;
  transform: translate3d(0, 0, 0) scale(1);
  transition: transform 900ms cubic-bezier(.2,.7,.2,1), opacity 850ms ease;
}

.youtube-connect-glow-pointer {
  top: 0;
  left: 0;
  width: 460px;
  height: 360px;
  background: radial-gradient(ellipse at center, rgba(39, 219, 232, .26), rgba(22, 160, 176, .1) 44%, transparent 73%);
  opacity: 0;
  transform: translate3d(var(--spot-x, 100%), var(--spot-y, 0%), 0) translate(-50%, -50%) scale(.58);
  transition: transform 540ms cubic-bezier(.18,.72,.2,1), opacity 480ms ease;
}

.youtube-connect-banner.is-pointer-active .youtube-connect-glow-ambient {
  opacity: .15;
  transform: translate3d(64px, -64px, 0) scale(1.14);
}

.youtube-connect-banner.is-pointer-active .youtube-connect-glow-pointer {
  opacity: .9;
  transform: translate3d(var(--spot-x, 100%), var(--spot-y, 0%), 0) translate(-50%, -50%) scale(1.08);
}

.youtube-connect-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 780px;
  padding-right: 20px;
}

.youtube-connect-copy h2 {
  max-width: 700px;
  margin: 0;
  color: inherit;
  font: 650 clamp(20px, 2.3vw, 25px)/1.3 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.65px;
}

.youtube-connect-description {
  max-width: 620px;
  margin: 10px 0 0;
  color: #a6b3ba;
  font: 400 12px/1.65 Inter, "Helvetica Neue", Arial, sans-serif;
}

.youtube-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.youtube-connect-actions button {
  min-height: 39px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: 600 11px/1 Inter, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.youtube-connect-actions button:hover { transform: translateY(-1px); }
.youtube-connect-actions button:focus-visible,
.youtube-connect-close:focus-visible,
.youtube-connect-help-link:focus-visible { outline: 2px solid #77e2ed; outline-offset: 3px; }
.youtube-connect-primary { background: linear-gradient(135deg, #5be0e8, #23b9cc); color: #05272c; box-shadow: 0 5px 18px rgba(24, 190, 205, .18); }
.youtube-connect-primary:hover { background: linear-gradient(135deg, #75e9ee, #35c9d9); }
.youtube-connect-secondary { border-color: rgba(221, 241, 244, .2) !important; background: rgba(255, 255, 255, .045); color: #e5edef; }
.youtube-connect-secondary:hover { border-color: rgba(121, 220, 229, .45) !important; background: rgba(71, 181, 193, .1); }

.youtube-connect-terms {
  margin: 15px 0 0;
  color: #727f85;
  font: 400 9px/1.5 Inter, "Helvetica Neue", Arial, sans-serif;
}

.youtube-connect-help-link {
  padding: 0;
  border: 0;
  background: none;
  color: #42ccdc;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(66, 204, 220, .42);
  text-underline-offset: 2px;
  cursor: pointer;
}

.youtube-connect-help-link:hover { color: #8be8f0; text-decoration-color: currentColor; }

.youtube-connect-signature {
  position: absolute;
  z-index: 2;
  right: 23px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c1cdd1;
  font: 450 10px/1 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.15px;
  white-space: nowrap;
}

.youtube-connect-signature img {
  display: block;
  width: 17px;
  height: 21px;
  object-fit: contain;
}

.youtube-connect-signature > span > span { color: #d9e2e5; }
.youtube-connect-signature strong { color: #45cad8; font-weight: 650; }

.youtube-connect-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  color: #aebdc1;
  cursor: pointer;
  place-items: center;
}

.youtube-connect-close:hover { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .11); color: #fff; }
.youtube-connect-banner[hidden] { display: none; }

.metric-grid { gap: 14px; margin-top: 20px; }
.metric-card,
.panel {
  border-radius: var(--sp-radius-card);
  box-shadow: var(--sp-shadow-light);
}

.metric-card {
  min-height: 150px;
  padding: 16px 16px 13px;
}

.metric-card.is-selected { box-shadow: 0 0 0 1px rgba(26, 167, 184, .12), 0 10px 24px rgba(26, 167, 184, .08); }
.metric-value { font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.metric-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }

.dashboard-grid,
.recent-grid { gap: 14px; margin-top: 14px; }

.chart-card { padding: 20px 20px 15px; }
.chart-heading h3,
.recent-card > .panel-heading h3,
.shortcuts-card h3 { letter-spacing: -.2px; }
.chart-heading p { margin-top: 6px; }
.chart-wrap { min-height: 205px; }
.metric-chart[hidden] { display: none; }
.chart-empty-state[hidden] { display: none; }
.chart-empty-state {
  box-sizing: border-box;
  display: grid;
  min-height: 205px;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  border: 1px dashed rgba(119, 145, 160, .24);
  border-radius: 13px;
  background: rgba(122, 157, 172, .035);
  text-align: center;
}
.chart-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
  border: 1px solid rgba(26, 167, 184, .14);
  border-radius: 13px;
  background: rgba(26, 167, 184, .08);
  color: var(--sp-accent);
  font-size: 16px;
  place-items: center;
}
.chart-empty-state strong { color: #34445b; font-size: 12px; font-weight: 650; }
.chart-empty-state > span:last-child { max-width: 35ch; color: #8793a0; font-size: 10px; line-height: 1.5; }

body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .panel { box-shadow: 0 10px 28px rgba(0, 0, 0, .12); }
body[data-theme="dark"] .metric-card.is-selected { box-shadow: 0 0 0 1px rgba(88, 206, 229, .12), 0 10px 24px rgba(0, 0, 0, .18); }
body[data-theme="dark"] .chart-empty-state { border-color: rgba(171, 196, 208, .17); background: rgba(255, 255, 255, .018); }
body[data-theme="dark"] .chart-empty-icon { border-color: rgba(108, 218, 231, .17); background: rgba(70, 177, 192, .12); color: #75d8e4; }
body[data-theme="dark"] .chart-empty-state strong { color: #e6edf1; }
body[data-theme="dark"] .chart-empty-state > span:last-child { color: #9eabb5; }

.shortcuts-card { padding: 20px; }
.shortcuts-card .eyebrow { margin-top: 0; }
.shortcut { min-height: 54px; border-radius: 10px; }
.shortcut-icon { width: 34px; height: 34px; border-radius: 10px; }
.shortcut strong { font-size: 11px; }
.shortcut small { font-size: 10px; }
.recent-card { min-height: 176px; }
.recent-card > .panel-heading { min-height: 54px; padding-inline: 18px; }
.empty-state p { font-size: 11px; }

.date-range {
  min-height: 40px;
  padding-inline: 13px;
  border-radius: 10px;
  font-weight: 600;
}

.date-picker,
.notifications-popover,
.profile-menu { border-radius: 14px; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline-offset: 3px; }

@media (max-width: 760px) {
  .nav-section-label { display: none; }
  .page-content { padding-top: 12px; }
  .metric-grid { gap: 10px; }
  .metric-card { border-radius: 14px; }
  .dashboard-grid,
  .recent-grid { gap: 11px; margin-top: 11px; }
  .chart-card,
  .shortcuts-card { padding: 16px; }
}

@media (max-width: 560px) {
  .chart-empty-state { min-height: 170px; }
  .chart-wrap { min-height: 170px; }
  .metric-card { min-height: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  .header-action,
  .metric-card,
  .panel { transition: none !important; }
}


/* Assistant — wider launcher and a calmer, more capable conversation surface. */
.search-assistant {
  left: calc(50% + var(--sp-sidebar-center-offset));
  width: min(400px, calc(100vw - 300px));
  bottom: 18px;
}
.desktop-search {
  width: 100%;
  min-height: 46px;
  gap: 8px;
  padding: 5px 6px 5px 15px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background: #34383e;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.desktop-search:focus-within {
  width: 100%;
  border-color: rgba(101,204,215,.55);
  box-shadow: 0 0 0 2px rgba(65,181,196,.12), 0 10px 28px rgba(0,0,0,.22);
}
.desktop-search textarea {
  min-height: 30px;
  padding: 5px 0;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: -.08px;
}
.desktop-search textarea::placeholder { color: #d4d7dc; }
.desktop-search button { width: 32px; height: 32px; background: #777d86; color: #21252a; opacity: 1; }
.desktop-search.has-text button { background: #f3f5f6; color: #171a1d; }
.desktop-search button svg { width: 15px; height: 15px; }

body[data-theme="light"] .desktop-search {
  border-color: #dce5e9;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 24px rgba(24, 57, 70, .12), inset 0 1px 0 #fff;
}
body[data-theme="light"] .desktop-search:focus-within {
  border-color: #8fcbd2;
  box-shadow: 0 0 0 2px rgba(64, 160, 172, .14), 0 10px 30px rgba(24, 57, 70, .13);
}
body[data-theme="light"] .desktop-search textarea { color: #26363c; }
body[data-theme="light"] .desktop-search textarea::placeholder { color: #7d8c92; }
body[data-theme="light"] .desktop-search button { background: #e9f1f3; color: #52717a; opacity: 1; }
body[data-theme="light"] .desktop-search.has-text button { background: #197f8d; color: #fff; }
body[data-theme="light"] .desktop-search.has-text button:hover { background: #126b78; }

@media (min-width: 701px) {
  .mobile-chat:not([hidden]) {
    background: #212121;
    color: #ececec;
  }
  .mobile-chat-header {
    min-height: 62px;
    padding-inline: clamp(20px, 3vw, 44px);
    border-bottom-color: rgba(255,255,255,.08);
    background: rgba(33,33,33,.94);
    backdrop-filter: blur(16px);
  }
  .mobile-chat-identity { gap: 12px; }
  .mobile-chat-avatar { border-radius: 13px; }
  .mobile-chat-icon-button { border-color: rgba(255,255,255,.07); }
  .mobile-chat-scroll { scroll-padding-block: 30px; }
  .mobile-chat-welcome {
    width: min(100%, 900px);
    padding: 46px 32px 62px;
  }
  .mobile-chat-welcome-mark { width: 52px; height: 52px; margin-bottom: 20px; }
  .mobile-chat-welcome h2 { font-size: clamp(27px, 3vw, 34px); letter-spacing: -.9px; }
  .mobile-chat-welcome > p { margin-bottom: 30px; font-size: 14px; }
  .mobile-chat-prompts { gap: 12px; }
  .mobile-chat-prompts button {
    min-height: 66px;
    padding-inline: 15px;
    border-color: #3c3c3c;
    border-radius: 14px;
    background: #272727;
    font-size: 13px;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
  }
  .mobile-chat-prompts button:hover { transform: translateY(-2px); border-color: #5e7779; background: #2b3030; }
  .mobile-chat-messages { width: min(100%, 850px); padding: 12px 32px 38px; }
  .mobile-chat-message { gap: 15px; padding: 22px 0; }
  .mobile-chat-message + .mobile-chat-message { border-top: 0; }
  .mobile-chat-message-avatar { width: 31px; height: 31px; border-radius: 10px; }
  .mobile-chat-message-body > strong { font-size: 12px; }
  .mobile-chat-message-text { margin-top: 8px; font-size: 15px; line-height: 1.72; }
  .mobile-chat-message.is-user { justify-content: flex-end; }
  .mobile-chat-message.is-user .mobile-chat-message-avatar { display: none; }
  .mobile-chat-message.is-user .mobile-chat-message-body {
    flex: 0 1 auto;
    max-width: min(78%, 650px);
    padding: 12px 17px;
    border: 1px solid #3c3c3c;
    border-radius: 20px 20px 5px 20px;
    background: #2f2f2f;
  }
  .mobile-chat-message.is-user .mobile-chat-message-body > strong { display: none; }
  .mobile-chat-message.is-user .mobile-chat-message-text { margin-top: 0; }
  .mobile-chat-composer {
    padding: 14px 28px max(18px, env(safe-area-inset-bottom));
    border-top: 0;
    background: linear-gradient(180deg, rgba(33,33,33,.78), #212121 28%);
  }
  .mobile-chat-composer-row { width: min(100%, 790px); gap: 9px; }
  .mobile-chat-input-shell {
    min-height: 50px;
    padding: 7px 8px 7px 17px;
    border-color: #4a4a4a;
    border-radius: 24px;
    background: #2f2f2f;
    box-shadow: 0 4px 18px rgba(0,0,0,.16);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }
  .mobile-chat-input-shell:focus-within { border-color: #777; background: #303030; box-shadow: 0 0 0 2px rgba(255,255,255,.055), 0 6px 22px rgba(0,0,0,.2); }
  .mobile-chat-input-shell textarea { min-height: 30px; padding-block: 5px; font-size: 14px; line-height: 1.45; }
  .mobile-chat-input-shell button { width: 34px; height: 34px; border-radius: 50%; background: #f4f4f4; font-size: 14px; transition: transform .16s ease, background .16s ease; }
  .mobile-chat-input-shell button:not(:disabled):hover { transform: scale(1.04); background: white; }
  .mobile-chat-input-shell button:disabled { background: #555; color: #aaa; }
  .mobile-chat-plus { width: 36px; height: 36px; border-color: #4a4a4a; background: #2f2f2f; }
  .mobile-chat-composer > p { margin-top: 10px; color: #888; font-size: 10px; }
  .mobile-chat-progress { width: min(100%, 850px); }
  .mobile-chat-pending-attachments { width: min(100%, 820px); }
  body[data-theme="light"] .mobile-chat:not([hidden]) { background: #fff; }
  body[data-theme="light"] .mobile-chat-header { background: rgba(255,255,255,.94); }
  body[data-theme="light"] .mobile-chat-message.is-user .mobile-chat-message-body { border-color: #e5e5e5; background: #f4f4f4; }
  body[data-theme="light"] .mobile-chat-input-shell { border-color: #dedede; background: #f4f4f4; }
  body[data-theme="light"] .mobile-chat-input-shell:focus-within { border-color: #aaa; background: #fff; box-shadow: 0 0 0 2px rgba(30,30,30,.06), 0 6px 22px rgba(20,20,20,.08); }
  body[data-theme="light"] .mobile-chat-composer { background: linear-gradient(180deg, rgba(255,255,255,.8), #fff 28%); }
  body[data-theme="light"] .mobile-chat-composer > p { color: #8a8a8a; }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .mobile-chat-welcome { padding-inline: 24px; }
  .mobile-chat-messages { padding-inline: 24px; }
}

@media (max-width: 700px) {
  .mobile-chat-header { backdrop-filter: blur(16px); }
  .mobile-chat-message.is-user { justify-content: flex-end; }
  .mobile-chat-message.is-user .mobile-chat-message-avatar { display: none; }
  .mobile-chat-message.is-user .mobile-chat-message-body { flex: 0 1 auto; max-width: min(84%, 560px); }
  .mobile-chat-message.is-user .mobile-chat-message-body > strong { display: none; }
  .mobile-chat-message.is-user .mobile-chat-message-text { margin-top: 0; }
  .mobile-chat-input-shell { min-height: 48px; border-radius: 23px; }
  .mobile-chat-input-shell button { width: 35px; height: 35px; border-radius: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-search, .desktop-search button, .mobile-chat-prompts button,
  .mobile-chat-input-shell, .mobile-chat-input-shell button { transition: none !important; }
}


/* AI presentation: ready-state gating, editable prompt cards, and the open-only shortcut. */
.search-assistant[hidden] { display: none !important; }
.desktop-search .desktop-search-open {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: transparent;
  color: #d8dce1;
  opacity: 1;
}
.desktop-search .desktop-search-open:hover { border-color: rgba(116,211,221,.45); background: rgba(83,187,199,.12); color: #a4eaf0; }
.desktop-search .desktop-search-open i { font-size: 13px; }
.desktop-search .desktop-search-open:focus-visible { outline: 2px solid #67d4e2; outline-offset: 2px; }
.mobile-chat-welcome h3 {
  margin: 9px 0 0;
  color: #f2f2f4;
  font: 620 19px/1.35 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.25px;
}
.mobile-chat-welcome > #mobile-chat-welcome-subtitle { max-width: 54ch; margin: 7px auto 22px; }
.mobile-chat-prompts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mobile-chat-prompts .mobile-chat-prompt-card {
  min-height: 78px;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  gap: 11px;
  padding: 12px 14px;
  border-color: #3d4145;
  border-radius: 14px;
  background: #27292b;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.mobile-chat-prompts .mobile-chat-prompt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(105,201,211,.42);
  background: #2c3032;
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}
.mobile-chat-prompt-emoji {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  font-size: 18px;
  place-items: center;
}
.mobile-chat-prompt-copy { display: grid; min-width: 0; gap: 4px; }
.mobile-chat-prompt-copy strong { color: #e8e9eb; font: 600 12px/1.35 Inter, "Helvetica Neue", Arial, sans-serif; }
.mobile-chat-prompt-copy small { color: #9b9fa4; font: 400 10px/1.45 Inter, "Helvetica Neue", Arial, sans-serif; }
.mobile-chat-prompts .mobile-chat-prompt-arrow { color: #858b91; font-size: 10px; }
.mobile-chat-prompt-hint { margin: 15px auto 0 !important; color: #858990 !important; font-size: 10px !important; line-height: 1.5 !important; }
.chat-presentation-loading {
  display: flex;
  min-height: 58px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #a6aaae;
  font: 450 12px/1.4 Inter, "Helvetica Neue", Arial, sans-serif;
}
.chat-presentation-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(156,211,218,.22);
  border-top-color: #8ed7df;
  border-radius: 50%;
  animation: presentation-spin .8s linear infinite;
}
@keyframes presentation-spin { to { transform: rotate(360deg); } }
body[data-theme="light"] .mobile-chat-welcome h3 { color: #27292e; }
body[data-theme="light"] .mobile-chat-prompts .mobile-chat-prompt-card { border-color: #e1e4e8; background: #fff; }
body[data-theme="light"] .mobile-chat-prompts .mobile-chat-prompt-card:hover { border-color: #b6d9dd; background: #f8fcfc; box-shadow: 0 8px 20px rgba(20,45,55,.07); }
body[data-theme="light"] .mobile-chat-prompt-emoji { border-color: #e9edf0; background: #f5f7f8; }
body[data-theme="light"] .mobile-chat-prompt-copy strong { color: #30333a; }
body[data-theme="light"] .mobile-chat-prompt-copy small, body[data-theme="light"] .mobile-chat-prompt-hint { color: #777d85 !important; }
body[data-theme="light"] .chat-presentation-loading { color: #747b83; }
body[data-theme="light"] .chat-presentation-spinner { border-color: rgba(67,142,151,.2); border-top-color: #438e97; }
body[data-theme="light"] .desktop-search .desktop-search-open { border-color: #d5e2e6; background: #f1f7f8; color: #45636c; }
body[data-theme="light"] .desktop-search .desktop-search-open:hover { border-color: #a8d4d9; background: #e8f6f7; color: #176b77; }
body[data-theme="light"] .mobile-chat-welcome-mark {
  border-color: rgba(38, 139, 151, .22);
  background: radial-gradient(circle at 30% 20%, #e8fbfc, #e9f1f4 72%);
  color: #257d89;
  box-shadow: 0 8px 24px rgba(25, 117, 129, .1);
}
body[data-theme="light"] .mobile-chat-welcome-mark svg {
  fill: #258b97;
  filter: drop-shadow(0 2px 5px rgba(37, 139, 151, .24));
}
body[data-theme="light"] .mobile-chat-avatar {
  border-color: #c9e3e7;
  background: linear-gradient(145deg, #e5f6f7, #dcebee);
  color: #257d89;
}
body[data-theme="light"] .mobile-chat-avatar svg {
  fill: #258b97;
  filter: drop-shadow(0 2px 4px rgba(37, 139, 151, .2));
  animation: none;
}
body[data-theme="light"] .mobile-chat-consent {
  border-color: #d8e4e7;
  background: linear-gradient(145deg, #fff, #f5f9fa);
  box-shadow: 0 8px 24px rgba(31, 67, 79, .08);
}
body[data-theme="light"] .mobile-chat-consent-icon { background: #e8f5f6; color: #287f8b; }
body[data-theme="light"] .mobile-chat-consent-heading strong { color: #293940; }
body[data-theme="light"] .mobile-chat-consent-details p { color: #5e6d74; }
body[data-theme="light"] .mobile-chat-consent-cancel { border-color: #dbe3e6; background: #f5f7f8; color: #53636a; }
body[data-theme="light"] .mobile-chat-consent-authorize { border-color: #287d88; background: linear-gradient(135deg, #3b9da8, #287d88); color: #fff; }
body[data-theme="light"] .mobile-chat-consent.is-authorized { border-color: #b9e2d0; }
body[data-theme="light"] .mobile-chat-consent.is-authorized .mobile-chat-consent-icon { border-color: #b9e2d0; background: #e8f7ef; color: #27805a; }
body[data-theme="light"] .mobile-chat-consent.is-denied { border-color: #dfe3e5; opacity: .9; }
@media (max-width: 700px) {
  body[data-theme="light"] .mobile-spark-button {
    border-color: rgba(32, 124, 139, .28);
    background: linear-gradient(145deg, #e9fbfc, #d2f0f3);
    box-shadow: 0 7px 18px rgba(23, 104, 119, .2), inset 0 1px 0 rgba(255,255,255,.9);
  }
  body[data-theme="light"] .mobile-spark-button svg {
    fill: #197f8d;
    filter: drop-shadow(0 1px 3px rgba(25, 127, 141, .24));
  }
  body[data-theme="light"] .mobile-spark-button:hover { background: linear-gradient(145deg, #dff7f9, #c5e9ed); }
  body[data-theme="light"] .mobile-spark-button:focus-visible { outline-color: #258b97; }
}
@media (max-width: 700px) {
  .mobile-chat-welcome h3 { font-size: 17px; }
  .mobile-chat-prompts { grid-template-columns: minmax(0, 1fr); }
  .mobile-chat-prompts .mobile-chat-prompt-card { min-height: 66px; padding: 10px 12px; }
  .mobile-chat-prompt-hint { max-width: 34ch; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-chat-prompts .mobile-chat-prompt-card { transition: none !important; }
  .chat-presentation-spinner { animation-duration: 2.4s; }
}

.mobile-chat-workspace[hidden] { display: none !important; }
.mobile-chat-workspace:not([hidden]) {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: block;
}
.mobile-chat-body { position: relative; display: flex; min-height: 0; flex: 1; overflow: hidden; }
.mobile-chat-body > .mobile-chat-scroll { min-height: 0; flex: 1; }
.mobile-chat-header .mobile-chat-history-button { width: 38px; height: 38px; border-radius: 11px; }
.mobile-chat-header .mobile-chat-history-button[aria-expanded="true"] { border-color: rgba(105,197,208,.28); background: rgba(75,174,186,.12); color: #91e0e8; }
.mobile-chat-history-view {
  position: absolute;
  z-index: 6;
  inset: 0 auto 0 0;
  display: flex;
  box-sizing: border-box;
  width: min(340px, 88%);
  max-width: none;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  border-right: 1px solid #3a3b41;
  background: #202124;
  box-shadow: 16px 0 44px rgba(0,0,0,.25);
  transform: translateX(-105%);
  transition: transform .24s cubic-bezier(.2,.75,.25,1);
}
.mobile-chat.is-history-open .mobile-chat-history-view { transform: translateX(0); }
.mobile-chat-history-scrim {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: rgba(5,8,11,.42);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  animation: chat-history-scrim-in .2s ease both;
}
.mobile-chat-history-scrim[hidden] { display: none !important; }
@keyframes chat-history-scrim-in { from { opacity: 0; } to { opacity: 1; } }
.mobile-chat-history-heading { flex: none; margin: 0; }
.mobile-chat-history-heading > div { gap: 8px; align-items: center; flex-wrap: wrap; }
.mobile-chat-history-heading h2 { font-size: 17px; }
.mobile-chat-history-heading > button { display: grid; width: 34px; min-height: 34px; padding: 0; place-items: center; }
.mobile-chat-history-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.mobile-chat-workspace.is-split {
  --mobile-chat-pane: 56%;
  display: grid;
  grid-template-columns: minmax(280px, var(--mobile-chat-pane)) 9px minmax(260px, 1fr);
  align-items: stretch;
  overflow: hidden;
  background: #15181b;
}
.mobile-chat-workspace.is-split > .mobile-chat:not([hidden]) {
  position: relative;
  z-index: auto;
  inset: auto;
  width: auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.07);
  border-radius: 0;
  box-shadow: none;
  animation: none;
  container: split-chat / inline-size;
}
.mobile-chat-workspace.is-split > .mobile-chat-splitter {
  position: relative;
  z-index: 3;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
  transition: background .15s ease;
}
.mobile-chat-workspace.is-split > .mobile-chat-splitter::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 3px;
  border-radius: 3px;
  background: rgba(138,153,164,.24);
  content: "";
}
.mobile-chat-workspace.is-split > .mobile-chat-splitter:hover::after,
.mobile-chat-workspace.is-split > .mobile-chat-splitter:focus-visible::after,
.mobile-chat-workspace.is-resizing > .mobile-chat-splitter::after { background: #53b7c3; }
.mobile-chat-splitter[hidden] { display: none !important; }
.mobile-chat-workspace.is-resizing,
.mobile-chat-workspace.is-resizing * { cursor: col-resize !important; user-select: none !important; }
.mobile-app-preview {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #29343a, #171a1d 72%);
}
.mobile-app-preview[hidden] { display: none !important; }
.mobile-app-preview-toolbar {
  display: flex;
  min-height: 48px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #c9d5da;
  font: 550 11px/1 Inter, "Helvetica Neue", Arial, sans-serif;
}
.mobile-app-preview-toolbar > span { display: flex; align-items: center; gap: 8px; }
.mobile-app-preview-toolbar > span i { color: #73ced9; }
.mobile-app-preview-back { display: none; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.04); color: inherit; cursor: pointer; font: inherit; }
.mobile-app-preview-canvas {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #f7f9fb;
}
.mobile-app-preview-canvas iframe { display: block; width: 100%; height: 100%; border: 0; background: #f7f9fb; }
body[data-theme="light"] .mobile-chat-workspace.is-split { background: #e8edef; }
body[data-theme="light"] .mobile-chat-workspace.is-split > .mobile-chat:not([hidden]) { border-right-color: #e0e6e8; }
body[data-theme="light"] .mobile-chat-workspace.is-split > .mobile-chat-splitter::after { background: rgba(58,93,104,.22); }
body[data-theme="light"] .mobile-chat-workspace.is-split > .mobile-chat-splitter:hover::after,
body[data-theme="light"] .mobile-chat-workspace.is-split > .mobile-chat-splitter:focus-visible::after,
body[data-theme="light"] .mobile-chat-workspace.is-resizing > .mobile-chat-splitter::after { background: #3995a2; }
body[data-theme="light"] .mobile-app-preview { background: radial-gradient(ellipse at 50% 40%, #f7fcfd, #e4ecef 72%); }
body[data-theme="light"] .mobile-app-preview-toolbar { border-bottom-color: #dce5e8; color: #56676e; }
body[data-theme="light"] .mobile-app-preview-toolbar > span i { color: #278493; }
body[data-theme="light"] .mobile-app-preview-back { border-color: #d6e1e4; background: #fff; color: #475d65; }

@container split-chat (max-width: 640px) {
  .mobile-chat-header { min-height: 56px; gap: 8px; padding-inline: 14px; }
  .mobile-chat-identity { gap: 8px; }
  .mobile-chat-avatar { width: 31px; height: 31px; border-radius: 10px; }
  .mobile-chat-identity strong { font-size: 11px; }
  .mobile-chat-identity small { font-size: 9px; }
  .mobile-chat-header-actions { gap: 3px; }
  .mobile-chat-icon-button,.mobile-chat-header .mobile-chat-history-button { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
  .mobile-chat-messages { width: 100%; padding: 8px 14px 22px; }
  .mobile-chat-message { gap: 10px; padding: 14px 0; }
  .mobile-chat-message-avatar { width: 26px; height: 26px; border-radius: 8px; }
  .mobile-chat-message-body > strong { font-size: 11px; }
  .mobile-chat-message-text { margin-top: 6px; font-size: 13px; line-height: 1.58; }
  .mobile-chat-composer { padding: 10px 12px max(12px,env(safe-area-inset-bottom)); }
  .mobile-chat-composer-row { width: 100%; gap: 7px; }
  .mobile-chat-plus,.mobile-chat-history-button { width: 34px; height: 34px; }
  .mobile-chat-input-shell { min-height: 44px; padding: 5px 6px 5px 12px; }
  .mobile-chat-input-shell textarea { min-height: 26px; font-size: 12px; }
  .mobile-chat-input-row { min-height: 30px; gap: 5px; }
  .mobile-chat-input-row > button { width: 30px; height: 30px; }
  .mobile-chat-composer > p { margin-top: 7px; font-size: 9px; }
  .mobile-chat-progress,.mobile-chat-pending-attachments { width: 100%; }
  .channel-metrics-dashboard { width: 100%; margin: 12px 0 16px; padding: 12px; border-radius: 14px; }
  .channel-dashboard-heading { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; margin-bottom: 10px; }
  .channel-dashboard-heading > div { min-width: 0; }
  .channel-dashboard-kicker { margin-bottom: 4px; font-size: 8px; letter-spacing: .08em; }
  .channel-dashboard-heading h3 { font-size: 15px; line-height: 1.28; overflow-wrap: break-word; word-break: normal; }
  .channel-dashboard-updated { font-size: 9px; }
  .channel-dashboard-note { font-size: 9px; }
  .channel-dashboard-cards { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .channel-dashboard-card { padding: 10px; }
  .channel-dashboard-stats { gap: 9px 13px; margin-top: 9px; }
  .channel-dashboard-stat { min-width: 60px; }
  .channel-dashboard-stat strong { font-size: 13px; }
  .channel-dashboard-stat span { font-size: 8px; }
  .channel-dashboard-chart-section,.channel-dashboard-video-section { margin-top: 10px; padding: 9px; border-radius: 11px; }
  .channel-dashboard-chart { min-height: 100px; }
  .channel-dashboard-chart svg { min-width: 260px; max-height: 200px; }
  .channel-dashboard-metrics { gap: 5px; }
  .channel-dashboard-metric { min-height: 27px; padding-inline: 8px; font-size: 8px; }
  .channel-dashboard-video-heading { align-items: flex-start; }
  .channel-dashboard-sort { gap: 3px; }
  .channel-dashboard-sort button { min-height: 24px; padding-inline: 7px; font-size: 8px; }
  .channel-dashboard-video { width: 170px; min-width: 170px; }
  .channel-dashboard-video-copy { padding: 7px; }
}
@container split-chat (max-width: 390px) {
  .mobile-chat-header { min-height: 50px; gap: 5px; padding-inline: 8px; }
  .mobile-chat-identity { gap: 6px; }
  .mobile-chat-avatar { width: 27px; height: 27px; border-radius: 8px; }
  .mobile-chat-identity strong { font-size: 10px; }
  .mobile-chat-identity small { display: none; }
  .mobile-chat-header-actions { gap: 1px; }
  .mobile-chat-icon-button,.mobile-chat-header .mobile-chat-history-button { width: 29px; height: 29px; border-radius: 8px; font-size: 12px; }
  .mobile-chat-messages { padding-inline: 9px; }
  .mobile-chat-message { gap: 7px; padding-block: 11px; }
  .mobile-chat-message-avatar { width: 23px; height: 23px; }
  .mobile-chat-message-text { font-size: 12px; line-height: 1.52; }
  .mobile-chat-composer { padding-inline: 8px; }
  .mobile-chat-composer-row { gap: 5px; }
  .mobile-chat-plus,.mobile-chat-history-button { width: 30px; height: 30px; }
  .mobile-chat-input-shell { padding-left: 9px; }
  .channel-metrics-dashboard { padding: 9px; }
  .channel-dashboard-heading h3 { font-size: 14px; }
  .channel-dashboard-chart svg { min-width: 240px; }
  .channel-dashboard-video { width: 148px; min-width: 148px; }
}
body[data-theme="light"] .mobile-chat-history-view { border-right-color: #dfe6e8; background: #fff; box-shadow: 16px 0 42px rgba(25,55,66,.14); }
body[data-theme="light"] .mobile-chat-header .mobile-chat-history-button[aria-expanded="true"] { border-color: #b9dfe3; background: #eef9fa; color: #267d87; }

/* Give the alerts workspace a clear, consistent break after the page header. */
.alerts-content { padding-top: 22px; }
.alerts-layout { gap: 16px; }
.alerts-list { gap: 12px; padding-top: 18px; }
@media (max-width: 700px) {
  .alerts-content { padding-top: 14px; }
  .alerts-layout { gap: 12px; }
  .alerts-list { gap: 10px; padding-top: 14px; }
}

/* Pending uploads live inside the composer, directly above the message field. */
.mobile-chat-input-shell { flex-wrap: wrap; }
.mobile-chat-pending-attachments {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: 0 0 100%;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  padding: 2px 1px 5px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 148, 160, .35) transparent;
}
.mobile-chat-pending-attachments[hidden] { display: none !important; }
.mobile-chat-attachment-card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 116px;
  min-width: 116px;
  height: 88px;
  flex: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(159, 180, 190, .2);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(46, 53, 59, .96), rgba(34, 39, 44, .98));
  box-shadow: 0 5px 16px rgba(0, 0, 0, .17);
}
.mobile-chat-attachment-preview { display: block; width: 100%; height: 55px; flex: none; object-fit: cover; background: #202529; }
.mobile-chat-attachment-detail { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 4px; padding: 0 7px; color: #cdd6db; font: 500 9px/1.2 Inter, "Helvetica Neue", Arial, sans-serif; }
.mobile-chat-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-chat-attachment-detail small { flex: none; color: #8e9ba2; font-size: 8px; }
.mobile-chat-attachment-remove { position: absolute; top: 4px; right: 4px; z-index: 1; display: grid; width: 21px !important; height: 21px !important; border: 1px solid rgba(255, 255, 255, .2) !important; border-radius: 50% !important; background: rgba(15, 20, 24, .78) !important; color: #f4f7f8 !important; cursor: pointer; font-size: 9px !important; place-items: center; backdrop-filter: blur(8px); }
.mobile-chat-attachment-remove:disabled { opacity: .55; cursor: default; }
.mobile-chat-attachment-chip { position: relative; max-width: 210px; min-height: 30px; padding: 3px 29px 3px 8px; }
.mobile-chat-attachment-chip .mobile-chat-attachment-remove { top: 4px; right: 4px; width: 20px !important; height: 20px !important; border: 0 !important; background: transparent !important; color: #aeb1b8 !important; }
.mobile-chat-input-shell:has(.mobile-chat-pending-attachments:not([hidden])) { border-radius: 18px; }
body[data-theme="light"] .mobile-chat-attachment-card { border-color: #dce2e7; background: linear-gradient(145deg, #fff, #f1f4f6); box-shadow: 0 5px 15px rgba(32, 51, 63, .09); }
body[data-theme="light"] .mobile-chat-attachment-preview { background: #e8edf0; }
body[data-theme="light"] .mobile-chat-attachment-detail { color: #39434a; }
body[data-theme="light"] .mobile-chat-attachment-detail small { color: #78858c; }
@container split-chat (max-width: 390px) {
  .mobile-chat-pending-attachments { gap: 6px; }
  .mobile-chat-attachment-card { width: 92px; min-width: 92px; height: 76px; border-radius: 10px; }
  .mobile-chat-attachment-preview { height: 46px; }
  .mobile-chat-attachment-detail { padding-inline: 5px; font-size: 8px; }
  .mobile-chat-attachment-detail small { font-size: 7px; }
}
@container split-chat (max-width: 300px) {
  .mobile-chat-attachment-card { width: 74px; min-width: 74px; height: 67px; }
  .mobile-chat-attachment-preview { height: 39px; }
  .mobile-chat-attachment-detail { align-items: flex-start; justify-content: center; flex-direction: column; gap: 1px; }
}

/* Floating, full-height sidebar control with a precise 5px edge gap. */
.sidebar { transition: width .24s cubic-bezier(.2,.75,.25,1), padding .24s ease; }
.sidebar-edge-toggle {
  position: fixed;
  z-index: 61;
  top: 50%;
  left: calc(var(--sp-sidebar-width) + 5px);
  box-sizing: border-box;
  display: grid;
  width: 10px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(159, 210, 224, .3);
  border-radius: 999px;
  background: rgba(34, 58, 83, .96);
  color: transparent;
  box-shadow: 0 5px 16px rgba(4, 15, 29, .28);
  cursor: pointer;
  place-items: center;
  backdrop-filter: blur(12px);
  transition: left .24s cubic-bezier(.2,.75,.25,1), height .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sidebar-edge-toggle:hover { height: 40px; border-color: rgba(118, 220, 230, .62); background: #2b5f70; box-shadow: 0 7px 19px rgba(4, 15, 29, .34), 0 0 16px rgba(70, 197, 212, .13); }
.sidebar-edge-toggle:focus-visible { outline: 3px solid rgba(99, 222, 232, .65); outline-offset: 3px; }
body.sidebar-collapsed { --sp-sidebar-width: 68px; --sp-sidebar-center-offset: 34px; }
@media (min-width: 701px) and (min-height: 501px) {
  body.sidebar-collapsed .sidebar { width: 68px; padding-right: 8px; padding-left: 8px; }
}
body.sidebar-collapsed .sidebar .brand { width: 100%; justify-content: center; }
body.sidebar-collapsed .sidebar .brand-name,
body.sidebar-collapsed .sidebar .profile-username,
body.sidebar-collapsed .sidebar .profile-chevron,
body.sidebar-collapsed .sidebar .balance-card,
body.sidebar-collapsed .sidebar .nav-section-label,
body.sidebar-collapsed .sidebar .nav-chevron,
body.sidebar-collapsed .sidebar .nav-submenu { display: none !important; }
body.sidebar-collapsed .sidebar .nav-button > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.sidebar-collapsed .sidebar .profile-button,
body.sidebar-collapsed .sidebar .nav-button { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar .nav-button > i:first-child { margin: 0; }
body.sidebar-collapsed .sidebar .nav-list { gap: 5px; }
body.sidebar-collapsed .sidebar .nav-button { position: relative; }
body[data-theme="light"] .sidebar-edge-toggle { border-color: rgba(70, 131, 147, .32); background: rgba(237, 247, 249, .98); box-shadow: 0 5px 16px rgba(28, 59, 71, .15); }
body[data-theme="light"] .sidebar-edge-toggle:hover { border-color: rgba(29, 151, 168, .55); background: #d9f3f4; box-shadow: 0 7px 19px rgba(27, 99, 113, .2), 0 0 14px rgba(70, 197, 212, .11); }
.topbar-hierarchy-shortcuts[hidden] { display: none !important; }
.topbar.has-hierarchy-shortcuts { min-height: 80px; padding: 8px 26px 37px 28px; }
.topbar-hierarchy-shortcuts:not([hidden]) {
  position: absolute;
  z-index: 8;
  top: auto;
  bottom: 4px;
  left: 50%;
  display: flex;
  width: max-content;
  max-width: calc(100% - 36px);
  max-height: none;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(145, 181, 196, .18);
  border-radius: 999px;
  background: rgba(30, 38, 47, .94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
  scrollbar-width: none;
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}
.topbar-hierarchy-shortcuts:not([hidden])::-webkit-scrollbar { display: none; }
.topbar-hierarchy-shortcut {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a9bac2;
  cursor: pointer;
  font-size: 11px;
  place-items: center;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.topbar-hierarchy-shortcut:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(111, 210, 220, .2); background: rgba(76, 181, 193, .12); color: #a0edf1; }
.topbar-hierarchy-shortcut[aria-current="page"] { border-color: rgba(85, 208, 218, .3); background: rgba(70, 181, 195, .18); color: #7de0e8; box-shadow: inset 0 0 0 1px rgba(85, 208, 218, .06); }
.topbar-hierarchy-shortcut:disabled { color: #657078; cursor: not-allowed; opacity: .45; }
.topbar-hierarchy-shortcut:focus-visible { outline: 2px solid #67d4e2; outline-offset: 1px; }
body[data-theme="light"] .topbar-hierarchy-shortcuts:not([hidden]) { border-color: rgba(70, 131, 147, .22); background: rgba(250, 253, 254, .96); box-shadow: 0 10px 28px rgba(26, 58, 70, .17), inset 0 1px 0 #fff; }
body[data-theme="light"] .topbar-hierarchy-shortcut { color: #60747b; }
body[data-theme="light"] .topbar-hierarchy-shortcut:hover:not(:disabled) { border-color: rgba(45, 156, 169, .22); background: #eaf7f8; color: #197c89; }
body[data-theme="light"] .topbar-hierarchy-shortcut[aria-current="page"] { border-color: rgba(45, 156, 169, .3); background: #e1f4f5; color: #197c89; }
@media (max-width: 700px), (max-width: 900px) and (max-height: 500px) {
  .topbar-hierarchy-shortcuts:not([hidden]) { display: none; }
}
@media (max-width: 700px), (max-width: 900px) and (max-height: 500px) {
  .sidebar-edge-toggle { display: none; }
}
@media (max-width: 760px) {
  .mobile-chat-workspace.is-phone-preview { display: block; background: #15181b; }
  .mobile-chat-workspace.is-phone-preview > .mobile-chat { display: none !important; }
  .mobile-chat-workspace.is-phone-preview > .mobile-chat-splitter { display: none !important; }
  .mobile-chat-workspace.is-phone-preview > .mobile-app-preview { width: 100%; height: 100%; }
  .mobile-chat-workspace.is-phone-preview .mobile-app-preview-toolbar { min-height: 54px; }
  .mobile-chat-workspace.is-phone-preview .mobile-app-preview-back { display: inline-flex; }
  .mobile-chat-workspace.is-phone-preview .mobile-app-preview-canvas { width: 100%; height: auto; }
  body[data-theme="light"] .mobile-chat-workspace.is-phone-preview { background: #f4f7f8; }
  body[data-theme="light"] .mobile-chat-workspace.is-phone-preview .mobile-app-preview-toolbar { background: #fff; }
}
body.split-app-preview-mode .mobile-chat-workspace,
body.split-app-preview-mode .mobile-spark-button,
body.split-app-preview-mode .search-assistant,
body.split-app-preview-mode #mobile-qr-screen,
body.split-app-preview-mode .youtube-popup,
body.split-app-preview-mode .login-gate { display: none !important; }


/* Responsive, model-authored visual canvas blocks. */
.channel-metrics-dashboard {
  --channel-panel: #171b20;
  --channel-surface: rgba(255,255,255,.035);
  --channel-border: rgba(160,178,190,.16);
  box-sizing: border-box;
  width: min(100%, 980px);
  margin: 18px 0 22px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--channel-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #1c2329, var(--channel-panel) 62%);
}
.channel-dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.channel-dashboard-kicker { display: block; margin-bottom: 5px; color: #66cad4; font: 750 9px/1.2 Inter,"Helvetica Neue",Arial,sans-serif; letter-spacing: .12em; }
.channel-dashboard-heading h3 { margin: 0; color: #f2f5f6; font: 640 18px/1.3 Inter,"Helvetica Neue",Arial,sans-serif; letter-spacing: -.2px; }
.channel-dashboard-updated { display: block; margin-top: 5px; color: #929da4; font: 450 10px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: 9px; }
.channel-dashboard-card { min-width: 0; padding: 12px; border: 1px solid var(--channel-border); border-radius: 13px; background: var(--channel-surface); }
.channel-dashboard-name { display: block; overflow: hidden; color: #eaf4f5; font: 620 12px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.channel-dashboard-name:hover { color: #73d6df; }
.channel-dashboard-stats { display: flex; flex-wrap: wrap; gap: 12px 17px; margin-top: 11px; }
.channel-dashboard-stat { min-width: 70px; display: grid; gap: 3px; }
.channel-dashboard-stat strong { color: #f3f6f7; font: 650 15px/1.15 Inter,"Helvetica Neue",Arial,sans-serif; font-variant-numeric: tabular-nums; }
.channel-dashboard-stat span { color: #9eaab1; font: 450 9px/1.35 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-note { margin: 9px 0 0; color: #f0be78; font: 450 10px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-chart-section,.channel-dashboard-video-section { margin-top: 15px; padding: 13px; border: 1px solid var(--channel-border); border-radius: 14px; background: var(--channel-surface); }
.channel-dashboard-chart-section h4,.channel-dashboard-video-heading h4 { margin: 0; color: #eaf0f2; font: 600 11px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-metrics { display: flex; gap: 6px; margin: 10px 0 2px; overflow-x: auto; scrollbar-width: thin; }
.channel-dashboard-metric,.channel-dashboard-sort button { flex: none; min-height: 30px; padding: 0 10px; border: 1px solid rgba(160,178,190,.18); border-radius: 999px; background: rgba(0,0,0,.12); color: #aeb9bf; cursor: pointer; font: 500 9px/1 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-metric[aria-selected="true"],.channel-dashboard-sort button[aria-pressed="true"] { border-color: rgba(85,198,209,.45); background: rgba(70,180,193,.13); color: #a4eaf0; }
.channel-dashboard-metric:focus-visible,.channel-dashboard-sort button:focus-visible { outline: 2px solid #59c5d0; outline-offset: 2px; }
.channel-dashboard-chart { min-height: 120px; overflow-x: auto; color: #9ba8ae; font: 450 10px/1.5 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-chart svg { display: block; width: 100%; min-width: 350px; height: auto; max-height: 250px; overflow: visible; }
.channel-chart-value { fill: #e3ecef; font: 550 10px Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-chart-label { fill: #9ca9af; font: 450 9px Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-video-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.channel-dashboard-sort { display: flex; gap: 5px; }
.channel-dashboard-sort button { min-height: 27px; padding-inline: 9px; }
.channel-dashboard-video-rail { display: flex; gap: 9px; margin: 10px -2px 0; padding: 1px 2px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: rgba(131,151,162,.42) transparent; }
.channel-dashboard-empty { margin: 9px 2px; color: #9aa7ad; font: 450 10px/1.5 Inter,"Helvetica Neue",Arial,sans-serif; }
.channel-dashboard-video { display: flex; width: 218px; min-width: 218px; flex-direction: column; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--channel-border); border-radius: 11px; background: rgba(0,0,0,.15); color: inherit; text-decoration: none; transition: border-color .16s ease, transform .16s ease; }
.channel-dashboard-video:hover { transform: translateY(-2px); border-color: rgba(91,195,205,.48); }
.channel-dashboard-video img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #252d32; }
.channel-dashboard-video-copy { display: grid; gap: 5px; padding: 9px; }
.channel-dashboard-video-copy strong { display: -webkit-box; min-height: 2.7em; overflow: hidden; color: #e9eff1; font: 550 10px/1.35 Inter,"Helvetica Neue",Arial,sans-serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.channel-dashboard-video-copy small { overflow: hidden; color: #99a6ad; font: 450 8px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.channel-dashboard-disclaimer { margin: 11px 2px 0; color: #9aa7ad; font: 400 9px/1.55 Inter,"Helvetica Neue",Arial,sans-serif; }
body[data-theme="light"] .channel-metrics-dashboard { --channel-panel: #f8fbfc; --channel-surface: rgba(255,255,255,.78); --channel-border: #dfe7ea; background: linear-gradient(145deg,#fff,#f1f6f7); }
body[data-theme="light"] .channel-dashboard-heading h3,body[data-theme="light"] .channel-dashboard-chart-section h4,body[data-theme="light"] .channel-dashboard-video-heading h4,body[data-theme="light"] .channel-dashboard-stat strong,body[data-theme="light"] .channel-dashboard-video-copy strong { color: #29373e; }
body[data-theme="light"] .channel-dashboard-updated,body[data-theme="light"] .channel-dashboard-stat span,body[data-theme="light"] .channel-dashboard-disclaimer,body[data-theme="light"] .channel-dashboard-video-copy small { color: #73838a; }
body[data-theme="light"] .channel-dashboard-name { color: #31434a; }
body[data-theme="light"] .channel-dashboard-metric,body[data-theme="light"] .channel-dashboard-sort button { border-color: #dce5e8; background: #fff; color: #66777e; }
body[data-theme="light"] .channel-dashboard-metric[aria-selected="true"],body[data-theme="light"] .channel-dashboard-sort button[aria-pressed="true"] { border-color: #acd9de; background: #eaf7f8; color: #247f89; }
body[data-theme="light"] .channel-chart-value { fill: #33434a; }
body[data-theme="light"] .channel-chart-label { fill: #718188; }
body[data-theme="light"] .channel-dashboard-video { background: #fff; }
body[data-theme="light"] .channel-dashboard-empty { color: #73838a; }
@media (max-width: 700px) {
  .channel-metrics-dashboard { padding: 11px; border-radius: 14px; }
  .channel-dashboard-heading h3 { font-size: 16px; }
  .channel-dashboard-chart-section,.channel-dashboard-video-section { padding: 10px; }
  .channel-dashboard-video { width: 188px; min-width: 188px; }
}

.assistant-canvas,
.assistant-code-block,
.assistant-canvas-pending {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(160,178,190,.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
}
.assistant-canvas { position: relative; }
.assistant-canvas:has(.assistant-canvas-copy) .assistant-canvas-heading { padding-right: 128px; }
.assistant-canvas-copy { top: 8px; right: 9px; }
.assistant-canvas-heading { display: flex; align-items: baseline; gap: 9px; padding: 13px 15px 10px; }
.assistant-canvas-kicker { flex: none; color: #82cfd7; font: 700 9px/1.2 Inter,"Helvetica Neue",Arial,sans-serif; letter-spacing: .1em; }
.assistant-canvas-heading h4 { min-width: 0; margin: 0; color: #edf0f2; font: 620 13px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; }
.assistant-canvas-body { box-sizing: border-box; width: 100%; min-width: 0; padding: 0 12px 13px; }
.assistant-grid-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.assistant-grid-table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; color: #d5d9dd; font: 400 12px/1.55 Inter,"Helvetica Neue",Arial,sans-serif; }
.assistant-grid-table th,
.assistant-grid-table td { max-width: 360px; padding: 10px 12px; border-right: 1px solid rgba(160,178,190,.1); border-bottom: 1px solid rgba(160,178,190,.1); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.assistant-grid-table th { background: rgba(128,177,187,.09); color: #dff3f4; font-weight: 650; }
.assistant-grid-table tr > :first-child { border-left: 1px solid rgba(160,178,190,.1); }
.assistant-grid-table thead tr:first-child th { border-top: 1px solid rgba(160,178,190,.1); }
.assistant-grid-table thead tr:first-child th:first-child { border-radius: 9px 0 0 0; }
.assistant-grid-table thead tr:first-child th:last-child { border-radius: 0 9px 0 0; }
.assistant-canvas-items { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.assistant-canvas-items.is-horizontal { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.assistant-canvas-items.is-vertical { grid-template-columns: minmax(0, 1fr); }
.assistant-canvas-items.is-list .assistant-canvas-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; }
.assistant-canvas-item { box-sizing: border-box; min-width: 0; padding: 12px; border: 1px solid rgba(160,178,190,.12); border-radius: 11px; background: rgba(0,0,0,.11); }
.assistant-canvas-emoji { display: block; margin-bottom: 7px; font-size: 18px; line-height: 1; }
.assistant-canvas-item > strong { display: block; color: #edf0f2; font: 620 12px/1.4 Inter,"Helvetica Neue",Arial,sans-serif; }
.assistant-canvas-item-copy { margin-top: 5px; color: #b9c0c5; font: 400 11px/1.55 Inter,"Helvetica Neue",Arial,sans-serif; overflow-wrap: anywhere; }
.assistant-canvas-items.is-list .assistant-canvas-item-copy { grid-column: 1 / -1; margin-top: 0; }
.assistant-scale-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.assistant-scale-item { min-width: 0; padding: 10px 11px; border: 1px solid rgba(160,178,190,.12); border-radius: 10px; background: rgba(0,0,0,.1); }
.assistant-scale-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #e8edef; font-size: 11px; }
.assistant-scale-top strong { overflow-wrap: anywhere; }
.assistant-scale-top > span { flex: none; color: #a5dce1; font-variant-numeric: tabular-nums; }
.assistant-scale-track { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.assistant-scale-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#3f9ba7,#82d2d8); }
.assistant-scale-item p { margin: 7px 0 0; color: #aeb7bc; font-size: 10px; line-height: 1.5; }
.assistant-code-block { padding: 13px 15px; overflow-x: auto; color: #d6dadd; white-space: pre; font: 11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; }
.assistant-code-block code { font: inherit; }
.assistant-inline-code { padding: .12em .38em; border: 1px solid rgba(160,178,190,.14); border-radius: 5px; background: rgba(130,160,170,.11); color: #8fd8d5; font: .9em ui-monospace,SFMono-Regular,Consolas,monospace; }
.assistant-code-frame { position: relative; margin: 12px 0 16px; overflow: hidden; border: 1px solid #343d44; border-radius: 13px; background: #111519; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.assistant-code-frame .assistant-code-block { box-sizing: border-box; max-height: min(560px,65vh); margin: 0; padding: 46px 17px 18px; border: 0; border-radius: 0; background: transparent; scrollbar-color: #49545c transparent; }
.assistant-code-frame .assistant-code-block code { display: block; min-width: max-content; padding-right: 96px; }
.assistant-code-copy { position: absolute; z-index: 1; top: 9px; right: 9px; display: inline-flex; min-height: 29px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #3a444b; border-radius: 8px; background: #20272c; color: #d4e0e4; cursor: pointer; font: 500 10px/1 Inter,"Helvetica Neue",Arial,sans-serif; transition: .15s ease; }
.assistant-code-language { position: absolute; top: 17px; left: 16px; color: #86949a; font: 600 9px/1 Inter,"Helvetica Neue",Arial,sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.assistant-code-copy:hover,.assistant-code-copy.is-copied { border-color: #58b9c3; background: #263b3e; color: #a9edf0; }
.assistant-code-copy:focus-visible,.mobile-chat-action-button:focus-visible { outline: 2px solid #65c4cd; outline-offset: 2px; }
.syntax-keyword { color: #c792ea; }
.syntax-string { color: #a8cc83; }
.syntax-number { color: #f2a978; }
.syntax-comment { color: #78858c; font-style: italic; }
.syntax-literal { color: #f08c9b; }
.syntax-function { color: #82c9e8; }
.syntax-type,.syntax-tag { color: #f3c878; }
.syntax-attribute { color: #8bd5ca; }
.syntax-operator { color: #d59ce8; }
.syntax-punctuation { color: #aeb8be; }
.mobile-chat-message-actions { align-items: center; gap: 3px; }
.mobile-chat-message-actions .mobile-chat-continue-button { margin-right: 5px; }
.mobile-chat-message-text > h1,.mobile-chat-message-text > h2,.mobile-chat-message-text > h3 { margin: 1.15em 0 .4em; letter-spacing: -.02em; line-height: 1.3; }
.mobile-chat-message-text > h1 { font-size: 1.35em; }
.mobile-chat-message-text > h2 { font-size: 1.18em; }
.mobile-chat-message-text > h3 { font-size: 1.04em; }
.mobile-chat-message-text > ul,.mobile-chat-message-text > ol { display: grid; gap: 5px; padding-left: 1.35em; }
.mobile-chat-message-text > p { margin: .65em 0; }
.mobile-chat-action-button { display: inline-grid; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #929a9e; cursor: pointer; place-items: center; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.mobile-chat-action-button:hover,.mobile-chat-action-button.is-selected { border-color: rgba(123,193,198,.23); background: rgba(87,173,183,.1); color: #9ce0e3; }
.mobile-chat-action-button.is-selected { box-shadow: inset 0 0 0 1px rgba(123,193,198,.08); }
.mobile-chat-message-quote { display: grid; gap: 4px; margin: 0 0 9px; padding: 0 0 0 10px; border-left: 2px solid #66bec6; color: #9ea9ad; font: 400 10px/1.45 Inter,"Helvetica Neue",Arial,sans-serif; }
.mobile-chat-message-quote span:first-child { color: #89d0d5; font-weight: 650; }
.mobile-chat-message-quote span:last-child { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.mobile-chat-reply-context { display: grid; grid-template-columns: auto minmax(0,1fr) 28px; align-items: center; gap: 8px; width: 100%; padding: 1px 5px 9px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-chat-reply-context[hidden] { display: none; }
.mobile-chat-reply-label { color: #8fd1d6; font: 650 10px/1.35 Inter,"Helvetica Neue",Arial,sans-serif; white-space: nowrap; }
.mobile-chat-reply-context blockquote { min-width: 0; max-height: 30px; margin: 0; overflow: hidden; color: #aab3b7; font: 400 10px/1.45 Inter,"Helvetica Neue",Arial,sans-serif; }
.mobile-chat-reply-context button { display: grid; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #929da1; cursor: pointer; place-items: center; }
.mobile-chat-reply-context button:hover { background: rgba(255,255,255,.07); color: #fff; }
body[data-theme="light"] .assistant-code-frame { border-color: #dce4e8; background: #f6f8fa; box-shadow: 0 8px 22px rgba(35,55,65,.08); }
body[data-theme="light"] .assistant-code-frame .assistant-code-block { color: #34434b; }
body[data-theme="light"] .assistant-inline-code { border-color: #e2e9ec; background: #f1f6f7; color: #267f83; }
body[data-theme="light"] .assistant-code-copy { border-color: #d7e0e4; background: #fff; color: #53656d; }
body[data-theme="light"] .assistant-code-language { color: #76868d; }
body[data-theme="light"] .mobile-chat-action-button { color: #738087; }
body[data-theme="light"] .mobile-chat-action-button:hover,body[data-theme="light"] .mobile-chat-action-button.is-selected { border-color: #d7e8ea; background: #edf7f8; color: #287b84; }
body[data-theme="light"] .mobile-chat-reply-context { border-bottom-color: #e5eaed; }
body[data-theme="light"] .mobile-chat-reply-context blockquote,body[data-theme="light"] .mobile-chat-message-quote { color: #66757c; }
body[data-theme="light"] .mobile-chat-reply-context button:hover { background: #edf1f3; color: #34434b; }
@media (max-width: 600px) {
  .mobile-chat-reply-context { grid-template-columns: minmax(0,1fr) 28px; gap: 3px 8px; }
  .mobile-chat-reply-label { grid-column: 1; }
  .mobile-chat-reply-context blockquote { grid-column: 1; grid-row: 2; }
  .mobile-chat-reply-context button { grid-column: 2; grid-row: 1 / span 2; }
  .assistant-code-frame .assistant-code-block { max-height: 52vh; padding-inline: 12px; }
}
.assistant-canvas-pending { min-height: 52px; padding: 16px; color: #a6b0b5; font-size: 11px; }
.mobile-chat-message-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mobile-chat-continue-button { display: inline-flex; min-height: 29px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(150,170,180,.2); border-radius: 8px; background: transparent; color: #aeb6bb; cursor: pointer; font: 500 10px/1 Inter,"Helvetica Neue",Arial,sans-serif; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.mobile-chat-continue-button:hover { border-color: rgba(108,204,215,.4); background: rgba(108,204,215,.07); color: #a8e7ec; }
.mobile-chat-continue-button i { font-size: 10px; transform: rotate(180deg); }
body[data-theme="light"] .assistant-canvas,
body[data-theme="light"] .assistant-code-block,
body[data-theme="light"] .assistant-canvas-pending { border-color: #e3e7ea; background: linear-gradient(145deg,#fff,#f8fafb); }
body[data-theme="light"] .assistant-canvas-kicker { color: #398992; }
body[data-theme="light"] .assistant-canvas-heading h4,
body[data-theme="light"] .assistant-canvas-item > strong { color: #28333a; }
body[data-theme="light"] .assistant-grid-table { color: #39464e; }
body[data-theme="light"] .assistant-grid-table th { background: #eff7f8; color: #2c575d; }
body[data-theme="light"] .assistant-grid-table th,
body[data-theme="light"] .assistant-grid-table td { border-color: #e5eaed; }
body[data-theme="light"] .assistant-canvas-item,
body[data-theme="light"] .assistant-scale-item { border-color: #e4e8eb; background: #fff; }
body[data-theme="light"] .assistant-canvas-item-copy,
body[data-theme="light"] .assistant-scale-item p { color: #64727a; }
body[data-theme="light"] .assistant-scale-top { color: #333e44; }
body[data-theme="light"] .assistant-scale-top > span { color: #287f88; }
body[data-theme="light"] .assistant-scale-track { background: #e7edef; }
body[data-theme="light"] .assistant-code-block { color: #35434b; }
body[data-theme="light"] .assistant-canvas-pending { color: #718087; }
body[data-theme="light"] .mobile-chat-continue-button { border-color: #e1e5e8; color: #646e75; }
body[data-theme="light"] .mobile-chat-continue-button:hover { border-color: #b8d9dc; background: #f3fafb; color: #267985; }
@media (max-width: 620px) {
  .assistant-canvas { margin: 13px 0; border-radius: 12px; }
  .assistant-canvas-body { padding-inline: 9px; }
  .assistant-grid-scroll { overflow: visible; }
  .assistant-grid-table, .assistant-grid-table tbody { display: block; width: 100%; min-width: 0; }
  .assistant-grid-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .assistant-grid-table tbody { display: grid; gap: 8px; }
  .assistant-grid-table tbody tr { display: block; overflow: hidden; border: 1px solid rgba(160,178,190,.13); border-radius: 10px; background: rgba(0,0,0,.08); }
  .assistant-grid-table tbody tr > td { display: grid; grid-template-columns: minmax(74px,.42fr) minmax(0,1fr); gap: 10px; max-width: none; padding: 8px 10px; border: 0; border-bottom: 1px solid rgba(160,178,190,.08); }
  .assistant-grid-table tbody tr > td:last-child { border-bottom: 0; }
  .assistant-grid-table tbody td::before { content: attr(data-label); color: #99a6ad; font-size: 9px; font-weight: 600; }
  body[data-theme="light"] .assistant-grid-table tbody tr { border-color: #e4e8eb; background: #fff; }
  body[data-theme="light"] .assistant-grid-table tbody tr > td { border-bottom-color: #edf0f2; }
  body[data-theme="light"] .assistant-grid-table tbody td::before { color: #77848b; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-chat-continue-button { transition: none !important; }
}


/* Smart YouTube links and an in-site Ctrl-click preview. */
.assistant-inline-link { color: #74baff !important; text-decoration-color: rgba(116,186,255,.42) !important; text-underline-offset: 3px; overflow-wrap: anywhere; }
.youtube-channel-card,
.youtube-link-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  align-items: center;
  gap: 9px;
  margin: 3px 2px;
  padding: 3px 11px 3px 4px;
  overflow: hidden;
  border: 1px solid rgba(55,157,255,.68);
  border-radius: 999px;
  background: rgba(31,132,218,.085);
  color: #72b8ff !important;
  text-decoration: none !important;
  vertical-align: middle;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.youtube-channel-card:hover,
.youtube-link-chip:hover { border-color: #66b7ff; background: rgba(31,132,218,.16); box-shadow: 0 0 0 2px rgba(49,151,239,.08); }
.youtube-channel-avatar { display: block; width: 26px; height: 26px; flex: none; border-radius: 50%; background: #202e3a; object-fit: cover; }
.youtube-channel-name { min-width: 0; overflow: hidden; color: #78baff; font: 650 12px/1.2 Inter,"Helvetica Neue",Arial,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.youtube-channel-card.is-text-only { min-height: 29px; padding: 5px 10px; }
.youtube-link-chip { min-height: 28px; padding: 4px 9px; border-radius: 9px; color: #76baff !important; font: 500 11px/1.35 Inter,"Helvetica Neue",Arial,sans-serif; overflow-wrap: anywhere; }
.youtube-popup[hidden] { display: none !important; }
.youtube-popup { position: fixed; z-index: 2000; inset: 0; display: grid; box-sizing: border-box; padding: clamp(14px,3vh,32px); place-items: center; }
.youtube-popup-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(6,10,16,.76); cursor: default; backdrop-filter: blur(7px); }
.youtube-popup-dialog { position: relative; display: grid; width: min(980px,100%); height: min(760px,calc(100vh - 48px)); min-width: 0; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid rgba(104,166,211,.36); border-radius: 18px; background: #171b20; box-shadow: 0 24px 80px rgba(0,0,0,.48); }
.youtube-popup-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.youtube-popup-kicker { color: #69b7fc; font: 700 9px/1.2 Inter,"Helvetica Neue",Arial,sans-serif; letter-spacing: .11em; }
.youtube-popup-header h2 { margin: 4px 0 0; color: #f0f3f6; font: 600 14px/1.3 Inter,"Helvetica Neue",Arial,sans-serif; }
.youtube-popup-close { display: grid; width: 36px; height: 36px; flex: none; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); color: #d7dce1; cursor: pointer; place-items: center; }
.youtube-popup-close:hover { border-color: rgba(89,174,239,.5); background: rgba(89,174,239,.12); color: #a6d7ff; }
.youtube-popup iframe { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #0c0f12; }
.youtube-popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.youtube-popup-footer p { margin: 0; color: #929ba3; font: 400 10px/1.45 Inter,"Helvetica Neue",Arial,sans-serif; }
.youtube-popup-footer a { flex: none; color: #77bdff; font: 550 10px/1.3 Inter,"Helvetica Neue",Arial,sans-serif; text-decoration: none; }
.youtube-popup-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.youtube-popup-footer a i { margin-left: 4px; font-size: 9px; }
body.youtube-popup-open { overflow: hidden; }
body[data-theme="light"] .youtube-popup-dialog { border-color: #d6e2eb; background: #fff; }
body[data-theme="light"] .youtube-popup-header { border-color: #e6eaee; }
body[data-theme="light"] .youtube-popup-header h2 { color: #25323b; }
body[data-theme="light"] .youtube-popup-close { border-color: #e2e7eb; background: #f7f9fa; color: #4d5d68; }
body[data-theme="light"] .youtube-popup-footer { border-color: #e6eaee; }
body[data-theme="light"] .youtube-popup-footer p { color: #77848c; }
@media (max-width: 560px) {
  .youtube-channel-card { min-height: 31px; gap: 7px; padding-right: 9px; }
  .youtube-channel-avatar { width: 23px; height: 23px; }
  .youtube-channel-name { font-size: 11px; }
  .youtube-popup { padding: 10px; }
  .youtube-popup-dialog { width: 100%; height: min(82dvh,720px); border-radius: 14px; }
  .youtube-popup-header { padding: 11px 13px; }
  .youtube-popup-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .youtube-channel-card, .youtube-link-chip { transition: none !important; }
}

@media (max-width: 760px) {
  .youtube-connect-banner { min-height: 0; margin-bottom: 20px; padding: 27px 26px 65px 24px; border-radius: 17px; transform: none; }
  .youtube-connect-glow-pointer { display: none; }
  .youtube-connect-banner.is-pointer-active .youtube-connect-glow-ambient { opacity: .85; transform: none; }
  .youtube-connect-copy { padding-right: 20px; }
  .youtube-connect-copy h2 { font-size: 20px; }
  .youtube-connect-description { font-size: 11px; }
}

@media (max-width: 560px) {
  .youtube-connect-banner { margin-bottom: 17px; padding: 23px 17px 60px; border-radius: 15px; }
  .youtube-connect-banner::before { opacity: .2; }
  .youtube-connect-copy { padding-right: 8px; }
  .youtube-connect-copy h2 { font-size: 17px; letter-spacing: -.35px; }
  .youtube-connect-description { margin-top: 7px; font-size: 10px; }
  .youtube-connect-actions { gap: 7px; margin-top: 13px; }
  .youtube-connect-actions button { min-height: 34px; padding-inline: 12px; }
  .youtube-connect-terms { margin-top: 13px; font-size: 8px; }
  .youtube-connect-signature { right: 16px; bottom: 15px; gap: 5px; font-size: 9px; }
  .youtube-connect-signature img { width: 15px; height: 18px; }
  .youtube-connect-close { top: 8px; right: 8px; width: 28px; height: 28px; }
}

@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  .youtube-connect-banner:hover {
    border-color: rgba(111, 222, 231, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 22px 52px rgba(0, 0, 0, .24), 0 0 35px rgba(0, 183, 200, .055);
  }
}

@media (prefers-reduced-motion: reduce) {
  .youtube-connect-banner { transform: none !important; transition: none !important; }
  .youtube-connect-glow { transition: none !important; }
  .youtube-connect-actions button { transition: none !important; }
}


/* Inline YouTube previews in both editable composers. */
.chat-link-preview-list[hidden] { display: none !important; }
.chat-link-preview-list { box-sizing: border-box; display: flex; width: 100%; min-width: 0; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.chat-link-preview-row { display: inline-flex; max-width: 100%; min-width: 0; align-items: center; gap: 4px; }
.chat-link-preview-row .youtube-channel-card,
.chat-link-preview-row .youtube-link-chip { max-width: min(100%, 270px); margin: 0; }
.chat-link-preview-row .youtube-channel-name,
.chat-link-preview-row .youtube-link-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-chat-input-shell {
  display: flex;
  min-height: 46px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 26px;
}
.mobile-chat-input-row { display: flex; width: 100%; min-width: 0; min-height: 34px; align-items: center; gap: 8px; }
.mobile-chat-input-shell textarea { min-height: 26px; padding-block: 4px; }
.mobile-chat-input-row > button { width: 32px; height: 32px; border-radius: 50%; }
.mobile-chat-plus,
.mobile-chat-history-button { box-sizing: border-box; width: 46px; height: 46px; border-radius: 50%; }
.mobile-chat-plus { font-size: 16px; }
.mobile-chat-history-button { font-size: 15px; }
.mobile-chat-input-shell .chat-link-preview-remove,
.desktop-search .chat-link-preview-remove {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(84,164,233,.18);
  border-radius: 50%;
  background: rgba(69,143,204,.08);
  color: #91bde2;
  cursor: pointer;
  font-size: 10px;
  opacity: 1;
  place-items: center;
}
.mobile-chat-input-shell .chat-link-preview-remove:hover,
.desktop-search .chat-link-preview-remove:hover { border-color: rgba(84,164,233,.45); background: rgba(69,143,204,.18); color: #c1e1ff; }
.desktop-search { flex-wrap: wrap; border-radius: 23px; }
.desktop-search textarea { width: auto; flex: 1 1 110px; }
.desktop-link-preview-list { order: 5; flex: 0 0 100%; width: 100%; min-width: 0; padding: 5px 4px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.desktop-search:has(.desktop-link-preview-list:not([hidden])) { row-gap: 5px; }
@media (min-width: 701px) {
  .mobile-chat-input-shell { min-height: 48px; border-radius: 27px; }
  .mobile-chat-input-row { min-height: 36px; }
  .mobile-chat-plus,
  .mobile-chat-history-button { width: 48px; height: 48px; }
  .mobile-chat-input-row > button { width: 34px; height: 34px; }
}
@media (max-width: 700px) {
  .mobile-chat-input-shell { min-height: 42px; gap: 3px; padding: 3px 6px; border-radius: 24px; }
  .mobile-chat-input-row { min-height: 34px; }
  .mobile-chat-plus,
  .mobile-chat-history-button { width: 42px; height: 42px; }
  .mobile-chat-input-row > button { width: 32px; height: 32px; }
  .desktop-search { flex-wrap: nowrap; }
  .desktop-link-preview-list { display: none !important; }
}
@supports not selector(:has(*)) {
  .desktop-link-preview-list:not([hidden]) { padding-top: 5px; }
}

/* Composer controls: inset the text slightly and dock the tools menu around its trigger. */
.mobile-chat-input-row textarea { padding-inline-start: 6px; }
.mobile-chat-tools { --chat-plus-half: 24px; }
.mobile-chat-plus {
  position: relative;
  z-index: 6;
  overflow: visible;
  border: 1px solid rgba(153, 187, 199, .24) !important;
  background: linear-gradient(145deg, #353b43, #292e35) !important;
  color: #c8e4e9 !important;
  box-shadow: 0 4px 13px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .2s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease !important;
}
.mobile-chat-plus i { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.mobile-chat-plus:hover,
.mobile-chat-plus[aria-expanded="true"] {
  transform: none !important;
  border-color: rgba(106, 215, 226, .62) !important;
  background: linear-gradient(145deg, #315b66, #293f4b) !important;
  color: #a8f0f4 !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .25), 0 0 16px rgba(73, 192, 208, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.mobile-chat-plus[aria-expanded="true"] i { transform: rotate(45deg); }
.mobile-chat-tools-menu {
  --chat-plus-half: 24px;
  bottom: 50% !important;
  left: 0 !important;
  z-index: 5;
  padding-bottom: calc(var(--chat-plus-half) + 5px) !important;
  border-radius: 16px !important;
  transform-origin: left bottom;
  -webkit-mask-image: radial-gradient(circle var(--chat-plus-half) at var(--chat-plus-half) 100%, transparent calc(var(--chat-plus-half) - 1px), #000 var(--chat-plus-half));
  mask-image: radial-gradient(circle var(--chat-plus-half) at var(--chat-plus-half) 100%, transparent calc(var(--chat-plus-half) - 1px), #000 var(--chat-plus-half));
}
.mobile-chat-tools-menu button { border-radius: 9px !important; }
.mobile-chat-tools-menu button:focus-visible { outline-offset: -2px !important; }
body[data-theme="light"] .mobile-chat-plus {
  border-color: rgba(85, 138, 150, .28) !important;
  background: linear-gradient(145deg, #fff, #eaf2f4) !important;
  color: #41727d !important;
  box-shadow: 0 4px 13px rgba(26, 54, 65, .12), inset 0 1px 0 #fff;
}
body[data-theme="light"] .mobile-chat-plus:hover,
body[data-theme="light"] .mobile-chat-plus[aria-expanded="true"] {
  border-color: rgba(42, 157, 171, .55) !important;
  background: linear-gradient(145deg, #efffff, #d8f1f3) !important;
  color: #197785 !important;
  box-shadow: 0 5px 16px rgba(26, 79, 91, .16), 0 0 14px rgba(73, 192, 208, .12), inset 0 1px 0 #fff;
}
body[data-theme="light"] .mobile-chat-tools-menu { border-color: #d7e2e6; }
@media (max-width: 700px) {
  .mobile-chat-tools,.mobile-chat-tools-menu { --chat-plus-half: 21px; }
}
@container split-chat (max-width: 640px) {
  .mobile-chat-tools,.mobile-chat-tools-menu { --chat-plus-half: 17px; }
}
@container split-chat (max-width: 390px) {
  .mobile-chat-tools,.mobile-chat-tools-menu { --chat-plus-half: 15px; }
}
.chat-model-intro-button { display: grid; width: min(100%, 390px); grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 11px; margin-top: 12px; padding: 11px 13px; border: 1px solid rgba(78, 196, 208, .34); border-radius: 15px; background: linear-gradient(120deg, rgba(38, 152, 171, .12), rgba(101, 112, 238, .1)); color: inherit; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.chat-model-intro-button:hover { transform: translateY(-1px); border-color: rgba(78, 196, 208, .7); box-shadow: 0 8px 24px rgba(39, 142, 166, .16); }
.chat-model-intro-button:focus-visible { outline: 2px solid #45c3d0; outline-offset: 3px; }
.chat-model-intro-icon { display: grid; width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(145deg, #54d0ce, #6677e8); color: #fff; place-items: center; font-size: 17px; }
.chat-model-intro-button > span:nth-child(2) { display: grid; gap: 4px; }
.chat-model-intro-button strong { color: #315b69; font-size: 12px; line-height: 1.35; }
.chat-model-intro-button small { color: #728994; font-size: 10px; line-height: 1.35; }
.chat-model-intro-button > .fa-arrow-right { color: #388e9e; font-size: 12px; }
body[data-theme="dark"] .chat-model-intro-button { border-color: rgba(83, 196, 207, .27); background: linear-gradient(120deg, rgba(38, 152, 171, .15), rgba(101, 112, 238, .14)); }
body[data-theme="dark"] .chat-model-intro-button strong { color: #d3edf0; }
body[data-theme="dark"] .chat-model-intro-button small { color: #a0b7be; }
body[data-theme="dark"] .chat-model-intro-button > .fa-arrow-right { color: #87d3dc; }
