/* 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. */

:root {
  --rv2-ink: #232336;
  --rv2-ink-soft: #5c5c76;
  --rv2-violet: #8b7bf0;
  --rv2-violet-deep: #6b5ce0;
  --rv2-pink: #f0a6c9;
  --rv2-teal: #0f9488;
  --rv2-teal-bg: #e3f7f4;
  --rv2-line: rgba(120, 110, 170, 0.16);
  --rv2-glass: rgba(255, 255, 255, 0.6);
  --rv2-glass-strong: rgba(255, 255, 255, 0.78);
}

body {
  background:
    radial-gradient(circle at 12% 8%, #e7deff, transparent 42%),
    radial-gradient(circle at 88% 15%, #ffe2f0, transparent 38%),
    radial-gradient(circle at 50% 95%, #d9f3ff, transparent 42%),
    #f5f4fb !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 rgba(255, 255, 255, 0.7) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 50px -30px rgba(90, 70, 160, 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(139, 123, 240, 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(139, 123, 240, 0.65);
}

.btn.btn-secondary {
  background: rgba(139, 123, 240, 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 rgba(255, 255, 255, 0.7) !important;
  border-radius: 18px !important;
  padding: 1.2rem !important;
  box-shadow: 0 14px 30px -20px rgba(90, 70, 160, 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 rgba(255, 255, 255, 0.7) !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;
}

/* ---- Homepage header: keep the glass header everywhere else, but the
   .rv3-home layout below is deliberately flatter/plainer than the rest
   of the site, so give it a plain light header instead of the glass
   one — a mixed metaphor otherwise. ---- */
.sx-shell .ac-header {
  background: var(--rv2-glass-strong) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7) !important;
  color: var(--rv2-ink) !important;
}
.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 {
  color: var(--rv2-ink) !important;
}
.sx-shell .ac-brand-domain { color: var(--rv2-ink-soft) !important; }
.sx-shell .sx-mark { color: var(--rv2-violet); }
.sx-shell .ac-nav a.is-active {
  background: rgba(139, 123, 240, 0.14) !important;
  border-bottom-color: transparent !important;
  border-radius: 999px !important;
}
.sx-shell .ac-nav a:hover { border-bottom-color: transparent !important; background: rgba(139, 123, 240, 0.08) !important; border-radius: 999px !important; }

body.rv3-home,
.sx-shell:has(.rv3-canvas) {
  background: #f7f8fa !important;
}
.sx-shell:has(.rv3-canvas) .ac-header {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid #e2e4ea !important;
  box-shadow: 0 1px 0 rgba(20, 20, 30, 0.03) !important;
}
.sx-shell:has(.rv3-canvas) .ac-nav a.is-active,
.sx-shell:has(.rv3-canvas) .ac-nav a:hover {
  background: #eef0f5 !important;
  border-radius: 4px !important;
}

.rv3-canvas.rv3-canvas,
.sx-shell.sx-home .rv3-canvas {
  max-width: 64rem;
  width: 100%;
  margin: 0 auto !important;
  padding: 0 clamp(1.25rem, 4vw, 2rem) !important;
}

.rv3-masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  border-bottom: 1px solid #e2e4ea;
}
.rv3-masthead-main { flex: 1 1 26rem; }
.rv3-masthead h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--rv2-ink);
  margin: 0 0 0.65rem;
}
.rv3-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--rv2-ink-soft);
  max-width: 42rem;
  margin: 0 0 0.5rem;
}
.rv3-meta {
  font-size: 0.82rem;
  color: var(--rv2-ink-soft);
  opacity: 0.75;
  margin: 0 0 1.1rem;
}
.rv3-masthead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}
.rv3-masthead-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--rv2-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}
.rv3-masthead-links a:hover { border-bottom-color: var(--rv2-teal); }

.rv3-stat-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, auto));
  gap: 0 2rem;
  margin: 0;
  flex: 0 0 auto;
}
.rv3-stat-rail > div {
  border-left: 2px solid var(--rv2-teal);
  padding-left: 0.75rem;
}
.rv3-stat-rail dt {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv2-ink-soft);
  margin: 0 0 0.2rem;
}
.rv3-stat-rail dd {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rv2-ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.rv3-section { padding: 2.75rem 0; border-bottom: 1px solid #e2e4ea; }
.rv3-section:last-child { border-bottom: 0; }
.rv3-section-head { margin-bottom: 1.25rem; }
.rv3-kicker {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rv2-teal);
  margin: 0 0 0.4rem;
}
.rv3-section-head h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rv2-ink);
  margin: 0 0 0.4rem;
}
.rv3-section-lead { color: var(--rv2-ink-soft); margin: 0; font-size: 0.95rem; }

.rv3-list { list-style: none; margin: 0; padding: 0; }
.rv3-list li { border-top: 1px solid #e2e4ea; }
.rv3-list li:last-child { border-bottom: 1px solid #e2e4ea; }
.rv3-list a {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}
.rv3-list a:hover { background: #eef0f5; }
.rv3-list-idx {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rv2-ink-soft);
  font-variant-numeric: tabular-nums;
}
.rv3-list-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.rv3-list-body em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv2-teal);
}
.rv3-list-body strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rv2-ink);
}
.rv3-list-blurb {
  font-size: 0.88rem;
  color: var(--rv2-ink-soft);
  line-height: 1.45;
  max-width: 46rem;
}
.rv3-list-arrow {
  color: var(--rv2-ink-soft);
  font-size: 1.1rem;
  transition: transform 0.12s ease, color 0.12s ease;
}
.rv3-list a:hover .rv3-list-arrow {
  color: var(--rv2-teal);
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .rv3-stat-rail { grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; }
  .rv3-list a { grid-template-columns: 1.75rem 1fr; }
  .rv3-list-arrow { display: none; }
}

@media (max-width: 700px) {
  .rv2-stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero.compiler-hero {
    padding: 1.75rem 1.5rem !important;
  }
}
