:root {
  --ink: #102c42;
  --navy: #062b54;
  --deep: #073c5d;
  --blue: #1f6fae;
  --teal: #0f8b7d;
  --green: #2b9d8f;
  --orange: #f18c2e;
  --gold: #f7bf2f;
  --purple: #7460a8;
  --bg: #f4f8fb;
  --surface: #ffffff;
  --soft: #eaf3f6;
  --line: #d9e6ec;
  --muted: #5c7080;
  --shadow: 0 18px 44px rgba(6, 43, 84, 0.12);
  --shadow-soft: 0 8px 22px rgba(6, 43, 84, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 251, 0.96)),
    radial-gradient(circle at 92% 8%, rgba(247, 191, 47, 0.18), transparent 30%),
    radial-gradient(circle at 12% 16%, rgba(31, 111, 174, 0.12), transparent 34%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar,
.hero,
.section,
.footer {
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.nav-links,
.top-actions,
.hero-actions,
.data-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 900;
  color: var(--navy);
}

.brand img {
  width: 112px;
  height: auto;
  display: block;
}

.brand span {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.nav-links {
  gap: 2px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 800;
  padding: 0.6rem 0.72rem;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--navy);
  background: var(--soft);
}

.button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  padding: 0.76rem 1rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.button.ghost {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.65);
}

.icon-button {
  padding: 0.5rem 0.65rem;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 42px;
  padding: 58px 0 54px;
}

.hero-copy {
  position: relative;
}

.funding-line {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  max-width: 720px;
  line-height: 1.35;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 5.9vw, 6.1rem);
  line-height: 0.94;
  letter-spacing: 0;
  color: var(--navy);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1;
  color: var(--navy);
  margin-bottom: 10px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.hero-text,
.section-head p,
.panel-title p,
.muted {
  color: var(--muted);
}

.hero-text {
  max-width: 680px;
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-console {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 238, 0.92)),
    linear-gradient(180deg, transparent 0 62%, rgba(6, 43, 84, 0.08));
  border: 1px solid rgba(6, 43, 84, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-console::before,
.hero-console::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  height: 130px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-console::before {
  bottom: 74px;
  background: rgba(15, 139, 125, 0.18);
  transform: rotate(-4deg);
}

.hero-console::after {
  bottom: 36px;
  background: rgba(6, 43, 84, 0.92);
  transform: rotate(3deg);
}

.console-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.metric-orbit {
  position: relative;
  z-index: 1;
  height: 220px;
  margin: 26px 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(6, 43, 84, 0.08), transparent),
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(6, 43, 84, 0.05) 63px 64px);
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 16px;
  padding: 22px;
}

.metric-orbit span {
  width: 18%;
  border-radius: 8px 8px 0 0;
  background: var(--blue);
  box-shadow: 0 18px 28px rgba(6, 43, 84, 0.12);
}

.metric-orbit span:nth-child(1) { height: 42%; background: var(--gold); }
.metric-orbit span:nth-child(2) { height: 64%; background: var(--orange); }
.metric-orbit span:nth-child(3) { height: 88%; background: var(--teal); }
.metric-orbit span:nth-child(4) { height: 56%; background: var(--blue); }
.metric-orbit span:nth-child(5) { height: 74%; background: var(--purple); }

.kpi-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.kpi-grid div,
.panel {
  border: 1px solid rgba(6, 43, 84, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.kpi-grid div {
  padding: 16px;
}

dt {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  font-weight: 950;
}

.section {
  padding: 78px 0;
}

.surface {
  position: relative;
}

.surface::before {
  content: "";
  position: absolute;
  inset: 28px calc((100vw - min(1320px, calc(100vw - 32px))) / -2);
  background: rgba(234, 243, 246, 0.78);
  z-index: -1;
}

.section-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 840px);
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.section-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-weight: 950;
}

.panel {
  padding: 20px;
  min-width: 0;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.pillar-grid,
.scorecard,
.chart-grid,
.learning-grid,
.voices-grid,
.planning-grid,
.reach-grid {
  display: grid;
  gap: 16px;
}

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

.pillar {
  min-height: 235px;
  padding: 22px;
  border-top: 5px solid var(--teal);
}

.pillar:nth-child(2) { border-top-color: var(--orange); }
.pillar:nth-child(3) { border-top-color: var(--gold); }
.pillar:nth-child(4) { border-top-color: var(--blue); }

.pillar-index {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  background: var(--navy);
  font-weight: 950;
  margin-bottom: 18px;
}

.pillar p {
  color: var(--muted);
  line-height: 1.5;
}

.performance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.performance-layout > *,
.chart-grid > *,
.reach-grid > *,
.learning-grid > *,
.voices-grid > *,
.planning-grid > * {
  min-width: 0;
}

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

.measure-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.measure-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--teal);
}

.measure-card.watch::before { background: var(--gold); }
.measure-card.needs-attention::before { background: var(--orange); }

.measure-card .status {
  display: inline-flex;
  padding: 0.32rem 0.55rem;
  border-radius: 99px;
  background: var(--soft);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 950;
  margin-bottom: 12px;
}

.measure-card strong {
  display: block;
  min-height: 44px;
  line-height: 1.25;
}

.measure-value {
  margin: 12px 0 10px;
  font-size: 1.65rem;
  font-weight: 950;
  color: var(--navy);
}

.measure-value small {
  font-size: 0.82rem;
  color: var(--muted);
}

.measure-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.meter,
.progress-track,
.target-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2edf1;
}

.meter span,
.progress-track span,
.target-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.insight-panel {
  background: var(--navy);
  color: white;
}

.insight-panel h3 {
  color: white;
}

.insight-stack {
  display: grid;
  gap: 12px;
}

