/* Layout: one narrow column on a shop-counter ground; each question is a
   manila price tag with a string hole, the price stamped in price-gun ink. */
:root {
  --counter: #d5ddd6;        /* page ground: painted shop counter */
  --counter-line: #c3cdc5;
  --fg: #1f2a26;             /* text on the counter */
  --muted: #56645e;
  --tag: #efdfb6;            /* manila tag stock, same in both themes */
  --tag-edge: #d6c393;
  --tag-ink: #2b2519;        /* pencil and print on the tag */
  --tag-muted: #6f634a;
  --stamp: #4a3c99;          /* price-gun violet */
  --stamp-soft: rgba(74, 60, 153, 0.12);
  --string: #9c7b4f;
  --good: #2f7a4b;           /* score bands: green, yellow, orange, red */
  --ok: #b38a0a;
  --warn: #cf6a1d;
  --bad: #b03a2e;
  --register-bg: #24211b;    /* the register's readout window, same in both themes */
  --register-fg: #f6e9c2;
  --field: #fbf4e0;
  --mark: #4a3c99;           /* wordmark accent and focus ring on the counter */
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 8px 18px -10px rgba(25, 35, 30, 0.45);

  --font-display: "Alfa Slab One", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-stamp: "Special Elite", "Courier New", Courier, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.4rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --counter: #18211e;
    --counter-line: #222d29;
    --fg: #e4ebe6;
    --muted: #9aa8a1;
    --tag: #e3d1a3;
    --tag-edge: #b9a674;
    --stamp: #4a3c99;
    --stamp-soft: rgba(74, 60, 153, 0.14);
    --string: #b8955f;
    --field: #f4e9cb;
    --mark: #e3d1a3;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 22px -10px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --counter: #18211e;
  --counter-line: #222d29;
  --fg: #e4ebe6;
  --muted: #9aa8a1;
  --tag: #e3d1a3;
  --tag-edge: #b9a674;
  --stamp: #4a3c99;
  --stamp-soft: rgba(74, 60, 153, 0.14);
  --string: #b8955f;
  --field: #f4e9cb;
  --mark: #e3d1a3;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 22px -10px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background-color: var(--counter);
  background-image: repeating-linear-gradient(0deg, transparent 0 46px, var(--counter-line) 46px 47px);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
}
button, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding-block: 20px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Header */
.masthead {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
  justify-self: center;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}
