/*
 * The black theme for the shared chrome (2026-11-20).
 *
 * The whole public site is black (body.ih-black, set in app/layout.tsx and
 * kept in step on navigation by Nav.tsx). The pages themselves take their
 * colours from the tokens in features/home-ai/components/AiHomePage.module.css;
 * this file covers what sits outside them: the page behind everything, the
 * header, its menus and the phone drawer. It loads last (lib/route-assets.ts)
 * and every rule starts with body.ih-black, so it outranks the older
 * stylesheets without touching them.
 *
 * Palette (same as the page tokens): black #060608, raised #101015,
 * text #f6f6f8, muted #a5a5b2, line rgba(255,255,255,.09), and one accent:
 * crimson #e8395f, with rose #ff8fa3 for thin lines of light. White is the
 * main button. No rainbow gradients: the first pass had them and the owner
 * found it had lost its sophistication.
 */

html:has(body.ih-black) {
  background: #060608;
  color-scheme: dark;
}

body.ih-black {
  background-color: #060608;
  color: #f6f6f8;
}

/* ── Header: dark glass ───────────────────────────────────────────────── */

body.ih-black .ih-site-header {
  background: rgba(8, 8, 11, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

body.ih-black .ih-site-nav,
body.ih-black .ih-nav-icon-link {
  color: #f6f6f8;
}

body.ih-black .ih-site-nav > a:not(.ih-nav-cta):not(.ih-nav-login) {
  color: rgba(246, 246, 248, 0.82);
  transition: color 0.2s ease;
}

body.ih-black .ih-site-nav > a:not(.ih-nav-cta):not(.ih-nav-login):hover {
  color: #fff;
}

/* The underline that slides in under a link: the brand's colour. */
body.ih-black .ih-site-nav a:not(.ih-nav-cta):not(.ih-nav-switch-link):not(.ih-nav-icon-link)::after {
  background: #ff8fa3;
}

/* "Sign up": white, the main action everywhere on the black site. */
body.ih-black .ih-nav-cta,
body.ih-black .ih-mobile-cta,
body.ih-black .ih-mobile-drawer-cta {
  background: #fff;
  border-color: #fff;
  color: #0b0b0e !important;
  font-weight: 600;
  box-shadow: 0 12px 28px -14px rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

body.ih-black .ih-nav-cta:hover,
body.ih-black .ih-nav-cta:focus-visible,
body.ih-black .ih-mobile-cta:hover,
body.ih-black .ih-mobile-cta:focus-visible,
body.ih-black .ih-mobile-drawer-cta:hover,
body.ih-black .ih-mobile-drawer-cta:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #0b0b0e !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px -14px rgba(255, 255, 255, 0.6);
}

body.ih-black .ih-nav-login {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f6f6f8 !important;
}

body.ih-black .ih-nav-login:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff !important;
}

body.ih-black .ih-nav-avatar {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f6f6f8;
}

body.ih-black .ih-hamburger-bar {
  background: #f6f6f8;
}

/* ── Menus that open from the header ──────────────────────────────────── */

body.ih-black .ih-nav-menu,
body.ih-black .ih-nav-explore-menu,
body.ih-black .ih-nav-popover-menu {
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #f6f6f8;
}

body.ih-black .ih-nav-menu-head,
body.ih-black .ih-nav-popover-head {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

body.ih-black .ih-nav-popover-footer {
  border-top-color: rgba(255, 255, 255, 0.09);
}

body.ih-black .ih-nav-menu-head strong,
body.ih-black .ih-nav-popover-head strong,
body.ih-black .ih-nav-popover-item.is-unread strong {
  color: #fff;
}

body.ih-black .ih-nav-menu-head span,
body.ih-black .ih-nav-popover-head a,
body.ih-black .ih-nav-popover-footer a,
body.ih-black .ih-nav-popover-item p,
body.ih-black .ih-nav-popover-item span,
body.ih-black .ih-nav-popover-item em {
  color: #a5a5b2;
}

body.ih-black .ih-nav-menu a,
body.ih-black .ih-nav-menu-action,
body.ih-black .ih-nav-explore-menu a,
body.ih-black .ih-nav-popover-item {
  color: #e7e7ec !important;
}

body.ih-black .ih-nav-menu a:hover,
body.ih-black .ih-nav-menu-action:hover,
body.ih-black .ih-nav-explore-menu a:hover,
body.ih-black .ih-nav-popover-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff !important;
}

body.ih-black .ih-nav-popover-item.is-unread {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #ff3d6b;
}

body.ih-black .ih-nav-popover-mark-toggle,
body.ih-black .ih-nav-popover-item-read-toggle,
body.ih-black .ih-nav-popover-action,
body.ih-black .ih-nav-popover-avatar,
body.ih-black .ih-nav-popover-empty {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d5d5dc !important;
}

body.ih-black .ih-nav-popover-action.is-primary {
  background: #fff;
  border-color: #fff;
  color: #0b0b0e !important;
}

body.ih-black .ih-nav-dashboard-switch {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.ih-black .ih-nav-dashboard-switch .ih-nav-switch-link {
  color: #a5a5b2;
}

body.ih-black .ih-nav-dashboard-switch .ih-nav-switch-link.is-active {
  background: #fff;
  color: #0b0b0e;
}

body.ih-black .ih-nav-icon-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* "Confirm your email" strip under the header. */
body.ih-black .ih-site-verification-bar {
  background: rgba(255, 61, 107, 0.1);
  border-top-color: rgba(255, 61, 107, 0.28);
}

body.ih-black .ih-site-verification-bar__inner {
  color: #ffd3dd;
}

body.ih-black .ih-site-verification-bar__inner span {
  color: #f0a9b8;
}

body.ih-black .ih-site-verification-bar__actions button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd3dd;
}

/* ── Phone drawer ─────────────────────────────────────────────────────── */

body.ih-black .ih-mobile-drawer,
body.ih-black .ih-mobile-drawer-head {
  background: #0c0c10;
  color: #f6f6f8;
}

body.ih-black .ih-mobile-drawer-link,
body.ih-black .ih-mobile-drawer-user strong {
  color: #f6f6f8;
}

body.ih-black .ih-mobile-drawer-avatar {
  background: rgba(255, 255, 255, 0.12);
  color: #f6f6f8;
}

body.ih-black .ih-mobile-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* ── Footer: the same black, with a line of colour on top ─────────────── */

body.ih-black .ih-site-footer {
  position: relative;
  background: #060608;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.ih-black .ih-site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #ff8fa3 35%, #ffb59a 65%, transparent 100%);
  opacity: 0.5;
}

/* ── Room for the menu: the search box is narrower, and steps aside on smaller screens ── */

body.ih-black .ih-header-search-slot {
  flex: 0 1 250px;
  max-width: 250px;
  margin-left: 16px;
}

@media (max-width: 1340px) {
  body.ih-black .ih-header-search-slot {
    display: none;
  }
}

/* The old page wrappers were white, which showed through the glass header at the top of a page. */
body.ih-black .qodef-wrapper,
body.ih-black .qodef-wrapper-inner,
body.ih-black .qodef-content,
body.ih-black .qodef-content-inner {
  background-color: #060608;
}

/* The phone drawer sat under the header (z-index 1199 against 1200), which hid its first link. It has its own logo and close button, so it goes on top. */
body.ih-black .ih-mobile-overlay {
  z-index: 1201;
}

body.ih-black .ih-mobile-drawer {
  z-index: 1202;
}

/* ── The older account screens (reset password, confirm email…) ───────── */
/* They are built from the ih-auth-* classes in account.css. The sign-in and
   sign-up pages restyle those themselves (AuthSplitLayout.module.css, which
   outranks these); this covers the single-card screens. */

body.ih-black .ih-auth-page {
  background: #060608;
  color: #f6f6f8;
}

body.ih-black .ih-auth-card,
body.ih-black .ih-auth-shell-single .ih-auth-card {
  background: #101015;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.85);
}

body.ih-black .ih-auth-card img[src$="/brand/logo.svg"] {
  filter: brightness(0) invert(1);
}

body.ih-black .ih-auth-card h1,
body.ih-black .ih-auth-form label,
body.ih-black .ih-auth-checkbox span,
body.ih-black .ih-auth-verify-banner__copy strong,
body.ih-black .ih-auth-verification-head h3,
body.ih-black .ih-auth-verification-head p strong {
  color: #f6f6f8;
}

body.ih-black .ih-auth-card p,
body.ih-black .ih-auth-divider,
body.ih-black .ih-auth-legal,
body.ih-black .ih-auth-footer,
body.ih-black .ih-auth-footer span,
body.ih-black .ih-auth-verify-banner__copy span,
body.ih-black .ih-auth-verify-banner__note,
body.ih-black .ih-auth-verification-head p,
body.ih-black .ih-auth-verification-notes li {
  color: #a5a5b2;
}

body.ih-black .ih-auth-form input {
  background: #17171e;
  border-color: rgba(255, 255, 255, 0.14);
  color: #f6f6f8;
}

body.ih-black .ih-auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.ih-black .ih-auth-form input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

body.ih-black .ih-auth-primary,
body.ih-black .ih-auth-primary:hover,
body.ih-black .ih-auth-verify-banner__primary {
  background: #fff;
  color: #0b0b0e;
}

body.ih-black .ih-auth-secondary,
body.ih-black .ih-auth-social,
body.ih-black .ih-auth-eye,
body.ih-black .ih-auth-verify-banner__secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f6f6f8;
}

body.ih-black .ih-auth-secondary:hover,
body.ih-black .ih-auth-social:hover,
body.ih-black .ih-auth-eye:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

body.ih-black .ih-auth-link,
body.ih-black .ih-auth-inline-link {
  color: #f6f6f8;
}

body.ih-black .ih-auth-divider span {
  background: #101015;
}

body.ih-black .ih-auth-divider::before {
  background: rgba(255, 255, 255, 0.12);
}

body.ih-black .ih-auth-icon,
body.ih-black .ih-auth-verification-notes {
  background: rgba(255, 255, 255, 0.07);
}

body.ih-black .ih-auth-error {
  background: rgba(232, 57, 95, 0.1);
  border-color: rgba(232, 57, 95, 0.3);
  color: #ffb3c0;
}

body.ih-black .ih-auth-verification,
body.ih-black .ih-auth-verify-banner {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #d6d6dc;
}
