/* ==========================================================================
   AffixIO master stylesheet — site-wide professional unity
   Load last. Canonical light shell + shared dark product surfaces.
   ========================================================================== */

:root {
  /* Light shell (default Affix enterprise) */
  --affix-graphite: #1d2128;
  --affix-chalk: #f5f2ea;
  --affix-basalt: #313843;
  --affix-verdict: #295f4e;
  --affix-verdict-mid: #3d7a66;
  --affix-verdict-soft: #e4efe9;
  --affix-refusal: #8c3a32;
  --affix-bronze: #8a6742;
  --affix-coal: #101317;
  --affix-stone: #bfc5cd;
  --affix-muted: #4c5868;
  --affix-line: #cfc7b8;
  --affix-chip: #ebe4d6;
  --affix-card: #fffcf7;
  --affix-card-soft: #f0ece2;
  --affix-radius: 10px;
  --affix-radius-sm: 8px;
  --affix-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 10px 28px rgba(17, 22, 31, 0.05);
  --affix-sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --affix-mono: "DM Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --affix-display: "DM Sans", "Segoe UI", system-ui, sans-serif;

  /* Dark product surface (home / evaluate / trends / sectors) */
  --affix-void: #06080b;
  --affix-void-surface: #0c1016;
  --affix-void-panel: #111820;
  --affix-void-line: rgba(120, 160, 140, 0.18);
  --affix-void-line-strong: rgba(90, 200, 150, 0.42);
  --affix-void-ink: #e8f0ea;
  --affix-void-muted: #8a9a90;
  --affix-void-accent: #3d9b72;
  --affix-void-accent-2: #7dffb3;
  --affix-void-accent-dim: rgba(61, 155, 114, 0.14);
  --affix-void-display: "Oxanium", "Sora", system-ui, sans-serif;
  --affix-void-sans: "Sora", system-ui, sans-serif;
  --affix-void-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Bridge legacy tokens used across older sheets */
  --graphite: var(--affix-graphite);
  --chalk: var(--affix-chalk);
  --basalt: var(--affix-basalt);
  --verdict: var(--affix-verdict);
  --refusal: var(--affix-refusal);
  --bronze: var(--affix-bronze);
  --coal: var(--affix-coal);
  --stone: var(--affix-stone);
  --bg: var(--affix-chalk);
  --fg: var(--affix-graphite);
  --muted: var(--affix-muted);
  --line: var(--affix-line);
  --chip: var(--affix-chip);
  --card: var(--affix-card-soft);
  --deep-verdict: var(--affix-verdict-mid);
}

/* Remap shared dark-hero theme onto the same void palette as evaluate */
:root {
  --affix-hero-void: var(--affix-void);
  --affix-hero-surface: var(--affix-void-surface);
  --affix-hero-panel: var(--affix-void-panel);
  --affix-hero-line: var(--affix-void-line);
  --affix-hero-line-strong: var(--affix-void-line-strong);
  --affix-hero-ink: var(--affix-void-ink);
  --affix-hero-muted: var(--affix-void-muted);
  --affix-hero-accent: var(--affix-void-accent);
  --affix-hero-accent-2: var(--affix-void-accent-2);
  --affix-hero-accent-dim: var(--affix-void-accent-dim);
  --affix-hero-display: var(--affix-void-display);
  --affix-hero-sans: var(--affix-void-sans);
  --affix-hero-mono: var(--affix-void-mono);
}

/* ——— Global light shell ——— */
html {
  overflow-x: clip;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--affix-chalk);
  color: var(--affix-graphite);
  font-family: var(--affix-sans);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.home,
body:has(.evaluate-hub-page),
body:has(.trends-hub-page),
body:has(.docs-premium),
body:has(.compliance-hub-page) {
  background: var(--affix-void);
  color: var(--affix-void-ink);
  color-scheme: dark;
}

main.page {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.15rem 1.15rem 4rem;
  min-width: 0;
  box-sizing: border-box;
}

main.page.site-chrome {
  max-width: 1180px;
}

a {
  color: var(--affix-verdict);
}

a:hover {
  color: color-mix(in srgb, var(--affix-verdict) 82%, #000);
}

.mono {
  font-family: var(--affix-mono);
  font-variant-ligatures: none;
}

/* ——— Shared chrome (light pages) ——— */
.topbar,
.site-chrome .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--affix-line);
  min-width: 0;
}

