/* Soft Glass x Dense Dashboard combined direction — approved, site-wide.
   Loaded globally from platform_base.html. Overrides shared classes from
   compiler.css / sentrix.css / atlascore.css / app.css wherever they
   appear, so every page (ClaimBuddy, SchemeBook, ClinicalAtlas,
   RiskAtlas, backend) inherits the same visual system without needing
   per-page CSS.

   Recolored to the navy/plum/sand palette from the homepage's "genuine
   blend" direction — same variable names (rv2-violet/-pink etc. are
   kept for compatibility with every existing rule below) so every
   shared component sitewide inherits the new palette without needing
   each rule rewritten individually. */

:root {
  --rv2-ink: #221c34;
  --rv2-ink-soft: #6a6178;
  --rv2-violet: #6a3fa0;
  --rv2-violet-deep: #4f2d78;
  /* Deep amber, not the original light sand (#d8a24a) — that failed WCAG AA
     (~2.3:1) for the white button/pill text set on top of it. This value
     holds ~5.6:1 against #fff. Only ever used as a gradient stop behind
     white text, so one fix here covers every button/active-pill instance
     sitewide (see templates that reference var(--rv2-pink, ...)). */
  --rv2-pink: #8a5f22;
  /* Darkened from #2d7d6f — the original was ~4.17:1 against --rv2-teal-bg,
     just under the 4.5:1 text threshold at the badge's ~18px bold size. */
  --rv2-teal: #256b5f;
  --rv2-teal-bg: #e3efec;
  --rv2-line: rgba(106, 63, 160, 0.16);
  --rv2-glass: rgba(255, 255, 255, 0.6);
  --rv2-glass-strong: rgba(255, 255, 255, 0.78);
  --rv2-glass-border: rgba(255, 255, 255, 0.7);
  --rv2-sticky-bg: rgba(245, 244, 251, 0.85);
  --rv2-body-glow-1: #e6dcf7;
  --rv2-body-glow-2: #f3e3c4;
  --rv2-body-glow-3: #ded8ec;
  --rv2-body-base: #f1eef2;
}

/* Dark mode: the site's own theme.js already sets data-theme="dark" from
   localStorage or the OS prefers-color-scheme signal (see platform_base.html)
   — this file just needs to answer it. Everything below is a straight
   token swap; because every rule in this file reads colors through
   var(--rv2-*)/var(--hp-*) rather than literal hex, redefining the
   tokens here re-themes the whole file without touching each rule. */
[data-theme="dark"] {
  --rv2-ink: #eee9f7;
  --rv2-ink-soft: #a79cc4;
  --rv2-violet: #9a7fe0;
  --rv2-violet-deep: #c3a9ff;
  --rv2-teal: #6fd9c4;
  --rv2-teal-bg: #16332e;
  --rv2-line: rgba(255, 255, 255, 0.14);
  --rv2-glass: rgba(35, 27, 54, 0.72);
  --rv2-glass-strong: rgba(24, 18, 38, 0.88);
  --rv2-glass-border: rgba(255, 255, 255, 0.12);
  --rv2-sticky-bg: rgba(18, 14, 28, 0.85);
  --rv2-body-glow-1: #2a2140;
  --rv2-body-glow-2: #241f30;
  --rv2-body-glow-3: #1c1730;
  --rv2-body-base: #120e1c;
}

body {
  background:
    radial-gradient(circle at 12% 8%, var(--rv2-body-glow-1), transparent 42%),
    radial-gradient(circle at 88% 15%, var(--rv2-body-glow-2), transparent 38%),
    radial-gradient(circle at 50% 95%, var(--rv2-body-glow-3), transparent 42%),
    var(--rv2-body-base) !important;
  color: var(--rv2-ink) !important;
}

