:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #0b1118;
  --surface: #121b25;
  --surface-raised: #182431;
  --line: #293746;
  --text: #f2f5f8;
  --muted: #a3afbd;
  --green: #57d68d;
  --red: #ff8177;
  --amber: #ffc36d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

header, main, footer {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 42px 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.sub { margin: 8px 0 0; color: var(--muted); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid #284a3a;
  border-radius: 999px;
  background: #12251d;
  color: #9bf0bd;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #57d68d20;
}

main { padding-block: 24px 36px; }

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

.row {
  display: grid;
  grid-template-columns: 104px 66px minmax(0, 1fr) 176px 152px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid #526274;
  border-radius: 9px;
  background: var(--surface);
}

.row[data-severity="sev1"] { border-left-color: var(--red); }
.row[data-severity="sev2"] { border-left-color: var(--amber); }

.id {
  color: #c6d1dd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 650;
}

.sev {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #4b3a2b;
  border-radius: 5px;
  background: #30251c;
  color: #ffd39a;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.row[data-severity="sev1"] .sev {
  border-color: #603532;
  background: #352220;
  color: #ffb4ad;
}

.what { min-width: 0; color: #e5ebf1; overflow-wrap: anywhere; }

.row time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ack-button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid #4cae78;
  border-radius: 7px;
  background: #237649;
  color: #f4fff8;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.ack-button:hover:not(:disabled) {
  border-color: #80e7aa;
  background: #2a8b56;
}

.ack-button:active:not(:disabled) { transform: translateY(1px); }

.ack-button:focus-visible {
  outline: 3px solid #b0f2c9;
  outline-offset: 3px;
}

.ack-button:disabled { cursor: wait; opacity: .72; }

.acked {
  justify-self: stretch;
  padding: 10px 14px;
  border: 1px solid #28513b;
  border-radius: 7px;
  background: #14281e;
  color: #a4efc0;
  font-weight: 650;
  text-align: center;
}

.state {
  margin: 0;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.state.error {
  margin-bottom: 12px;
  border-color: #69413c;
  background: #291c1c;
  color: #ffc4bd;
}

[hidden] { display: none !important; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.build-label { color: #8593a2; }
footer code { color: #bac6d3; font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 820px) {
  header, main, footer { width: min(100% - 32px, 1120px); }
  .row { grid-template-columns: 90px 64px minmax(0, 1fr) 150px; }
  .row .what { grid-column: 1 / 4; grid-row: 2; }
  .row time { grid-column: 4; grid-row: 2; justify-self: end; }
  .row .ack-button, .row .acked { grid-column: 4; grid-row: 1; }
}

@media (max-width: 520px) {
  header { align-items: flex-start; padding-block: 28px 22px; }
  .live { margin-top: 3px; }
  main { padding-block: 18px 28px; }
  .row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 13px;
  }
  .row .id { grid-column: 1; grid-row: 1; }
  .row .sev { grid-column: 2; grid-row: 1; justify-self: end; }
  .row .what { grid-column: 1 / -1; grid-row: 2; }
  .row time { grid-column: 1; grid-row: 3; justify-self: start; white-space: normal; }
  .row .ack-button, .row .acked { grid-column: 2; grid-row: 3; }
  footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
