/* SITE-BARE-WHITE-HOME-SKIN-01 — Home-only visual skin; conversation mode is intentionally excluded. */
body.chat-home-page:not(.conversation-active) {
  --home-skin-bg: #ffffff;
  --home-skin-surface: #ffffff;
  --home-skin-text: var(--lotbi-text-primary);
  --home-skin-muted: var(--lotbi-text-primary);
  --home-skin-line: #e7e9ed;
  --home-skin-hover: #f6f7f8;
  --home-skin-selected: #f1f3f5;
  --home-skin-action: #f7f8f9;
  --home-skin-strong: #24272c;
  --home-skin-strong-text: #ffffff;
}

body.chat-home-page[data-site-theme="dark"]:not(.conversation-active) {
  --home-skin-bg: #212121;
  --home-skin-surface: #212121;
  --home-skin-text: var(--lotbi-text-primary);
  --home-skin-muted: var(--lotbi-text-primary);
  --home-skin-line: #424242;
  --home-skin-hover: #2f2f2f;
  --home-skin-selected: #353535;
  --home-skin-action: #2f2f2f;
  --home-skin-strong: #f5f5f5;
  --home-skin-strong-text: #212121;
}

@media (prefers-color-scheme: dark) {
  body.chat-home-page[data-site-theme="system"]:not(.conversation-active) {
    --home-skin-bg: #212121;
    --home-skin-surface: #212121;
    --home-skin-text: var(--lotbi-text-primary);
    --home-skin-muted: var(--lotbi-text-primary);
    --home-skin-line: #424242;
    --home-skin-hover: #2f2f2f;
    --home-skin-selected: #353535;
    --home-skin-action: #2f2f2f;
    --home-skin-strong: #f5f5f5;
    --home-skin-strong-text: #212121;
  }
}

/* SITE-HOME-DARK-FIRST-PAINT-01 — the dark skin above is keyed on
   body[data-site-theme], which site-conversation.js sets only after the
   session check. Until then (1~3 s, 8 s and more under load) the shell fell
   back to the light skin: a white page with Dark's light ink, nearly unreadable.
   index.html's inline bootstrap already puts the resolved theme on
   html[data-site-theme-bootstrap] before first paint, so the same skin is keyed
   on it too, only while the body has no attribute of its own yet (the live
   choice still wins afterwards). Same pattern as site-theme-tokens.css. */
html[data-site-theme-bootstrap="dark"] body.chat-home-page:not([data-site-theme]):not(.conversation-active) {
  --home-skin-bg: #212121;
  --home-skin-surface: #212121;
  --home-skin-text: var(--lotbi-text-primary);
  --home-skin-muted: var(--lotbi-text-primary);
  --home-skin-line: #424242;
  --home-skin-hover: #2f2f2f;
  --home-skin-selected: #353535;
  --home-skin-action: #2f2f2f;
  --home-skin-strong: #f5f5f5;
  --home-skin-strong-text: #212121;
}

@media (prefers-color-scheme: dark) {
  html[data-site-theme-bootstrap="system"] body.chat-home-page:not([data-site-theme]):not(.conversation-active) {
    --home-skin-bg: #212121;
    --home-skin-surface: #212121;
    --home-skin-text: var(--lotbi-text-primary);
    --home-skin-muted: var(--lotbi-text-primary);
    --home-skin-line: #424242;
    --home-skin-hover: #2f2f2f;
    --home-skin-selected: #353535;
    --home-skin-action: #2f2f2f;
    --home-skin-strong: #f5f5f5;
    --home-skin-strong-text: #212121;
  }
}

body.chat-home-page:not(.conversation-active),
body.chat-home-page:not(.conversation-active) .chat-app-shell,
body.chat-home-page:not(.conversation-active) .chat-home-shell,
body.chat-home-page:not(.conversation-active) .chat-sidebar,
body.chat-home-page:not(.conversation-active) .sidebar-account-footer,
body.chat-home-page:not(.conversation-active) .mobile-nav-drawer {
  background: var(--home-skin-bg);
  color: var(--home-skin-text);
}

body.chat-home-page:not(.conversation-active) .chat-sidebar-desktop,
body.chat-home-page:not(.conversation-active) .mobile-nav-drawer,
body.chat-home-page:not(.conversation-active) .sidebar-account-footer {
  border-color: var(--home-skin-line);
}

body.chat-home-page:not(.conversation-active) .chat-sidebar-desktop {
  box-shadow: none;
}

body.chat-home-page:not(.conversation-active) .sidebar-nav {
  gap: 14px;
}

body.chat-home-page:not(.conversation-active) .nav-section-title,
body.chat-home-page:not(.conversation-active) .nav-status,
body.chat-home-page:not(.conversation-active) .sidebar-account-handle {
  color: var(--home-skin-muted);
}

body.chat-home-page:not(.conversation-active) .nav-item,
body.chat-home-page:not(.conversation-active) .sidebar-account-entry {
  border-radius: 9px;
  color: var(--home-skin-text);
}