.hero.compiler-hero,
.compiler-panel,
.compiler-alt-start,
.compiler-drop,
.sx-note,
.compiler-context,
.compiler-file-list,
.ref-card,
.ac-panel,
.ac-stat-card,
.sx-squares a,
.sx-chapters a,
.sx-essay {
  background: var(--rv2-glass) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--rv2-glass-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px -30px rgba(79, 45, 120, 0.35);
  color: var(--rv2-ink) !important;
}

.sx-essay {
  padding: 2rem 2.25rem !important;
}

.cms-link-list li {
  border-bottom-color: var(--rv2-line) !important;
}

.hero.compiler-hero {
  padding: 2.75rem 2.5rem !important;
  margin-bottom: 1.5rem;
}

.ref-kicker {
  display: inline-block;
  background: rgba(106, 63, 160, 0.14) !important;
  color: var(--rv2-violet-deep) !important;
  font-weight: 700;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
}

.hero.compiler-hero h1 {
  color: var(--rv2-ink) !important;
  font-weight: 800 !important;
}

.hero.compiler-hero p,
.compiler-panel p,
.compiler-quiet {
  color: var(--rv2-ink-soft) !important;
}

.btn.btn-primary {
  background: linear-gradient(135deg, var(--rv2-violet), var(--rv2-pink)) !important;
  border: none !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 12px 24px -12px rgba(106, 63, 160, 0.65);
}

.btn.btn-secondary {
  background: rgba(106, 63, 160, 0.12) !important;
  color: var(--rv2-violet-deep) !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.compiler-why,
.sx-roles {
  display: grid;
  gap: 1.1rem !important;
}

.compiler-why .compiler-panel,
.compiler-how > div {
  padding: 1.5rem 1.4rem !important;
}

.compiler-why .compiler-panel h2 {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  color: var(--rv2-ink) !important;
}

.compiler-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--rv2-teal-bg);
  color: var(--rv2-teal);
  font-weight: 800;
  font-size: 0.9rem;
}

.sx-roles button,
.sx-roles a {
  background: var(--rv2-glass) !important;
  backdrop-filter: blur(14px);
  border: 1px solid var(--rv2-glass-border) !important;
  border-radius: 18px !important;
  padding: 1.2rem !important;
  box-shadow: 0 14px 30px -20px rgba(79, 45, 120, 0.3);
}

.sx-roles h3 {
  color: var(--rv2-violet-deep) !important;
}

/* Dense-dashboard influence: tight stat strip above the fold */
.rv2-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.rv2-stat-strip .rv2-stat {
  background: var(--rv2-teal-bg);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.rv2-stat-strip .rv2-stat .v {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--rv2-teal);
  display: block;
}

.rv2-stat-strip .rv2-stat .l {
  font-size: 0.74rem;
  color: var(--rv2-ink-soft);
}

.ac-table-wrap,
.ac-table th,
.ac-table td {
  background: transparent !important;
}

.ac-table-wrap {
  background: var(--rv2-glass) !important;
  border-radius: 16px !important;
  padding: 0.5rem !important;
  border: 1px solid var(--rv2-glass-border) !important;
}

.sx-kicker {
  color: var(--rv2-violet-deep) !important;
}

a {
  color: var(--rv2-violet-deep);
}

.sx-essay h1,
.sx-essay h2,
.sx-essay h3,
.ac-panel h2,
.sx-squares h2,
.sx-chapters h2 {
  color: var(--rv2-ink) !important;
}

/* One header, one color, everywhere — no more per-shell drift.
   sentrix.css's `.sx-shell.ra-home-body .ac-header` compound selector
   (3 classes) was beating this rule's old `.sx-shell .ac-header` (2
   classes) on almost every page, since body normally carries both
   classes at once — so the header never actually got the glass
   treatment; it silently kept sentrix.css's dark navy background with
   dark ink text on top of it (unreadable). Listing every real ancestor
   combination explicitly, at equal-or-higher specificity than each
   competing rule, so this is the one that wins regardless of which
   shell classes a given page happens to carry. Solid navy gradient
   (not hp-plum — the purple read poorly, especially in dark mode),
   deliberately theme-invariant so there's no light/dark variant left
   to drift again. */
