:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #f3f5f7;
  background: #111315;
  letter-spacing: 0;
  --line: #363d44;
  --muted: #aeb6bf;
  --accent: #35b77e;
  --accent-strong: #5cd69e;
  --orange: #e7a23b;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #111315; }
h1, h2, p { margin: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #171a1e;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { display: block; }
.eyebrow { color: var(--accent-strong); font-size: 11px; text-transform: uppercase; }
h1 { font-size: 20px; line-height: 1.2; }
.count {
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid #414950;
  border-radius: 5px;
  color: var(--muted);
  background: #24292e;
  font-size: 13px;
  text-align: center;
}

main { width: min(1040px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 56px; }
.intro { max-width: 700px; margin-bottom: 26px; }
.intro h2 { margin-top: 5px; font-size: clamp(25px, 4vw, 36px); }
.intro > p:last-child { margin-top: 10px; color: var(--muted); line-height: 1.55; }

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 10px;
}

.event-link {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #434b53;
  border-radius: 6px;
  color: #f5f7f8;
  background: #20252a;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.event-link:hover { border-color: var(--accent); background: #26352f; transform: translateY(-1px); }
.event-link:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.event-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #4e5b55;
  border-radius: 5px;
  color: var(--accent-strong);
  background: #192820;
  font-size: 20px;
  font-weight: 700;
}
.event-copy { min-width: 0; }
.event-name { display: block; overflow-wrap: anywhere; font-size: 16px; }
.event-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.event-arrow { color: var(--orange); font-size: 22px; }

.empty-state {
  display: grid;
  gap: 7px;
  padding: 22px;
  border: 1px dashed #4b545d;
  border-radius: 6px;
  color: var(--muted);
  background: #171a1e;
}
.empty-state strong { color: #f3f5f7; }
.empty-state.error { border-color: #8c4848; }
code { color: var(--orange); }
footer { padding: 18px; border-top: 1px solid var(--line); color: #7f8992; text-align: center; font-size: 12px; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .count { min-width: 0; }
  main { width: min(100% - 24px, 1040px); padding-top: 28px; }
  .event-list { grid-template-columns: 1fr; }
}
