:root {
  --ink: #121212;
  --muted: #5a5a5a;
  --faint: #e6e6e6;
  --faint-2: #f5f5f5;
  --white: #ffffff;
  --correct: #538d4e;
  --accent: #2f6f8f;
  --sans: "Libre Franklin", Helvetica, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 9px 12px;
  color: #fff;
  background: #000;
  font-size: 0.75rem;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid #d0d0d0;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1160px, calc(100% - 32px));
  height: 58px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-game {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.theme-toggle,
.unit-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #9b9b9b;
  border-radius: 3px;
}

.theme-toggle {
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 6px;
  color: var(--muted);
  background: #fff;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.unit-toggle button {
  min-width: 30px;
  height: 26px;
  padding: 0 6px;
  color: var(--muted);
  background: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
}

.unit-toggle button + button {
  border-left: 1px solid #9b9b9b;
}

.unit-toggle button[aria-pressed="true"] {
  color: #fff;
  background: #000;
}

.theme-toggle[aria-pressed="true"] {
  color: #fff;
  background: #000;
}

.theme-toggle:focus-visible,
.unit-toggle button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.header-stats,
.header-help {
  padding: 8px 0;
  background: none;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
}

.header-stats:hover,
.header-help:hover {
  text-decoration-color: currentColor;
}

.game-switcher {
  border-top: 1px solid #e2e2e2;
}

.game-switcher-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(22px, 4.5vw, 52px);
  width: min(900px, calc(100% - 32px));
  height: 44px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.game-switcher-inner::-webkit-scrollbar {
  display: none;
}

.game-switcher-item {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 0 0;
  color: #515151;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.game-switcher-item::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
}

.game-switcher-item:hover,
.game-switcher-item:focus-visible {
  color: var(--ink);
}

.game-switcher-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.game-switcher-item.is-active {
  color: var(--ink);
  font-weight: 700;
}

.game-switcher-item.is-active::after {
  background: var(--ink);
}

html[data-page="hub"] .game-shell,
html[data-page="hub"] #game-footer,
html[data-page="hub"] [data-game-only],
html[data-page="game"] .games-hub,
html[data-page="game"] .hub-footer {
  display: none !important;
}

.games-hub {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 78px;
}

.games-hub-intro {
  display: grid;
  grid-template-columns: minmax(0, 780px) auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 34px;
  border-bottom: 2px solid var(--ink);
}

.games-hub-intro .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -15px;
}

