:root {
  color-scheme: dark;
  --ink: #f8f8f4;
  --muted: #c2c7c4;
  --bg: #0c1012;
  --surface: rgba(19, 25, 27, 0.88);
  --soft: rgba(248, 248, 244, 0.06);
  --line: rgba(248, 248, 244, 0.15);
  --blue: #72a7ff;
  --green: #7bd39a;
  --gold: #e6c15f;
  --red: #ee7a74;
  --violet: #c7a5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(248, 248, 244, 0.04) 1px, transparent 1px) 0 0 / 88px 88px,
    linear-gradient(135deg, #0c1012 0%, #14201d 52%, #121827 100%);
  font-family: Avenir Next, Avenir, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.shell {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 24px;
  align-items: end;
  padding-bottom: 26px;
  min-height: 28vh;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font: 850 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  font-size: 86px;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.12;
}

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

.boundary,
.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.boundary {
  padding: 22px;
  border-color: rgba(114, 167, 255, 0.42);
}

.boundary span {
  color: var(--blue);
  font: 850 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.boundary p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.metric b {
  display: block;
  font-size: clamp(20px, 1.7vw, 27px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.surface {
  grid-column: span 4;
  padding: 18px;
  min-height: 300px;
}

.surface.wide {
  grid-column: span 8;
}

.surface-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.rule-list,
.event-list,
.gate-list,
.activation-list,
.activation-gates,
.attribution {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rule-card,
.event-card,
.gate-card,
.activation-card,
.activation-gate,
.attribution-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 248, 244, 0.055);
  padding: 14px;
}

.rule-card {
  display: grid;
  grid-template-columns: 0.8fr 0.7fr 1fr 0.45fr;
  gap: 12px;
  align-items: center;
}

.activation-card {
  display: grid;
  grid-template-columns: 0.9fr 0.7fr 0.45fr 1.25fr;
  gap: 12px;
  align-items: center;
}

.name {
  font-weight: 850;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #091012;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.tag.signal {
  background: var(--green);
}

.tag.blocked {
  background: var(--red);
}

.tag.review_only {
  background: var(--gold);
}

.tag.activation-status {
  background: var(--violet);
}

.mono {
  margin: 8px 0 0;
  color: var(--muted);
  font: 750 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.bar {
  overflow: hidden;
  height: 8px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(248, 248, 244, 0.12);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}

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

.attribution-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-top: 16px;
}

.footer button {
  border: 0;
  border-radius: 7px;
  color: #091012;
  background: var(--green);
  padding: 13px 16px;
  font-weight: 850;
  cursor: pointer;
}

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

@media (max-width: 1180px) {
  .hero,
  .layout,
  .scoreboard {
    grid-template-columns: 1fr;
  }

  .surface,
  .surface.wide {
    grid-column: auto;
  }

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

  h1 {
    font-size: 70px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1440px);
    padding-top: 22px;
  }

  h1 {
    font-size: 48px;
  }

  .rule-card,
  .activation-card,
  .scoreboard,
  .attribution,
  .footer {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
  }
}