.ac-header,
.sx-shell .ac-header,
.sx-shell.ra-home-body .ac-header,
.ra-core-shell .ac-header,
.ra-home-body .ac-header,
[data-ui-style="legacy"] .ac-header,
.sx-shell:has(.sx-home-canvas) .ac-header {
  background: linear-gradient(100deg, #1a2033, #262e4a) !important;
  border-bottom: 0 !important;
  box-shadow: 0 2px 20px -8px rgba(10, 12, 20, 0.5) !important;
  color: #fff !important;
}
.ac-brand,
.ac-brand-name,
.sx-shell .ac-brand,
.sx-shell .ac-brand-name,
.sx-shell .ac-nav a,
.sx-shell .ac-nav a.is-active,
.sx-shell .ra-theme-btn,
.ra-core-shell .ac-brand,
.ra-core-shell .ac-brand-name,
.ra-core-shell .ac-nav a,
.ra-home-body .ac-brand,
.ra-home-body .ac-brand-name,
.ra-home-body .ac-nav a,
[data-ui-style="legacy"] .ac-brand,
[data-ui-style="legacy"] .ac-brand-name,
[data-ui-style="legacy"] .ac-nav a {
  color: #fff !important;
}
.ac-brand-domain,
.sx-shell .ac-brand-domain,
.ra-core-shell .ac-brand-domain,
.ra-home-body .ac-brand-domain,
[data-ui-style="legacy"] .ac-brand-domain {
  color: rgba(255, 255, 255, 0.7) !important;
}
.ac-header .sx-mark,
.ac-header .ac-master-badge {
  color: #fff !important;
}
.ac-header .ac-master-badge {
  border-color: rgba(255, 255, 255, 0.35) !important;
}
.ac-nav a.is-active,
.sx-shell .ac-nav a.is-active,
.ra-core-shell .ac-nav a.is-active,
.ra-home-body .ac-nav a.is-active,
[data-ui-style="legacy"] .ac-nav a.is-active {
  background: rgba(255, 255, 255, 0.18) !important;
  border-bottom-color: transparent !important;
  border-radius: 999px !important;
  color: #fff !important;
}
.ac-nav a:hover,
.sx-shell .ac-nav a:hover,
.ra-core-shell .ac-nav a:hover,
.ra-home-body .ac-nav a:hover,
[data-ui-style="legacy"] .ac-nav a:hover {
  border-bottom-color: transparent !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  color: #fff !important;
}
.ac-header .ra-theme-btn {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}

/* ---- Homepage "genuine blend" (option 3): split hero + disc, masonry
   product grid, tl grid, one combined navy/plum/sand palette. ---- */
:root {
  --hp-bg: #f1eef2;
  --hp-ink: #221c34;
  --hp-muted: #6a6178;
  --hp-navy: #241a44;
  --hp-plum: #6a3fa0;
  --hp-sand: #d8a24a;
  --hp-white: #ffffff;
}

/* hp-navy/hp-plum/hp-sand are left unchanged in dark mode: they only ever
   back the already-dark hero / thought-leadership gradient panels (navy
   -> plum, with white text), which read fine regardless of page theme.
   Only the tokens used for the *light* card surfaces need to flip. */
[data-theme="dark"] {
  --hp-bg: #120e1c;
  --hp-ink: #eee9f7;
  --hp-muted: #a79cc4;
  --hp-white: #1c1730;
}

body.hp-home,
.sx-shell:has(.hp-canvas) {
  background: var(--hp-bg) !important;
}

.hp-canvas.hp-canvas {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto !important;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 0 !important;
}

.hp-hero {
  background: linear-gradient(100deg, var(--hp-navy), var(--hp-plum));
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px -36px rgba(36, 26, 68, 0.35);
  padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.75rem, 6vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hp-disc {
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 19rem;
  height: 19rem;
  border-radius: 999px;
  background: rgba(216, 162, 74, 0.32);
}
.hp-disc-2 {
  right: 2rem;
  bottom: -7rem;
  top: auto;
  width: 12rem;
  height: 12rem;
  background: rgba(255, 255, 255, 0.14);
}
.hp-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  max-width: 34ch;
  text-wrap: balance;
  position: relative;
}
.hp-lead {
  font-size: 1.08rem;
  line-height: 1.6;
  opacity: 0.92;
  margin: 0 0 0.9rem;
  position: relative;
  max-width: 52rem;
}
.hp-closing {
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.72;
  margin: 0 0 1.5rem;
  position: relative;
  max-width: 52rem;
}
.hp-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  position: relative;
}
.hp-links a {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 0.15rem;
}
.hp-links a:hover { border-bottom-color: var(--hp-sand); }

