:root {
  --bg: #f3efe7;
  --panel: rgba(255, 250, 245, 0.88);
  --panel-strong: #fffaf5;
  --ink: #17151a;
  --muted: #625b67;
  --line: rgba(64, 45, 36, 0.12);
  --teal: #0f766e;
  --gold: #d97706;
  --brick: #b45309;
  --coral: #d9485f;
  --olive: #5f6b2e;
  --shadow: 0 22px 60px rgba(78, 48, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, rgba(15, 118, 110, 0.16), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(217, 119, 6, 0.18), transparent 28%),
    linear-gradient(180deg, #f8f2e8 0%, #f3efe7 44%, #efe8de 100%);
}

.page-glow {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

.page-glow-a {
  left: -10rem;
  top: 18rem;
  background: rgba(15, 118, 110, 0.28);
}

.page-glow-b {
  right: -8rem;
  top: 4rem;
  background: rgba(217, 119, 6, 0.24);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.25rem;
  padding: 1.35rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
}

h1,
h2,
h3,
.kpi__value {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.95;
}

h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.25rem, 2.8vw, 1.9rem);
}

h3 {
  margin: 0;
  font-size: 1rem;
}

p {
  color: var(--muted);
}

.hero__lede {
  max-width: 60ch;
  font-size: 0.98rem;
}

.hero__controls {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.control {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(64, 45, 36, 0.08);
  border-radius: 18px;
}

.control span {
  font-size: 0.84rem;
  color: var(--muted);
}

select,
input[type="range"] {
  width: 100%;
}

select {
  appearance: none;
  border: 1px solid rgba(64, 45, 36, 0.15);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
}

input[type="range"] {
  accent-color: var(--teal);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.kpi {
  padding: 1rem 1.05rem;
}

.kpi__label {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi__value {
  margin: 0.35rem 0 0.1rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1;
}

.kpi__note {
  margin: 0;
  font-size: 0.82rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-panel,
.panel {
  padding: 1.15rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-note {
  max-width: 34ch;
  margin: 0;
  font-size: 0.86rem;
}

.chart-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 242, 232, 0.9));
  border: 1px solid rgba(64, 45, 36, 0.08);
  border-radius: 20px;
  padding: 1rem;
}

#trajectoryChart {
  width: 100%;
  height: auto;
  display: block;
}

.allocation {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.allocation__row {
  display: grid;
  gap: 0.35rem;
}

.allocation__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.allocation__track {
  height: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(98, 91, 103, 0.12);
  display: flex;
}

.allocation__fill {
  height: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.legend__swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
}

.readiness-list,
.pipeline,
.scorecard-grid,
.timeline {
  display: grid;
  gap: 0.8rem;
}

.readiness-item,
.pipeline-item,
.scorecard-card,
.timeline-item {
  border: 1px solid rgba(64, 45, 36, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  padding: 0.95rem 1rem;
}

.readiness-item__top,
.pipeline-item__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.meter {
  height: 0.85rem;
  border-radius: 999px;
  background: rgba(98, 91, 103, 0.12);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #37b6ac, #f59e0b);
}

.pipeline-item__price {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
}

.pipeline-item__sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.scorecard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scorecard-card p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
}

.timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-item__step {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.timeline-item p {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .hero,
  .layout-grid,
  .scorecard-grid,
  .timeline,
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100vw - 1rem, 100%);
    padding-top: 0.5rem;
  }

  .layout-grid,
  .scorecard-grid,
  .timeline,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .readiness-item__top,
  .pipeline-item__top {
    align-items: start;
    flex-direction: column;
  }

  h1 {
    max-width: 10ch;
  }
}