.brand,
.site-chrome .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--affix-sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--affix-graphite);
  flex-shrink: 0;
}

.brand img,
.site-chrome .brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  border: 1px solid var(--affix-line);
}

.btn,
.site-chrome .btn,
.btn-contact {
  border: 1px solid var(--affix-line);
  background: var(--affix-chip);
  color: var(--affix-graphite);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--affix-sans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-contact,
a.btn.btn-contact {
  background: var(--affix-verdict) !important;
  border-color: var(--affix-verdict) !important;
  color: #f5f2ea !important;
}

.nav-yesno,
.site-chrome .nav-yesno {
  display: flex;
  border: 1px solid var(--affix-line);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: var(--affix-sans);
}

.nav-yesno .yes,
.site-chrome .nav-yesno .yes {
  background: var(--affix-verdict);
  color: #f5f2ea;
}

.nav-yesno .no,
.site-chrome .nav-yesno .no {
  background: var(--affix-refusal);
  color: #f5f2ea;
}

.footer,
.site-chrome .footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--affix-line);
  color: var(--affix-muted);
}

.footer a,
.site-chrome .footer a,
.footer summary,
.site-chrome .footer summary {
  color: var(--affix-muted);
}

.footer a:hover,
.site-chrome .footer a:hover {
  color: var(--affix-verdict);
}

/* ——— Shared light content primitives ——— */
.legal-doc,
.seo-page article,
.seo-page .legal-doc {
  border: 1px solid var(--affix-line);
  border-radius: 14px;
  background: var(--affix-card);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--affix-shadow);
}

.legal-doc h1,
.seo-page h1,
.seo-hero h1 {
  letter-spacing: -0.03em;
}

.legal-doc h2,
.seo-page h2 {
  color: var(--affix-graphite);
}

.legal-doc p,
.legal-doc li,
.seo-page p,
.seo-page li {
  color: var(--affix-graphite);
}

/* Soft light heroes for SEO / inset pages that were forced dark */
.seo-page .seo-hero,
main.seo-page .seo-hero {
  color: var(--affix-graphite) !important;
  font-family: var(--affix-sans) !important;
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, color-mix(in srgb, var(--affix-verdict) 12%, transparent), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--affix-card) 100%) !important;
  border: 1px solid var(--affix-line) !important;
  border-radius: 14px !important;
  border-block-end: 1px solid var(--affix-line) !important;
  max-width: none;
  margin: 0 0 1.15rem;
  padding: 1.35rem 1.35rem 1.2rem !important;
}

.seo-page .seo-hero::before,
.seo-page .seo-hero::after,
main.seo-page .seo-hero::before,
main.seo-page .seo-hero::after {
  content: none !important;
  display: none !important;
}

.seo-page .seo-hero h1,
main.seo-page .seo-hero h1 {
  font-family: var(--affix-display) !important;
  color: var(--affix-graphite) !important;
}

.seo-page .seo-hero p,
.seo-page .seo-hero__lead,
main.seo-page .seo-hero p,
main.seo-page .seo-hero__lead {
  font-family: var(--affix-sans) !important;
  color: var(--affix-muted) !important;
}

.seo-page .seo-hero__flag {
  font-family: var(--affix-mono) !important;
  color: var(--affix-verdict) !important;
}

/* ——— Contact ——— */
main.site-chrome .contact-page,
.contact-page {
  --contact-panel: var(--affix-card);
  --contact-glow: color-mix(in srgb, var(--affix-verdict) 14%, transparent);
}

/* ——— Trust ——— */
.trust-page {
  --trust-bg: var(--affix-chalk);
  --trust-ink: var(--affix-graphite);
  --trust-muted: var(--affix-muted);
  --trust-line: var(--affix-line);
  --trust-chip: var(--affix-chip);
  --trust-card: var(--affix-card);
  --trust-verdict: var(--affix-verdict);
  --trust-verdict-soft: var(--affix-verdict-soft);
  --trust-display: var(--affix-display);
  --trust-mono: var(--affix-mono);
}