.hp-section { padding: clamp(2.5rem, 5vw, 3.5rem) 0 0.5rem; }
.hp-section-alt { }
.hp-section-head { margin-bottom: 1.5rem; }
.hp-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rv2-violet-deep);
  margin: 0 0 0.4rem;
}
.hp-section-head h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--hp-ink);
  margin: 0 0 0.4rem;
}
.hp-section-lead { color: var(--hp-muted); margin: 0; font-size: 0.95rem; }
.hp-section-lead a { color: var(--rv2-violet-deep); font-weight: 600; text-decoration: none; }
.hp-section-lead a:hover { text-decoration: none; }

.hp-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 2rem;
}
.hp-services-solo .hp-masonry {
  grid-template-columns: minmax(0, 16rem);
  justify-content: center;
}
.hp-card {
  background: var(--hp-white);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 18px 40px -30px rgba(36, 26, 68, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hp-card-compact { padding: 1.1rem 1.25rem; }
.hp-card-compact .hp-card-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.hp-card-compact .hp-card-icon { font-size: 2.1rem; line-height: 1; }
.hp-card-compact .hp-card-main strong { margin: 0; font-size: 1.05rem; }
.hp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px -26px rgba(36, 26, 68, 0.4);
}
.hp-card-big { grid-column: span 2; }
.hp-card-main {
  display: block;
  text-decoration: none;
  color: var(--hp-ink);
}
.hp-card em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rv2-violet-deep);
  display: block;
  margin-bottom: 0.5rem;
}
.hp-card strong { display: block; font-size: 1.12rem; font-weight: 700; margin-bottom: 0.45rem; }
.hp-card p { margin: 0; font-size: 0.88rem; color: var(--hp-muted); line-height: 1.5; }
.hp-card-links {
  margin: 0.85rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rv2-line, rgba(106, 63, 160, 0.16));
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
}
.hp-card-links a {
  color: var(--rv2-violet-deep);
  font-weight: 600;
  text-decoration: none;
}
.hp-card-links a:hover { text-decoration: none; }