.games-hub-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.2rem);
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.games-hub-intro > p:not(.eyebrow) {
  grid-column: 1;
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.games-hub-intro > span {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.games-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(44px, 7vw, 86px);
  row-gap: 58px;
  padding-top: 48px;
}

.game-library-card {
  display: grid;
  grid-template-columns: minmax(180px, 238px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 3vw, 34px);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.game-library-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--game-icon-background, #e7e7e3);
}

.game-library-art img {
  display: block;
  width: 54%;
  height: 54%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.game-icon-exportle {
  --game-icon-background: #e79a55;
}

.game-icon-importle {
  --game-icon-background: #79bce6;
}

.game-icon-truddies {
  --game-icon-background: #87c59a;
}

.game-icon-then-now {
  --game-icon-background: #ae8bd3;
}

.game-icon-productle {
  --game-icon-background: #e9c848;
}

.game-icon-tradeoffs {
  --game-icon-background: #d9897d;
}

.game-library-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.game-library-copy > strong {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.game-library-copy > span {
  font-size: 0.9rem;
  line-height: 1.5;
}

.game-library-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.game-library-copy small b {
  display: inline-block;
  color: var(--ink);
  font-size: 0.9rem;
  transition: transform 150ms ease;
}

.game-library-card:hover .game-library-art img {
  transform: scale(1.055);
}

.game-library-card:hover .game-library-copy > strong {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.game-library-card:hover .game-library-copy small b {
  transform: translateX(3px);
}

.game-library-card:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 7px;
}

.game-shell {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.all-games-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.all-games-link:hover,
.all-games-link:focus-visible {
  color: var(--ink);
}

.all-games-link-bottom {
  margin: 38px 0 0;
}

.game-intro {
  padding-bottom: 34px;
  text-align: center;
}

.game-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.game-intro > p {
  margin: 10px 0 8px;
  color: #333;
  font-size: 0.98rem;
  line-height: 1.45;
}

.daily-meta {
  display: flex;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.game-board {
  border-top: 2px solid var(--ink);
}

.puzzle-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.puzzle-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.attempt-summary {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 1px;
}

.attempt-summary strong {
  font-size: 1.25rem;
  line-height: 1;
}

.attempt-summary span {
  color: var(--muted);
  font-size: 0.67rem;
}

.attempt-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-bottom: 14px;
}

.attempt-track span {
  height: 4px;
  background: #dedede;
}

.attempt-track span.used {
  background: #787878;
}

.attempt-track span.correct {
  background: var(--correct);
}

.export-figure {
  margin: 0;
  border: 1px solid #b8b8b8;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid #b8b8b8;
}

.chart-path {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.chart-path > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chart-path strong {
  overflow: hidden;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-path span {
  color: #3f3f3f;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.chart-year {
  color: var(--muted);
  font-size: 0.66rem;
}

.chart-back {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.chart-back:hover {
  background: var(--faint-2);
}

.chart-year {
  flex: 0 0 auto;
  font-weight: 600;
}

.treemap-wrap {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: #ececec;
}

.trade-profile {
  min-height: 430px;
  background: #fff;
}

.trade-profile:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(250px, 0.88fr) minmax(320px, 1.12fr);
}

.gdp-clue {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 38px;
  color: #fff;
  background: var(--ink);
}

.gdp-clue > span,
.partner-clue > p {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gdp-clue > span {
  color: #c8c8c8;
}

.gdp-clue strong {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: clamp(2.65rem, 6vw, 4.2rem);
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.gdp-clue small {
  color: #c8c8c8;
  font-size: 0.62rem;
  line-height: 1.4;
}

.partner-clue {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 30px;
}

.partner-clue > p {
  margin-bottom: 13px;
  color: var(--muted);
}

.partner-list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #cfcfcf;
  list-style: none;
}

.partner-list li {
  display: grid;
  grid-template-columns: 25px 31px minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  border-top: 1px solid #cfcfcf;
}

.partner-rank {
  color: #858585;
  font-size: 0.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.partner-flag {
  font-size: 1.05rem;
}

.partner-name {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-error {
  grid-column: 1 / -1;
  place-self: center;
  color: var(--muted);
  font-size: 0.75rem;
}

.period-comparison {
  min-height: 430px;
  background: #fff;
}

.period-comparison:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.period-panel {
  min-width: 0;
  padding: 30px 28px 26px;
  box-shadow: inset 0 6px #8d8d8d;
}

.period-panel.is-then {
  background: #f3f1eb;
}

.period-panel.is-now {
  border-left: 1px solid #b8b8b8;
  background: #fff;
  box-shadow: inset 0 6px var(--ink);
}

.period-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.period-heading span,
.period-total span,
.period-panel > p {
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.period-heading span,
.period-panel > p {
  color: var(--muted);
}

.period-heading strong {
  font-family: var(--serif);
  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.period-total {
  display: grid;
  gap: 5px;
  margin: 19px 0 22px;
}

.period-total span {
  color: var(--muted);
}

.period-total strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  letter-spacing: -0.05em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-panel > p {
  margin: 0 0 9px;
}

.period-category-list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #c9c9c9;
  list-style: none;
}

.period-category-list li {
  display: grid;
  grid-template-columns: 22px 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  border-top: 1px solid #c9c9c9;
}

.period-category-rank {
  color: #858585;
  font-size: 0.56rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.period-category-dot {
  width: 9px;
  height: 9px;
  background: var(--category-color, #666);
}

.period-category-name {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-category-share {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.productle-clue {
  min-height: 430px;
  padding: 24px 30px 26px;
  background: #fff;
}

.productle-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 16px;
  border-bottom: 2px solid var(--ink);
}

.productle-intro span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.productle-intro strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.productle-country-list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #c9c9c9;
  list-style: none;
}

.productle-country-row {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 68px;
  border-top: 1px solid #c9c9c9;
}

.productle-country-row:first-child {
  border-top: 0;
}

.productle-country-rank {
  color: #858585;
  font-size: 0.57rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.productle-country-flag {
  font-size: 1.1rem;
}

.productle-country-name {
  overflow: hidden;
  padding-right: 16px;
  font-family: var(--serif);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productle-country-share {
  display: grid;
  justify-items: end;
  min-width: 82px;
  gap: 1px;
  font-variant-numeric: tabular-nums;
}

.productle-country-share strong {
  font-family: var(--serif);
  font-size: 1.75rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.productle-country-share small {
  color: var(--muted);
  font-size: 0.51rem;
  font-weight: 600;
  text-transform: uppercase;
}

.treemap {
  position: absolute;
  inset: 0;
}

.chart-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  color: var(--muted);
  background: #f4f4f4;
}

.chart-loading.is-hidden {
  display: none;
}

.chart-loading span {
  width: 26px;
  height: 26px;
  border: 2px solid #c9c9c9;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.chart-loading p {
  margin: 0;
  font-size: 0.7rem;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.treemap-cell {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
  z-index: 1;
  padding: 9px;
  border: 1px solid #fff;
  color: #fff;
  text-align: left;
  transition: filter 120ms ease, outline-color 120ms ease;
}

.section-outline {
  position: absolute;
  z-index: 2;
  border: 2.5px solid #fff;
  pointer-events: none;
}

button.treemap-cell {
  appearance: none;
  cursor: pointer;
}

button.treemap-cell:hover,
button.treemap-cell:focus-visible {
  z-index: 3;
  outline: 3px solid #000;
  outline-offset: -4px;
  filter: brightness(1.08);
}

.cell-name {
  display: block;
  max-width: 23ch;
  margin: auto 0;
  font-size: var(--label-size, clamp(0.74rem, 1.8vw, 1.05rem));
  font-weight: 700;
  line-height: 1.08;
}

.cell-value {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--value-size, 0.62rem);
  font-weight: 600;
}

.cell-hint {
  opacity: 0.8;
  font-size: 0.56rem;
  font-weight: 600;
}

.treemap-cell.is-medium {
  padding: 7px;
}

.treemap-cell.is-medium .cell-name {
  font-size: min(var(--label-size, 0.67rem), 0.72rem);
}

.treemap-cell.is-medium .cell-hint {
  display: none;
}

.treemap-cell.is-small {
  justify-content: center;
  padding: 5px;
}

.treemap-cell.is-small .cell-value,
.treemap-cell.is-small .cell-hint {
  display: none;
}

.treemap-cell.is-small .cell-name {
  margin: 0;
  overflow: hidden;
  font-size: 0.54rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-cell.is-tiny > * {
  display: none;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 5px 6px;
  overflow-x: auto;
  border-top: 1px solid #b8b8b8;
  background: #f3f3f3;
  scrollbar-width: thin;
}

.category-tab {
  position: relative;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #fff;
  background: var(--tab-color, #555);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.category-tab:hover,
.category-tab:focus-visible {
  z-index: 2;
  outline: 2px solid #000;
  outline-offset: 1px;
}

.category-tab.is-active {
  z-index: 1;
  outline: 2px solid #000;
  outline-offset: 1px;
}

.category-tab.all-tab {
  color: #fff;
  background: #1a1a1a;
  font-size: 0.48rem;
}

.chart-instruction {
  min-height: 38px;
  margin: 0;
  padding: 11px 13px;
  border-top: 1px solid #d1d1d1;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: center;
}

.guess-form {
  margin-top: 30px;
}

.productle-guess {
  margin-top: 30px;
}

.productle-guess-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.productle-guess-heading .eyebrow {
  margin-bottom: 3px;
}

.productle-guess-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.productle-guess-heading > span {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
}

.productle-word-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #b8b8b8;
  border-left: 1px solid #b8b8b8;
}

.productle-category-button {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  gap: 10px;
  padding: 8px 12px;
  border-right: 1px solid #b8b8b8;
  border-bottom: 1px solid #b8b8b8;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.productle-category-button:hover,
.productle-category-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.productle-category-swatch {
  width: 8px;
  height: 26px;
  background: var(--category-color, #666);
}

.productle-category-button.is-used {
  color: #8b8b8b;
  background: #ededed;
  text-decoration: line-through;
  cursor: not-allowed;
}

.productle-category-button.is-used .productle-category-swatch {
  background: #a7a7a7;
}

.productle-category-button.is-correct {
  color: #fff;
  background: var(--correct);
}

.productle-category-button.is-correct .productle-category-swatch {
  background: #fff;
}

.productle-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.productle-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 27px;
}

.productle-actions button {
  padding: 4px 0;
  color: var(--muted);
  background: none;
  font-size: 0.66rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.tradeoff-clue {
  min-height: 430px;
  padding: 28px 30px 22px;
  background: #fff;
}

.tradeoff-question {
  text-align: center;
}

.tradeoff-question h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.tradeoff-countries {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.tradeoff-countries::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #999;
  border-radius: 50%;
  background: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  content: "OR";
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tradeoff-country-button {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 225px;
  padding: 24px 20px;
  border: 1px solid #8e8e8e;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.tradeoff-country-button:hover,
.tradeoff-country-button:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

.tradeoff-country-flag {
  font-size: 2rem;
  line-height: 1;
}

.tradeoff-country-name {
  margin: 9px 0 18px;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.tradeoff-total-label {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tradeoff-total-value {
  margin-top: 4px;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.tradeoff-category-reveal {
  display: grid;
  width: 100%;
  gap: 3px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid #c8c8c8;
  font-variant-numeric: tabular-nums;
}

.tradeoff-category-reveal small,
.tradeoff-category-reveal span {
  font-size: 0.52rem;
}

.tradeoff-category-reveal small {
  font-weight: 700;
  text-transform: uppercase;
}

.tradeoff-category-reveal strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.tradeoff-category-reveal span {
  color: var(--muted);
}

.tradeoff-country-button.is-correct {
  color: #fff;
  border-color: var(--correct);
  background: var(--correct);
}

.tradeoff-country-button.is-correct .tradeoff-total-label,
.tradeoff-country-button.is-correct .tradeoff-category-reveal span {
  color: #fff;
}

.tradeoff-country-button.is-correct .tradeoff-category-reveal {
  border-color: rgba(255, 255, 255, 0.55);
}

.tradeoff-country-button.is-wrong {
  color: #777;
  background: #ededed;
}

.tradeoff-country-button:disabled {
  cursor: default;
}

.tradeoff-feedback {
  min-height: 18px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  text-align: center;
}

.tradeoff-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 27px;
}

.tradeoff-actions button {
  padding: 4px 0;
  color: var(--muted);
  background: none;
  font-size: 0.66rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.guess-form > label,
.calls h3 {
  display: block;
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.guess-form > label.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.guess-controls {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 8px;
}

.country-combobox {
  position: relative;
  min-width: 0;
}

.country-combobox input {
  width: 100%;
  height: 48px;
  border: 1px solid #767676;
  border-radius: 3px;
  outline: 0;
  padding: 0 13px;
  background: #fff;
  font-size: 0.9rem;
}

.country-combobox input:focus {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.country-combobox input::placeholder {
  color: #777;
}

.country-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 250px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  border: 1px solid #8d8d8d;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.13);
  list-style: none;
}

.country-suggestions[hidden] {
  display: none;
}

.country-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.84rem;
  cursor: pointer;
}

.country-suggestion:hover,
.country-suggestion.is-active {
  background: #ededed;
}

.suggestion-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 600;
}

.suggestion-flag {
  font-size: 1rem;
}

.suggestion-continent {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.64rem;
}

.submit-guess {
  height: 48px;
  border: 1px solid #000;
  border-radius: 3px;
  color: #fff;
  background: #000;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.submit-guess:hover {
  background: #333;
}

.submit-guess:disabled,
.country-combobox input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.form-message {
  min-height: 18px;
  margin: 6px 0 0;
  color: #a51d1d;
  font-size: 0.68rem;
}

.secondary-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 27px;
}

.secondary-actions button {
  padding: 4px 0;
  color: var(--muted);
  background: none;
  font-size: 0.66rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.calls {
  margin-top: 26px;
  border-top: 1px solid #b8b8b8;
  padding-top: 18px;
}

.calls h3 {
  margin-bottom: 12px;
}

.empty-log {
  padding: 18px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.empty-log p {
  margin: 0;
}

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

.guess-row {
  display: grid;
  grid-template-columns: minmax(155px, 1.35fr) minmax(275px, 1fr);
  align-items: center;
  min-height: 62px;
  border-top: 1px solid var(--faint);
}

.guess-row:last-child {
  border-bottom: 1px solid var(--faint);
}

.guess-country {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.guess-count {
  width: 18px;
  color: var(--muted);
  font-size: 0.64rem;
}

.guess-flag {
  font-size: 1.2rem;
}

.guess-country strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guess-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  text-align: right;
}

.guess-signal {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.guess-signal strong {
  font-size: 0.7rem;
}

.guess-signal small {
  color: var(--muted);
  font-size: 0.5rem;
  text-transform: uppercase;
}

.bearing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bearing-arrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-style: normal;
  transform: rotate(var(--bearing-angle));
}

.proximity-bar {
  display: none;
}

.guess-row.is-correct {
  color: #fff;
  background: var(--correct);
}

.guess-row.is-correct .guess-country,
.guess-row.is-correct .guess-signals {
  padding-top: 10px;
  padding-bottom: 10px;
}

.guess-row.is-correct .guess-country {
  padding-left: 8px;
}

.guess-row.is-correct .guess-signals {
  padding-right: 8px;
}

.guess-row.is-correct .guess-count,
.guess-row.is-correct .guess-signal small,
.guess-row.is-correct .bearing {
  color: #fff;
}

.completed-card {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid #b8b8b8;
  background: var(--faint-2);
}

.completed-card:not([hidden]) {
  display: flex;
}

.completed-card strong {
  font-size: 0.8rem;
}

.completed-card button {
  padding: 8px 11px;
  border: 1px solid #000;
  border-radius: 3px;
  color: #fff;
  background: #000;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 21px 0 32px;
  border-top: 1px solid #d0d0d0;
  color: var(--muted);
  font-size: 0.62rem;
}

dialog {
  width: min(510px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.dialog-card {
  position: relative;
  max-height: calc(100vh - 24px);
  padding: 34px;
  overflow: auto;
  border-radius: 5px;
  background: #fff;
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--faint-2);
}

.answer-lockup {
  margin: 16px 0 24px;
}

.answer-flag {
  display: block;
  margin-bottom: 8px;
  font-size: 2.4rem;
}

.answer-flag.is-category {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  color: #fff;
  background: var(--category-color, #666);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
}

.answer-lockup h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.answer-lockup p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.answer-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.answer-products.is-productle {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.answer-products.is-tradeoff {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer-product {
  min-width: 0;
  padding: 12px 8px;
}

.answer-product + .answer-product {
  border-left: 1px solid #ddd;
}

.answer-product span,
.answer-product strong {
  display: block;
}

.answer-product span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-product strong {
  margin-top: 4px;
  font-size: 0.9rem;
}

.answer-product small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.53rem;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 24px 0;
}

.result-stats > div {
  display: grid;
  gap: 2px;
}

.result-stats strong {
  font-family: var(--serif);
  font-size: 1.75rem;
}

.result-stats span {
  color: var(--muted);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.primary-dialog-button {
  width: 100%;
  min-height: 46px;
  border-radius: 3px;
  color: #fff;
  background: #000;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.primary-dialog-button:hover {
  background: #333;
}

.share-status {
  min-height: 15px;
  margin: 7px 0 -15px;
  color: var(--muted);
  font-size: 0.62rem;
}

.help-card h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 2.2rem;
}

.help-card ol {
  margin: 0 0 24px;
  padding-left: 22px;
  text-align: left;
}

.help-card li {
  margin-bottom: 12px;
  padding-left: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.stats-dialog {
  width: min(720px, calc(100% - 24px));
}

.stats-card {
  padding: 34px 38px 38px;
  text-align: left;
}

.stats-heading {
  padding-right: 40px;
}

.stats-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats-heading > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.stats-overview,
.stats-distribution {
  margin-top: 30px;
}

.stats-overview h3,
.stats-distribution h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

.stats-game-grid {
  margin-top: 10px;
  border-top: 1px solid #aaa;
  border-right: 1px solid #aaa;
  border-left: 1px solid #aaa;
}

.stats-game-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.5fr) repeat(4, minmax(54px, 0.65fr));
  min-height: 46px;
  border-bottom: 1px solid #c8c8c8;
}

.stats-game-row > * {
  display: grid;
  place-content: center;
  min-width: 0;
  padding: 7px 8px;
  border-left: 1px solid #dedede;
  text-align: center;
}

.stats-game-row > *:first-child {
  justify-content: start;
  border-left: 0;
  text-align: left;
}

.stats-game-row > strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-game-row span {
  color: var(--muted);
  font-size: 0.56rem;
}

.stats-game-row span b {
  color: var(--ink);
  font-size: 0.74rem;
}

.stats-game-row span small {
  display: none;
}

.stats-game-row.is-heading {
  min-height: 28px;
  background: #f1f1f1;
}

.stats-game-row.is-heading span {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stats-game-row.is-current {
  box-shadow: inset 4px 0 var(--ink);
}

.stats-distribution {
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.stats-distribution-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
}

.stats-game-tabs {
  display: flex;
  gap: 0;
  margin-top: 14px;
  overflow-x: auto;
  border-bottom: 1px solid #999;
  scrollbar-width: thin;
}

.stats-game-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 35px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
  font-size: 0.61rem;
  font-weight: 600;
  cursor: pointer;
}

.stats-game-tabs button::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  background: transparent;
  content: "";
}

.stats-game-tabs button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 700;
}

.stats-game-tabs button[aria-selected="true"]::after {
  background: var(--ink);
}

.stats-game-tabs button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.distribution-chart {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 166px;
  padding-top: 18px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.distribution-attempt,
.distribution-row > strong {
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}

.distribution-attempt {
  color: var(--muted);
  text-align: center;
}

.distribution-row > strong {
  text-align: right;
}

.distribution-track {
  height: 18px;
  background: #ededed;
}

.distribution-fill {
  display: block;
  height: 100%;
  background: var(--correct);
  transition: width 180ms ease;
}

.distribution-empty {
  position: absolute;
  right: 0;
  bottom: -2px;
  margin: 0;
  color: var(--muted);
  font-size: 0.6rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  padding: 10px 13px;
  border-radius: 3px;
  color: #fff;
  background: #000;
  font-size: 0.7rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="dark"] {
  --ink: #f2f2ef;
  --muted: #aaa9a4;
  --faint: #343434;
  --faint-2: #242424;
  --white: #151515;
  --accent: #70aeca;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #151515;
}

html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .submit-guess,
html[data-theme="dark"] .completed-card button,
html[data-theme="dark"] .primary-dialog-button,
html[data-theme="dark"] .toast {
  color: #151515;
  background: #f2f2ef;
}

html[data-theme="dark"] .submit-guess,
html[data-theme="dark"] .completed-card button {
  border-color: #f2f2ef;
}

html[data-theme="dark"] .submit-guess:hover,
html[data-theme="dark"] .primary-dialog-button:hover {
  background: #d8d8d4;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer {
  border-color: #393939;
}

html[data-theme="dark"] .game-switcher {
  border-color: #303030;
}

html[data-theme="dark"] .game-switcher-item {
  color: #aaa9a4;
}

html[data-theme="dark"] .game-switcher-item:hover,
html[data-theme="dark"] .game-switcher-item:focus-visible,
html[data-theme="dark"] .game-switcher-item.is-active {
  color: var(--ink);
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .unit-toggle {
  border-color: #656565;
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .unit-toggle button {
  color: #aaa9a4;
  background: #1b1b1b;
}

html[data-theme="dark"] .unit-toggle button + button {
  border-color: #656565;
}

html[data-theme="dark"] .theme-toggle[aria-pressed="true"],
html[data-theme="dark"] .unit-toggle button[aria-pressed="true"] {
  color: #151515;
  background: #f2f2ef;
}

html[data-theme="dark"] .game-intro > p {
  color: #d0d0cc;
}

html[data-theme="dark"] .attempt-track span {
  background: #3a3a3a;
}

html[data-theme="dark"] .attempt-track span.used {
  background: #8a8a86;
}

html[data-theme="dark"] .export-figure,
html[data-theme="dark"] .chart-toolbar,
html[data-theme="dark"] .chart-back,
html[data-theme="dark"] .category-tabs,
html[data-theme="dark"] .productle-word-bank,
html[data-theme="dark"] .productle-category-button,
html[data-theme="dark"] .calls,
html[data-theme="dark"] .completed-card {
  border-color: #494949;
}

html[data-theme="dark"] .chart-path span {
  color: #c4c4c0;
}

html[data-theme="dark"] .chart-back,
html[data-theme="dark"] .productle-category-button,
html[data-theme="dark"] .tradeoff-country-button,
html[data-theme="dark"] .stats-game-tabs button {
  background: #1b1b1b;
}

html[data-theme="dark"] .chart-back:hover,
html[data-theme="dark"] .dialog-close:hover {
  background: #292929;
}

html[data-theme="dark"] .treemap-wrap {
  background: #242424;
}

html[data-theme="dark"] .chart-loading {
  background: #1c1c1c;
}

html[data-theme="dark"] .chart-loading span {
  border-color: #515151;
  border-top-color: var(--ink);
}

html[data-theme="dark"] button.treemap-cell:hover,
html[data-theme="dark"] button.treemap-cell:focus-visible,
html[data-theme="dark"] .category-tab:hover,
html[data-theme="dark"] .category-tab:focus-visible,
html[data-theme="dark"] .category-tab.is-active {
  outline-color: #fff;
}

html[data-theme="dark"] .category-tabs {
  background: #202020;
}

html[data-theme="dark"] .chart-instruction {
  border-color: #3a3a3a;
}

html[data-theme="dark"] .trade-profile,
html[data-theme="dark"] .period-comparison,
html[data-theme="dark"] .productle-clue,
html[data-theme="dark"] .tradeoff-clue,
html[data-theme="dark"] .dialog-card {
  background: #1b1b1b;
}

html[data-theme="dark"] .gdp-clue {
  color: #f2f2ef;
  background: #0c0c0c;
}

html[data-theme="dark"] .gdp-clue > span,
html[data-theme="dark"] .gdp-clue small {
  color: #aaa9a4;
}

html[data-theme="dark"] .partner-list,
html[data-theme="dark"] .partner-list li,
html[data-theme="dark"] .period-category-list,
html[data-theme="dark"] .period-category-list li,
html[data-theme="dark"] .productle-country-list,
html[data-theme="dark"] .productle-country-row,
html[data-theme="dark"] .tradeoff-category-reveal,
html[data-theme="dark"] .answer-products,
html[data-theme="dark"] .answer-product + .answer-product,
html[data-theme="dark"] .stats-game-grid,
html[data-theme="dark"] .stats-game-row,
html[data-theme="dark"] .stats-game-row > *,
html[data-theme="dark"] .stats-game-tabs,
html[data-theme="dark"] .distribution-track {
  border-color: #414141;
}

html[data-theme="dark"] .partner-rank,
html[data-theme="dark"] .period-category-rank,
html[data-theme="dark"] .productle-country-rank {
  color: #92928e;
}

html[data-theme="dark"] .period-panel.is-then {
  background: #211f1a;
}

html[data-theme="dark"] .period-panel.is-now {
  border-color: #494949;
  background: #1b1b1b;
}

html[data-theme="dark"] .productle-category-button.is-used,
html[data-theme="dark"] .tradeoff-country-button.is-wrong,
html[data-theme="dark"] .country-suggestion:hover,
html[data-theme="dark"] .country-suggestion.is-active {
  color: #92928e;
  background: #2b2b2b;
}

html[data-theme="dark"] .productle-category-button.is-used .productle-category-swatch {
  background: #686868;
}

html[data-theme="dark"] .tradeoff-countries::after {
  border-color: #656565;
  background: #1b1b1b;
}

html[data-theme="dark"] .tradeoff-country-button {
  border-color: #5a5a5a;
}

html[data-theme="dark"] .country-combobox input,
html[data-theme="dark"] .country-suggestions {
  border-color: #626262;
  background: #1b1b1b;
}

html[data-theme="dark"] .country-combobox input:focus {
  border-color: #f2f2ef;
  box-shadow: 0 0 0 1px #f2f2ef;
}

html[data-theme="dark"] .country-combobox input::placeholder {
  color: #92928e;
}

html[data-theme="dark"] .country-suggestions {
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .form-message {
  color: #ff8b83;
}

html[data-theme="dark"] .completed-card {
  background: #222;
}

html[data-theme="dark"] dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

html[data-theme="dark"] .stats-game-row.is-heading,
html[data-theme="dark"] .distribution-track {
  background: #292929;
}

html[data-theme="dark"] .stats-game-grid {
  border-color: #555;
}

html[data-theme="dark"] .stats-game-tabs {
  border-color: #5a5a5a;
}

@media (max-width: 900px) {
  .games-hub {
    width: min(760px, calc(100% - 32px));
  }

  .games-catalog {
    grid-template-columns: 1fr;
    row-gap: 42px;
  }

  .game-library-card {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .header-inner {
    width: calc(100% - 24px);
  }

  .brand {
    font-size: 0.92rem;
  }

  .header-actions {
    gap: 7px;
  }

  .theme-toggle {
    min-width: 34px;
    padding: 0 4px;
  }

  .unit-toggle button {
    min-width: 27px;
    padding: 0 4px;
  }

  .header-help {
    font-size: 0.67rem;
  }

  .header-stats {
    font-size: 0.67rem;
  }

  .game-switcher-inner {
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    height: 42px;
    padding: 0 12px;
  }

  .game-switcher-item {
    font-size: 0.69rem;
  }

  .games-hub {
    width: calc(100% - 24px);
    padding: 40px 0 60px;
  }

  .games-hub-intro {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 27px;
  }

  .games-hub-intro .eyebrow {
    grid-column: 1;
    margin-bottom: 9px;
  }

  .games-hub-intro h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .games-hub-intro > p:not(.eyebrow) {
    grid-column: 1;
    font-size: 0.88rem;
  }

  .games-hub-intro > span {
    grid-column: 1;
    grid-row: auto;
    margin-top: 14px;
  }

  .games-catalog {
    row-gap: 29px;
    padding-top: 32px;
  }

  .game-library-card {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 19px;
  }

  .game-library-copy {
    gap: 7px;
  }

  .game-library-copy > strong {
    font-size: 1.55rem;
  }

  .game-library-copy > span {
    font-size: 0.76rem;
    line-height: 1.42;
  }

  .game-library-copy small {
    font-size: 0.53rem;
  }

  .game-shell {
    width: min(100% - 24px, 680px);
    padding-top: 30px;
  }

  .game-intro {
    padding-bottom: 28px;
  }

  .game-intro h1 {
    font-size: 2.75rem;
  }

  .puzzle-header h2 {
    font-size: 1.65rem;
  }

  .treemap-wrap {
    height: 360px;
  }

  .trade-profile:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .period-comparison:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .period-panel {
    padding: 25px 22px 24px;
  }

  .period-panel.is-now {
    border-top: 1px solid #b8b8b8;
    border-left: 0;
  }

  .period-total strong {
    font-size: 2.35rem;
  }

  .productle-clue {
    min-height: 390px;
    padding: 20px 18px 22px;
  }

  .productle-intro {
    gap: 10px;
  }

  .productle-intro strong {
    font-size: 1.05rem;
  }

  .productle-country-row {
    grid-template-columns: 23px 31px minmax(0, 1fr) auto;
    min-height: 62px;
  }

  .productle-country-name {
    padding-right: 8px;
    font-size: 1rem;
  }

  .productle-country-share {
    min-width: 68px;
  }

  .productle-country-share strong {
    font-size: 1.45rem;
  }

  .productle-category-button {
    min-height: 48px;
    padding: 7px 9px;
    font-size: 0.64rem;
  }

  .tradeoff-clue {
    min-height: 405px;
    padding: 24px 14px 18px;
  }

  .tradeoff-question h3 {
    font-size: 2rem;
  }

  .tradeoff-countries {
    gap: 8px;
    margin-top: 21px;
  }

  .tradeoff-countries::after {
    width: 27px;
    height: 27px;
    font-size: 0.48rem;
  }

  .tradeoff-country-button {
    min-height: 215px;
    padding: 20px 10px;
  }

  .tradeoff-country-name {
    margin: 8px 0 15px;
    font-size: 1.22rem;
  }

  .tradeoff-category-reveal strong {
    font-size: 1.2rem;
  }

  .gdp-clue {
    min-height: 168px;
    padding: 27px 24px;
  }

  .gdp-clue strong {
    margin-top: 8px;
    font-size: 3.3rem;
  }

  .partner-clue {
    padding: 24px 20px 26px;
  }

  .partner-list li {
    min-height: 50px;
  }

  .chart-toolbar {
    min-height: 58px;
    padding: 9px 10px;
  }

  .chart-path {
    gap: 8px;
  }

  .chart-back {
    padding: 6px 7px;
    font-size: 0.61rem;
  }

  .guess-controls {
    grid-template-columns: 1fr 84px;
  }

  .guess-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px 0;
  }

  .guess-signals {
    padding-left: 47px;
    text-align: left;
  }

  .guess-signal {
    justify-items: start;
  }

  .guess-row.is-correct .guess-country,
  .guess-row.is-correct .guess-signals {
    padding-top: 0;
    padding-bottom: 0;
  }

  .guess-row.is-correct .guess-signals {
    padding-right: 0;
    padding-left: 55px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 24px);
  }

  .dialog-card {
    padding: 30px 20px;
  }

  .stats-card {
    padding: 28px 14px 30px;
  }

  .stats-heading {
    padding: 0 28px 0 4px;
  }

  .stats-heading h2 {
    font-size: 2.15rem;
  }

  .stats-game-row {
    grid-template-columns: minmax(76px, 1.35fr) repeat(4, minmax(39px, 0.65fr));
  }

  .stats-game-row > * {
    padding-right: 4px;
    padding-left: 4px;
  }

  .stats-game-row > strong {
    font-size: 0.75rem;
  }

  .stats-game-row span b {
    font-size: 0.66rem;
  }

  .stats-game-tabs button {
    padding: 0 10px;
    font-size: 0.58rem;
  }

  .answer-lockup h2 {
    font-size: 2.5rem;
  }

  .answer-products {
    grid-template-columns: 1fr;
  }

  .answer-products.is-productle {
    grid-template-columns: 1fr;
  }

  .answer-products.is-tradeoff {
    grid-template-columns: 1fr;
  }

  .answer-product + .answer-product {
    border-top: 1px solid #ddd;
    border-left: 0;
  }
}

@media (max-width: 430px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-game {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .game-library-card {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 15px;
  }

  .game-library-copy > strong {
    font-size: 1.35rem;
  }

  .game-library-copy > span {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