body.chat-home-page:not(.conversation-active) .nav-item-primary {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.chat-home-page:not(.conversation-active) .nav-link:hover,
body.chat-home-page:not(.conversation-active) .nav-link:focus-visible,
body.chat-home-page:not(.conversation-active) .nav-item-primary:hover,
body.chat-home-page:not(.conversation-active) .nav-item-primary:focus-visible,
body.chat-home-page:not(.conversation-active) .sidebar-account-entry:hover,
body.chat-home-page:not(.conversation-active) .conversation-history-menu-trigger:hover,
body.chat-home-page:not(.conversation-active) .conversation-history-menu-trigger:focus-visible {
  background: var(--home-skin-hover);
}

body.chat-home-page:not(.conversation-active) .nav-history-list button[aria-current="true"],
body.chat-home-page:not(.conversation-active) .nav-item[aria-current="page"] {
  background: var(--home-skin-selected);
}

body.chat-home-page:not(.conversation-active) .sidebar-profile-avatar,
body.chat-home-page:not(.conversation-active) .conversation-history-pin {
  background: var(--home-skin-selected);
}

body.chat-home-page:not(.conversation-active) .mobile-nav-drawer {
  box-shadow: 8px 0 24px rgba(18, 24, 34, .08);
}

body.chat-home-page:not(.conversation-active) .chat-hero {
  padding-top: clamp(28px, 4.5vh, 52px);
}

body.chat-home-page:not(.conversation-active) .chat-character-wrap {
  margin-top: clamp(18px, 3vh, 34px);
  margin-bottom: 12px;
  filter: none;
}

body.chat-home-page:not(.conversation-active) .home-value-proposition {
  width: min(680px, 100%);
  margin: 0 auto 18px;
  color: var(--home-skin-text);
  text-align: center;
}

body.chat-home-page:not(.conversation-active) .home-value-proposition h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.28;
  letter-spacing: -.035em;
}

body.chat-home-page:not(.conversation-active) .home-value-proposition p {
  margin: 8px 0 0;
  color: var(--home-skin-muted);
  font-size: 15px;
  line-height: 1.55;
}

.conversation-active .home-value-proposition {
  display: none;
}

body.chat-home-page:not(.conversation-active) .chat-composer-stack {
  background: var(--home-skin-bg);
}

/* COMMON-UI-POLISH-01 (QA #19) — the topbar kept the conversation navy
   (#151922) on the Dark home, a 64px band over the #212121 skin. It follows
   the same skin as everything around it; conversation mode is untouched. */
body.chat-home-page:not(.conversation-active) .chat-topbar {
  background: var(--home-skin-bg);
}

body.chat-home-page:not(.conversation-active) .chat-safety-copy {
  color: var(--home-skin-muted);
  font-weight: 500;
}

body.chat-home-page:not(.conversation-active) .chat-composer {
  border-color: var(--home-skin-line);
  border-radius: 24px;
  background: var(--home-skin-surface);
  box-shadow: none;
}

body.chat-home-page:not(.conversation-active) .chat-composer:focus-within {
  border-color: #b8bec7;
  box-shadow: 0 0 0 3px rgba(36, 39, 44, .055);
}

body.chat-home-page:not(.conversation-active) .chat-input {
  min-height: 56px;
  color: var(--home-skin-text);
}

body.chat-home-page:not(.conversation-active) .chat-input::placeholder {
  color: var(--home-skin-muted);
}

body.chat-home-page:not(.conversation-active) .composer-button,
body.chat-home-page:not(.conversation-active) .attachment-button {
  border-color: transparent;
  background: var(--home-skin-action);
  color: var(--home-skin-text);
  box-shadow: none;
}

body.chat-home-page:not(.conversation-active) .composer-button:not(:disabled):hover,
body.chat-home-page:not(.conversation-active) .composer-button:not(:disabled):focus-visible,
body.chat-home-page:not(.conversation-active) .attachment-button:not(:disabled):hover,
body.chat-home-page:not(.conversation-active) .attachment-button:not(:disabled):focus-visible {
  border-color: var(--home-skin-line);
  background: var(--home-skin-hover);
  color: var(--home-skin-text);
}

body.chat-home-page:not(.conversation-active) .send-button {
  border-color: var(--home-skin-strong);
  background: var(--home-skin-strong);
  color: var(--home-skin-strong-text);
}

body.chat-home-page:not(.conversation-active) .attachment-menu {
  border-color: var(--home-skin-line);
  background: var(--home-skin-surface);
  color: var(--home-skin-text);
  box-shadow: 0 8px 24px rgba(18, 24, 34, .08);
}

body.chat-home-page:not(.conversation-active) .chat-home-footer {
  background: transparent;
  color: var(--home-skin-muted);
}

body.chat-home-page:not(.conversation-active) .chat-home-footer a {
  color: inherit;
}

body.chat-home-page:not(.conversation-active) .chat-home-footer a:hover,
body.chat-home-page:not(.conversation-active) .chat-home-footer a:focus-visible {
  color: var(--home-skin-text);
}

