:root {
  --bg: #f5f1e8;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #19212d;
  --soft: #5c6675;
  --accent: #0f766e;
  --accent-2: #ea580c;
  --line: rgba(25, 33, 45, 0.1);
  --shadow: 0 18px 40px rgba(25, 33, 45, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Avenir Next", "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(234, 88, 12, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 24%),
    linear-gradient(180deg, #fbf7ef 0%, #f1ede2 100%);
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-copy,
.hero-panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-copy {
  padding: 34px;
}

.hero-panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 0.94;
  max-width: 11ch;
}

.dek {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--soft);
}

.hero-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.footer-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-secondary,
.footer-actions a {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.hero-panel ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--soft);
  line-height: 1.7;
}

.panel-label,
.section-header p,
#stage-caption {
  margin: 0;
  color: var(--soft);
}

.controls,
.headline,
.footer-card {
  padding: 22px 24px;
  margin-bottom: 20px;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-group + .control-group {
  margin-top: 14px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.headline h2 {
  font-size: 1.55rem;
}

.headline p {
  margin: 10px 0 0;
  line-height: 1.7;
  color: var(--soft);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 22px;
}

.metric-card h3 {
  font-size: 1rem;
}

.metric-value {
  margin-top: 12px;
  font-size: 2rem;
  font-weight: 800;
}

.metric-delta {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-delta.positive { color: var(--accent); }
.metric-delta.neutral { color: var(--soft); }

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

.card {
  padding: 22px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.stage-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.stage-row:first-child,
.repair-item:first-child {
  border-top: 0;
}

.stage-row header,
.repair-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stage-row h3,
.repair-item strong {
  font-size: 1rem;
}

.bar-track {
  margin-top: 12px;
  width: 100%;
  height: 10px;
  background: rgba(25, 33, 45, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #22c55e);
}

.repair-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-card p {
  margin: 12px 0 0;
  max-width: 72ch;
  line-height: 1.7;
  color: var(--soft);
}

@media (max-width: 960px) {
  .hero,
  .split,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

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