:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --text: #17201d;
  --muted: #66716d;
  --line: #d9e0de;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b91c1c;
  --green: #15803d;
  --shadow: 0 16px 40px rgba(23, 32, 29, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 340px),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: end;
  padding: 22px 0 18px;
}

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

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-panel,
.controls,
.score-card,
.metric,
.progress-panel,
.details-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.hero-panel span:last-child {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 99px;
  background: var(--amber);
}

.status-dot.ok {
  background: var(--green);
}

.status-dot.bad {
  background: var(--red);
}

.controls {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  margin: 14px 0;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
button {
  width: 100%;
  min-height: 44px;
  border-radius: 7px;
  font: inherit;
}

select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.summary-grid,
.meter-grid,
.details-grid {
  display: grid;
  gap: 14px;
}

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

.meter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.score-card,
.metric,
.details-grid article {
  padding: 16px;
}

.score-card span,
.metric span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.score-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 44px;
  line-height: 1;
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1;
}

.score-card p,
.metric p,
li,
dd {
  color: var(--muted);
  line-height: 1.5;
}

.score-card p,
.metric p {
  margin-bottom: 0;
}

.progress-panel {
  margin: 14px 0;
  padding: 16px;
  box-shadow: none;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress-head span {
  color: var(--muted);
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecea;
}

.bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 240ms ease;
}

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

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

@media (max-width: 880px) {
  .hero,
  .controls,
  .summary-grid,
  .meter-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: stretch;
  }
}
