/* Shared light-mode overrides for embedded interactive whitepapers */
:root {
  --wp-bg: #09090b;
  --wp-panel: #0a0a0a;
  --wp-text: #ffffff;
  --wp-muted: #a1a1aa;
  --wp-muted-dim: #52525b;
  --wp-muted-faint: #3f3f46;
  --wp-border: rgba(255, 255, 255, 0.08);
  --wp-border-subtle: rgba(255, 255, 255, 0.04);
  --wp-glass-bg: rgba(255, 255, 255, 0.03);
  --wp-glass-hover: rgba(255, 255, 255, 0.06);
  --wp-track: #18181b;
  --read-body: #d4d4d8;
  --read-muted: #a1a1aa;
}

.light {
  --wp-bg: #ffffff;
  --wp-panel: #f8fafc;
  --wp-text: #0f172a;
  --wp-muted: #334155;
  --wp-muted-dim: #475569;
  --wp-muted-faint: #64748b;
  --wp-border: rgba(15, 23, 42, 0.14);
  --wp-border-subtle: rgba(15, 23, 42, 0.1);
  --wp-glass-bg: rgba(15, 23, 42, 0.04);
  --wp-glass-hover: rgba(15, 23, 42, 0.07);
  --wp-track: #e2e8f0;
  /* Body copy must stay dark on white — do not reuse dark-theme zincs */
  --read-body: #1e293b;
  --read-muted: #334155;
}

.light body {
  background: var(--wp-bg);
  color: var(--wp-text);
}

.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

.light ::selection {
  background: rgba(5, 150, 105, 0.22);
  color: var(--wp-text);
}

/* Shell */
.light #sidebar {
  background: rgba(255, 255, 255, 0.98);
  border-right-color: var(--wp-border-subtle);
}

.light #topnav {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--wp-border-subtle);
}

.light #mobpanel {
  background: #ffffff;
  border-right-color: var(--wp-border-subtle);
}

.light #moboverlay {
  background: rgba(15, 23, 42, 0.35);
}

/* Sidebar / top nav — higher contrast */
.light .sb-label {
  color: var(--wp-muted-dim);
}

.light .sb-btn {
  color: var(--wp-muted);
}

.light .sb-btn:hover {
  color: var(--wp-text);
  background: rgba(15, 23, 42, 0.05);
}

.light .sb-btn.active {
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
  font-weight: 600;
}

.light .sb-btn .n {
  color: var(--wp-muted-faint);
}

.light .sb-btn.active .n {
  color: #059669;
}

.light .sb-divider {
  background: var(--wp-border-subtle);
}

.light .tn-btn {
  color: var(--wp-muted);
}

.light .tn-btn:hover {
  color: var(--wp-text);
  background: rgba(15, 23, 42, 0.05);
}

.light .tn-btn.active {
  color: var(--wp-text);
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

/* Cards & surfaces */
.light .glass {
  background: var(--wp-glass-bg);
  border-color: var(--wp-border);
}

.light .glass:hover {
  background: var(--wp-glass-hover);
  border-color: rgba(15, 23, 42, 0.18);
}

.light .gtxt {
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #0f172a;
}

.light .hgrad {
  background: radial-gradient(ellipse at top, rgba(5, 150, 105, 0.1), #ffffff 70%, #f1f5f9);
}

.light .gridbg {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

/* Common inline text colors (dark zinc → slate for light) */
.light [style*="color:#fff"],
.light [style*="color:#ffffff"] {
  color: var(--wp-text) !important;
}

.light [style*="color:#e4e4e7"],
.light [style*="color:#d4d4d8"] {
  color: var(--read-body) !important;
}

.light [style*="color:#a1a1aa"] {
  color: var(--wp-muted) !important;
}

.light [style*="color:#71717a"] {
  color: var(--wp-muted) !important;
}

.light [style*="color:#52525b"] {
  color: var(--wp-muted-dim) !important;
}

.light [style*="color:#3f3f46"] {
  color: var(--wp-muted-faint) !important;
}

.light [style*="background:none"][style*="color:#71717a"][style*="border:1px solid rgba(255,255,255,.08)"] {
  color: var(--wp-muted) !important;
  border-color: var(--wp-border) !important;
}

/* Full-width layout inside #main (beside fixed sidebar) */
#main [style*="max-width:800px"],
#main [style*="max-width: 800px"],
#main [style*="max-width:640px"],
#main [style*="max-width: 640px"],
#main [style*="max-width:600px"],
#main [style*="max-width: 600px"],
#main [style*="max-width:560px"],
#main [style*="max-width: 560px"] {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

#main [style*="margin:0 auto"],
#main [style*="margin: 0 auto"] {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#main .pg {
  width: 100%;
}

@media (min-width: 1024px) {
  #main [style*="padding:32px"],
  #main [style*="padding:40px 32px"],
  #main [style*="padding:20px 32px"],
  #main [style*="padding:40px 32px 20px"],
  #main [style*="padding:40px 32px 50px"] {
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
}

.light [style*="background:rgba(255,255,255,.03)"] {
  background: rgba(15, 23, 42, 0.04) !important;
}

.light [style*="background:rgba(255,255,255,.04)"] {
  background: rgba(15, 23, 42, 0.05) !important;
}

.light [style*="background:rgba(255,255,255,.06)"] {
  background: rgba(15, 23, 42, 0.06) !important;
}

.light [style*="border:1px solid rgba(255,255,255,.08)"],
.light [style*="border:1px solid rgba(255,255,255,.04)"] {
  border-color: var(--wp-border) !important;
}

.light [style*="border-top:1px solid rgba(255,255,255,.04)"],
.light [style*="border-bottom:1px solid rgba(255,255,255,.04)"] {
  border-color: var(--wp-border-subtle) !important;
}

.light [style*="height:1px;background:rgba(255,255,255,.04)"] {
  background: var(--wp-border-subtle) !important;
}

.light [style*="background:#18181b"] {
  background: var(--wp-track) !important;
}

/* Ghost nav buttons */
.light [style*="background:none"][style*="color:#71717a"][style*="border:1px solid rgba(255,255,255,.08)"] {
  color: var(--wp-muted) !important;
  border-color: var(--wp-border) !important;
}

/* Proprietary notice — opaque so scroll never bleeds through */
#proprietary-notice {
  background: #1c1917;
  border-bottom: 1px solid rgba(234, 179, 8, 0.45);
  color: #f5f5f4;
}

.light #proprietary-notice {
  background: #fffbeb;
  border-bottom: 1px solid #f59e0b;
  color: #1c1917;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.light #proprietary-notice strong {
  color: #92400e;
}

.light #proprietary-notice a {
  color: #047857;
  font-weight: 600;
}

.light .read-block {
  background: rgba(5, 150, 105, 0.07);
  border-color: rgba(5, 150, 105, 0.28);
}

.light .read-block h3 {
  color: #047857;
}

.light .read-block p,
.light .read-block li,
.light .read-block ul {
  color: var(--read-body) !important;
}

.light .read-block strong {
  color: var(--wp-text) !important;
}

.light .license-block {
  background: #fffbeb;
  border-color: rgba(180, 83, 9, 0.35);
}

.light .license-block h3 {
  color: #92400e;
}

.light .license-block p {
  color: var(--read-muted) !important;
}

.light .section-intro {
  color: var(--read-body) !important;
}

/* Metric / chip labels */
.light #sidebar [style*="font-size:10px"],
.light #sidebar [style*="font-size:9px"] {
  color: var(--wp-muted-dim) !important;
}

.light #sidebar [style*="font-size:12px"] {
  color: var(--wp-muted) !important;
}