@media (max-width: 760px) {
  body.chat-home-page:not(.conversation-active) .chat-home-shell {
    padding-inline: 16px;
  }

  body.chat-home-page:not(.conversation-active) .chat-hero {
    padding-top: 16px;
  }

  body.chat-home-page:not(.conversation-active) .chat-character-wrap {
    width: 132px;
    height: 174px;
    margin-top: 14px;
    margin-bottom: 8px;
  }

  body.chat-home-page:not(.conversation-active) .chat-character-logo {
    height: 174px;
  }

  body.chat-home-page:not(.conversation-active) .home-value-proposition {
    margin-bottom: 14px;
  }

  body.chat-home-page:not(.conversation-active) .home-value-proposition h2 {
    font-size: clamp(20px, 6vw, 25px);
  }

  body.chat-home-page:not(.conversation-active) .home-value-proposition p {
    margin-top: 6px;
    font-size: 14px;
  }

  body.chat-home-page:not(.conversation-active) .chat-composer {
    padding: 9px 9px 8px 13px;
    border-radius: 21px;
  }

  body.chat-home-page:not(.conversation-active) .chat-input {
    min-height: 52px;
  }

  body.chat-home-page:not(.conversation-active) .chat-safety-copy {
    margin-bottom: 6px;
    font-size: 11.5px;
  }
}

@media (max-width: 390px) {
  body.chat-home-page:not(.conversation-active) .chat-home-shell {
    padding-inline: 12px;
  }

  body.chat-home-page:not(.conversation-active) .chat-character-wrap {
    width: 122px;
    height: 161px;
  }

  body.chat-home-page:not(.conversation-active) .chat-character-logo {
    height: 161px;
  }
}

/* SITE-BARE-WHITE-SIDEBAR-01 — Desktop navigation remains a restrained white
   surface even when conversation mode is active. Mobile drawer styling stays
   untouched. */
body.chat-home-page {
  --home-sidebar-bg: #ffffff;
  --home-sidebar-text: #20242a;
  --home-sidebar-line: #e7e9ed;
  --home-sidebar-hover: #f6f7f8;
  --home-sidebar-selected: #f1f3f5;
}

body.chat-home-page[data-site-theme="dark"] {
  --home-sidebar-bg: #212121;
  --home-sidebar-text: #f5f5f5;
  --home-sidebar-line: #424242;
  --home-sidebar-hover: #2f2f2f;
  --home-sidebar-selected: #353535;
}

@media (prefers-color-scheme: dark) {
  body.chat-home-page[data-site-theme="system"] {
    --home-sidebar-bg: #212121;
    --home-sidebar-text: #f5f5f5;
    --home-sidebar-line: #424242;
    --home-sidebar-hover: #2f2f2f;
    --home-sidebar-selected: #353535;
  }
}

/* SITE-HOME-DARK-FIRST-PAINT-01 — the desktop sidebar's variables, keyed on the
   html bootstrap too while the body has no theme of its own yet (the account
   row at the bottom of the sidebar stayed white). */
html[data-site-theme-bootstrap="dark"] body.chat-home-page:not([data-site-theme]) {
  --home-sidebar-bg: #212121;
  --home-sidebar-text: #f5f5f5;
  --home-sidebar-line: #424242;
  --home-sidebar-hover: #2f2f2f;
  --home-sidebar-selected: #353535;
}

@media (prefers-color-scheme: dark) {
  html[data-site-theme-bootstrap="system"] body.chat-home-page:not([data-site-theme]) {
    --home-sidebar-bg: #212121;
    --home-sidebar-text: #f5f5f5;
    --home-sidebar-line: #424242;
    --home-sidebar-hover: #2f2f2f;
    --home-sidebar-selected: #353535;
  }
}

@media (min-width: 901px) {
  body.chat-home-page .chat-sidebar-desktop,
  body.chat-home-page .chat-sidebar-desktop .sidebar-account-footer {
    background: var(--home-sidebar-bg);
    color: var(--home-sidebar-text);
  }

  body.chat-home-page .chat-sidebar-desktop {
    border-right-color: var(--home-sidebar-line);
    box-shadow: none;
  }

  body.chat-home-page .chat-sidebar-desktop .sidebar-account-footer {
    border-top-color: var(--home-sidebar-line);
  }

  body.chat-home-page .chat-sidebar-desktop .nav-link:hover,
  body.chat-home-page .chat-sidebar-desktop .nav-link:focus-visible,
  body.chat-home-page .chat-sidebar-desktop .nav-item-primary:hover,
  body.chat-home-page .chat-sidebar-desktop .nav-item-primary:focus-visible,
  body.chat-home-page .chat-sidebar-desktop .sidebar-account-entry:hover,
  body.chat-home-page .chat-sidebar-desktop .conversation-history-menu-trigger:hover,
  body.chat-home-page .chat-sidebar-desktop .conversation-history-menu-trigger:focus-visible {
    background: var(--home-sidebar-hover);
  }

  body.chat-home-page .chat-sidebar-desktop .nav-history-list button[aria-current="true"],
  body.chat-home-page .chat-sidebar-desktop .nav-item[aria-current="page"] {
    background: var(--home-sidebar-selected);
  }
}
