/* ── Shared page header (used by problem, approach, team, dashboard) ─── */
/* Note: .page-main already clears the fixed nav with padding-top: var(--nav-height).
   page-hero only needs its own spacing on top of that. */
.page-hero {
  background: var(--bg-white);
  padding: var(--sp-20) 0 var(--sp-12);
  border-bottom: 1px solid var(--border);
}
.page-hero--subtle { background: var(--bg-subtle); }
.page-hero--navy   { background: var(--navy-bg); }
.page-hero--navy .section-eyebrow { color: var(--green-light); }
.page-hero--navy .page-hero__title { color: #fff; }
.page-hero--navy .page-hero__sub   { color: rgba(255,255,255,0.65); }

.page-hero__title {
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
  max-width: 800px;
  margin-bottom: var(--sp-5);
}
.page-hero__sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
}
.page-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  flex-wrap: wrap;
}

/* ── Feature / problem cards ──────────────────────────────────────────── */
.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition:
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base),
    border-left-color var(--t-base);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
  border-left-color: var(--green);
}
.feature-card__icon {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-5);
  line-height: 1;
}
.feature-card__icon--green { color: var(--green); }
.feature-card__icon--blue  { color: var(--blue); }
.feature-card__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-3);
}
.feature-card__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Case study block ─────────────────────────────────────────────────── */
.case-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--sp-8) var(--sp-10);
}
.case-block__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--sp-4);
  font-weight: 600;
}
.case-block__body {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 800px;
}
.case-block__highlight {
  font-size: var(--text-sm);
  color: var(--navy);
  font-weight: 600;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* ── Equation display ─────────────────────────────────────────────────── */
.equation-block {
  background: var(--navy-bg);
  color: var(--green-light);
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.2vw, 26px);
  letter-spacing: 0.06em;
  text-align: center;
  padding: var(--sp-12) var(--sp-10);
  border-radius: var(--radius-xl);
  line-height: 1.6;
  user-select: all;
}
.equation-block sub { color: rgba(142,224,160,0.65); }

/* ── SDE component cards ──────────────────────────────────────────────── */
.component-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition:
    border-color var(--t-base),
    border-top-color var(--t-base),
    box-shadow var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}
.component-card:hover {
  border-color: rgba(47,111,176,0.30);
  border-top-color: var(--blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.component-card__sym {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.component-card__name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--sp-5);
}
.component-card__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Results stat block ───────────────────────────────────────────────── */
.result-hero {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius-xl);
  padding: var(--sp-16) var(--sp-12);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.result-hero__num {
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 900;
  color: var(--green);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--sp-4);
}
.result-hero__unit { font-size: 0.45em; opacity: 0.7; }
.result-hero__desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Comparison table ─────────────────────────────────────────────────── */
.compare-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.compare-table th {
  background: var(--bg-panel);
  padding: var(--sp-4) var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table td {
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr.row--ours { background: rgba(63,184,115,0.04); }
.compare-table .mse-good { color: var(--green); font-weight: 700; font-family: var(--font-mono); font-size: var(--text-lg); }
.compare-table .mse-bad  { color: var(--text-subtle); font-family: var(--font-mono); }

/* ── Stack tags ───────────────────────────────────────────────────────── */
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}
.stack-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--bg-panel);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  letter-spacing: 0.05em;
}

/* ── Dashboard panels ─────────────────────────────────────────────────── */
.db-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.db-panel {
  background: var(--bg-white);
  padding: var(--sp-5) var(--sp-6);
}
.db-panel--full { grid-column: 1 / -1; }
.db-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  row-gap: var(--sp-2);
}
.db-panel-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.db-panel-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-subtle);
}
.db-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.db-live::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: db-blink 2s step-end infinite;
}
@keyframes db-blink { 0%,100%{opacity:1} 45%,55%{opacity:0.15} }

#yield-chart, #error-chart { display: block; width: 100%; }

