.results-page {
  --results-ink: #111715;
  --results-muted: #59635f;
  --results-line: #d9dedb;
  --results-green: #0e5d43;
  --tier-1: #f0e442;
  --tier-2: #56b4e9;
  --tier-3: #009e73;
  --tier-4: #0072b2;
  --tier-5: #cc79a7;
  color: var(--results-ink);
}

.private-warning {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  border: 2px solid #8a6d00;
  background: #fff3cd;
  color: #4f3d00;
}

.chart-column .chart-bar {
  background: var(--analysis-tier);
  color: var(--analysis-label);
}

.results-page h3,
.results-page h4 {
  line-height: 1.2;
}

.results-page h3 {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.results-page h4 {
  margin: 2rem 0 .35rem;
  font-size: 1.08rem;
}

.season-browser {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .8rem;
  border: 1px solid #bfd1c8;
  background: #e7f2ec;
}

.season-browser-heading {
  display: grid;
  gap: .12rem;
}

.season-browser-heading strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.season-browser-heading small {
  color: var(--results-muted);
  font-size: .72rem;
  line-height: 1.3;
}

.edition-strip {
  display: flex;
  min-width: 0;
  gap: .35rem;
  overflow-x: auto;
  padding: .2rem .1rem .45rem;
  scrollbar-color: #8a9f95 transparent;
}

.edition-strip a,
.edition-strip span {
  flex: 0 0 auto;
  padding: .48rem .72rem;
  border: 1px solid #b7c5be;
  border-radius: 99px;
  background: #f8fbf9;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.edition-strip a[aria-current="page"] {
  border-color: var(--results-green);
  background: var(--results-green);
  color: white;
}

.edition-strip span[aria-disabled="true"] {
  color: #758079;
  cursor: not-allowed;
}

.season-ballot-link {
  padding: .62rem .85rem;
  border: 2px solid var(--results-green);
  color: var(--results-green);
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.season-ballot-link:hover {
  background: var(--results-green);
  color: white;
}

.results-figure {
  margin: 0;
  border: 1px solid var(--results-line);
  background: #fff;
  box-shadow: 0 22px 64px rgb(32 45 39 / 12%);
}

.published-hero-chart {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.chart-heading-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: stretch;
  border-bottom: 1px solid var(--results-line);
}

.chart-heading-block > div:first-child {
  padding: clamp(1.4rem, 4vw, 3rem);
}

.preview-badge {
  display: inline-block;
  margin-bottom: .55rem;
  padding: .32rem .55rem;
  background: #fff4cf;
  color: #6a4b05;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.chart-heading-block h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.1rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: .015em;
  line-height: .95;
  text-transform: uppercase;
}

.chart-heading-block p {
  margin: .55rem 0 0;
  color: #343b38;
  font-family: "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.2rem, 3.2vw, 2.5rem);
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
}

.chart-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem;
  background: #161b19;
  color: white;
  text-align: center;
  text-transform: uppercase;
}

.chart-date span {
  color: #cfd5d2;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.chart-date strong {
  margin-top: .35rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: .05em;
  line-height: .95;
}

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.15rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--results-line);
  font-size: .76rem;
  font-weight: 800;
}

.tier-legend span {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}

.tier-swatch {
  width: 1.4rem;
  height: .65rem;
  border: 1px solid rgb(0 0 0 / 22%);
}

.tier-swatch.tier-1,
.chart-column.tier-1 .chart-bar { background: var(--tier-1); }
.tier-swatch.tier-2,
.chart-column.tier-2 .chart-bar { background: var(--tier-2); }
.tier-swatch.tier-3,
.chart-column.tier-3 .chart-bar { background: var(--tier-3); }
.tier-swatch.tier-4,
.chart-column.tier-4 .chart-bar { background: var(--tier-4); }
.tier-swatch.tier-5,
.chart-column.tier-5 .chart-bar { background: var(--tier-5); }

.chart-column.tier-3 .chart-bar,
.chart-column.tier-4 .chart-bar {
  color: white;
}

.chart-scroll {
  max-width: 100%;
  overflow-x: auto;
  background: white;
}

.chart-scroll:focus-visible,
.table-scroll:focus-visible,
.edition-strip a:focus-visible,
.season-ballot-link:focus-visible {
  outline: 3px solid #4a9ddd;
  outline-offset: 2px;
}

.chart-canvas {
  position: relative;
  min-width: 1100px;
  height: 690px;
  padding: 35px 30px 68px 78px;
  background: #fff;
}

.chart-plot {
  position: relative;
  height: 555px;
  border-bottom: 2px solid #1e2421;
}

.chart-gridline {
  position: absolute;
  right: 0;
  bottom: var(--tick-position);
  left: 0;
  border-top: 1px solid #e1e4e2;
}

.chart-gridline span {
  position: absolute;
  right: calc(100% + 10px);
  top: -.65rem;
  width: 42px;
  color: var(--results-muted);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.average-line {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 12.5%;
  left: 0;
  border-top: 2px solid #3c4541;
  pointer-events: none;
}

.average-line span {
  position: absolute;
  right: 0;
  bottom: .35rem;
  padding: .2rem .38rem;
  background: rgb(255 255 255 / 90%);
  color: #222825;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chart-bars {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(30, minmax(25px, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-column {
  position: relative;
  min-width: 0;
}

.chart-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  height: var(--bar-height);
  min-height: 24px;
  border: 1px solid rgb(0 0 0 / 28%);
  color: #101513;
}

