/* The blind comparison card of Pairwise, a made-up model evaluation app, on a soft warm page. The two columns sit in a
   flex row with a thin seam between them; their widths are set by the script so the loser can fold away. The answers
   are written word by word into spans that already hold their place, so nothing reflows while they appear. */
:root {
  --paper: #f3f2ee;        /* the soft page */
  --card: #fdfdfb;         /* the card */
  --ink: #16181d;          /* titles and answers */
  --muted: #8c8f96;        /* small print, words still faint */
  --line: #e5e4df;         /* hairlines and the seam */
  --well: #f4f3ef;         /* the vote track and the question */
  --accent: #0f7a63;       /* the single accent: the chosen vote, the name block, the caret */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: radial-gradient(120% 90% at 50% 0%, #f9f8f5 0%, var(--paper) 62%);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.stage {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 2vh 10px;
}

.arena {
  position: relative;
  width: min(660px, 94vw);
  font-size: clamp(9.6px, min(2.15vw, 2.45vh), 14.5px);
  background: var(--card);
  border-radius: 1.5em;
  padding: 1.35em 1.4em 1.3em;
  box-shadow:
    0 0 0 1px rgba(22, 24, 29, 0.06),
    0 1px 2px rgba(22, 24, 29, 0.05),
    0 8px 24px -10px rgba(22, 24, 29, 0.14),
    0 30px 60px -28px rgba(22, 24, 29, 0.22);
}
.arena::before {          /* a thread of light on the top edge */
  content: "";
  position: absolute;
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
}

.arena__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 620;
  font-size: 1.02em;
  letter-spacing: -0.01em;
}
.brand__mark { width: 1.15em; height: 1.15em; fill: var(--ink); }
.tally { display: flex; align-items: baseline; gap: 0.5em; font-size: 0.86em; color: var(--muted); }
.tally .roll { color: var(--ink); font-size: 1.02em; }

.question {
  margin-top: 1em;
  display: flex;
  align-items: center;
  gap: 0.7em;
  background: var(--well);
  border-radius: 0.9em;
  padding: 0.65em 0.85em;
}
.question__tag {
  flex: none;
  display: grid;
  place-items: center;
  height: 1.9em;
  padding: 0 0.6em;
  border-radius: 99px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 0.78em;
  color: var(--muted);
  line-height: 1;
}
.question__text { font-size: 1.04em; font-weight: 560; letter-spacing: -0.01em; line-height: 1.3; }

.cols {
  position: relative;
  margin-top: 1.05em;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.col {
  flex: none;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  height: 2.2em;
  white-space: nowrap;
}
.col__stat { font-size: 0.78em; color: var(--muted); opacity: 0; }
.chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 2.1em;
  padding: 0 0.8em;
  border-radius: 99px;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  font-size: 0.84em;
  font-weight: 600;
  line-height: 1;
}
.chip__text { grid-area: 1 / 1; }
.chip__block {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.chip.is-known { background: color-mix(in srgb, var(--accent) 10%, var(--card)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, var(--card)); color: var(--accent); }

.col__body { margin-top: 0.75em; }
.answer {
  font-size: 1em;
  line-height: 1.52;
  color: var(--ink);
  letter-spacing: -0.003em;
}
.answer .w { opacity: 0; display: inline-block; white-space: pre; }
.answer .w.is-on { opacity: 1; }
.caret {
  left: 0;
  top: 0;
  position: absolute;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
}

.seam { flex: none; width: 24px; align-self: stretch; overflow: visible; }
.seam path { fill: none; stroke: var(--line); stroke-width: 1.2; vector-effect: non-scaling-stroke; }

.full {
  position: absolute;
  left: 0;
  right: 0;
  top: 2.95em;
  opacity: 0;
  pointer-events: none;
}

.vote {
  position: relative;
  margin-top: 1.15em;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--well);
  border-radius: 0.95em;
  padding: 0.25em;
}
.vote__pill {
  position: absolute;
  top: 0.25em;
  bottom: 0.25em;
  left: 0;
  width: 0;
  border-radius: 0.75em;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(22, 24, 29, 0.06), 0 2px 6px -2px rgba(22, 24, 29, 0.18);
  opacity: 0;
}
.choice {
  position: relative;
  display: grid;
  place-items: center;
  height: 2.6em;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9em;
  font-weight: 560;
  font-variation-settings: "wdth" 100;
  color: var(--muted);
  border-radius: 0.75em;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: color 0.2s, font-variation-settings 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.choice[aria-checked="true"] { color: var(--accent); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) {
  .choice:hover { color: var(--ink); font-variation-settings: "wdth" 112; }
  .choice[aria-checked="true"]:hover { color: var(--accent); }
}
.vote.is-locked .choice { pointer-events: none; }

.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5em;
  height: 1.5em;
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 1.1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 460px) {
  .tally__label { display: none; }
  .col__stat { display: none; }
  .seam { width: 14px; }
  .arena { padding: 1.2em 1.1em 1.1em; }
}

.roll { display: inline-flex; align-items: baseline; }
.d { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; vertical-align: bottom; }
.d__s { display: block; }
