html {
  background: var(--bg);
  color: var(--text-body);
}

:root {
  font-family: "Inter", system-ui, sans-serif;

  /* Light theme (default) */
  --bg: #f6f8fb;
  --panel-bg: #ffffff;
  --panel-border: rgba(15, 23, 42, 0.10);
  --text-body: #0f172a;
  --text-muted: #475569;
  --text-strong: #0f172a;
  --link: #1d4ed8;

  --brand: #1d4ed8;
  --brand-contrast: #ffffff;

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
  --bg: #0b1a2a;
  --panel-bg: #11253b;
  --panel-border: rgba(148, 163, 184, 0.20);
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --text-strong: #e2e8f0;
  --link: rgba(255,255,255,0.92);

  --brand: #3b82f6;
  --brand-contrast: #ffffff;

  --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-body);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--panel-bg);
  color: var(--text-body);
  border-bottom: 1px solid var(--panel-border);
}

.app-header a {
  color: inherit;
}

.app-title {
  font-weight: 600;
  font-size: 18px;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.link-button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.app-main {
  flex: 1;
  padding: 24px;
  display: flex;
  justify-content: center;
}

.page {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--panel-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.35);
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-body);
  margin: 0 0 6px;
}

.panel h1,
.panel h2 {
  margin-top: 0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.input,
.select {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  font-size: 14px;
  min-width: 220px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-body);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.25);
  color: #0b1a2a;
}

.instrument-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.instrument-list li {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition: background 0.2s;
}

.instrument-list li:hover {
  background: rgba(30, 64, 175, 0.15);
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.error {
  color: #fecaca;
  background: rgba(153, 27, 27, 0.4);
}

.chart-container {
  width: 100%;
}

.chart-footnote {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.bdc-mini-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bdc-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.bdc-mini-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.bdc-mini-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.bdc-mini-value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 6px;
}

.bdc-mini-chart {
  width: 100%;
  height: 72px;
}

.bdc-mini-chart-bg {
  fill: rgba(15, 23, 42, 0.4);
}

.bdc-mini-chart-line {
  fill: none;
  stroke-width: 2;
}

.bdc-mini-chart-point {
  stroke: #0b1a2a;
  stroke-width: 1;
}

.bdc-mini-chart-bar {
  opacity: 0.85;
}

.bdc-mini-chart-empty {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.25);
  border-radius: 8px;
}

.bdc-mini-source {
  font-size: 11px;
  color: var(--text-muted);
}

.empty-state {
  padding: 20px;
  background: rgba(30, 64, 175, 0.15);
  border-radius: 8px;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
}

.landing-page .panel {
  position: relative;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 24px;
  align-items: start;
}

.landing-copy h1 {
  margin-bottom: 8px;
}

.landing-subtitle {
  margin-top: 0;
  color: #cbd5f5;
  font-weight: 500;
}

.landing-body {
  color: var(--text-muted);
  line-height: 1.6;
}