.brand:focus-visible { outline: 3px solid var(--stamp); outline-offset: 4px; }
.logo { width: 48px; height: 48px; flex: none; }
.logo-tag { fill: var(--tag); stroke: var(--tag-ink); stroke-width: 2.5; stroke-linejoin: round; }
.logo-hole { fill: var(--counter); stroke: var(--tag-ink); stroke-width: 1.5; }
.logo-arrow { fill: none; stroke: var(--stamp); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  letter-spacing: 0.01em;
  line-height: 1;
}
.wordmark span { color: var(--mark); }
.edition {
  margin: 4px 0 0;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.help-btn {
  width: 36px;
  height: 36px;
  justify-self: end;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--fg);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1;
  cursor: pointer;
}
.help-btn:hover { background: var(--fg); color: var(--counter); }
.mast-tools { display: flex; gap: 4px; justify-self: start; }
.mast-tools .help-btn { width: 34px; height: 34px; }
.archive-btn, .sound-btn { display: grid; place-items: center; text-decoration: none; padding: 0; }
.sound-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .cross { display: none; }
.sound-btn.muted .waves { display: none; }
.sound-btn.muted .cross { display: inline; }
.archive-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Running total: a cash register readout with rolling digit drums */
.register {
  position: relative;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.register-label, .register-of {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.register-window {
  display: inline-flex;
  background: var(--register-bg);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 0 3px var(--tag-edge);
}
.drums { display: inline-flex; gap: 2px; }
.drum {
  position: relative;
  width: 0.72em;
  height: 1.2em;
  overflow: hidden;
  font-family: var(--font-stamp);
  font-size: var(--step-2);
  line-height: 1.2em;
  color: var(--register-fg);
  text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(255,255,255,.06) 30%, rgba(255,255,255,.06) 70%, rgba(0,0,0,.55));
  border-radius: 2px;
}
.drum.lead { color: color-mix(in srgb, var(--register-fg) 30%, transparent); }
.reel { display: flex; flex-direction: column; will-change: transform; }
.reel span { height: 1.2em; }
.register-window.big .drum { font-size: var(--step-3); }
.register-flag {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
  padding: 2px 8px;
  background: var(--stamp);
  color: #fff;
  font-family: var(--font-stamp);
  font-size: var(--step-0);
  border-radius: 3px 3px 0 0;
  opacity: 0;
  pointer-events: none;
}
.register-flag.pop { animation: ka-ching 1100ms ease-out; }
@keyframes ka-ching {
  0% { opacity: 0; transform: translateY(6px); }
  20% { opacity: 1; transform: translateY(-26px); }
  70% { opacity: 1; transform: translateY(-30px); }
  100% { opacity: 0; transform: translateY(-36px); }
}

/* Progress strip: six mini tags */
.strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.strip li {
  height: 34px;
  border-radius: 4px 4px 4px 4px;
  background: transparent;
  border: 1.5px dashed var(--muted);
  display: grid;
  place-items: center;
  font-family: var(--font-stamp);
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.strip li.current { border-style: solid; border-color: var(--fg); color: var(--fg); }
.strip li.done { background: var(--tag); border: 1.5px solid var(--tag-edge); color: var(--tag-ink); }
.strip li.done.t-good { box-shadow: inset 0 -4px 0 var(--good); }
.strip li.done.t-ok { box-shadow: inset 0 -4px 0 var(--ok); }
.strip li.done.t-warn { box-shadow: inset 0 -4px 0 var(--warn); }
.strip li.done.t-bad { box-shadow: inset 0 -4px 0 var(--bad); }

/* The tag */
.tag {
  position: relative;
  background: var(--tag);
  color: var(--tag-ink);
  border: 1px solid var(--tag-edge);
  /* clipped top corners, like a die-cut tag */
  clip-path: polygon(28px 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%, 0 28px);
  padding: 44px 24px 24px;
  filter: drop-shadow(0 6px 10px rgba(20, 30, 25, 0.25));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.tag > * { width: 100%; }
.tag-wrap { position: relative; padding-top: 26px; transform-origin: 50% 0; }
.tag-wrap::before {
  /* the string */
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 42px;
  background: var(--string);
  transform: translateX(-1px) rotate(4deg);
  transform-origin: top;
  z-index: 2;
}
/* The string always runs up off the top of the screen, behind the frosted header. */
.tag-wrap::before { top: -200vh; height: calc(200vh + 42px); transform: translateX(-1px); }
.tag::before {
  /* the reinforced string hole */
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--counter);
  box-shadow: 0 0 0 5px var(--tag-edge);
}
.tag-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tag-muted);
  border-bottom: 1px dashed var(--tag-edge);
  padding-bottom: 10px;
}
.item {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-1);
  line-height: 1.2;
  text-wrap: balance;
}
.unit { font-family: var(--font-body); font-size: var(--step--1); color: var(--tag-muted); font-weight: 600; letter-spacing: 0.04em; }

/* Price-gun label: the 2025 price */
.label-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.price-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: #fffdf6;
  border: 1px solid var(--tag-edge);
  padding: 6px 12px 4px;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.price-label .yr { font-size: var(--step--1); color: var(--tag-muted); letter-spacing: 0.08em; font-weight: 600; }
.stamp {
  font-family: var(--font-stamp);
  color: var(--stamp);
  font-size: var(--step-2);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.ask { margin: 0; font-size: var(--step-1); font-weight: 600; }
.ask .past-year { font-family: var(--font-stamp); color: var(--stamp); font-size: 1.15em; }

/* Guess form */
.guess { display: flex; flex-direction: column; gap: 8px; }
.guess-row { display: flex; flex-direction: column; gap: 8px; }
.money {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--field);
  border: 2px solid var(--tag-ink);
  border-radius: 6px;
  padding: 0 12px;
}
.money span { font-family: var(--font-stamp); font-size: var(--step-1); color: var(--tag-muted); }
.money input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--tag-ink);
  font-family: var(--font-stamp);
  font-size: var(--step-1);
  padding: 10px 6px;
  outline: none;
}
.money:focus-within { outline: 3px solid var(--stamp); outline-offset: 2px; }
.btn {
  border: 0;
  border-radius: 6px;
  background: var(--stamp);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
a.btn { display: inline-block; text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--tag-ink); border: 2px solid var(--tag-ink); }
.hint { margin: 0; min-height: 1.4em; text-align: center; font-size: var(--step--1); color: var(--tag-muted); }
.hint.error { color: var(--bad); font-weight: 600; }

/* Reveal */
.reveal { display: flex; flex-direction: column; gap: 14px; }
/* Labels on top, then the two prices with the stamp level between them, then the
   verdict under the stamp. The cells and verdict row dissolve into this grid. */
