:root { color-scheme:light; }

.theme-toggle {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--surface);
  color:var(--ink);
  cursor:pointer;
}
.theme-toggle:hover { background:var(--accent-soft); border-color:var(--brand-blue); }
.theme-toggle .icon { width:18px; height:18px; }
.theme-toggle .theme-sun { display:none; }
.nav-actions { gap:15px; }

:root[data-theme="dark"] {
  color-scheme:dark;
  --ink:#edf4fd;
  --text:#b6c4d7;
  --muted:#98acc5;
  --brand-blue:#63b6ff;
  --blue:var(--brand-blue);
  --blue-hover:#9ad0ff;
  --blue-mist:#294b70;
  --blue-muted:#618ab5;
  --accent-soft:#173450;
  --surface:#111f32;
  --surface-blue:#10263e;
  --paper:#0b1423;
  --line:#293b53;
  --line-accent:#31506e;
  --shadow:0 22px 65px #00000040;
}

[data-theme="dark"] .theme-toggle .theme-moon { display:none; }
[data-theme="dark"] .theme-toggle .theme-sun { display:block; }
[data-theme="dark"] .site-header { background:#0b1423f2; }

/* Keep supplied logos readable without changing their source artwork. */
[data-theme="dark"] .brand-logo { filter:invert(1) hue-rotate(180deg); mix-blend-mode:screen; }
[data-theme="dark"] .integration-logos img { filter:grayscale(1) invert(1); mix-blend-mode:screen; opacity:.8; }
[data-theme="dark"] :is(.flow-liveprice,.system-logos>div) { background:#fff; color:#080f24; }
[data-theme="dark"] .flow-liveprice small { color:#596579; }

[data-theme="dark"] :is(.section-white,.process,.site-footer,.proof-strip) { background:var(--paper); }
[data-theme="dark"] :is(.dropdown-panel,.mini-window,.channel-row,.lead-form,.price-card,.skip-link) { background:var(--surface); }
[data-theme="dark"] .price-card.featured { background:var(--surface-blue); }
[data-theme="dark"] .button-light { background:var(--surface); }
[data-theme="dark"] .button-light:hover { background:var(--accent-soft); }
[data-theme="dark"] .feature-tab[aria-selected="true"] { background:var(--paper); }
[data-theme="dark"] .feature-tab:hover { background:var(--surface-blue); }
[data-theme="dark"] :is(.form-field input,.form-field select,.form-field textarea) { background:var(--paper); }
[data-theme="dark"] .contact-section .eyebrow { color:var(--brand-blue); }
[data-theme="dark"] .contact-section .eyebrow::before { background:var(--brand-blue); }
[data-theme="dark"] :is(.contact-copy .check-list .icon,.contact-person>.icon) { color:var(--brand-blue); }

[data-theme="dark"] :is(.button-primary,.price-badge,.chat-launcher,.chat-header,.chat-message-user,.chat-composer button,.cen-price-result,.chain-active .chain-number) {
  background:#0878c9;
  color:#fff;
}
[data-theme="dark"] :is(.button-primary:hover,.chat-launcher:hover,.chat-composer button:hover) { background:#0865ac; }
[data-theme="dark"] :is(.chat-close,.cen-price-result>p) { color:#fff; }
[data-theme="dark"] :is(.cen-simulator select,.cen-simulator input[type="text"],.cen-simulator input[type="number"]) { border-color:var(--line-accent); }
[data-theme="dark"] .cen-error { background:#402620; border-color:#774b40; color:#ffbcaa; }

[data-theme="dark"] .hero.product-hero { background:linear-gradient(112deg,#0b1423 27%,#0d1d32 65%,#122b47); border-bottom-color:var(--line); }
[data-theme="dark"] .hero.product-hero::after { background:radial-gradient(ellipse at 86% 44%,#2170ad26,transparent 47%); }
[data-theme="dark"] .hero-atmosphere { --hero-flow-color:#398fef; }
[data-theme="dark"] .hero.product-hero .hero-art::before { background:radial-gradient(ellipse,#1764aa33,transparent 68%); }
[data-theme="dark"] .hero.product-hero h1 .accent { color:var(--brand-blue); background-image:linear-gradient(105deg,#91caff,#63b6ff 70%,#8ad3ff); }
[data-theme="dark"] .hero.product-hero .hero-lead { color:var(--text); }
[data-theme="dark"] .hero.product-hero .eyebrow { color:var(--brand-blue); }
[data-theme="dark"] .hero-proof-rule { background:var(--line-accent); }
[data-theme="dark"] .hero-live-label { color:#a4c6e7; }
[data-theme="dark"] .hero-live-label>span { box-shadow:0 0 0 4px #63b6ff12; }
[data-theme="dark"] .hero.product-hero .dashboard { background:var(--surface); border-color:#385775; box-shadow:0 30px 65px -20px #0009,0 0 0 7px #ffffff04; }
[data-theme="dark"] .hero.product-hero .dashboard-top { background:#14243a; }
[data-theme="dark"] .hero-panel-rail { background:#091a2e; }
[data-theme="dark"] .hero.product-hero .metric { background:#14243a; border-color:var(--line); }
[data-theme="dark"] .hero.product-hero .metric:last-child { background:var(--surface-blue); border-color:var(--line-accent); }
[data-theme="dark"] .hero-rule-card { background:#172c44; border-color:#355777; box-shadow:0 15px 35px #0004; }
[data-theme="dark"] :is(.hero-rule-icon,.hero-rule-check) { background:#214362; }
[data-theme="dark"] :is(.hero-rule-card>div>span,.hero-rule-price del,.hero-rule-price>.icon,.allegro-hero .hero-rule-price>span) { color:var(--muted); }
[data-theme="dark"] .hero.product-hero .floating-note .icon { background:var(--accent-soft); }
[data-theme="dark"] :is(.hero.product-hero .floating-note small,.hero.product-hero .hero-art figcaption) { color:var(--muted); }

[data-theme="dark"] .allegro-hero .comparison-product .product-thumb { background:var(--surface-blue); border-color:var(--line-accent); }
[data-theme="dark"] .allegro-hero .comparison-product .icon { color:var(--brand-blue); }
[data-theme="dark"] .allegro-hero .comparison-product small { color:var(--muted); }
[data-theme="dark"] .allegro-hero .seller-row { background:#14243a; border-color:var(--line); }
[data-theme="dark"] .allegro-hero .seller-row .position { color:var(--muted); }
[data-theme="dark"] .allegro-hero .seller-row.own { background:#173b5a; border-color:#49779f; }
[data-theme="dark"] .allegro-hero .seller-row.own .position { color:var(--brand-blue); }
[data-theme="dark"] .allegro-hero .seller-row.own small { background:#0e263f; }
[data-theme="dark"] .allegro-hero-limits { border-color:var(--line); color:var(--text); }

@media(max-width:1180px) and (min-width:801px) {
  .header-inner { gap:18px; }
  .nav-actions { gap:10px; }
  .site-nav { gap:16px; }
  .nav-actions>a:first-child { display:none; }
}

@media(max-width:800px) {
  .header-inner { gap:12px; }
  .nav-actions { gap:8px; }
  [data-theme="dark"] .dropdown-panel { background:transparent; }
}

@media(max-width:520px) {
  .header-inner { gap:8px; }
  .header-inner .brand-logo { width:126px; }
  .nav-actions { gap:6px; }
  .nav-actions .button { padding:9px 10px; font-size:10px; gap:7px; }
  .nav-actions .button .icon { display:none; }
}

@media(max-width:360px) {
  .header-inner { gap:6px; }
  .header-inner .brand-logo { width:105px; }
  .nav-actions { gap:4px; }
  .nav-actions .button { font-size:9px; padding-inline:9px; }
}