.insight-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.insight-card span {
  display: block;
  color: var(--gold);
  font-weight: 950;
  margin-bottom: 6px;
}

.insight-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
  margin: 0;
}

.chart-grid {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.85fr);
  margin-top: 16px;
}

.bar-chart {
  height: 300px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 20px 8px 34px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bar {
  flex: 1;
  min-width: 25px;
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
}

.bar span {
  width: 100%;
  min-height: 4px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--orange), var(--blue));
}

.bar em {
  position: absolute;
  top: -22px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.bar small {
  position: absolute;
  bottom: -28px;
  color: var(--muted);
  font-size: 0.72rem;
}

.target-chart,
.progress-list,
.compact-bars {
  display: grid;
  gap: 12px;
}

.target-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) 64px;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 800;
}

.target-row strong {
  color: var(--navy);
  text-align: right;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 240px 240px;
  gap: 12px;
  margin-bottom: 16px;
}

.segment-toolbar {
  grid-template-columns: minmax(220px, 360px);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 950;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
}

.reach-grid {
  grid-template-columns: 0.7fr 0.8fr 1.2fr;
}

.zip-map {
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.zip-tile {
  min-height: 100px;
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--zip-color), white 24%), var(--zip-color));
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.zip-tile span {
  font-size: 1.7rem;
  font-weight: 950;
}

.zip-tile small {
  font-weight: 800;
  opacity: 0.88;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.event-item:last-child {
  border-bottom: 0;
}

.event-item strong {
  color: var(--orange);
  font-size: 1.45rem;
  font-weight: 950;
}

.event-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-panel {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 0.72rem 0.78rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf6f7;
  color: var(--navy);
}

.learning-grid {
  grid-template-columns: 1fr 0.9fr 0.72fr 0.72fr;
}

.segment-panel {
  margin-bottom: 16px;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.segment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.segment-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.segment-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.segment-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.25rem;
}

.segment-card p,
.segment-card small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
}

.source-warning {
  margin: 0 0 12px;
  color: #8d3f2d;
  font-weight: 900;
}

.progress-row,
.compact-row {
  display: grid;
  gap: 7px;
}

.progress-row header,
.compact-row header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.88rem;
  font-weight: 850;
}

.funnel {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.funnel-step {
  width: var(--funnel-width);
  min-width: 190px;
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}

.funnel-step:nth-child(4),
.funnel-step:nth-child(5) {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: var(--navy);
}

.funnel-step span {
  font-weight: 950;
}

.funnel-step small {
  grid-column: 1 / -1;
  opacity: 0.86;
}

.large-stat {
  color: var(--navy);
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 950;
  margin: 22px 0 14px;
}

.large-stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.35;
}

.voices-grid {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
}

.accent-panel {
  background: var(--navy);
  color: white;
}

.accent-panel h3 {
  color: white;
}

.quote-stack,
.quote-wall {
  display: grid;
  gap: 12px;
}

.quote {
  margin: 0;
  padding: 12px 0 12px 14px;
  border-left: 4px solid var(--gold);
}

.quote p {
  line-height: 1.45;
  margin-bottom: 8px;
}

.quote small {
  color: rgba(255, 255, 255, 0.72);
}

.quote-wall-panel {
  margin-top: 16px;
}

.quote-search {
  min-width: 280px;
}

.quote-wall {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 710px;
  overflow: auto;
}

.quote-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.quote-card p {
  line-height: 1.45;
  margin-bottom: 10px;
}

.quote-card small {
  color: var(--muted);
}

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.theme-tags span {
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: var(--soft);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
}

.planning-grid {
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
}

.recommendation-panel {
  grid-column: 1 / -1;
}

.scenario-panel {
  background: var(--navy);
  color: white;
}

.scenario-panel h3,
.scenario-panel label span {
  color: white;
}

.scenario-panel select {
  margin-bottom: 14px;
}

.scenario-summary {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.scenario-summary div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.scenario-summary span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scenario-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.scenario-summary p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.costing-table {
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recommendation {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.recommendation span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 950;
  margin-bottom: 12px;
}

.recommendation p {
  color: var(--muted);
  line-height: 1.48;
}

.recommendation b {
  color: var(--navy);
}

.data-actions {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer p {
  margin-bottom: 0;
}

.report-body {
  background: white;
}

.report-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 44px 28px 80px;
}

.report-cover {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 4px solid var(--navy);
}

.report-cover h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.report-cover h2 {
  color: var(--orange);
}

.report-actions,
.report-kpis {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.report-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.metric-card {
  min-width: 170px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 6px;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 950;
}

@media (max-width: 1120px) {
  .nav-links {
    display: none;
  }

  .hero,
  .performance-layout,
  .chart-grid,
  .reach-grid,
  .learning-grid,
  .segment-grid,
  .voices-grid,
  .planning-grid {
    grid-template-columns: 1fr;
  }

  .pillar-grid,
  .scorecard,
  .recommendation-grid,
  .quote-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar,
  .top-actions,
  .hero-actions,
  .panel-title,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand span {
    border-left: 0;
    padding-left: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.6rem);
  }

  .kpi-grid,
  .pillar-grid,
  .scorecard,
  .recommendation-grid,
  .quote-wall,
  .toolbar,
  .zip-map {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 58px 0;
  }

  table {
    min-width: 0;
  }

  th,
  td {
    font-size: 0.78rem;
    padding: 0.58rem 0.5rem;
    overflow-wrap: anywhere;
  }

  .bar-chart {
    gap: 2px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .bar {
    min-width: 9px;
  }

  .bar em {
    display: none;
  }
}

@media print {
  .app-shell,
  .footer,
  .screen-only {
    display: none !important;
  }
}
