/* Delimitation vote result: this page's own classes. style.css and story.css stay as they are (Rule 14). */

.res-sample {
  position: sticky; top: 0; z-index: 20; margin: 0; padding: 8px 16px; text-align: center;
  background: var(--short); color: #FFFFFF; font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: 0.5px;
}

.story > .res-hero { max-width: 780px; font-family: var(--sans); margin-top: 24px; margin-bottom: 36px; }
.res-verdict { font-size: 15px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; text-align: center; margin: 0 0 10px; }
.res-verdict.is-pass { color: var(--spare); }
.res-verdict.is-block { color: var(--short); }

/* Three big numbers, NYT style */
.res-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0; }
.res-count { display: flex; flex-direction: column; }
.res-num { font-size: 48px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.res-word { font-size: 14px; font-weight: 700; margin-top: 4px; }
.res-yes .res-num, .res-yes .res-word { color: var(--for-text); }
.res-no .res-num, .res-no .res-word { color: var(--against); }
.res-away .res-num, .res-away .res-word { color: var(--meta); }
@media (min-width: 740px) { .res-num { font-size: 64px; } }

/* The bar, as on the vote story; the arrow under its label points at two-thirds */
.res-bar { margin-top: 40px; }
.res-bar .hero-need::before {
  content: ""; position: absolute; top: 14px; left: -7.5px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--ink);
}
.res-bar .hero-need-label { top: -12px; }
.res .hero-face img { object-position: 50% 0%; }

.res-chamber { width: 100%; max-width: 720px; height: auto; display: block; margin: 18px auto 0; }
.res-needle-label { font-family: var(--sans); font-size: 21px; font-weight: 800; fill: var(--ink); }
.res-side-label { font-family: var(--sans); font-size: 30px; font-weight: 800; }
.res-logo { margin-right: max(0px, calc((100% - 720px) / 2)); margin-bottom: 4px; }
.res-caption { font-size: 13px; line-height: 1.45; color: var(--meta); margin: 6px 0 0; }

