/* Light surfaces for retained pages. Load after professional.css.
   Every rule is scoped to the legacy marketing layout. Image previews,
   maps and illustrative dashboards retain their own contrasting palette. */
body[data-av-legacy] {
  --green: #18734a;
  --warning: #a16406;
  --danger: #b52b37;
  --brand-gradient: linear-gradient(118deg, #1257ed, #286cec);
}

/* Content surfaces whose original backgrounds were fixed dark gradients. */
body[data-av-legacy] :is(.card, .path-card, .pillar, .process-step,
  .benefit-strip, .comparison-card, .module-card, .check-panel, .finding,
  .contact-form-card, .contact-info-card, .price-card, .case-card,
  .knowledge-card, .hero-side-card, .toc, .article-cta, .branch-card,
  .mosaic-card, .error-panel, .region-card, .wd-card, .faq-item,
  .feature-card, .article-card) {
  color: #13203a;
  background: #fff;
  border-color: #d9e3f0;
  box-shadow: 0 6px 24px #172f5708;
}
body[data-av-legacy] :is(.card-accent, .card-dark, .comparison-card.good,
  .check-intro, .decision-band, .article-callout, .notice,
  .result-top, .result-category, .cta-band, .section-accent) {
  background: #f2f6fd;
  color: #334762;
  border-color: #d9e3f0;
}
body[data-av-legacy] :is(.home-hero, .page-hero-v2, .page-hero, .sc-hero) .lead,
body[data-av-legacy] :is(.hero-proof, .hero-side-list li, .path-result,
  .process-output, .feature-list li, .pillar ul, .comparison-card ul,
  .price-card ul, .branch-card ul, .check-intro p, .check-tags span,
  .notice, .legal, .article, .article p, .article li,
  .article-body p, .article-body li, .wd-card p) {
  color: #465973;
}
body[data-av-legacy] :is(.article, .article-body, .legal) :is(h2, h3, h4),
body[data-av-legacy] :is(.card, .check-panel, .hero-side-card, .article-cta,
  .article-callout, .cta-band, .toc) :is(h2, h3, h4) {
  color: #13203a;
}
body[data-av-legacy] .feature-list li::before {
  color: #fff;
  background: #1257ed;
}
body[data-av-legacy] :is(.check-tags span, .tag, .label, .chip) {
  background: #edf3fc;
  color: #365477;
  border-color: #d5e1f0;
}
body[data-av-legacy] :is(.legal, .article, .article-body) a {
  color: #1257ed;
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* Calls to action and small navigation controls. */
body[data-av-legacy] :is(.btn-primary, .btn-brand) {
  background: #1257ed;
  color: #fff !important;
  border-color: #1257ed;
}
body[data-av-legacy] .btn-dark { background: #13203a; color: #fff; }
body[data-av-legacy] :is(.btn-secondary, .btn-ghost) {
  color: #23416b;
  background: #fff;
  border-color: #c5d3e7;
}
body[data-av-legacy] :is(.btn-secondary, .btn-ghost):hover {
  color: #1257ed;
  background: #edf3ff;
}
body[data-av-legacy] .context-nav-wrap { background: #f2f6fd; }
body[data-av-legacy] :is(.context-title, .context-nav a) {
  background: #fff;
  color: #334762;
  border-color: #d2deed;
}
body[data-av-legacy] .context-nav a:is(:hover, :focus-visible, .is-active) {
  color: #fff;
  background: #1257ed;
}
body[data-av-legacy] .region-links a {
  color: #334762;
  background: #fff;
  border-color: #cbd8e9;
}
body[data-av-legacy] .region-links a:hover {
  color: #1257ed;
  background: #edf3ff;
}

/* Photo heroes remain dark, with explicit foreground colours. */
body[data-av-legacy] .region-hero { color: #fff; }
body[data-av-legacy] .region-hero :is(h1, h2, .lead) { color: #fff; }
body[data-av-legacy] .region-hero :is(.page-gradient, .text-gradient) {
  color: #acd1ff !important;
  -webkit-text-fill-color: #acd1ff !important;
}
body[data-av-legacy] .region-hero :is(.btn-secondary, .btn-ghost) {
  color: #fff;
  background: #13203ab3;
  border-color: #92a9c5;
}
body[data-av-legacy] .region-hero :is(.btn-secondary, .btn-ghost):hover {
  background: #213b62;
}
body[data-av-legacy] .region-hero__proof i { color: #fff; }

/* Inputs and result messages: retain state meaning without dark fields. */
body[data-av-legacy] :is(.input, input[type="text"], input[type="url"],
  input[type="email"], input[type="tel"], select, textarea) {
  background: #fff;
  color: #17223a;
  border-color: #b9c8dc;
}
body[data-av-legacy] :is(input, select, textarea):focus {
  background: #fff;
  color: #17223a;
  border-color: #1257ed;
}
body[data-av-legacy] .form-field label { color: #253b5a; }
body[data-av-legacy] :is(input, textarea)::placeholder { color: #64758d; }
body[data-av-legacy] .loader { border-color: #dce6f5; border-top-color: #1257ed; }
body[data-av-legacy] .result-score {
  background: conic-gradient(var(--page-b) calc(var(--result) * 1%), #dce5f2 0);
}
body[data-av-legacy] .check-reference {
  background: #eaf2ff;
  color: #244c80;
}
body[data-av-legacy] .finding:is(.ok, .warn, .bad) i { color: #fff; }
body[data-av-legacy] .faq-item[open] { background: #f3f7fe; border-color: #adbfda; }
body[data-av-legacy] :is(.faq-button, .faq-item summary) { color: #172c4b; }
body[data-av-legacy] :is(.faq-panel, .faq-body) { color: #465973; }
body[data-av-legacy] table { color: #253b5a; background: #fff; }
body[data-av-legacy] :is(td, th) { border-color: #d7e1ef; }
body[data-av-legacy] th { background: #edf3fb; color: #172c4b; }
body[data-av-legacy] td:last-child { color: #253b5a; }
body[data-av-legacy] caption { color: #52647d; }

/* The existing visual demonstrations use dark UI surfaces intentionally. */
body[data-av-legacy] :is(.visual-panel, .hero-stage, .browser-mock, .browser,
  .shop-window, .search-panel, .phone, .arch-canvas, .api-board, .workflow-board,
  .ai-console, .ale-dashboard, .launch-board, .landing-window, .case-browser,
  .mosaic-mini-browser, .map-canvas) {
  --text: #f3f8ff;
  --text-soft: #d3dfed;
  --muted: #a8bdd5;
  --muted-2: #92aac7;
  --bg-deep: #030914;
  --bg-2: #071322;
  --panel: #10253c;
  --line: #47617e;
  color: #f3f8ff;
}

/* Map controls outside the actual map adopt the light page theme. */
body[data-av-legacy] :is(.map-shell, .map-side, .map-detail, .map-list) {
  color: #253b5a;
  background: #f4f7fc;
  border-color: #d5e0ee;
}
body[data-av-legacy] :is(.map-detail p, .map-detail__meta span, .map-count,
  .map-list button, .map-list button em, .map-filter) { color: #465973; }
body[data-av-legacy] .map-detail__eyebrow { color: #1257ed; }
body[data-av-legacy] :is(.map-filter, .map-detail__meta span) { background: #e6edf8; }
body[data-av-legacy] .map-filter:hover { color: #1257ed; }
body[data-av-legacy] .map-filter.is-on { background: #1257ed; color: #fff; }
body[data-av-legacy] .map-search input { background: #fff; color: #17223a; }

/* Gallery chrome is light; screenshot stages and browser frames stay intact. */
body[data-av-legacy] :is(.sc-controls, .sc-card__link, .sc-saved__panel) {
  background: #fff;
  color: #17223a;
  border-color: #d5e0ee;
  box-shadow: 0 8px 28px #172f5710;
}
body[data-av-legacy] :is(.sc-hero, .sc-gallery, .sc-promise, .sc-saved) {
  --sc-edge: #d5e0ee;
}
body[data-av-legacy] :is(.sc-card__title, .sc-card__features li, .sc-saved__list li) { color: #253b5a; }
body[data-av-legacy] :is(.sc-card__cat, .sc-card__cta) { color: #1257ed; }
body[data-av-legacy] :is(.sc-filter, .sc-view__btn, .sc-saved__list button) {
  color: #3b5475;
  background: #edf3fc;
}
body[data-av-legacy] :is(.sc-filter:hover, .sc-filter[aria-pressed="true"],
  .sc-view__btn.is-active) { color: #fff; background: #1257ed; }
body[data-av-legacy] .sc-filter[aria-pressed="true"] span { color: #fff; background: #ffffff26; }
body[data-av-legacy] .sc-saved__list button:hover { color: #8d2630; background: #ffe9ec; }
