/* Core & Satellite page (/core-satellite). Uses the site palette from site.css. */
:root {
  --cs-core: #405362;
  --cs-core-2: #7f95a6;
  --cs-sat1: #cf9e51;
  --cs-sat2: #b8892e;
  --cs-sat3: #e2c28c;
  --cs-sat4: #f1dfbd;
  --cs-cash: #cfd6dc;
}

/* ── Explorer: diagram + detail panel ── */
.cs-explorer { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.cs-diagram-wrap { position: relative; }
.cs-diagram { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.cs-hint { text-align: center; font-size: 14px; color: var(--text-muted); margin: 8px 0 0; }

.cs-orbit { fill: none; stroke: var(--border); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; transform-origin: 260px 260px; animation: cs-spin 90s linear infinite; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-links line { stroke: var(--border); stroke-width: 2; transition: stroke 0.25s, opacity 0.25s; }

.cs-node { cursor: pointer; outline: none; transition: opacity 0.25s; }
.cs-node text { text-anchor: middle; pointer-events: none; font-family: 'Figtree', 'Segoe UI', Arial, sans-serif; transition: fill 0.25s; }
.cs-node .cs-disc { transition: fill 0.25s, stroke 0.25s, transform 0.25s; transform-box: fill-box; transform-origin: center; }
.cs-node .cs-halo { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0; transition: opacity 0.25s; }

.cs-core .cs-disc { fill: var(--cs-core); stroke: var(--white); stroke-width: 4; }
.cs-core .cs-title { fill: var(--white); font-family: Georgia, 'Times New Roman', serif; font-size: 30px; }
.cs-core .cs-sub { fill: rgba(255,255,255,0.82); font-size: 15px; letter-spacing: 0.02em; }

.cs-sat .cs-disc { fill: var(--white); stroke: var(--gold); stroke-width: 2.5; }
.cs-sat .cs-num { fill: var(--gold-dark); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.cs-sat .cs-name { fill: var(--navy); font-family: Georgia, 'Times New Roman', serif; font-size: 17px; }

/* Highlight state: set by JS on the <svg> as data-hot="<key>" */
.cs-diagram[data-hot] .cs-node { opacity: 0.35; }
.cs-diagram[data-hot] .cs-links line { opacity: 0.4; }
.cs-diagram[data-hot] .cs-node.is-hot { opacity: 1; }
.cs-node.is-hot .cs-halo { opacity: 1; }
.cs-node.is-hot .cs-disc { transform: scale(1.06); }
.cs-sat.is-hot .cs-disc { fill: var(--gold); stroke: var(--gold); }
.cs-sat.is-hot .cs-num { fill: rgba(255,255,255,0.85); }
.cs-sat.is-hot .cs-name { fill: var(--white); }
.cs-core.is-hot .cs-disc { fill: var(--blue-dark); }
.cs-diagram[data-hot="sat1"] .cs-links line:nth-child(1),
.cs-diagram[data-hot="sat2"] .cs-links line:nth-child(2),
.cs-diagram[data-hot="sat3"] .cs-links line:nth-child(3),
.cs-diagram[data-hot="sat4"] .cs-links line:nth-child(4) { stroke: var(--gold); opacity: 1; }
.cs-diagram[data-hot="core"] .cs-links line { stroke: var(--cs-core-2); opacity: 1; }
.cs-node:focus-visible .cs-halo { opacity: 1; stroke: var(--blue); }

/* Panel */
.cs-panel { position: relative; min-height: 460px; scroll-margin-top: 96px; }
#the-model, #how-it-comes-together { scroll-margin-top: 60px; }
.cs-detail { display: none; background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: 8px; padding: 30px 32px 26px; box-shadow: 0 10px 30px rgba(64,83,98,0.08); }
.cs-detail.is-active { display: block; animation: cs-fade 0.3s ease; }
.cs-detail[data-panel="core"] { border-top-color: var(--cs-core); }
@keyframes cs-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cs-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 6px; }
.cs-detail h3 { margin: 0 0 12px; }
.cs-detail > p { font-size: 17px; }
.cs-facts { margin: 18px 0 0; border-top: 1px solid var(--border); }
.cs-facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cs-facts dt { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); padding-top: 2px; }
.cs-facts dd { font-size: 16px; margin: 0; line-height: 1.55; }
.cs-weight { margin: 16px 0 0; font-size: 15px; color: var(--text-muted); }
.cs-weight:empty { display: none; }
.cs-weight strong { color: var(--navy); font-weight: 600; }
.cs-back { margin-top: 18px; background: none; border: none; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--gold-dark); cursor: pointer; }
.cs-back:hover { color: var(--blue); }

.cs-overview-list { list-style: none; margin: 18px 0 0; }
.cs-overview-list li { margin: 0; border-top: 1px solid var(--border); }
.cs-overview-list button { width: 100%; text-align: left; background: none; border: none; font: inherit; color: var(--navy); font-size: 17px; padding: 12px 6px 12px 0; cursor: pointer; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: baseline; transition: color 0.15s, background 0.15s; }
.cs-overview-list button small { grid-column: 2; font-size: 14px; color: var(--text-muted); }
.cs-overview-list button:hover, .cs-overview-list button:focus-visible { color: var(--gold-dark); background: var(--gold-light); outline: none; }
.cs-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gold); display: inline-block; transform: translateY(1px); }
.cs-dot.core { background: var(--cs-core); border-color: var(--cs-core); }

