:root {
  color-scheme: light;
  --bg: #f5f7f1;
  --surface: #ffffff;
  --surface-muted: #eef3ee;
  --ink: #15181d;
  --muted: #5f6671;
  --line: #d9ded6;
  --teal: #0f766e;
  --green: #3f7a28;
  --amber: #b85c00;
  --red: #ad343e;
  --blue: #315c8f;
  --shadow: 0 12px 30px rgba(21, 24, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-140%);
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar,
main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  gap: 16px;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 5vw, 3.25rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.topbar-note,
.control-panel p,
.section-heading p,
.handoff-panel p,
.card p,
.delivery-rail p {
  color: var(--muted);
}

.topbar-note {
  max-width: 660px;
  margin: 0;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
}

.status-strip article,
.control-panel,
.delivery-rail,
.card,
.handoff-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-strip article {
  min-height: 128px;
  padding: 16px;
}

.metric {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.status-strip small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.control-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

.control-panel p {
  margin-bottom: 0;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.segment {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink);
  padding: 7px 11px;
  cursor: pointer;
}

.segment:hover,
.segment:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.segment.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.layout-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.delivery-rail {
  position: sticky;
  top: 16px;
  padding: 18px;
}

.delivery-rail ol {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.delivery-rail li {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.delivery-rail li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.delivery-rail span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--teal);
  font-weight: 900;
  font-size: 0.78rem;
  grid-row: 1 / span 2;
}

.delivery-rail strong {
  display: block;
  margin-bottom: 4px;
  grid-column: 2;
}

.delivery-rail p {
  margin-bottom: 0;
  font-size: 0.92rem;
  grid-column: 2;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.section-heading p {
  margin-bottom: 0;
  text-align: right;
}

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

.card {
  display: grid;
  gap: 10px;
  min-height: 196px;
  padding: 16px;
}

.card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge.installed {
  background: #e4f4ef;
  color: var(--teal);
}

.badge.candidate {
  background: #fff0d9;
  color: var(--amber);
}

.badge.workflow {
  background: #e8f0fb;
  color: var(--blue);
}

.badge.guardrail {
  background: #fae6e8;
  color: var(--red);
}

.card p {
  margin-bottom: 0;
}

.card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.card li::marker {
  color: var(--teal);
}

.handoff-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  margin: 18px 0 32px;
  padding: 20px;
}

.handoff-panel p {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .topbar,
  main {
    width: min(100vw - 24px, 720px);
  }

  .status-strip,
  .layout-grid,
  .handoff-panel {
    grid-template-columns: 1fr;
  }

  .control-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .delivery-rail {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding-top: 22px;
  }

  h1 {
    font-size: 2rem;
  }

  .status-strip {
    gap: 8px;
  }

  .status-strip article {
    min-height: auto;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading p {
    text-align: left;
  }

  .segment {
    flex: 1 1 calc(50% - 6px);
  }
}
