:root {
  --bg: #07080a;
  --card: #131519;
  --ink: #eceef2;
  --soft: rgba(236, 238, 242, 0.52);
  --line: rgba(236, 238, 242, 0.08);
  --accent: #7c9cff;
  --minus: #ff8f8f;
  --plus: #7fe0a2;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 0%, #14161b 0%, var(--bg) 62%);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 10px;
}

.al { position: relative; width: min(344px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px 0 0; border-radius: 26px; background: linear-gradient(180deg, #181b20, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 34px 60px -34px rgba(0, 0, 0, 0.95); overflow: hidden; }
.al__roll { display: block; overflow: hidden; }
.al__roll > span { display: block; white-space: nowrap; }

.al__head { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 16px; }
.al__title { font-size: 15.500px; font-weight: 720; font-stretch: 104%; letter-spacing: -0.005em; }
/* --live is tweened by the script: the accent while events arrive, grey while you read */
.al__live { --live: var(--accent); height: 20px; padding: 0 8px; border-radius: 10px; color: var(--live); box-shadow: inset 0 0 0 1px var(--live); font-size: 10.500px; line-height: 20px; font-weight: 720; letter-spacing: 0.02em; }
.al__count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--soft); white-space: nowrap; }

.al__chips { display: flex; gap: 6px; margin-top: 12px; padding: 0 16px; }
.al__chips button { height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: rgba(236, 238, 242, 0.06); color: var(--soft); font: inherit; font-size: 12.500px; font-weight: 660; cursor: pointer; outline: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color 0.25s, background-color 0.25s; }
.al__chips button > span { display: inline-block; }
.al__chips button[aria-pressed="true"] { background: var(--ink); color: #101216; }
.al__chips button:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

/* the rows are placed by the script, one under the other, so they can slide when the list changes */
.al__list { position: relative; height: min(236px, calc(100vh - 130px)); margin-top: 10px; list-style: none; border-top: 1px solid var(--line); background: var(--card); overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
.al__row { position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--card); overflow: hidden; }
.al__flash { position: absolute; inset: 0; background: var(--accent); opacity: 0; pointer-events: none; }
.al__top { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.al__top:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); border-radius: 10px; }
.al__who { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 10.500px; font-weight: 760; letter-spacing: 0.02em; }
.al__what { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.500px; font-weight: 520; color: var(--soft); }
.al__what b { font-weight: 700; color: var(--ink); }
.al__when { flex: none; min-width: 26px; text-align: right; font-size: 11px; font-weight: 600; color: rgba(236, 238, 242, 0.4); }
.al__chev { flex: none; width: 12px; height: 12px; fill: none; stroke: rgba(236, 238, 242, 0.4); stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.al__more { position: relative; display: grid; gap: 5px; padding: 0 16px 0 54px; font-size: 11.500px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.al__diff { display: flex; align-items: center; gap: 7px; height: 20px; }
.al__diff svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.al__from { padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--minus) 13%, transparent); color: var(--minus); line-height: 20px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--minus) 60%, transparent); }
.al__to { padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--plus) 13%, transparent); color: var(--plus); line-height: 20px; }
.al__meta { height: 16px; line-height: 16px; color: rgba(236, 238, 242, 0.4); }
.al__row::after { content: ""; position: absolute; left: 54px; right: 0; bottom: 0; height: 1px; background: var(--line); }

@media (hover: hover) {
  .al__chips button:hover { color: var(--ink); }
  .al__chips button[aria-pressed="true"]:hover { color: #101216; }
  .al__top:hover { background: rgba(236, 238, 242, 0.035); }
}

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #101216; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 5; }