/* Regime panel */
.regime-panel { display: flex; flex-direction: column; height: 100%; min-height: 200px; gap: var(--sp-6); }
.regime-label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--sp-2);
}
.regime-status {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900; letter-spacing: 2px; line-height: 1; margin-bottom: var(--sp-2);
}
.regime-status--calm   { color: var(--green); }
.regime-status--stress { color: var(--amber); }
.regime-status--crisis { color: var(--red); }
.regime-detail { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.regime-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; height: 5px; border-radius: 3px; overflow: hidden; margin-top: auto; }
.regime-bar > div { border-radius: 2px; }
.regime-bar-calm   { background: var(--green); opacity: 0.25; }
.regime-bar-stress { background: var(--amber); opacity: 0.25; }
.regime-bar-crisis { background: var(--red);   opacity: 1; }
.regime-bar-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--text-subtle); margin-top: var(--sp-1); text-transform: uppercase; }

/* Rates grid */
.rates-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; }
.rate-item { background: var(--bg-white); padding: var(--sp-4) var(--sp-3); transition: background var(--t-fast); }
.rate-item:hover { background: var(--bg-subtle); }
.rate-tenor { font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--sp-2); }
.rate-current { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.rate-forecast { font-family: var(--font-mono); font-size: 12px; color: var(--blue); margin-bottom: 4px; }
.rate-change { font-family: var(--font-mono); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.rate-change--up   { color: var(--red); }
.rate-change--down { color: var(--green); }
.rate-uncertainty  { font-family: var(--font-mono); font-size: 10px; color: var(--text-subtle); }

/* Integration note */
.integration-note {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-8);
}
.integration-note h4 { font-size: var(--text-base); font-weight: 700; color: var(--navy); margin-bottom: var(--sp-4); }
.integration-note ol { padding-left: var(--sp-5); }
.integration-note li { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.75; margin-bottom: var(--sp-2); }
.integration-note code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-panel); padding: 1px 5px;
  border-radius: var(--radius-xs); color: var(--blue);
}

/* ── Team cards ───────────────────────────────────────────────────────── */
.team-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  transition:
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base),
    border-top-color var(--t-base);
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
  border-top-color: var(--green);
}
.team-avatar {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--navy-bg) 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  color: var(--green-light); letter-spacing: 1px;
  margin-bottom: var(--sp-6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.team-name { font-size: var(--text-2xl); font-weight: 800; color: var(--navy); margin-bottom: var(--sp-1); }
.team-role { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.15em; text-transform: uppercase; color: var(--green); margin-bottom: var(--sp-5); font-weight: 600; }
.team-bio { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.8; margin-bottom: var(--sp-6); }
.team-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.team-tag { font-family: var(--font-mono); font-size: 10px; background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: var(--radius-full); letter-spacing: 0.05em; }

/* ── Contact link cards (team page direct emails) ─────────────────────── */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.contact-link {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-5) var(--sp-6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    background var(--t-fast),
    border-color var(--t-base),
    box-shadow var(--t-base) var(--ease);
}
.contact-link:hover {
  background: var(--bg-panel);
  border-color: var(--border-dark);
  border-left-color: var(--green-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.contact-link__person {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
}
.contact-link__person span { color: var(--text-subtle); font-weight: 400; margin-inline: 4px; }
.contact-link__email {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--green);
  letter-spacing: 0.02em;
  transition: color var(--t-fast);
}
.contact-link:hover .contact-link__email { color: var(--green-light); }

/* ── Contact section ──────────────────────────────────────────────────── */
.contact-strip {
  background: var(--navy-bg);
  border-radius: var(--radius-2xl);
  padding: var(--sp-16);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-12);
  align-items: center;
}
.contact-strip h2 { color: #fff; font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--sp-3); }
.contact-strip p  { color: rgba(255,255,255,0.6); font-size: var(--text-base); line-height: 1.75; max-width: 480px; }
.contact-strip__actions { display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-end; flex-shrink: 0; }

@media (max-width: 768px) {
  .db-layout { grid-template-columns: 1fr; }
  .rates-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-strip { grid-template-columns: 1fr; }
  .contact-strip__actions { align-items: flex-start; }
  .page-hero { padding: var(--sp-12) 0 var(--sp-8); }
}
@media (max-width: 480px) {
  .rates-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: var(--sp-10) 0 var(--sp-6); }
  .equation-block { padding: var(--sp-8) var(--sp-5); letter-spacing: 0.02em; }
  .result-hero { padding: var(--sp-10) var(--sp-6); }
  .case-block { padding: var(--sp-6) var(--sp-6); }
  .contact-strip { padding: var(--sp-10) var(--sp-6); border-radius: var(--radius-xl); }
}