.landing-links {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.landing-links a {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: grid;
  gap: 4px;
  transition: background 0.2s ease;
}

.landing-links a:hover {
  background: rgba(30, 64, 175, 0.15);
}

.landing-login {
  background: #f8fafc;
  color: #0b1a2a;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.3);
}

.landing-login h3 {
  margin-top: 0;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.login-form .input {
  background: #fff;
  color: #0b1a2a;
  border-color: rgba(15, 23, 42, 0.2);
}

.login-hint {
  font-size: 13px;
  margin: 0;
  color: #0b1a2a;
}

.login-hint.is-error {
  color: #dc2626;
}

.landing-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.landing-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.heatmap-wrapper {
  overflow-x: auto;
}

.heatmap-grid {
  display: grid;
  gap: 4px;
  align-items: center;
}

.heatmap-header {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px;
}

.heatmap-cell-header {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: left;
}

.heatmap-row {
  display: contents;
}

.heatmap-label {
  font-weight: 600;
  font-size: 12px;
  padding: 6px;
  color: var(--text-muted);
}

.heatmap-cell {
  font-size: 11px;
  padding: 6px;
  text-align: center;
  border-radius: 4px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.overview-heatmap-shell {
  --overview-heatmap-height: 360px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.overview-heatmap-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-heatmap-axis {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.overview-heatmap-axis-y {
  flex-direction: column;
  position: relative;
}

.overview-heatmap-axis-x {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.overview-heatmap-axis-title {
  font-size: 10px;
}

.overview-heatmap-axis-y .overview-heatmap-axis-title {
  position: absolute;
  top: -14px;
  left: 0;
}

.overview-heatmap-axis-ticks {
  display: grid;
  gap: 2px;
  width: 100%;
}

.overview-heatmap-axis-ticks-y {
  position: relative;
  height: var(--overview-heatmap-height);
  text-transform: none;
  font-size: 12px;
}

.overview-heatmap-axis-tick {
  position: absolute;
  left: 0;
}

.overview-heatmap-axis-ticks-x {
  grid-template-columns: repeat(10, 1fr);
  text-transform: none;
  font-size: 12px;
  width: 100%;
  justify-items: start;
}

.overview-heatmap {
  width: 100%;
  height: var(--overview-heatmap-height);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
}

.overview-heatmap-grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 0;
}

.overview-heatmap-cell {
  width: 100%;
  height: 100%;
}

.overview-heatmap-tooltip {
  position: fixed;
  z-index: 20;
  background: #0f1f33;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
}

.overview-drawdown-row {
  --overview-heatmap-height: 360px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: flex-start;
  overflow: hidden;
}

.drawdown-chart {
  width: 100%;
  height: calc(var(--overview-heatmap-height) + 36px);
}

.tooltip-card {
  background: #0f1f33;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.landing-story {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.landing-story-copy p {
  margin: 10px 0;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
}

.landing-story-note {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
}

.landing-story-cta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.secondary-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(255,255,255,0.92);
  font-weight: 600;
}

.secondary-button:hover {
  background: rgba(255,255,255,0.06);
}

@media (max-width: 860px) {
  .landing-story {
    grid-template-columns: 1fr;
  }
  }

/* Inhoudelijke links (tekst, artikelen) */
.content a,
.landing-story a,
.panel-body a {
  color: #60a5fa; /* blauw-achtig, consistent met charts */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.content a:hover,
.landing-story a:hover,
.panel-body a:hover {
  color: #93c5fd;
}

/* Navigatie-links expliciet zonder underline */
.app-nav a {
  text-decoration: none;
  color: var(--text-body);
}

.app-nav a:hover {
  color: var(--brand);
}

.landing-story-charts {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

/* Embed toont zélf al een kaart met ronde randen.
   Public moet daarom geen extra rand/achtergrond toevoegen. */
.embed-chart {
  width: 100%;
  max-width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: block;
  overflow: hidden;
  border-radius: 14px; /* clip embed background edges */
}

.landing-story-charts,
.landing-story-charts > * {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 860px) {
  .embed-chart {
  width: 100%;
  max-width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: block;
  overflow: hidden;
  border-radius: 14px; /* clip embed background edges */
}
}

/* Als er per ongeluk een chart-kaart in landing-panels grid belandt: span full width */
.landing-panels .landing-yield-curves {
  grid-column: 1 / -1;
}


/* Embed-hoogtes per kaart (inflatie is compacter dan rentes) */
.embed-chart--inflation { height: 300px; }
.embed-chart--rates { height: 390px; }

@media (max-width: 860px) {
  .embed-chart--inflation { height: 320px; }
  .embed-chart--rates { height: 420px; }
}


/* Buttons */
.primary-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-contrast);
  font-weight: 600;
  text-decoration: none;
}
.primary-button:hover { filter: brightness(1.05); }

.secondary-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  color: var(--text-body);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
}
.secondary-button:hover { filter: brightness(0.98); }

.small-muted {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Theme toggle */
.theme-toggle {
  margin-left: 12px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-body);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.theme-toggle:hover { filter: brightness(0.98); }

/* Landing additions */
.landing-micro { margin-top: 10px; color: var(--text-muted); }

.landing-hero-cta { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.proof-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.proof-title { font-weight: 700; margin-bottom: 10px; }
.proof-list { margin: 0; padding-left: 18px; color: var(--text-body); }
.proof-list li { margin: 6px 0; color: var(--text-body); }

.landing-yields { margin-top: 18px; }
.landing-yields-sub { color: var(--text-muted); margin-top: 6px; margin-bottom: 12px; }

.yield-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 860px) {
  .yield-grid { grid-template-columns: 1fr; }
}

.yield-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.yield-card-muted { opacity: 0.85; }
.yield-name { font-weight: 700; }
.yield-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.yield-note { color: var(--text-muted); margin-top: 6px; line-height: 1.45; }

.yield-disclaimer {
  margin-top: 12px;
  color: var(--text-body);
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: rgba(29, 78, 216, 0.06);
  border-radius: 12px;
}

.landing-cta {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-top: 18px;
  align-items: start;
}
@media (max-width: 860px) {
  .landing-cta { grid-template-columns: 1fr; }
}

.landing-cta-copy { margin-top: 8px; color: var(--text-muted); }
.landing-cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.landing-articles { margin-top: 20px; }
.landing-articles-sub { color: var(--text-muted); margin-top: 6px; margin-bottom: 12px; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 860px) {
  .article-grid { grid-template-columns: 1fr; }
}

.article-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: var(--text-body);
  box-shadow: var(--shadow);
}
.article-card:hover { filter: brightness(0.99); }

.article-title { font-weight: 800; margin-bottom: 6px; }
.article-description { color: var(--text-muted); line-height: 1.45; }

.landing-nav { margin-top: 12px; display: flex; gap: 16px; }
.landing-nav a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }


/* Landing: tighter, calm hierarchy */
.landing-title { font-size: 42px; line-height: 1.12; margin: 0 0 14px; letter-spacing: -0.02em; }
.landing-subtitle { font-size: 18px; line-height: 1.5; color: var(--text-body); margin: 0 0 10px; }
.landing-micro { font-size: 14px; line-height: 1.5; color: var(--text-muted); margin: 0 0 18px; }
.landing-two-lines p { margin: 10px 0 0; color: var(--text-muted); }
.landing-context { margin-top: 18px; }
.landing-get { margin-top: 18px; }

.landing-bullets { margin: 0; padding-left: 18px; }
.landing-bullets li { margin: 10px 0; color: var(--text-body); }

.landing-steps { margin: 0; padding-left: 18px; }
.landing-steps li { margin: 10px 0; color: var(--text-body); }
.landing-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Range chart */
.range-chart { margin-top: 18px; border: 1px solid var(--panel-border); background: var(--panel-bg); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.range-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.range-chart-svg { width: 100%; height: auto; display: block; }
.range-chart-grid line { stroke: rgba(15,23,42,0.08); stroke-width: 1; }
html[data-theme="dark"] .range-chart-grid line { stroke: rgba(148,163,184,0.20); }
.range-chart-axis text { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.range-chart-x text    { fill: var(--text-body);  font-size: 11px; font-family: inherit; }
.range-chart-note text { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.range-chart-inflation line { stroke: rgba(245,158,11,0.85); stroke-width: 2; stroke-dasharray: 4 4; }
.range-chart-inflation text { fill: var(--text-muted); font-size: 11px; }
.bar-range { fill: rgba(29,78,216,0.18); stroke: rgba(29,78,216,0.55); stroke-width: 1; }
html[data-theme="dark"] .bar-range { fill: rgba(59,130,246,0.22); stroke: rgba(59,130,246,0.65); }
.bar-muted { fill: rgba(100,116,139,0.18); stroke: rgba(100,116,139,0.55); }
html[data-theme="dark"] .bar-muted { fill: rgba(148,163,184,0.18); stroke: rgba(148,163,184,0.55); }
.bar-savings { fill: rgba(16,185,129,0.18); stroke: rgba(16,185,129,0.55); stroke-width: 1; }
html[data-theme="dark"] .bar-savings { fill: rgba(16,185,129,0.20); stroke: rgba(16,185,129,0.65); }
.range-chart-foot { margin-top: 8px; }
.landing-copy-line { margin: 8px 0 6px; color: var(--text-body); font-size: 14px; line-height: 1.55; }

.ranked-embed-chart { margin-top: 18px; }
.ranked-risk-return-embed {
  width: 100%;
  min-height: 410px;
  border: 0;
  background: transparent;
}
.ranked-risk-return-unavailable { margin: 8px 0 0; }
