:root {
  color-scheme: light;
  --ink: #15201c;
  --muted: #5b6861;
  --line: #d8dfda;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #365314;
  --warm: #b45309;
  --soft: #eef5f1;
  --shadow: 0 18px 55px rgba(20, 32, 28, 0.12);
}

* {
  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.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(251, 252, 250, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand,
nav {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand {
  font-weight: 750;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

main {
  overflow: hidden;
}

.hero,
.framework,
.scorecard-shell,
.results,
.case-study {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px);
  scroll-margin-top: 86px;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(28px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: calc(100vh - 64px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hero-copy {
  max-width: 820px;
}

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

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

h1 {
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  margin-bottom: 24px;
  max-width: 980px;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 16px;
}

h3 {
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.lede {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  max-width: 760px;
}

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

.button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

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

.button.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.button.full {
  width: 100%;
}

.button[hidden] {
  display: none;
}

.signal-panel {
  background: linear-gradient(145deg, #ffffff, #edf7f2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.score-visual {
  margin: 0 auto 26px;
  max-width: 360px;
}

.score-gauge {
  align-items: center;
  aspect-ratio: 1.9;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 360px;
  overflow: hidden;
  padding: 18px 18px 0;
  position: relative;
  text-align: center;
}

.gauge-arc {
  background:
    radial-gradient(circle at 50% 100%, #ffffff 0 42%, transparent 43%),
    conic-gradient(from 270deg at 50% 100%, #b91c1c 0deg, #f59e0b 90deg, #16a34a 180deg, transparent 181deg 360deg);
  border-radius: 999px 999px 0 0;
  bottom: 0;
  box-shadow: inset 0 -10px 28px rgba(21, 32, 28, 0.08);
  height: calc(100% - 6px);
  left: 0;
  position: absolute;
  right: 0;
}

.gauge-needle {
  background: var(--ink);
  border-radius: 999px;
  bottom: 6px;
  height: 5px;
  left: 50%;
  position: absolute;
  transform: translateX(-4px) rotate(-28deg);
  transform-origin: 4px 50%;
  width: 42%;
  z-index: 2;
}

.gauge-needle::after {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
  height: 10px;
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
}

.gauge-hub {
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  bottom: -18px;
  box-shadow: 0 8px 20px rgba(21, 32, 28, 0.12);
  height: 58px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 58px;
  z-index: 3;
}

.score-gauge strong {
  align-items: center;
  align-self: flex-end;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(21, 32, 28, 0.14);
  display: flex;
  font-size: 14px;
  justify-content: center;
  min-height: 54px;
  padding: 12px 18px;
  position: relative;
  z-index: 4;
}

.score-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.score-scale span {
  border: 1px solid rgba(21, 32, 28, 0.12);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-width: 54px;
  padding: 8px 12px;
}

.score-scale span:first-child {
  background: #b91c1c;
}

.score-scale span:last-child {
  background: #15803d;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric-list div {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 13px 14px;
}

.metric-list span {
  color: var(--muted);
}

.framework {
  background: #f2f6f4;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
}

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

.framework-grid article,
.case-grid article,
.results-grid section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.framework-grid p,
.case-grid p,
.results-grid p,
li {
  color: var(--muted);
}

.section-heading {
  margin: 0 auto 28px;
  max-width: 980px;
}

.section-copy,
.detail-copy,
.bar-note {
  color: var(--muted);
}

.section-copy {
  max-width: 720px;
}

.section-copy code {
  background: var(--soft);
  border-radius: 5px;
  color: var(--ink);
  padding: 2px 5px;
}

.scorecard-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(20px, 4vw, 34px);
}

.progress {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.progress-bar {
  background: var(--soft);
  border-radius: 999px;
  flex: 1;
  height: 10px;
  overflow: hidden;
}

.progress-bar span {
  background: var(--accent);
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 25%;
}

.progress > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

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

.step.is-active {
  display: grid;
}

legend {
  font-size: 24px;
  font-weight: 800;
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 14px;
  font-weight: 750;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-weight: 600;
}

input,
select {
  appearance: none;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 11px 12px;
  width: 100%;
}

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

.range-value {
  color: var(--accent);
  font-weight: 800;
}

.form-status {
  color: var(--muted);
  font-weight: 700;
  min-height: 24px;
}

.results {
  background: #eef5f1;
}

.result-hero {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 190px;
  margin: 0 auto 18px;
  max-width: 1180px;
}

.score-dial {
  align-items: center;
  aspect-ratio: 1;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.score-dial strong {
  color: var(--accent);
  font-size: 64px;
  line-height: 1;
}

.score-dial span {
  color: var(--muted);
  font-weight: 700;
}

.results-grid {
  margin: 0 auto;
  max-width: 1180px;
}

.bars {
  display: grid;
  gap: 14px;
}

.bar-label {
  display: flex;
  font-size: 14px;
  font-weight: 750;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bar-track {
  background: var(--soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-track span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  display: block;
  height: 100%;
}

.bar-note {
  font-size: 13px;
  margin: 6px 0 0;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

ul,
ol {
  margin-bottom: 0;
  padding-left: 20px;
}

.mitigations li {
  color: var(--ink);
}

.case-study {
  background: var(--ink);
  color: white;
}

.case-study .eyebrow {
  color: #7dd3fc;
}

.case-study h2 {
  max-width: 860px;
}

.case-grid article {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.case-grid p {
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .hero,
  .framework,
  .result-hero,
  .framework-grid,
  .case-grid,
  .results-grid,
  .step {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 46px;
  }

  .score-dial {
    height: 170px;
    width: 170px;
  }

  .hero,
  .framework,
  .scorecard-shell,
  .results,
  .case-study {
    scroll-margin-top: 126px;
  }
}

@media (max-width: 520px) {
  .hero,
  .framework,
  .scorecard-shell,
  .results,
  .case-study {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 38px;
  }

  .progress {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }
}
