/* Kinsta staging homepage and its checkout share the existing theme components. */
:root {
  color-scheme: normal;
  --page: #031027;
  --canvas: #04132b;
  --surface: #0c2035;
  --well: #07192d;
  --text: #f4f7fb;
  --muted: #c0cfda;
  --line: #344e64;
  --accent: #bbf238;
  --focus: #c5f467;
  --sage-glow: #107d7130;
  --card-shadow: 0 12px 35px #00102255;
  --station-glass: linear-gradient(125deg, #104452dd, #071b31f5 46%, #073843dd);
}
/* Keep the viewport scrollbar native while controls use the dark palette. */
body { color-scheme: dark; }
.site-header::before {
  background: #031027e8;
  border-color: var(--line);
}
.wordmark-icon, .home-comparison-returning .wordmark-icon { color: var(--accent); }
.wordmark-custom { filter: brightness(0) invert(1); }
.swap-page .swap-hero[data-hero-style] {
  background: radial-gradient(ellipse at 78% 35%, #0c455455, transparent 42%), #031027;
  border-bottom-color: #234353;
}
.swap-hero::after {
  content: "";
  display: block;
  height: clamp(165px, 20vw, 360px);
  background: url("station-panorama.webp") center 67% / cover no-repeat;
  mask-image: linear-gradient(to bottom, transparent, black 12%);
}
.swap-hero .swap-hero-inner { padding-block-end: clamp(10px, 2vw, 28px); }
.swap-hero[data-hero-style] .intro-mission { color: var(--muted); }
.swap-card, .home-tracking-example, .home-comparison-card, .checkout-card, .checkout-tips, .checkout-site-check {
  background: var(--station-glass);
  color: var(--text);
  border-color: #386575;
  box-shadow: inset 0 1px 0 #8de8ee18, var(--card-shadow);
}
.asset-panel, .asset-panel-receive, .checkout-fields input:not([type="checkbox"]) {
  background: #061728ee;
  border-color: var(--line);
}
.asset-select, .home-example-coins, .home-comparison-vs, .checkout-site-address,
.checkout-amounts > div:last-child, .checkout-deposit-help, .swap-provider:not([hidden]) {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.home-comparison-returning { border-color: #a0cb48; }
.home-about h2, .home-intro-grid .home-benefit h3 { color: var(--text); }
.home-about-copy p, .home-comparison-direct li, .home-comparison-returning li p,
.home-example-description { color: var(--muted); }
.home-intro-grid .home-benefit { background: linear-gradient(110deg, #0d2b3c, var(--well)); }
.home-currencies { background: #0a2034; border: 1px solid var(--line); }
.home-faq-marks { color: #294557; }
.home-faq summary:hover, .home-faq-support:hover { background: #163247; }
.home-steps li::before, .home-comparison-mark, .checkout-steps [aria-current] span {
  background: var(--accent);
  color: #162007;
}
.footer-newsletter-form button, .primary-nav a[aria-current="page"],
.analytics-options [data-choice="allow"], .language-list a[aria-current="true"] { color: #162007; }
.home-comparison-cta { background: var(--accent); }
.home-example-details, .home-faq-band, .site-footer { border-color: var(--line); }
.site-footer { background-color: var(--canvas); }
.footer-copyright { background: #031d29; }
.quote-countdown:not([hidden]) { background: #193646; color: var(--focus); }
.minimum-warning { color: #ffcb87; }
.continue-button:disabled { color: #b0c0ca; background: #30434d; }
@media (max-width: 680px) {
  .swap-hero::after { height: auto; aspect-ratio: 3 / 1; background-size: 100% auto; }
}

/* Sweep across the current stage throughout the wait, including long deposits. */
@media (prefers-reduced-motion: no-preference) {
  .home-tracking-example.is-playing .order-stages [aria-current="step"]:not(:last-child)::after,
  .order-progress .order-stages [aria-current="step"]:not(:last-child)::after {
    background-image: linear-gradient(90deg, transparent, #f7ffe5 50%, transparent);
    background-size: 55% 100%;
    animation: example-order-sweep 2s ease-in-out infinite;
  }
  .home-tracking-example.is-playing .order-stages [aria-current="step"]:last-child::after {
    content: none;
  }
}

/* One shared desktop measure from the benefits section through the legal strip. */
@media (min-width: 1100px) {
  :root { --station-desktop-width: min(92%, 1680px); }
  body:not(.home):not(:has(.ex-wrap)) .site-header-inner, body:not(.home):not(:has(.ex-wrap)) .swap-hero-inner,
  .swap-page :is(.home-benefits, .home-currencies, .home-walkthrough, .home-about-inner, .home-faq-inner),
  .swap-page ~ .site-footer :is(.footer-inner, .footer-copyright-inner) {
    width: var(--station-desktop-width);
  }
  .home-intro-grid { gap: clamp(18px, 1.8vw, 32px); }
}

/* Secondary pages use the same station lighting with a quiet reading surface. */
.content-page .page-hero {
  background: linear-gradient(90deg, #031027fa 10%, #031027e8 48%, #03102770),
    url("station-panorama.webp") center 58% / cover no-repeat;
}
.content-page :is(.about-routing, .about-purpose, .how-aggregator, .how-funds, .how-rate-card, .support-contact) {
  background: var(--station-glass);
  border-color: #386575;
}
.about-impact { background: var(--well); box-shadow: 0 0 0 100vmax var(--well); }
.about-impact-copy .about-impact-total { color: var(--accent); }
.how-steps li::before { background: var(--accent); color: #162007; }
.how-rate-chart, .how-steps li + li { border-color: var(--line); }
.how-rate-trend {
  background: repeating-linear-gradient(0deg, transparent 0 14px, var(--line) 14px 15px);
}
.how-rate-trend::before, .how-rate-floating .how-rate-trend::after { background: var(--focus); }
.ex-wrap { --ink: var(--text); }
body :is(.ex-wrap article, .ex-chart, .ex-tutorial, .ex-benefits article:first-child,
  .ex-route-panel, .ex-route, .ex-route-directions, .ex-chips a,
  .ex-route-filters select, .ex-route-filters input, .ex-route-symbol) {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
body :is(.ex-route-directions button, .ex-route-filters label) { color: var(--text); }
body :is(.ex-route:hover, .ex-chips a:hover, .ex-route-directions button[aria-pressed=true]) {
  background: var(--well); border-color: var(--focus);
}
body :is(.ex-route-back, .ex-route-arrow, .ex-quote-arrows, .ex-route-footer a, .ex-route-summary a) { color: var(--focus); }
.ex-steps article::before { color: #162007; }
@media (min-width: 1100px) {
  :is(.about-page, .how-page) :is(.page-hero-inner, #returning-page-body),
  .content-page ~ .site-footer :is(.footer-inner, .footer-copyright-inner) {
    width: var(--station-desktop-width);
  }
}

@media (min-width: 801px) {
  .home-intro-grid {
    grid-template-columns: minmax(0, min(47%, 680px)) minmax(0, 1fr);
  }
  .home-intro-poster {
    align-self: center;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

.home-intro-poster {
  background: #071627 url("station-intro.webp") center / cover no-repeat;
}
.home-intro-title { top: 34%; max-width: 50%; transform: none; }
.home-intro-play { place-items: end start; padding: 0 6% 5%; }
.home-intro-play span {
  width: clamp(36px, 9cqw, 60px);
  background: #bef438;
  color: #091b23;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.home-intro-play span::before {
  content: "";
  width: 31%;
  height: 34%;
  margin-left: 5%;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.home-intro-play:is(:hover, :focus-visible) span { background: #deff92; }

/* Frame the order details with the night map while keeping the card measure. */
.checkout-order,
.swap-page:has(#live-review:not([hidden])) {
  position: relative;
  isolation: isolate;
  background-color: var(--page);
}
.checkout-order {
  width: 100%;
  margin: 0;
  padding: clamp(25px, 5vw, 64px) max(16px, calc((100% - 810px) / 2));
}
.checkout-order::before,
.swap-page:has(#live-review:not([hidden]))::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(100%, max(52vw, 560px));
  background: url("swap-tracking-map.webp") left top / cover no-repeat;
  mask-image: linear-gradient(to bottom, black 80%, transparent);
  pointer-events: none;
}

.ex-route-footer a.ex-route-browse {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--well);
  color: var(--focus);
  text-decoration: none;
}
.ex-route-footer a.ex-route-browse:is(:hover, :focus-visible) {
  border-color: var(--focus);
  background: #163247;
}
.ex-route-footer a.ex-route-browse:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
