/* Dark theme, following the device. Loaded last on every page, so nothing here can touch the light theme.
   Tokens flip in tokens.css; this sheet only covers colours written as literals. */

@media (prefers-color-scheme: dark) {
  /* ---------- buttons: the primary stays a white pill on night ---------- */
  .btn-split__label, .btn-split__circle,
  .surface-light .btn-split__label, .surface-light .btn-split__circle { background: #fff; color: #11172c; }
  .btn-dark, .btn-dark:hover { background: #fff; color: #11172c; }
  @media (hover: hover) { .btn-dark:hover { background: #e4e4ec; } }
  .btn-line { border-color: rgb(255 255 255 / .18); color: #fff; }

  /* ---------- orbit bands (buyers, Who is buying): the night skin of the orbit ---------- */
  .orbit__glow { background: radial-gradient(closest-side, rgb(0 185 173 / .26), rgb(84 137 232 / .14) 45%, color-mix(in srgb, var(--night) 0%, transparent) 100%); }
  .orbit__ring { background: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }
  .orbit__ring--2 { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
  .orbit__ring--4 { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
  .orbit__bubble {
    color: rgb(255 255 255 / .6);
    background: radial-gradient(circle at 70% 25%, rgb(255 255 255 / .16), rgb(255 255 255 / .04) 60%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), inset -2px 3px 8px rgb(255 255 255 / .06), 0 10px 24px rgb(0 0 0 / .35);
  }
  .orbit__bubble i { filter: none; }
  .orbit ~ * .t-sub { color: var(--ink-muted); }

  /* ---------- Why DealOn panels: the same hues, at night ---------- */
  .vz {
    background:
      radial-gradient(60% 70% at 10% 6%, oklch(42% .09 var(--h)), oklch(42% .09 var(--h) / 0) 70%),
      radial-gradient(60% 65% at 96% 10%, oklch(40% .08 calc(var(--h) + 55)), oklch(40% .08 calc(var(--h) + 55) / 0) 70%),
      radial-gradient(75% 55% at 64% 104%, oklch(34% .04 calc(var(--h) - 40)), oklch(34% .04 calc(var(--h) - 40) / 0) 75%),
      linear-gradient(180deg, oklch(30% .05 var(--h)), oklch(25% .035 calc(var(--h) + 25)));
  }
  .vz-cv .t, .vz-film .ft { stroke: rgb(255 255 255 / .32); }
  .vz-st i { background: rgb(150 214 222 / .34); }
  .vz-score, .vz-you { color: #11172c; }

  /* ---------- Four reasons and Sell steps: deep grounds for the screens ---------- */
  .rv-match { background: radial-gradient(70% 70% at 100% 100%, rgb(124 92 252 / .3), rgb(124 92 252 / 0) 70%), linear-gradient(160deg, #1e1e42, #11112a 55%, #0e0e1e); }
  .rv-phone { background: radial-gradient(70% 70% at 100% 100%, rgb(0 185 173 / .26), rgb(0 185 173 / 0) 70%), linear-gradient(160deg, #173733, #1b2c2a 55%, #0e0e1e); }
  .rv-fees { background: radial-gradient(60% 60% at 0% 0%, rgb(0 185 173 / .16), rgb(0 185 173 / 0) 70%), radial-gradient(55% 65% at 104% 104%, rgb(124 92 252 / .4), rgb(124 92 252 / 0) 72%), radial-gradient(38% 42% at 80% 108%, rgb(0 229 191 / .2), rgb(0 229 191 / 0) 72%), linear-gradient(160deg, #181834, #0f0f20 55%, #0e0e1e); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
  .rv-match__win { box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 60px -24px rgb(0 0 0 / .6); }

  /* ---------- fees ---------- */
  .fees__cells span { background: #292948; }
  [data-mode="typical"] .fees__cells span,
  [data-mode="typical"] .fees__cells span:first-child { background: #8b84a6; }
  .fees__switch button[aria-pressed="true"] { color: #11172c; }

  /* ---------- Who is buying ---------- */
  .wib-input { background: #171730; border-color: rgb(255 255 255 / .16); color: var(--ink); }
  .wib-search .wib-input { box-shadow: 0 0 0 8px rgb(255 255 255 / .05), 0 28px 56px -28px rgb(0 0 0 / .6); }
  .wib-input::placeholder { color: rgb(255 255 255 / .45); }
  .wib-input:focus { border-color: rgb(255 255 255 / .3); }
  .wib-desc { color: var(--ink-muted); }
  .wib-glow { background: radial-gradient(closest-side, rgb(0 185 173 / .22), rgb(84 137 232 / .1) 45%, color-mix(in srgb, var(--night) 0%, transparent) 100%); }
  .wib-ticker { color: var(--ink-muted); background: linear-gradient(to top, color-mix(in srgb, var(--night) 85%, transparent), color-mix(in srgb, var(--night) 0%, transparent)); }
  .ticker-item::after { background: rgb(255 255 255 / .2); }
  .wib-options, .wib-buyer-type, .wib-near, .wib-next.wib-next--over { background: #19192d; }
  .wib-next__disc { background: radial-gradient(circle at 72% 24%, rgb(255 255 255 / .18), rgb(255 255 255 / 0) 46%), rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 14px 30px rgb(0 0 0 / .4); }

  /* ---------- review round 1 ---------- */
  /* White pills keep dark text. */
  .seller-contact-modal .contact-submit:not(:disabled), .tour-overlay__tab[aria-pressed="true"],
  .skip-link, .hero-card__go { color: #11172c; }
  @media (max-width: 940px) { .nav-auth--solid { color: #11172c; } }
  .sector__icon { background: #181834; color: var(--ink); }
  .btn-line:hover { border-color: rgb(255 255 255 / .3); }
  .nf .btn-line { background: var(--glass-08); }

  /* Step 4 notification on a night ground, with a dark glass card. */
  .rv-notify::before { background: radial-gradient(60% 70% at 0% 0%, rgb(245 179 205 / .28), rgb(245 179 205 / 0) 70%), radial-gradient(60% 80% at 100% 10%, rgb(159 219 230 / .22), rgb(159 219 230 / 0) 70%), linear-gradient(180deg, #1e1e42, #0e0e1e); }
  .rv-notify__card { background: rgb(25 25 45 / .82); box-shadow: var(--shadow-notif), inset 0 0 0 1px rgb(255 255 255 / .12); }
  .rv-notify__app { color: #fff; }
  .rv-notify__msg { color: var(--ink-2); }
  .rv-notify__time { color: var(--ink-muted); }

  /* Step 1 laptop on a night ground like its neighbours. */
  .rv-laptop { background: radial-gradient(70% 70% at 100% 100%, rgb(124 92 252 / .24), rgb(124 92 252 / 0) 70%), linear-gradient(160deg, #11172c, #0e0e1e); }
  .rv-laptop .dots { --dot: rgb(255 255 255 / .08); }

  .split__visual--fee {
    --panel:
      radial-gradient(70% 55% at 8% 0%, rgb(174 170 240 / .3) 10%, rgb(174 170 240 / 0) 100%),
      radial-gradient(70% 60% at 100% 4%, rgb(153 215 232 / .26) 10%, rgb(153 215 232 / 0) 100%),
      #0e0e1e;
  }

  .faq-list { border-top-color: var(--line); }
  .faq-item { border-bottom-color: var(--line); }

  /* Who is buying states. */
  .wib-buyer-num { color: rgb(255 255 255 / .3); }
  .wib-steps li { color: rgb(255 255 255 / .4); }
  .wib-steps li i { color: rgb(255 255 255 / .2); }
  .wib-spin { border-color: rgb(255 255 255 / .14); }

  /* Legal. */
  .legal__body li::marker { color: rgb(255 255 255 / .35); }
  .legal-table-wrap td code { background: rgb(255 255 255 / .08); }

  /* With no final CTA above, the footer takes the glow a CTA hands it on other pages, eased in from night. */
  main:not(:has(> .final-cta:last-child)) + .site-footer::before { display: none; }
  main:not(:has(> .final-cta:last-child)) + .site-footer {
    background:
      linear-gradient(var(--night), color-mix(in srgb, var(--night) 84.4%, transparent) calc(var(--lip-h) * .4),
        color-mix(in srgb, var(--night) 50%, transparent) calc(var(--lip-h) * .8), color-mix(in srgb, var(--night) 15.6%, transparent) calc(var(--lip-h) * 1.2),
        transparent calc(var(--lip-h) * 1.6)),
      radial-gradient(ellipse 90% 110% at 50% -10%, transparent 30%, color-mix(in srgb, var(--night) 4.3%, transparent) 38.75%,
        color-mix(in srgb, var(--night) 15.6%, transparent) 47.5%, color-mix(in srgb, var(--night) 31.6%, transparent) 56.25%, color-mix(in srgb, var(--night) 50%, transparent) 65%, color-mix(in srgb, var(--night) 68.4%, transparent) 73.75%,
        color-mix(in srgb, var(--night) 84.4%, transparent) 82.5%, color-mix(in srgb, var(--night) 95.7%, transparent) 91.25%, var(--night)),
      linear-gradient(90deg, rgb(30 92 94), rgb(38 66 92) 50%, rgb(74 62 136));
  }
  .final-cta__lip {
    display: block; position: absolute; top: 0; left: 50%; z-index: -1;
    width: var(--lip-w); max-width: none; height: calc(var(--lip-h) * 1.5); translate: -50% 0;
    opacity: .85; pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
  }
  .final-cta:has(> .final-cta__lip)::before { display: none; }
  .site-footer__lip { display: none; }
  .final-cta::before {
    height: calc(var(--lip-h) * 1.5); opacity: .85;
    background: var(--aurora-lip, none) 50% 0 / var(--lip-w) 100% no-repeat;
    -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
  }
  .legal__body a { text-decoration-color: rgb(255 255 255 / .35); }
  .legal-table-wrap td { border-bottom-color: var(--table-border); }
  .wib-buyer-name a, .wib-buyer-links a, .wib-more, .wib-more-list a { text-decoration-color: rgb(255 255 255 / .3); }
  .wib-input:hover:not(:focus) { border-color: rgb(255 255 255 / .2); }

  /* ---------- review round 2 ---------- */
  .nf .orbit__glow { -webkit-mask-image: linear-gradient(transparent 12%, #000 32%, #000 68%, transparent 88%); mask-image: linear-gradient(transparent 12%, #000 32%, #000 68%, transparent 88%); }
  .scrolly.is-live .scrolly__row:not(.is-active):not(:focus-within) :is(.t-title-row, .t-body, .t-stat-label, .scrolly__list) { color: #6f7194; }
  .wy-card { background: var(--night-card); }
  .wy__btn:not(:disabled):hover { box-shadow: 0 0 0 1px rgb(255 255 255 / .28), 0 10px 24px -12px rgb(0 0 0 / .6); }
  .legal::after { background-image: radial-gradient(circle, rgb(255 255 255 / .1) var(--dot-r), transparent 1.4px); }

  /* Safari can show the glow canvas a shade off the page colour, so its outer edge would read as a line. */
  .ai__band--in { -webkit-mask-image: linear-gradient(transparent, #000 35%); mask-image: linear-gradient(transparent, #000 35%); }
  .ai__band--out { -webkit-mask-image: linear-gradient(to top, transparent, #000 35%); mask-image: linear-gradient(to top, transparent, #000 35%); }

  /* ---------- product screens: the app's own dark tokens ---------- */
  .rp { background: #060610; color: #eeeef0; }
  .rp small { color: #9395b8; }
  .rp__card { border-color: #292948; background: #0e0e1e; }
  .rp__box { background: #181834; }
  .rp__btn { border-color: #292948; background: #0e0e1e; }
  .rp__btn--p { border-color: #00e5bf; background: #00e5bf; color: #060610; }
  .rp__av { background: #181834; }
}