.chart-bar span {
  display: block;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: .3rem 1px;
  font-size: .61rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.chart-logo {
  position: absolute;
  z-index: 4;
  bottom: calc(var(--logo-height, var(--bar-height)) + 7px);
  left: 50%;
  width: 30px;
  height: 30px;
  padding: 2px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 22%));
  transform: translateX(-50%);
}

.chart-rank {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.axis-title {
  color: #303834;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.axis-title-y {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left top;
}

.axis-title-x {
  position: absolute;
  right: 30px;
  bottom: 16px;
  left: 78px;
  text-align: center;
}

.chart-caveat {
  margin: 0;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--results-line);
  background: #fff8e8;
  color: #51451f;
  font-size: .84rem;
}

.results-story {
  max-width: 1040px;
  margin: clamp(2.5rem, 7vw, 6rem) auto 0;
}

.story-header {
  max-width: 880px;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--results-line);
}

.story-header h2 {
  margin: .45rem 0 1rem;
  font-size: clamp(2.25rem, 6vw, 4.7rem);
  letter-spacing: -.035em;
}

.story-deck {
  max-width: 760px;
  color: #34413b;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.story-byline {
  color: var(--results-muted);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.poll-specs {
  margin: 2.5rem 0;
  padding: clamp(1.2rem, 4vw, 2.2rem);
  border-left: 5px solid var(--results-green);
  background: #eaf3ee;
}

.poll-specs h3 {
  font-size: 1.45rem;
}

.poll-specs dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #c9d8d0;
}

.poll-specs dl div {
  padding: 1rem;
  background: #f8fcfa;
}

.poll-specs dd {
  font-size: .95rem;
}

.analysis-diagnostics {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--results-line);
}

.diagnostic-verdict {
  margin: 1.25rem 0;
  padding: .9rem 1rem;
  border-left: 5px solid #9a6712;
  background: #fff3cd;
}

.diagnostic-verdict.is-pass {
  border-color: #08734e;
  background: #e3f4ec;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.diagnostic-grid article {
  padding: 1rem;
  border: 1px solid var(--results-line);
  background: #fbfcfb;
}

.diagnostic-grid article h4 {
  margin: 0 0 .8rem;
}

.diagnostic-grid dl {
  margin: 0;
}

.diagnostic-grid dl div,
.diagnostic-list li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .45rem 0;
  border-bottom: 1px solid #e2e7e4;
}

.diagnostic-grid dt {
  color: var(--results-muted);
}

.diagnostic-grid dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.diagnostic-wide {
  grid-column: 1 / -1;
}

.diagnostic-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagnostic-note {
  color: var(--results-muted);
  font-size: .78rem;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.story-body > section + section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--results-line);
}

.story-body p {
  color: #29332e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.72;
}

.story-aside {
  position: sticky;
  top: 1rem;
  padding: 1.25rem;
  border-top: 5px solid var(--results-green);
  background: white;
  box-shadow: 0 12px 36px rgb(36 50 43 / 10%);
}

.story-aside h3 {
  font-size: 1.3rem;
}

.story-aside p {
  color: #3f4a45;
  font-size: .88rem;
}

.results-table-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--results-line);
}

.section-heading-row {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
}

.section-heading-row h3 {
  margin: .25rem 0 0;
}

.section-heading-row > p {
  max-width: 360px;
  color: var(--results-muted);
  font-size: .82rem;
  text-align: right;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 1.2rem;
}

.results-table-section table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
  font-variant-numeric: tabular-nums;
}

.results-table-section th,
.results-table-section td {
  padding: .72rem .85rem;
  border-bottom: 1px solid var(--results-line);
  text-align: left;
}

.results-table-section thead th {
  background: #15231d;
  color: white;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.results-table-section tbody tr:nth-child(even) {
  background: #f3f5f3;
}

.table-team {
  display: inline-flex;
  gap: .7rem;
  align-items: center;
}

.table-team img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.rank-difference {
  display: inline-block;
  min-width: 2.2rem;
  font-weight: 900;
  text-align: center;
}

.rank-difference.is-up {
  color: #0d6a48;
}

.rank-difference.is-down {
  color: #a53c37;
}

.rank-difference.is-same,
.rank-difference.is-unranked {
  color: var(--results-muted);
}

@media (max-width: 980px) {
  .season-browser {
    grid-template-columns: 1fr;
  }

  .season-ballot-link {
    justify-self: start;
  }

  .poll-specs dl {
    grid-template-columns: 1fr 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-aside {
    position: static;
  }
}

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

  .diagnostic-wide {
    grid-column: auto;
  }

  .chart-heading-block {
    grid-template-columns: 1fr;
  }

  .chart-date {
    flex-direction: row;
    gap: .65rem;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }

  .chart-date strong {
    font-size: 1.35rem;
  }

  .poll-specs dl {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    display: block;
  }

  .section-heading-row > p {
    text-align: left;
  }
}

@media print {
  .season-browser,
  .site-header,
  .site-footer {
    display: none;
  }

  .results-figure {
    box-shadow: none;
  }

  .chart-scroll {
    overflow: visible;
  }

  .chart-canvas {
    min-width: 0;
  }
}