.reveal-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  column-gap: 12px;
  row-gap: 2px;
  border-top: 1px dashed var(--tag-edge);
  padding-top: 14px;
  text-align: center;
}
.cell, .verdict-row { display: contents; }
.cell .k { grid-row: 1; align-self: end; }
.cell .v { grid-row: 2; min-width: 0; }
.cell:first-child > * { grid-column: 1; }
.cell:last-child > * { grid-column: 3; }
.verdict-row .points { grid-column: 2; grid-row: 2; }
.verdict-row .verdict { grid-column: 2; grid-row: 3; margin-top: 6px; }
.cell .k { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tag-muted); }
.cell .v { font-family: var(--font-stamp); font-size: var(--step-2); font-variant-numeric: tabular-nums; word-break: break-word; }
.cell .v.actual { color: var(--stamp); }
.reveal-grid.long .v { font-size: var(--step-1); }
.reveal-grid.xlong .v { font-size: var(--step-0); }
.points {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1;
  color: var(--stamp);
  transform: rotate(-4deg);
  animation: thunk 260ms cubic-bezier(.2,.9,.3,1.3);
}
/* Rubber stamp: double rule, uneven ink, speckled gaps (the #ink SVG filter) */
.points-ink {
  display: inline-block;
  border: 3.5px solid currentColor;
  border-radius: 8px;
  padding: 7px 14px 5px;
  outline: 1.5px solid currentColor;
  outline-offset: -8px;
  filter: url(#ink);
  opacity: 0.92;
  background: radial-gradient(circle at 30% 35%, color-mix(in srgb, currentColor 10%, transparent), transparent 60%);
}
.points small { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; margin-left: 4px; }
.points.t-good { color: var(--good); }
.points.t-ok { color: var(--ok); }
.points.t-warn { color: var(--warn); }
.points.t-bad { color: var(--bad); }
@keyframes thunk { from { transform: rotate(-4deg) scale(1.6); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.reveal.fresh .points { opacity: 0; animation: none; }
.reveal.fresh .points.stamped { opacity: 1; animation: thunk 200ms cubic-bezier(.2,.9,.3,1.3); }
.verdict { margin: 0; font-weight: 600; font-size: var(--step--1); text-align: center; max-width: 9em; }
.then-now {
  margin: 0;
  background: var(--stamp-soft);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: var(--step-0);
}
.then-now b { font-family: var(--font-stamp); font-weight: 400; color: var(--stamp); }
.source { margin: 0; font-size: var(--step--1); color: var(--tag-muted); }

/* Results */
.results h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.total { display: flex; align-items: center; justify-content: center; gap: 10px; }
.total .of { color: var(--tag-muted); font-weight: 600; }
.ledger { width: 100%; border-collapse: collapse; font-size: var(--step--1); text-align: left; }
.ledger-pts { display: inline-block; min-width: 2.2em; text-align: center; padding-bottom: 1px; border-bottom: 4px solid var(--tag-edge); }
.ledger-pts.t-good { border-color: var(--good); }
.ledger-pts.t-ok { border-color: var(--ok); }
.ledger-pts.t-warn { border-color: var(--warn); }
.ledger-pts.t-bad { border-color: var(--bad); }
.ledger td { padding: 7px 0; border-bottom: 1px dashed var(--tag-edge); vertical-align: top; }
.ledger td:last-child { text-align: right; font-family: var(--font-stamp); font-size: var(--step-0); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.ledger .q { font-weight: 600; }
.ledger .sub { color: var(--tag-muted); }
.actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--font-stamp); font-weight: 400; font-size: var(--step-2); color: var(--stamp); font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tag-muted); font-weight: 600; }
.next { margin: 0; font-size: var(--step--1); color: var(--tag-muted); }
.next b { font-family: var(--font-stamp); font-weight: 400; font-size: var(--step-0); color: var(--tag-ink); font-variant-numeric: tabular-nums; }

/* How to play / messages on the counter */
.note { margin: 0; color: var(--muted); font-size: var(--step--1); text-align: center; }
.panel {
  background: var(--tag);
  color: var(--tag-ink);
  border: 1px solid var(--tag-edge);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.panel p, .panel ul { margin: 0; }
.panel ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.date-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.panel { text-align: center; align-items: center; }

/* Archive */
.archive-banner { margin: 0; text-align: center; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.archive-banner a, .next a { color: inherit; }
.archive-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; }
.archive-list li + li { border-top: 1px dashed var(--tag-edge); }
.archive-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  color: var(--tag-ink);
  text-decoration: none;
}
.archive-list a:hover .arc-date { text-decoration: underline; }
.arc-date { font-weight: 600; }
.arc-done, .arc-part, .arc-new { font-family: var(--font-stamp); font-size: var(--step--1); white-space: nowrap; }
.arc-done { color: var(--good); }
.arc-part { color: var(--tag-muted); }
.arc-new { color: var(--stamp); }

/* How to play modal */
.modal {
  width: min(26rem, calc(100% - 32px));
  border: 1px solid var(--tag-edge);
  border-radius: 8px;
  padding: 0;
  background: var(--tag);
  color: var(--tag-ink);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.modal::backdrop { background: rgba(15, 22, 19, 0.55); }
.modal-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; text-align: center; }
.modal h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); }
.modal ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.modal li { line-height: 1.45; }
.modal[open] { animation: modal-in 220ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 420px) {
  .tag { padding: 36px 16px 18px; }
  .stats b { font-size: var(--step-1); }
}
/* Phones: tighter spacing so a whole tag, with its Stamp it button, fits on one
   screen (and above the keyboard), and no padding hangs below the credits. */
