:root {
  color-scheme: light;
  --ink: #1d2430;
  --muted: #5e6978;
  --line: #d9dde5;
  --paper: #f8f6f1;
  --surface: #ffffff;
  --soft: #eef3f4;
  --blue: #2867b2;
  --teal: #0f766e;
  --green: #3f7d20;
  --amber: #b26b00;
  --red: #b63b42;
  --plum: #7750a6;
  --slate: #364152;
  --shadow: 0 18px 40px rgba(29, 36, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  background: rgba(248, 246, 241, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topnav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  background: var(--surface);
}

.topnav a:hover {
  color: var(--ink);
  border-color: var(--slate);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 32px;
  align-items: stretch;
  min-height: calc(100svh - 78px);
  padding: 54px 32px 40px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    repeating-linear-gradient(135deg, rgba(40, 103, 178, 0.08) 0 1px, transparent 1px 26px),
    var(--soft);
}

.compact-hero {
  min-height: calc(86svh - 78px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 920px;
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal);
  font-size: 14px;
  font-weight: 750;
}

.status-pill svg,
.panel-title svg,
.route-card svg,
.route-start svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.hero-copy h2 {
  max-width: 880px;
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
  font-weight: 820;
}

.hero-copy p:last-child {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.metric-grid {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.cost-card,
.equation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 160px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card strong {
  display: block;
  font-size: 44px;
  line-height: 1;
}

.metric-card span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.metric-label {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.claim-strip,
.source-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 36px;
  padding: 34px 32px;
  background: var(--ink);
  color: white;
}

.claim-strip h2,
.source-band h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.claim-strip p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.section-block {
  padding: 64px 32px;
}

.section-muted {
  background: #edf0e8;
}

.section-heading {
  max-width: 920px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.section-heading p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.route-map {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.route-start {
  width: fit-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.route-arrow {
  width: 2px;
  height: 24px;
  margin: 6px 0 6px 23px;
  background: var(--slate);
  position: relative;
}

.route-arrow::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
  transform: rotate(45deg);
}

.route-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
}

.route-card {
  min-height: 152px;
  padding: 16px;
  border-radius: 8px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.route-card strong {
  line-height: 1.2;
}

.route-card span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.route-search {
  background: var(--blue);
}

.route-tool {
  background: var(--green);
}

.route-small {
  background: var(--teal);
}

.route-llm {
  background: var(--plum);
}

.route-agent {
  background: var(--amber);
}

.route-reason {
  background: var(--red);
}

.route-expert {
  background: var(--slate);
}

.two-column,
.chart-layout,
.equation-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

.route-ladder article {
  min-height: 230px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.route-ladder h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.route-ladder p {
  min-height: 78px;
  margin: 0 0 16px;
  color: var(--muted);
}

.route-ladder strong {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #edf8f5;
  color: var(--teal);
  font-size: 13px;
}

.ladder-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 850;
}

.label-list.compact li {
  grid-template-columns: 38px minmax(120px, 0.35fr) 1fr;
}

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

.cost-split span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
  color: var(--ink);
  text-align: center;
  font-weight: 800;
}

.panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-title h3,
.equation-card h3 {
  margin: 0;
  font-size: 20px;
}

.label-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: labels;
}

.label-list li {
  counter-increment: labels;
  display: grid;
  grid-template-columns: 38px minmax(150px, 0.42fr) 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
}

.label-list li::before {
  content: counter(labels);
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.label-list span,
.panel p,
.equation-card p {
  color: var(--muted);
}

.formula-box {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #edf8f5;
}

.formula-box span {
  color: var(--teal);
  font-weight: 800;
}

.formula-box strong {
  font-size: 24px;
}

.chart-panel {
  min-height: 430px;
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) 1fr 64px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  color: var(--ink);
  font-weight: 750;
}

.bar-track {
  height: 28px;
  border-radius: 999px;
  background: #eceef1;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.donut-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
}

.donut-center {
  fill: var(--surface);
}

.legend {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 9px;
  align-items: center;
  font-size: 14px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

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

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

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

.result-card {
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.result-card span {
  color: var(--teal);
  font-weight: 850;
}

.result-card strong {
  display: block;
  margin: 24px 0 16px;
  font-size: 44px;
  line-height: 1;
}

.result-card p,
.frontier-callout p {
  margin: 0;
  color: var(--muted);
}

.frontier-callout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.frontier-callout h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.frontier-callout p {
  color: rgba(255, 255, 255, 0.78);
}

.carbon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.carbon-panel {
  min-height: 330px;
}

.stacked-bar {
  display: flex;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: #e6e9ee;
}

.seg {
  min-width: 44px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.seg.cloud {
  background: var(--blue);
}

.seg.device {
  background: var(--amber);
}

.seg.human {
  background: var(--teal);
}

.carbon-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.carbon-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.carbon-list div:last-child {
  border-bottom: 0;
}

.carbon-list dt {
  color: var(--muted);
}

.carbon-list dd {
  margin: 0;
  font-weight: 850;
}

.decomp-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.decomp-summary article,
.scale-card,
.route-definition-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.decomp-summary article {
  min-height: 170px;
  padding: 18px;
}

.decomp-summary span,
.route-definition-grid span {
  color: var(--teal);
  font-weight: 850;
}

.decomp-summary strong {
  display: block;
  margin: 14px 0 10px;
  font-size: 30px;
}

.decomp-summary p,
.scale-card p,
.route-definition-grid p {
  margin: 0;
  color: var(--muted);
}

.scale-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  padding: 24px;
}

.scale-card h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
}

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

.route-definition-grid article {
  min-height: 210px;
  padding: 18px;
}

.route-definition-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

.route-definition-grid span {
  display: inline-flex;
  margin-bottom: 16px;
}

.route-summary {
  margin-top: 18px;
}

.cost-card {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cost-card.high {
  border-color: rgba(182, 59, 66, 0.36);
  background: #fff5f3;
}

.cost-source {
  color: var(--teal);
  font-weight: 800;
}

.cost-card strong {
  font-size: 40px;
}

.cost-card span:last-child {
  color: var(--muted);
}

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

.equation-card {
  padding: 20px;
}

.matrix-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.matrix-head,
.matrix-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(170px, 0.55fr) minmax(220px, 1fr);
}

.route-summary .matrix-head,
.route-summary .matrix-row {
  grid-template-columns: minmax(210px, 1fr) minmax(90px, 0.35fr) minmax(120px, 0.5fr) minmax(110px, 0.45fr);
}

.multiplier-table .matrix-head,
.multiplier-table .matrix-row {
  grid-template-columns:
    minmax(230px, 1.15fr)
    minmax(90px, 0.45fr)
    minmax(90px, 0.45fr)
    minmax(90px, 0.45fr)
    minmax(90px, 0.45fr)
    minmax(90px, 0.45fr);
}

.muted-row {
  background: #f4f5f2;
  color: var(--muted);
}

.compact-callout {
  margin-top: 20px;
}

.matrix-head {
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.matrix-head span,
.matrix-row span {
  padding: 16px;
  border-right: 1px solid var(--line);
}

.matrix-head span:last-child,
.matrix-row span:last-child {
  border-right: 0;
}

.matrix-row + .matrix-row {
  border-top: 1px solid var(--line);
}

.matrix-row span:nth-child(2) {
  color: var(--teal);
  font-weight: 800;
}

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

.timeline article {
  min-height: 240px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 850;
}

.timeline h3 {
  margin: 18px 0 8px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.source-band {
  align-items: start;
}

.source-band ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.source-band a {
  color: rgba(255, 255, 255, 0.86);
}

.source-band a:hover {
  color: white;
}

@media (max-width: 1120px) {
  .hero-band,
  .claim-strip,
  .source-band,
  .two-column,
  .chart-layout,
  .carbon-grid,
  .scale-card {
    grid-template-columns: 1fr;
  }

  .route-options,
  .route-ladder,
  .route-definition-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-grid,
  .result-grid,
  .multiplier-grid,
  .decomp-summary,
  .frontier-callout,
  .equation-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero-band,
  .section-block,
  .claim-strip,
  .source-band {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy h2 {
    font-size: 36px;
  }

  .hero-copy p:last-child {
    font-size: 17px;
  }

  .metric-grid,
  .multiplier-grid,
  .route-options,
  .route-ladder,
  .route-definition-grid,
  .timeline,
  .donut-wrap,
  .cost-split,
  .carbon-grid,
  .scale-card {
    grid-template-columns: 1fr;
  }

  .label-list li,
  .bar-row,
  .matrix-head,
  .matrix-row,
  .route-summary .matrix-head,
  .route-summary .matrix-row,
  .multiplier-table .matrix-head,
  .multiplier-table .matrix-row {
    grid-template-columns: 1fr;
  }

  .matrix-head span,
  .matrix-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .matrix-head span:last-child,
  .matrix-row span:last-child {
    border-bottom: 0;
  }
}