/* ── Process ── */
.cs-steps { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: none; }
.cs-steps li { background: var(--white); border-radius: 8px; padding: 26px 24px; margin: 0; border: 1px solid var(--border); position: relative; }
.cs-steps h3 { font-size: 21px; margin: 14px 0 8px; }
.cs-steps p { font-size: 16px; color: var(--text-muted); margin: 0; }
.cs-step-n { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--white); font-weight: 600; font-size: 16px; }

/* ── How it comes together ── */
.cs-together-grid { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 28px; align-items: stretch; }
.cs-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 28px; box-shadow: 0 8px 24px rgba(64,83,98,0.06); min-width: 0; }
.cs-card h3 { margin: 0 0 4px; font-size: 24px; }
.cs-asof { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }

.cs-donut-wrap { position: relative; max-width: 240px; margin: 8px auto 18px; }
.cs-donut { width: 100%; height: auto; display: block; }
.cs-donut path { cursor: pointer; transition: opacity 0.2s, transform 0.2s; transform-origin: 110px 110px; }
.cs-donut.has-hot path { opacity: 0.3; }
.cs-donut.has-hot path.is-hot { opacity: 1; transform: scale(1.04); }
.cs-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.cs-donut-center span { font-family: Georgia, serif; font-size: 32px; color: var(--navy); line-height: 1; }
.cs-donut-center small { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.cs-legend { list-style: none; margin: 0; }
.cs-legend li { margin: 0; }
.cs-legend button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: none; border-bottom: 1px solid var(--border); padding: 8px 2px; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; text-align: left; }
.cs-legend button:hover, .cs-legend button.is-hot { background: var(--blue-light); }
.cs-legend button[disabled] { cursor: default; }
.cs-legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cs-legend .lbl { flex: 1; }
.cs-legend .pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy); }
.cs-legend .grp { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); padding: 12px 2px 4px; border-bottom: 1px solid var(--border); }

.cs-perf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cs-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; padding: 3px; background: var(--blue-light); }
.cs-tabs button { background: none; border: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--blue); padding: 6px 14px; border-radius: 4px; cursor: pointer; }
.cs-tabs button[aria-selected="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cs-chart-legend { display: flex; gap: 20px; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.cs-chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cs-chart-legend .ln { width: 22px; height: 0; border-top: 3px solid var(--gold); display: inline-block; }
.cs-chart-legend .ln.bench { border-top: 2px dashed var(--cs-core); }
.cs-chart { position: relative; padding-left: 46px; margin-bottom: 26px; touch-action: pan-y; }
.cs-dot-pt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--white); pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.25); z-index: 2; }
.cs-tip { z-index: 3; }
.cs-dot-pt.m { background: var(--gold); }
.cs-dot-pt.b { background: var(--cs-core); }
.cs-line { width: 100%; height: 300px; display: block; overflow: visible; }
.cs-line .grid line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cs-line .grid line.zero { stroke: #b9c4cd; }
.cs-line .series { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.cs-line .series.model { stroke: var(--gold); stroke-width: 3; }
.cs-line .series.bench { stroke: var(--cs-core); stroke-width: 2; stroke-dasharray: 6 5; }
.cs-line .area { fill: url(#cs-grad); }
.cs-line .cursor { stroke: var(--blue); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cs-axis { position: absolute; font-size: 12px; color: var(--text-muted); pointer-events: none; white-space: nowrap; }
.cs-axis.y { left: 0; transform: translateY(-50%); }
.cs-axis.x { bottom: -22px; transform: translateX(-50%); }
.cs-tip { position: absolute; top: 8px; background: var(--navy); color: var(--white); font-size: 13px; line-height: 1.5; padding: 8px 12px; border-radius: 6px; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.cs-tip b { font-weight: 600; }
.cs-tip .m { color: #f0c987; }

.cs-returns { width: 100%; border-collapse: collapse; margin-top: 36px; font-size: 15px; }
.cs-returns th, .cs-returns td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.cs-returns thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.cs-returns th:first-child { text-align: left; }
.cs-returns tbody th { font-weight: 500; color: var(--navy); }
.cs-returns tbody th small { display: block; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.cs-returns td:nth-child(2) { color: var(--navy); font-weight: 600; }

.cs-source { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); margin: 12px 0 0; font-style: italic; }
.cs-source:empty { display: none; }
.cs-disclosure { margin-top: 28px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); border-left: 3px solid var(--border); padding: 4px 0 4px 18px; }
.cs-disclosure p { margin-bottom: 0.7em; }
.cs-disclosure strong { color: var(--text); }

.cs-cta { text-align: center; max-width: 640px; margin: 64px auto 0; }
.cs-cta h3 { margin-top: 0; }
.cs-cta p { color: var(--text-muted); }
.cs-cta .btn { margin: 4px 6px; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .cs-explorer { grid-template-columns: 1fr; gap: 24px; }
  .cs-panel { min-height: 0; }
  .cs-diagram { max-width: 420px; }
  .cs-together-grid { grid-template-columns: 1fr; }
  .cs-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cs-steps { grid-template-columns: 1fr; }
  .cs-detail { padding: 24px 20px 20px; }
  .cs-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .cs-card { padding: 22px 18px; }
  .cs-line { height: 240px; }
  .cs-returns { font-size: 14px; }
  .cs-returns th, .cs-returns td { padding: 9px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-orbit { animation: none; }
  .cs-detail.is-active { animation: none; }
  .cs-node .cs-disc, .cs-donut path { transition: none; }
}