@media (max-width: 480px) {
  .wrap { gap: 14px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .logo { width: 40px; height: 40px; }
  .money input { padding-block: 8px; }
}
/* Phones: squeeze the answered tag so Next tag is on screen without scrolling.
   The question is dropped (the reveal names the year) and the source moves up
   under the inflation note. */
@media (max-width: 480px) {
  .tag.answered .ask { display: none; }
  .tag.answered .reveal { gap: 10px; }
  .tag.answered .reveal-grid { padding-top: 10px; column-gap: 8px; }
  .tag.answered .cell .k { letter-spacing: 0.04em; white-space: nowrap; }
  .tag.answered .then-now { font-size: var(--step--1); padding: 8px 12px; }
  .tag.answered .source { margin-top: -6px; }
}
@media (max-width: 400px) {
  .masthead { grid-template-columns: 68px 1fr 68px; gap: 4px; }
  .mast-tools { gap: 2px; }
  .brand { gap: 6px; }
  .logo { width: 34px; height: 34px; }
  .edition { white-space: nowrap; letter-spacing: 0.02em; font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) {
  .points, .register-flag.pop, .modal[open] { animation: none; }
}

#app { display: flex; flex-direction: column; gap: 20px; }
.strip-btn {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#share-text:not(.visually-hidden) {
  width: 100%;
  font-family: var(--font-stamp);
  background: var(--field);
  color: var(--tag-ink);
  border: 1px solid var(--tag-edge);
  padding: 8px;
}

.credits {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--muted);
  text-align: center;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Global score distribution on the receipt */
.crowd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}
.crowd h3 {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tag-muted);
}
#crowd-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.crowd-line { margin: 0; font-size: var(--step-0); }
.crowd-line b { font-family: var(--font-stamp); font-weight: 400; font-size: var(--step-1); color: var(--stamp); }
.crowd-avg { margin: 0; font-size: var(--step--1); color: var(--tag-muted); }
.crowd-avg b { font-family: var(--font-stamp); font-weight: 400; font-size: var(--step-0); color: var(--tag-ink); }
.crowd-chart { width: 100%; max-width: 100%; height: auto; overflow: visible; }
.crowd-chart .curve-area { fill: var(--tag-edge); opacity: 0.55; }
.crowd-chart .curve-area.mine { fill: var(--stamp); opacity: 0.28; }
.crowd-chart .curve-line { fill: none; stroke: var(--tag-ink); stroke-width: 1.5; stroke-linejoin: round; }
.crowd-chart .axis, .crowd-chart .tick { stroke: var(--tag-muted); stroke-width: 1; }
.crowd-chart .tick-label { fill: var(--tag-muted); font-family: var(--font-body); font-size: 9px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.crowd-chart .avg-line { stroke: var(--tag-ink); stroke-width: 1; stroke-dasharray: 1 3; opacity: 0.7; }
.crowd-chart .avg-label { fill: var(--tag-muted); font-family: var(--font-body); font-size: 9px; font-weight: 600; }
.crowd-chart .you-line { stroke: var(--stamp); stroke-width: 2; stroke-dasharray: 3 2; }
.crowd-chart .you-label { fill: var(--stamp); font-family: var(--font-stamp); font-size: 11px; }
/* Very narrow phones: shrink the reveal labels and verdict together so they stay one size */
@media (max-width: 340px) {
  .tag.answered .cell .k, .tag.answered .verdict { font-size: 0.72rem; }
}

/* Frosted header: a translucent band from the top of the screen down to just under
   the progress strip, frostier the higher it goes. The tag's string shows faintly
   through it, and a tag hauled up slides under it. The header sits above the band. */
html { overflow-x: clip; }
.masthead, .register, .archive-banner { position: relative; z-index: 4; }
.strip { position: relative; z-index: 3; }
.strip::before, .strip::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  top: -100vh;
  bottom: -16px;
  pointer-events: none;
}
/* Tint: as frosted as before just under the strip, near opaque at the top */
.strip::after {
  background: linear-gradient(to top,
    transparent 0,
    color-mix(in srgb, var(--counter) 80%, transparent) 16px,
    color-mix(in srgb, var(--counter) 96%, transparent) 220px);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 16px);
  mask-image: linear-gradient(to top, transparent 0, #000 16px);
}
/* Extra blur that fades in toward the top */
.strip::before {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, transparent 40px, #000 200px);
  mask-image: linear-gradient(to top, transparent 40px, #000 200px);
}