/* ——— Evaluate / dark hubs keep void, but share accents ——— */
.evaluate-hub-page {
  --eval-void: var(--affix-void);
  --eval-surface: var(--affix-void-surface);
  --eval-panel: var(--affix-void-panel);
  --eval-line: var(--affix-void-line);
  --eval-line-strong: var(--affix-void-line-strong);
  --eval-ink: var(--affix-void-ink);
  --eval-muted: var(--affix-void-muted);
  --eval-accent: var(--affix-void-accent);
  --eval-accent-2: var(--affix-void-accent-2);
  --eval-accent-dim: var(--affix-void-accent-dim);
  --eval-mono: var(--affix-void-mono);
  --eval-sans: var(--affix-void-sans);
  --eval-display: var(--affix-void-display);
}

.trends-hub-page,
.sector-bands-page,
.tools-suite-page,
.compliance-hub-page,
.docs-premium,
.compare-page {
  --affix-hero-void: var(--affix-void);
  --affix-hero-surface: var(--affix-void-surface);
  --affix-hero-panel: var(--affix-void-panel);
  --affix-hero-accent: var(--affix-void-accent);
  --affix-hero-accent-2: var(--affix-void-accent-2);
}

/* Trends / sector / tools: keep dark heroes, unify chips and cards in light content wells where present */
.trends-hub-page .page-body,
.sector-bands-page .page-body,
.tools-suite-page .page-body {
  color: var(--affix-void-ink);
}

/* Light content cards on mixed pages */
.trust-card,
.seo-card,
.compare-card,
.field-note-card {
  border-color: var(--affix-line);
  background: var(--affix-card);
}

/* Forms */
input,
select,
textarea,
button {
  font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--affix-line);
  border-radius: var(--affix-radius-sm);
  background: #fff;
  color: var(--affix-graphite);
}

/* Tables */
table {
  border-color: var(--affix-line);
}

th {
  background: var(--affix-chip);
  color: var(--affix-graphite);
}

/* CTA pattern */
.trust-cta a,
.seo-cta a,
.hero-actions .btn-primary,
.cta-primary {
  background: var(--affix-verdict);
  border-color: var(--affix-verdict);
  color: #f5f2ea;
}

/* ——— Page-family polish ——— */

/* About / legal / privacy / terms / cookies / security / procurement */
.seo-page--glossary .seo-hero,
.seo-page--faq .seo-hero,
main.page:has(.legal-doc) .seo-hero {
  /* already handled by .seo-page .seo-hero */
}

/* Docs chrome pages (non-premium) */
main.page.site-chrome:has(.docs-layout),
main.page.site-chrome.docs-page {
  background: transparent;
}

/* Partner pages */
.partner-hub,
.partner-page {
  --verdict: var(--affix-verdict);
  --line: var(--affix-line);
  --muted: var(--affix-muted);
}

/* Status */
.status-page,
main.page:has(.status-hero) {
  --verdict: var(--affix-verdict);
}

/* Press / brands / collab light panels */
.press-section,
.brands-grid,
.collab-section {
  color: var(--affix-graphite);
}

/* Hub CMS / account hubs: if light chrome, keep Affix tokens */
.account-hub-page,
.hub-page {
  --verdict: var(--affix-verdict);
  --line: var(--affix-line);
}

/* Xalgo */
.xalgo-page {
  --verdict: var(--affix-verdict);
  --bg: var(--affix-chalk);
  --fg: var(--affix-graphite);
}

/* Sandbox is separate service; ignore here */

/* ——— Mobile unity ——— */
@media (max-width: 900px) {
  .topbar,
  .site-chrome .topbar {
    gap: 0.5rem;
  }

  main.page {
    padding: 0.85rem 0.85rem 3rem;
  }
}

