@property --split {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

:root {
  --page: #0b0a10;
  --ink: #f3f1f8;
  --mute: #8d899e;
  --faint: #5c586c;
  --rule: rgba(255, 255, 255, 0.08);

  /* Vybe: navy night, purple pins, the icon's purple-to-coral fill */
  --vybe-bg: #120d26;
  --vybe-streets: #7a5ff0;
  --vybe: #a98bff;
  --vybe-fill: linear-gradient(170deg, #8a72ff 0%, #c86bd0 52%, #ff8f72 100%);

  /* Vyb: black, grey-blue streets, the lime full stop */
  --vyb-bg: #0c0c10;
  --vyb-streets: #8e98ad;
  --vyb: #c6f03a;

  --display: "Poppins", system-ui, sans-serif;
  --body: "Geist", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* Each app's colours, picked up by whatever sits on its side */
.t-vybe { --bg: var(--vybe-bg); --streets: var(--vybe-streets); --accent: var(--vybe); }
.t-vyb { --bg: var(--vyb-bg); --streets: var(--vyb-streets); --accent: var(--vyb); }

/* ---------- wordmarks ---------- */
.wm { display: inline-block; white-space: nowrap; line-height: 1; }
.wm-vybe {
  font-family: "Nunito", var(--display);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--vybe-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wm-vybe .e { display: inline-block; background: inherit; -webkit-background-clip: text; background-clip: text; }
.wm-vyb {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}
.wm-vyb .dot { display: inline-block; color: var(--vyb); }

/* ---------- hero ---------- */
.hero {
  --hh: max(100svh, 680px);
  position: relative;
  min-height: max(100svh, 680px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
  transition: --split 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero.dragging { transition: none; }

.side { position: absolute; inset: 0; z-index: -2; background: var(--bg); }
.side-l { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.side-r { clip-path: inset(0 0 0 var(--split)); }

.map {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, calc(var(--hh) * 1.1552));
  aspect-ratio: 1600 / 1385;
  transform: translate(-50%, -50%);
}
.streets {
  position: absolute;
  inset: 0;
  background: var(--streets);
  -webkit-mask: url(/map.svg) center / 100% 100% no-repeat;
  mask: url(/map.svg) center / 100% 100% no-repeat;
}

/* Pins and streets thin out behind the score so the type stays clean */
.side .map { --fade: radial-gradient(ellipse 34% 40% at 50% 50%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.18) 55%, #000 100%); }
.side .streets {
  -webkit-mask: url(/map.svg) center / 100% 100% no-repeat, var(--fade);
  -webkit-mask-composite: source-in;
  mask: url(/map.svg) center / 100% 100% no-repeat intersect, var(--fade);
}
.pins { position: absolute; inset: 0; -webkit-mask: var(--fade); mask: var(--fade); }
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: default;
}
/* Vybe draws venues as ringed counters */
.t-vybe .pin {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1b1440;
  border: 2px solid #8b5cf6;
  opacity: 0.72;
}
.t-vybe .pin::after {
  content: attr(data-n);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 600 11px/1 var(--body);
  color: #fff;
}
.t-vybe .pin.club { border-color: #ff8f72; }
/* Vyb draws them as small coloured dots, clubs as a lime tile */
.t-vyb .pin {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--vyb-bg);
  background: var(--c, #9b7bff);
  opacity: 0.8;
}
.t-vyb .pin.c0 { --c: #c6f03a; }
.t-vyb .pin.c1 { --c: #9b7bff; }
.t-vyb .pin.c2 { --c: #5fd3e8; }
.t-vyb .pin.club {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--vyb);
  border: 0;
}
.t-vyb .pin.club::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--vyb-bg);
  transform: translate(-50%, -50%);
}
.pin:hover { opacity: 1; z-index: 2; }

.pin-name {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(10, 9, 16, 0.92);
  font: 500 13px/1.2 var(--body);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 18px));
  transition: opacity 0.15s;
}
.pin-name.on { opacity: 1; }

.split-line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--split);
  width: 28px;
  margin-left: -14px;
  z-index: 3;
  cursor: ew-resize;
  touch-action: none;
}
.split-line::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.34);
}

.top, .intro, .poster, .foot { position: relative; z-index: 4; pointer-events: none; }
.top a, .foot a { pointer-events: auto; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 18px 28px 0;
}
.vote { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.vote-q { font: 500 14px/1.3 var(--body); margin-right: 6px; }
.vote-q small { display: block; font-size: 12px; color: var(--mute); font-weight: 400; }
.vote-bs { display: flex; gap: 8px; }
.vote-b {
  appearance: none;
  border: 0;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, opacity 0.15s;
}
.vote-b .wm { font-size: 21px; }
.vote-b:hover { background: rgba(255, 255, 255, 0.15); }
.vote-b:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vote-b:disabled { cursor: wait; }
.vote-b.t-vybe[aria-pressed="true"] { background: #33237a; }
.vote-b.t-vyb[aria-pressed="true"] { background: #34421a; }
.vote.voted .vote-b[aria-pressed="false"] { opacity: 0.5; }
.vote.voted .vote-b[aria-pressed="false"]:hover { opacity: 1; }
.clock {
  margin: 0;
  display: flex;
  gap: 18px;
  font: 500 13px/1.4 var(--body);
  color: var(--mute);
}
.clock span:first-child { color: var(--ink); }

.intro {
  margin: 28px auto 0;
  max-width: 660px;
  padding: 0 24px;
  text-align: center;
  font-size: 17px;
  line-height: 1.5;
  color: #d9d5e6;
  text-wrap: balance;
}

.poster {
  margin: 0;
  align-self: center;
  display: grid;
  grid-template-columns: var(--split) 1fr;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}
.corner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 0;
}
.corner-l { align-items: flex-end; text-align: right; padding-right: clamp(28px, 4.5vw, 72px); }
.corner-r { align-items: flex-start; text-align: left; padding-left: clamp(28px, 4.5vw, 72px); }
.corner .icon {
  width: clamp(48px, 5vw, 68px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 23%;
  display: block;
}
.corner .wm { font-size: clamp(46px, 8.4vw, 124px); pointer-events: auto; }
.corner .score {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(104px, 17vw, 250px);
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: var(--accent);
  margin-top: 6px;
}
.corner .sub {
  font: 500 14px/1.4 var(--body);
  color: var(--mute);
  max-width: 220px;
}
.corner .sub b { color: var(--ink); font-weight: 600; }

.vs {
  position: absolute;
  left: var(--split);
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 0;
  width: 44px;
  text-align: center;
  font: 600 15px/1 var(--body);
  color: var(--mute);
  background: linear-gradient(90deg, var(--l-bg) 50%, var(--r-bg) 50%);
}

.foot {
  padding: 0 24px 34px;
  text-align: center;
}
.verdict {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.45;
  text-wrap: balance;
}
.order-note {
  margin: 10px auto 0;
  max-width: 600px;
  font-size: 13px;
  color: var(--mute);
  text-wrap: balance;
}

/* ---------- sections ---------- */
.block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 24px 0;
}
.block-head { max-width: 640px; margin-bottom: 44px; }
.block-head h2 {
  margin: 0;
  font: 800 clamp(34px, 5vw, 58px)/1 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.block-head p { margin: 14px 0 0; color: var(--mute); text-wrap: pretty; }

/* scorecard */
.board-head, .round, .board-total {
  display: grid;
  grid-template-columns: minmax(96px, 170px) 1fr minmax(96px, 170px);
  align-items: center;
  column-gap: clamp(14px, 3vw, 40px);
}
.board-head { padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.board-head .l { justify-self: end; }
.board-head .wm { font-size: 34px; }
.board-head .mid { text-align: center; font-size: 13px; color: var(--mute); }

.round { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.round .v { font: 600 clamp(20px, 2.6vw, 30px)/1.1 var(--body); font-variant-numeric: tabular-nums; color: var(--faint); }
.round .v.win { color: var(--accent); }
.round .v.tie { color: var(--ink); }
.round .l { text-align: right; }
.round .delta { display: block; margin-top: 6px; font: 400 12px/1.3 var(--body); color: var(--mute); }
.round .delta.up { color: #b9e6a0; }
.round .delta.down { color: #ff9b8f; }
.round .mid { text-align: center; }
.round .name { font-weight: 600; font-size: 16px; }
.round .note { font-size: 13px; color: var(--mute); margin-top: 2px; }
.round .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 12px; }
.round .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; display: flex; }
.round .bar:first-child { justify-content: flex-end; }
.round .bar i { display: block; height: 100%; border-radius: 3px; background: #3a3746; transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.round .bar.win i { background: var(--accent); }
.round .pending { font-size: 13px; color: var(--mute); }

.board-total { padding-top: 22px; }
.board-total .l { text-align: right; }
.board-total .s { font: 800 44px/1 var(--display); color: var(--accent); letter-spacing: -0.03em; }
.board-total .mid { text-align: center; color: var(--mute); font-size: 14px; }

/* chart */
.switch { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-bottom: 22px; }
.switch button {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 0;
  font: 500 15px/1.3 var(--body);
  color: var(--mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.switch button:hover { color: var(--ink); }
.switch button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.chart { position: relative; height: 340px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: rgba(255, 255, 255, 0.06); }
.chart .axis text { fill: var(--faint); font: 400 12px var(--body); }
.chart .now line { stroke: rgba(255, 255, 255, 0.28); stroke-dasharray: 3 4; }
.chart .now text { fill: var(--mute); font: 500 12px var(--body); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .end text { font: 600 13px var(--body); font-variant-numeric: tabular-nums; }
.chart .hover line { stroke: rgba(255, 255, 255, 0.3); }
.tip {
  position: absolute;
  top: 0;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1a1824;
  font: 400 13px/1.5 var(--body);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* tale of the tape */
.tape { width: 100%; border-collapse: collapse; }
.tape th, .tape td { padding: 16px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.tape th:first-child, .tape td:first-child { padding-left: 0; }
.tape thead th { padding-bottom: 18px; }
.tape thead .wm { font-size: 30px; }
.tape tbody th { width: 26%; font-weight: 500; color: var(--mute); }
.tape td { width: 37%; }
.tape td small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }

/* pros and cons */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.side-col .wm { font-size: 44px; }
.side-col .who { margin: 10px 0 0; color: var(--mute); font-size: 14px; }
.side-col h3 { margin: 32px 0 6px; font: 700 15px/1.3 var(--display); color: var(--mute); }
.side-col ul { list-style: none; margin: 0; padding: 0; }
.side-col li { position: relative; padding: 12px 0 12px 26px; border-bottom: 1px solid var(--rule); }
.side-col li::before { position: absolute; left: 0; top: 12px; font-weight: 600; }
.side-col .pros li::before { content: "+"; color: var(--accent); }
.side-col .cons li::before { content: "\2212"; color: var(--faint); }

/* timeline */
.story { list-style: none; margin: 0; padding: 0; }
.story li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.story time { font: 700 16px/1.5 var(--display); color: var(--ink); }
.story .who { font-weight: 600; }
.story .who.t-vybe, .story .who.t-vyb { color: var(--accent); }
.story q { color: #e4e0ef; }
.story p { margin: 0; max-width: 680px; }
.story .aside { color: var(--mute); }

.footer {
  max-width: 1120px;
  margin: 120px auto 0;
  padding: 32px 24px 56px;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 14px;
}
.footer p { max-width: 760px; margin: 0 0 12px; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .top { flex-direction: column; padding: 16px 16px 0; gap: 14px; }
  .clock { flex-direction: column; align-items: center; gap: 0; }
  .vote { flex-direction: column; gap: 8px; text-align: center; }
  .vote-q { margin: 0; }
  .intro { font-size: 15px; margin-top: 18px; }
  .intro br { display: none; }
  .corner { gap: 10px; }
  .corner-l { padding-right: 22px; }
  .corner-r { padding-left: 22px; }
  .corner .sub { font-size: 12px; max-width: 150px; }
  .vs { width: 34px; font-size: 13px; }
  .t-vybe .pin { width: 20px; height: 20px; }
  .t-vybe .pin::after { font-size: 9px; }
  .block { padding-top: 88px; }
  .round, .board-head {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "mid mid" "l r";
    row-gap: 10px;
  }
  .round .mid { grid-area: mid; }
  .round .v.l, .board-head .l { grid-area: l; justify-self: start; text-align: left; }
  .round .v.r, .board-head > :last-child { grid-area: r; justify-self: end; text-align: right; }
  .board-head .mid { display: none; }
  .board-head .wm { font-size: 26px; }
  .round .bars { margin-top: 10px; }
  .board-total { grid-template-columns: auto 1fr auto; }
  .board-total .s { font-size: 34px; }
  .chart { height: 260px; }
  .tape thead .wm { font-size: 22px; }
  .tape th, .tape td { padding: 12px 8px; font-size: 14px; }
  .tape tbody th { width: 30%; }
  .sides { grid-template-columns: 1fr; gap: 56px; }
  .story li { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .round .bar i { transition: none; }
}
