:root {
  --ink: #17202a;
  --muted-ink: #5f6973;
  --paper: #fbfaf7;
  --paper-blue: #f3f7fb;
  --accent: #0d6efd;
  --accent-dark: #084298;
  --rule: rgba(23, 32, 42, 0.15);
  --truth: #b6410e;
  --guess: #6f42c1;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

.site-shell {
  background: var(--paper);
}

.site-header {
  position: relative;
  z-index: 10;
}

.narrative-section {
  background:
    radial-gradient(circle at 50% 42%, rgba(13, 110, 253, 0.08), transparent 42%),
    var(--paper);
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 82vh;
  min-height: 82svh;
  padding: clamp(4rem, 12vh, 8rem) max(1.25rem, env(safe-area-inset-left)) 2rem;
  scroll-margin-top: 1rem;
}

.statement-narrative {
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}

.expectation-narrative {
  background: var(--paper);
}

.narrative-copy {
  align-self: center;
  margin: 0 auto;
  max-width: 58rem;
  text-align: center;
  width: 100%;
}

.respondent-count {
  color: var(--accent-dark);
  font-size: clamp(5.5rem, 18vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.84;
  margin: 0 0 0.25em;
}

.respondent-description {
  font-size: clamp(2rem, 6.5vw, 4.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0.12em 0;
}

.intro-tease {
  opacity: 0.62;
}

.story-lead,
.story-emphasis {
  font-size: clamp(1.65rem, 4.5vw, 3.5rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.14;
  margin: 0 auto 1.5rem;
  max-width: 20ch;
}

.narrative-copy blockquote {
  border-left: 0;
  color: var(--accent-dark);
  font-size: clamp(2rem, 5.8vw, 4.5rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 1.25rem auto;
  max-width: 19ch;
}

.story-aside {
  color: var(--muted-ink);
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
}

.section-scroll-cue {
  align-items: center;
  color: var(--muted-ink);
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  gap: 0.1rem;
  justify-self: center;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
}

.section-scroll-cue:hover {
  color: var(--accent-dark);
}

.section-scroll-cue:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid rgba(13, 110, 253, 0.45);
  outline-offset: 3px;
}

.section-scroll-cue i {
  animation: cue-bob 1.8s ease-in-out infinite;
  font-size: 1.25rem;
}

.continue-after-answer {
  align-items: center;
  animation: gentle-bob 1.8s ease-in-out infinite;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  color: var(--muted-ink);
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  gap: 0.1rem;
  left: 50%;
  letter-spacing: 0.06em;
  position: absolute;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.continue-after-answer i {
  font-size: 1.25rem;
}

.question-section {
  align-items: center;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: 5rem 1.25rem;
}

.mean-section {
  background: var(--paper-blue);
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  position: relative;
}

.month-section {
  background: var(--paper);
}

.question-card {
  margin: 0 auto;
  max-width: 56rem;
  text-align: center;
  width: 100%;
}

.section-kicker {
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.question-card h1,
.question-card h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 auto 2.5rem;
  max-width: 22ch;
}

.slider-value {
  display: flex;
  flex-direction: column;
  margin: 1rem auto 2rem;
}

.slider-value-label {
  color: var(--muted-ink);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.slider-value output {
  color: var(--accent-dark);
  font-size: clamp(3.25rem, 9vw, 6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.slider-control {
  margin: 0 auto;
  max-width: 48rem;
}

.support-range {
  --range-position: 50%;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 0 var(--range-position), #cbd3dc var(--range-position) 100%);
  border-radius: 999px;
  cursor: pointer;
  height: 0.65rem;
  margin: 1.5rem 0 1.25rem;
  width: 100%;
}

.support-range::-webkit-slider-thumb {
  appearance: none;
  background: #fff;
  border: 4px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.28);
  height: 2rem;
  width: 2rem;
}

.support-range::-moz-range-thumb {
  background: #fff;
  border: 4px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.28);
  height: 1.5rem;
  width: 1.5rem;
}

.support-range:focus-visible {
  outline: 4px solid rgba(13, 110, 253, 0.3);
  outline-offset: 8px;
}

.scale-labels {
  display: grid;
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
  line-height: 1.2;
}

.scale-labels span {
  color: var(--muted-ink);
  display: flex;
  flex-direction: column;
}

.scale-labels span:first-child {
  text-align: left;
}

.scale-labels span:last-child {
  text-align: right;
}

.scale-labels strong {
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.control-instruction,
.submit-help {
  color: var(--muted-ink);
  margin: 2rem auto 0;
}

.continue-after-answer {
  display: none;
}

.mean-answered .continue-after-answer {
  display: flex;
}

.js .after-mean:not(.is-revealed) {
  display: none;
}

.date-range {
  color: var(--muted-ink);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  margin: 0 auto 1.25rem;
  max-width: 34rem;
}

.month-control {
  margin: 0 auto 2rem;
  max-width: 28rem;
  text-align: left;
}

.month-control label {
  font-weight: 650;
  margin-bottom: 0.5rem;
}

.month-control .form-select {
  border-color: #9aa6b2;
  min-height: 3.5rem;
}

.month-control .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
}

.submit-guesses {
  font-weight: 700;
  min-height: 3.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.submission-status {
  margin: 1.5rem auto 0;
  max-width: 36rem;
  text-align: left;
}

.results-section {
  background: #fff;
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 9vw, 8rem) 1.25rem;
  scroll-margin-top: 1rem;
}

.results-shell {
  margin: 0 auto;
  max-width: 74rem;
}

.results-header {
  margin: 0 auto 4rem;
  max-width: 48rem;
  text-align: center;
}

.results-header h2 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-bottom: 1.25rem;
}

.first-guess-note {
  color: var(--muted-ink);
  font-weight: 650;
  margin-bottom: 0;
}

.aggregate-total {
  color: var(--muted-ink);
}

.result-block {
  border-top: 1px solid var(--rule);
  padding: 4rem 0;
}

.result-block h3 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.result-summary {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  max-width: 54rem;
}

.chart-frame {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  max-width: 100%;
  overflow: hidden;
}

.results-chart {
  display: block;
  height: auto;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.results-chart .grid-line {
  stroke: #dfe4e9;
  stroke-width: 1;
}

.results-chart .axis-line {
  stroke: #69737d;
  stroke-width: 1.25;
}

.results-chart .axis-text {
  fill: #4f5963;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
}

.results-chart .axis-title {
  fill: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 650;
}

.results-chart .histogram-bar {
  fill: #86b7fe;
}

.results-chart .series-line {
  fill: none;
  stroke: var(--accent-dark);
  stroke-linejoin: round;
  stroke-width: 3;
}

.results-chart .series-point {
  fill: #fff;
  stroke: var(--accent-dark);
  stroke-width: 2;
}

.results-chart .truth-marker {
  fill: var(--truth);
  stroke: var(--truth);
}

.results-chart .guess-marker {
  fill: var(--guess);
  stroke: var(--guess);
}

.results-chart .marker-line {
  stroke-width: 3;
}

.results-chart .guess-marker.marker-line {
  stroke-dasharray: 7 5;
}

.results-chart .marker-label {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 750;
}

.results-chart .truth-label {
  fill: var(--truth);
}

.results-chart .guess-label {
  fill: var(--guess);
}

.other-guesses-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 3.5rem 0 1.25rem;
}

.supporting-data {
  background: var(--paper-blue);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  margin-top: 1rem;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.supporting-data h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.supporting-data p:last-child {
  margin-bottom: 0;
}

.results-meta {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
}

@keyframes gentle-bob {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 0.4rem);
  }
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.35rem);
  }
}

@media (max-width: 767.98px) {
  .site-header .nav {
    justify-content: center;
    width: 100%;
  }

  .narrative-section {
    min-height: 78vh;
    min-height: 78svh;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .question-section {
    padding: 4rem 1rem 6rem;
  }

  .scale-labels {
    gap: 0.35rem;
  }

  .scale-labels span:nth-child(2) {
    padding: 0 0.25rem;
  }
}

@media (max-width: 380px) {
  .respondent-count {
    font-size: 4.8rem;
  }

  .respondent-description {
    font-size: 1.8rem;
  }

  .scale-labels {
    font-size: 0.68rem;
  }
}

@media (max-height: 600px) {
  .narrative-section {
    min-height: 36rem;
    padding-top: 3rem;
  }

  .respondent-count {
    font-size: clamp(3.75rem, 18vh, 6rem);
    margin-bottom: 0.15em;
  }

  .respondent-description {
    font-size: clamp(1.5rem, 6vh, 2.5rem);
  }

  .story-lead,
  .story-emphasis {
    font-size: clamp(1.25rem, 5.2vh, 2rem);
    margin-bottom: 0.75rem;
  }

  .narrative-copy blockquote {
    font-size: clamp(1.5rem, 6.2vh, 2.5rem);
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
  }

  .story-aside {
    font-size: 1rem;
    margin-bottom: 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