@media (max-width: 640px) {
  main.page {
    padding: 0.7rem max(0.75rem, env(safe-area-inset-right)) calc(2.75rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }

  .topbar,
  .site-chrome .topbar {
    margin-bottom: 0.85rem;
    padding-bottom: 0.55rem;
  }

  .seo-page .seo-hero,
  main.seo-page .seo-hero {
    padding: 1.05rem 1rem !important;
    border-radius: 12px !important;
  }

  .legal-doc,
  .seo-page article {
    padding: 1rem 0.95rem;
    border-radius: 12px;
    box-shadow: none;
  }

  .nav-yesno {
    display: none;
  }
}

/* Reduce accidental horizontal overflow from long mono strings */
pre,
code,
.mono {
  overflow-wrap: anywhere;
}


/* ——— Dark hub chrome consistency (home / evaluate / trends / sectors) ——— */
body.home .topbar,
.evaluate-hub-page > .topbar,
.trends-hub-page > .topbar,
.sector-bands-page > .topbar,
.tools-suite-page > .topbar,
.docs-premium > .topbar,
.compliance-hub-page > .topbar {
  border-bottom-color: var(--affix-void-line);
}

body.home .brand,
body.home .primary-nav a,
.evaluate-hub-page .brand,
.evaluate-hub-page .primary-nav a,
.trends-hub-page .brand,
.trends-hub-page .primary-nav a,
.sector-bands-page .brand,
.sector-bands-page .primary-nav a,
.tools-suite-page .brand,
.tools-suite-page .primary-nav a,
.docs-premium .brand,
.docs-premium .primary-nav a {
  color: var(--affix-void-ink);
}

body.home .primary-nav a:hover,
body.home .primary-nav a[aria-current="page"],
.evaluate-hub-page .primary-nav a:hover,
.evaluate-hub-page .primary-nav a[aria-current="page"],
.trends-hub-page .primary-nav a:hover,
.trends-hub-page .primary-nav a[aria-current="page"],
.sector-bands-page .primary-nav a:hover,
.tools-suite-page .primary-nav a:hover,
.docs-premium .primary-nav a:hover {
  color: var(--affix-void-accent-2);
  background: var(--affix-void-accent-dim);
}

body.home .btn-contact,
.evaluate-hub-page .btn-contact,
.trends-hub-page .btn-contact,
.sector-bands-page .btn-contact,
.tools-suite-page .btn-contact,
.docs-premium .btn-contact {
  background: var(--affix-void-accent) !important;
  border-color: var(--affix-void-accent) !important;
  color: var(--affix-void-ink) !important;
}

/* Shared void hero chip look */
.tr-chip,
.chub-hero__chips span,
.sector-band-hero__chips span,
.tools-suite-hero__chips span {
  border-radius: 999px;
}

/* Light pages: primary nav hover uses Affix chip */
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page) .primary-nav a:hover,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page) .primary-nav a[aria-current="page"],
main.page.site-chrome .primary-nav a:hover,
main.page.site-chrome .primary-nav a[aria-current="page"] {
  color: var(--affix-verdict);
  background: var(--affix-chip);
}

/* Soften over-bright neon on dark heroes toward evaluate accent */
.tr-hero,
.chub-hero,
.sector-band--hero,
.home-band--hero,
.home-hero,
.tools-suite-band--hero,
.docs-premium-hero {
  --verdict: var(--affix-void-accent);
}


/* ——— Light-page heroes: stop shared dark hero theme on chalk pages ——— */
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .hub-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .seo-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .status-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .collab-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .brands-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .int-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .ip-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .vp-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .wg-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .wca-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .cli-hero,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .cli-verify-hero {
  color: var(--affix-graphite) !important;
  font-family: var(--affix-sans) !important;
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, color-mix(in srgb, var(--affix-verdict) 12%, transparent), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--affix-card) 100%) !important;
  border: 1px solid var(--affix-line) !important;
  border-radius: 14px !important;
  border-block-end: 1px solid var(--affix-line) !important;
  max-width: none;
  width: 100%;
  margin: 0 0 1.15rem;
  padding: 1.25rem 1.25rem 1.1rem !important;
  box-sizing: border-box;
}

main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .hub-hero::before,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .hub-hero::after,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .seo-hero::before,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .seo-hero::after,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .status-hero::before,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .status-hero::after {
  content: none !important;
  display: none !important;
}

main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .hub-hero h1,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .seo-hero h1,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .status-hero h1,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .collab-hero h1,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .brands-hero h1 {
  font-family: var(--affix-display) !important;
  color: var(--affix-graphite) !important;
}

main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .hub-hero p,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .seo-hero p,
main.page:not(.evaluate-hub-page):not(.trends-hub-page):not(.sector-bands-page):not(.tools-suite-page):not(.docs-premium):not(.compliance-hub-page):not(.compare-page) .status-hero p {
  font-family: var(--affix-sans) !important;
  color: var(--affix-muted) !important;
}


/* ——— Docs hub ——— */
.docs-page {
  --docs-ink: var(--affix-graphite);
  --docs-muted: var(--affix-muted);
  --docs-line: var(--affix-line);
  --docs-chip: var(--affix-chip);
  --docs-card: var(--affix-card);
  --docs-soft: var(--affix-card-soft);
  --docs-verdict: var(--affix-verdict);
  --docs-verdict-soft: var(--affix-verdict-soft);
}
