:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --teal: #087f83;
  --blue: #2357d6;
  --amber: #b65f00;
  --red: #bd2b2b;
  --green: #1f8a5b;
  --shadow: 0 18px 45px rgba(25, 34, 49, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  z-index: 5;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  max-width: 680px;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 18px;
  font-size: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--green);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.panel,
.health-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 5vw, 54px);
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

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

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

button:active {
  transform: translateY(1px);
}

.primary,
.ghost {
  min-height: 46px;
  padding: 0 20px;
  font-weight: 800;
}

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

.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.health-panel {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
}

.health-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
}

.health-header strong {
  color: var(--ink);
  font-size: 42px;
}

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

.ring {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 10px solid #d7efe8;
  color: var(--green);
  font-weight: 900;
}

.ring.warn {
  border-color: #ffe0b2;
  color: var(--amber);
}

.ring.fail {
  border-color: #f8caca;
  color: var(--red);
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.meter span {
  display: block;
  width: 98%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 0.35s ease;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  gap: 24px;
}

.panel {
  padding: 22px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #344054;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.policy {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.policy.active {
  background: #e6f4f2;
  color: var(--teal);
  border-color: #9cd3ce;
}

.summary {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  background: #f0f7ff;
  color: #344054;
}

.summary span,
.label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary p,
.route-card p,
.submission p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mini {
  min-height: 34px;
  padding: 0 12px;
  background: #edf2f7;
  color: #344054;
  font-weight: 800;
}

.event-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.event {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.event strong {
  display: block;
  margin-bottom: 4px;
}

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

.dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
}

.event.warn .dot {
  background: var(--amber);
}

.event.fail .dot {
  background: var(--red);
}

.route-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fbfcfe;
}

.route-card strong {
  font-size: 20px;
}

.submission {
  margin-top: 24px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .notes-grid {
    grid-template-columns: 1fr;
  }

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