:root {
  color-scheme: dark;
  --ev-bg: #000;
  --ev-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  --ev-text: #ffffff;
  --ev-muted: #d9e2ee;
  --ev-soft: #eef4fb;
  --ev-line: rgba(255, 255, 255, 0.18);
  --ev-line-strong: rgba(255, 255, 255, 0.34);
  --ev-warning: #dfc67e;
  --ev-error: #d79a9a;
  --ev-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --ev-sans: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ev-bg);
  color: var(--ev-text);
}

body {
  font-family: var(--ev-sans);
  line-height: 1.25;
  letter-spacing: 0;
}

.events-shell {
  width: min(1560px, 100% - 18px);
  margin: 0 auto;
  padding: 10px 0 16px;
}

.events-header {
  border-bottom: 1px solid var(--ev-line-strong);
  padding-bottom: 10px;
}

.kicker {
  margin: 0;
  font-family: var(--ev-mono);
  color: var(--ev-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

h1,
h2,
p { margin: 0; }

h1 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.header-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.last-updated {
  color: var(--ev-soft);
  font-family: var(--ev-mono);
  font-size: 11px;
}

.cursor {
  width: 6px;
  height: 11px;
  background: var(--ev-text);
  animation: cursor-blink 1.1s steps(1, end) infinite;
}

@keyframes cursor-blink {
  0%,
  49% { opacity: 1; }
  50%,
  100% { opacity: 0; }
}

.purpose {
  margin-top: 4px;
  color: var(--ev-soft);
  font-family: var(--ev-mono);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls {
  margin-top: 8px;
}

.refresh-btn {
  border: 1px solid var(--ev-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ev-text);
  font-family: var(--ev-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 9px;
  cursor: pointer;
}

.refresh-btn:hover,
.refresh-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.page-status {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ev-soft);
  font-family: var(--ev-mono);
}

.page-status.is-partial,
.page-status.is-stale { color: var(--ev-warning); }

.page-status.is-error { color: var(--ev-error); }

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.events-section {
  padding: 12px;
  border: 1px solid var(--ev-line);
  background: var(--ev-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.events-section--wide {
  grid-column: 1 / -1;
}

.section-head {
  margin-bottom: 4px;
}

h2 {
  font-size: 11px;
  letter-spacing: 0.11em;
  font-family: var(--ev-mono);
  font-weight: 600;
  color: var(--ev-soft);
}

.section-note {
  margin-bottom: 8px;
  color: var(--ev-muted);
  font-size: 11px;
  font-family: var(--ev-mono);
}

.event-list {
  border-top: 1px solid var(--ev-line);
}

.event-row {
  padding: 5px 0;
  border-bottom: 1px solid var(--ev-line);
}

.event-line {
  font-family: var(--ev-mono);
  font-size: 12px;
  color: var(--ev-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  text-shadow: 0 0 0 transparent;
}

.event-link {
  color: inherit;
  text-decoration: none;
  display: block;
  white-space: inherit;
  overflow: inherit;
  text-overflow: inherit;
}

.event-link:hover,
.event-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.empty-state {
  padding: 8px 0;
  color: var(--ev-muted);
  font-size: 11px;
  font-family: var(--ev-mono);
}

.events-footer {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--ev-line-strong);
  color: var(--ev-soft);
  font-size: 11px;
  font-family: var(--ev-mono);
  display: grid;
  gap: 4px;
}

.disclaimer { display: none; }

@media (max-width: 959px) {
  .events-grid {
    grid-template-columns: 1fr;
  }

  .events-section--wide {
    grid-column: auto;
  }
}

@media (max-width: 759px) {
  .events-shell {
    width: min(100% - 12px, 100%);
    padding-top: 8px;
  }

  h1 {
    font-size: 20px;
  }

  .event-line,
  .event-link {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
}