/* The radar of MPs who decided it */
.res-radar { max-width: 640px; margin: 30px auto 36px; font-family: var(--sans); }
.story-body .res-radar p { font-family: var(--sans); }
.res-radar-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.story-body .res-radar .res-radar-sub { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.4; }
.res-group { border-top: 1px solid var(--rule); padding: 12px 0; }
.res-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.res-group-name { font-size: 16px; font-weight: 800; }
.res-group-mps { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.res-group-votes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.res-chip { font-size: 12px; font-weight: 700; border-radius: 12px; padding: 3px 9px; border: 1px solid #CCCCCC; background: #FFFFFF; }
.res-chip-yes { background: var(--for); border-color: var(--for); color: #FFFFFF; }
.res-chip-no { background: var(--against); border-color: var(--against); color: #FFFFFF; }
.res-chip-absent { background: #FFFFFF; border-color: var(--away); color: var(--ink-2); }
.res-chip-split { background: var(--purple); border-color: var(--purple); color: #FFFFFF; }
.res-chip-unknown { color: var(--meta); }
.res-flag { font-size: 12px; font-weight: 800; color: var(--short); }
.res-source { font-size: 12px; color: var(--meta); }
.story-body .res-radar .res-group-note { font-size: 13px; color: var(--ink-2); margin: 0 0 6px; line-height: 1.4; }
.res-faces { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.res-face { display: inline-flex; align-items: center; gap: 6px; }
.res-face img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #FFFFFF; border: 2px solid #FFFFFF; box-shadow: 0 0 0 2px var(--away); }
.res-ring-yes img { box-shadow: 0 0 0 2px var(--for); }
.res-ring-no img { box-shadow: 0 0 0 2px var(--against); }
.res-ring-unknown img { box-shadow: 0 0 0 2px #DDDDDD; }
.res-face-name { font-size: 13px; font-weight: 600; }

@media (max-width: 600px) {
  .res-side-label { font-size: 46px; }
  .res-needle-label { font-size: 36px; }
  .res .hero-face img { width: 40px; height: 40px; }
  .res .hero-face span { font-size: 12px; }
  .res .hero-need-label { font-size: 14px; }
  .res-logo { height: 34px; margin: 8px 0 0 auto; }
}

/* The NYT-style vote bar */
.res-unitbar { width: 100%; height: auto; display: block; margin: 8px 0 0; }
.res-unit-label { font-family: var(--sans); font-size: 22px; font-weight: 700; }
.res-unit-num { font-size: 40px; font-weight: 800; }
.res-unit-small { font-family: var(--sans); font-size: 15px; font-weight: 600; fill: var(--meta); }
.res-unit-need { font-family: var(--sans); font-size: 17px; font-weight: 800; fill: var(--ink); }
.res-unit-call { font-family: var(--sans); font-size: 17px; font-weight: 800; }
@media (max-width: 600px) {
  .res-unit-label { font-size: 34px; }
  .res-unit-num { font-size: 56px; }
  .res-unit-small { font-size: 26px; }
  .res-unit-need { font-size: 28px; }
  .res-unit-call { font-size: 28px; }
}

/* The dummy: a watermark across the result and the radar, so a screenshot cannot pass for the result */
.is-dummy .res-hero, .is-dummy .res-radar { position: relative; overflow: hidden; }   /* the rotated word stays inside */
.is-dummy .res-hero::after, .is-dummy .res-radar::after {
  content: "DUMMY · NOT THE RESULT"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: clamp(28px, 7vw, 64px); font-weight: 800; letter-spacing: 2px; color: rgba(179, 38, 30, 0.22);
  transform: rotate(-14deg); pointer-events: none; z-index: 5; text-align: center; white-space: normal; padding: 0 12px;
}

/* Never a sideways scroll on a phone, whatever a chart or a label does (web team, Dec 1, 2026). "clip" keeps the
   sticky banner working, where "hidden" would not */
html, body { overflow-x: clip; }

/* Seven months later: April against December */
.res-change { max-width: 640px; margin: 28px auto 32px; font-family: var(--sans); }
.res-change svg { width: 100%; height: auto; display: block; }
.story-body .res-change .res-change-sub { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.4; }
.res-change-when { font-family: var(--sans); font-size: 17px; font-weight: 800; fill: var(--ink); }
.res-change-in { font-family: var(--sans); font-size: 15px; font-weight: 800; fill: #FFFFFF; }
.res-change-verdict { font-family: var(--sans); font-size: 15px; font-weight: 800; }
.res-change-verdict.is-pass { fill: var(--spare); }
.res-change-verdict.is-block { fill: var(--short); }
.res-change figcaption { font-size: 12px; color: var(--meta); margin-top: 4px; }
.res-change figcaption a { color: var(--meta); }
@media (max-width: 600px) {
  .res-change-when { font-size: 30px; }
  .res-change-in, .res-change-verdict { font-size: 26px; }
}

/* story.css takes the spacing off any paragraph whose one element is a link (meant for a lone link); in this story
   most paragraphs carry one source link, so they keep normal spacing here */
.res .story-body p:has(> a:only-child) { margin: 1em 0; }


/* The chamber, step by step */
.res-chamber circle { transition: fill 0.45s ease; }
.res-chamber .res-final-only { transition: opacity 0.4s ease; }
.res-chamber.is-stepping .res-final-only { opacity: 0; }
.res-steps { max-width: 560px; margin: 4px auto 10px; text-align: center; font-family: var(--sans); min-height: 104px; }
.res-step-count { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.res-step-text { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.4; }
.res-step-text a { color: var(--ink-2); }
.res-step-group { color: #C8650A; }
.res-step-unnamed { color: #6E6B63; }
.res-step-nav { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; color: var(--meta); }
.res-step-nav button { font: inherit; font-weight: 700; color: var(--ink); background: #FFFFFF; border: 1px solid #CCCCCC; border-radius: 14px; padding: 4px 12px; cursor: pointer; }
.res-step-nav button:disabled { opacity: 0.35; cursor: default; }
@media (prefers-reduced-motion: reduce) { .res-chamber circle, .res-chamber .res-final-only { transition: none; } }

/* The bar's count-up */
.res-unitbar rect { transition: fill 0.12s linear; }
.res-unit-late { transition: opacity 0.5s ease; }
.res-unitbar.is-counting .res-unit-late { opacity: 0; transition: none; }
.res-unit-marker { transition: opacity 0.4s ease; }
.res-unitbar:not(.is-counting) .res-unit-marker { opacity: 0 !important; }
.res-unit-call.is-reached { fill: #2E7D5B; }
.res-bar-replay { font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); background: #FFFFFF; border: 1px solid #CCCCCC; border-radius: 12px; padding: 2px 10px; margin-left: 6px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .res-unitbar rect, .res-unit-late, .res-unit-marker { transition: none; } }