.hp-tl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 2.5rem;
}
.hp-tl-card {
  background: linear-gradient(160deg, var(--hp-navy), var(--hp-plum));
  color: #fff;
  border-radius: 22px;
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.hp-tl-card:hover { transform: translateY(-3px); }
.hp-tl-card em {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-sand);
  display: block;
  margin-bottom: 0.5rem;
}
.hp-tl-card strong { display: block; font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.hp-tl-card p { margin: 0; font-size: 0.85rem; opacity: 0.82; line-height: 1.5; }

.hp-closing-band {
  border-top: 1px solid var(--rv2-line);
  padding: 1.75rem 0 2.5rem;
  text-align: center;
}
.hp-closing-band-text { margin: 0; font-size: 0.9rem; color: var(--hp-muted); }
.hp-closing-band-text a { color: var(--rv2-violet-deep); font-weight: 600; text-decoration: none; }
.hp-closing-band-text a:hover { text-decoration: none; }

@media (max-width: 860px) {
  .hp-masonry, .hp-tl-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-card-big { grid-column: span 2; }
}
@media (max-width: 560px) {
  .hp-masonry, .hp-tl-grid { grid-template-columns: 1fr; }
  .hp-card-big { grid-column: span 1; }
}

/* ---- Bring the remaining "hero" wrappers into the same glass system.
   .sx-hero (Consulting) still carried sentrix.css's older forest/brass/
   parchment palette; .ra-land-hero and friends (Training, Compass, the
   AU/ZA market picker) still carried compiler.css's older teal-minimal
   palette. Neither responded to data-theme, so both showed a fixed-light
   panel on an otherwise dark page. Folding them into the approved glass
   system fixes both the "doesn't match the homepage" look and the dark-
   mode gap in one place, same pattern as the shared-panel list above. ---- */
.sx-hero,
.ra-land-hero {
  background: var(--rv2-glass) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--rv2-glass-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px -30px rgba(79, 45, 120, 0.35);
  color: var(--rv2-ink) !important;
  max-width: none !important;
}
.sx-hero .sx-kicker,
.ra-land-kicker,
.ra-land-types-label {
  color: var(--rv2-violet-deep) !important;
}
.sx-hero h1,
.sx-hero .sx-lead,
.sx-hero .sx-meta,
.ra-land-hero h1,
.ra-land-lead,
.ra-land-hint,
.ra-land-markets,
.ra-land-subhead {
  color: var(--rv2-ink) !important;
}
.sx-hero .sx-lead,
.ra-land-lead,
.ra-land-hint,
.ra-land-markets {
  color: var(--rv2-ink-soft) !important;
}
.sx-hero-links a {
  color: var(--rv2-violet-deep) !important;
  border: 1px solid var(--rv2-line) !important;
  background: var(--rv2-glass) !important;
}
.sx-hero-links a:hover {
  background: linear-gradient(135deg, var(--rv2-violet), var(--rv2-pink)) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.ra-land-section > h2 {
  color: var(--rv2-ink) !important;
}
.ra-land-section > h2::after {
  background: var(--rv2-violet) !important;
}
.ra-land-card,
.ra-land-offer,
.ra-land-four > div,
.ra-land-four > article,
.ra-land-two > article {
  background: var(--rv2-glass) !important;
  border: 1px solid var(--rv2-glass-border) !important;
  border-radius: 16px !important;
  color: var(--rv2-ink) !important;
}
.ra-land-card:hover,
.ra-land-card:focus-visible,
.ra-land-offer:hover {
  border-color: var(--rv2-violet) !important;
}
.ra-land-card-more,
.ra-land-domain {
  color: var(--rv2-violet-deep) !important;
}
.ra-land-types li {
  background: rgba(106, 63, 160, 0.12) !important;
  border: 1px solid var(--rv2-line) !important;
  color: var(--rv2-violet-deep) !important;
}

/* Business-card-style contact block (About page). */
.sx-bcard-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem 3.5rem;
}
.sx-bcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 30rem;
  text-align: center;
  background: linear-gradient(160deg, var(--hp-navy, #241a44), var(--hp-plum, #6a3fa0));
  color: #fff;
  border-radius: 18px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 20px 50px -30px rgba(36, 26, 68, 0.45);
}
.sx-bcard-contact { text-align: center; }
.sx-bcard-line { margin: 0.3rem 0; font-size: 1.1rem; line-height: 1.5; }
.sx-bcard-line a { color: #fff; text-decoration: none; }
.sx-bcard-line a:hover { color: var(--hp-sand, #d8a24a); }
.sx-bcard-city { margin-top: 0.6rem; font-weight: 700; letter-spacing: 0.06em; }
.hp-hero .sx-bcard-wrap { padding: 2rem 0 2rem; }
.hp-hero .sx-bcard {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

/* Sections built but not ready for public interaction yet — visible as a
   preview, but blurred and inert so nothing can be pressed. */
.sx-not-ready {
  position: relative;
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
.sx-not-ready::after {
  content: "Coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rv2-ink);
  filter: none;
  pointer-events: none;
}
