:root {
  --wes-blue: #0000ef;
  --wes-blue-dark: #001a66;
  --wes-pink: #ff8b8e;
  --wes-red: #ef3b4a;
  --wes-mist: #ebeaef;
  --wes-lilac: #ccccf8;
  --wes-ink: #0a0a2e;
  --wes-ink-soft: rgba(10, 10, 46, 0.62);
  --surface: transparent;
  --track: rgba(10, 10, 46, 0.08);
  --radius: 3px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", "DM Sans", sans-serif;
  --pad-x: 1rem;
  --gap: 0.85rem;
  --touch: 44px;
  --page-max: 800px;
  /* Typo: Pills = kleinste Stufe; jede Stufe +2% oder +5% */
  --fs-0: 0.65rem;
  --fs-1: calc(var(--fs-0) * 1.05);
  --fs-2: calc(var(--fs-1) * 1.02);
  --fs-3: calc(var(--fs-2) * 1.05);
  --fs-4: calc(var(--fs-3) * 1.02);
  --fs-5: calc(var(--fs-4) * 1.05);
  --fs-6: calc(var(--fs-5) * 1.02);
  --fs-7: calc(var(--fs-6) * 1.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--wes-ink);
  background: var(--wes-mist);
  line-height: 1.45;
}

/* —— Topbar: stacked on mobile —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--wes-blue);
  color: var(--wes-mist);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.55rem var(--pad-x);
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-height: auto;
  flex-shrink: 0;
  opacity: 0.92;
}

.brand-logo {
  display: block;
  width: auto;
  height: 1.55rem;
  flex-shrink: 0;
}

.tabs {
  display: flex;
  width: auto;
  max-width: 70%;
  gap: 0.15rem;
  padding: 0.1rem;
  border-radius: var(--radius);
  background: rgba(235, 234, 239, 0.1);
}

.tab {
  flex: 1;
  border: 0;
  border-radius: var(--radius);
  min-height: 1.55rem;
  padding: 0.22rem 0.45rem;
  background: transparent;
  color: rgba(235, 234, 239, 0.72);
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-0);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.tab:active {
  background: rgba(255, 255, 255, 0.08);
}

.tab.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--wes-blue);
}

/* —— Content shell —— */
main {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem var(--pad-x) 3rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  display: grid;
  gap: var(--gap);
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
}

.panel {
  display: none;
  gap: var(--gap);
  min-width: 0;
}

.panel.is-active {
  display: grid;
  animation: rise 0.4s ease both;
  min-width: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-block {
  padding: 0.15rem 0.1rem 0;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--wes-blue);
  font-weight: 600;
  font-size: var(--fs-1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 8.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--wes-blue);
  max-width: 11.5em;
}

.lede {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: var(--wes-ink-soft);
  font-size: var(--fs-6);
}

.surface {
  background: transparent;
  padding: 0.35rem 0 1rem;
  border-bottom: 1px solid rgba(10, 10, 46, 0.08);
  min-width: 0;
  max-width: 100%;
}

.surface:last-of-type {
  border-bottom: 0;
}

.surface-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--wes-ink);
}

.section-note {
  margin: 0.2rem 0 0.85rem;
  color: var(--wes-ink-soft);
  font-size: var(--fs-3);
}

.surface-head .section-note {
  margin-bottom: 0;
}

/* —— Stats: 1 col mobile, hero first —— */
.stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.hero-stat .stat-label {
  margin: 0;
  color: var(--wes-ink-soft);
  font-size: var(--fs-2);
  font-weight: 600;
}

.stat-value {
  margin: 0.3rem 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--wes-blue);
}

.stat-value.sm {
  font-size: clamp(1.9rem, 9vw, 2.5rem);
  margin-bottom: 0;
}

.stat-sub {
  margin: 0.65rem 0 0;
  color: var(--wes-ink-soft);
  font-size: var(--fs-3);
}

.hero-stat.compact {
  background: transparent;
}

.hero-stat.wide {
  grid-column: auto;
}

#panel-wieder .stat-row {
  grid-template-columns: 1fr 1fr;
}

#panel-wieder .year-chart-card {
  grid-column: 1 / -1;
}

.stat-cluster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (min-width: 600px) {
  .stat-cluster {
    gap: var(--gap);
  }
}

.meter {
  height: 8px;
  border-radius: var(--radius);
  background: var(--track);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--wes-blue);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

/* —— Bars: stacked label, then track+value —— */
.bars {
  display: grid;
  gap: 0;
  min-width: 0;
  width: 100%;
}

.bars.tall {
  gap: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label label"
    "track value";
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.95rem 0.9rem;
  border-radius: var(--radius);
  background: transparent;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.bar-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.5);
}

.bar-row--count {
  grid-template-columns: 1fr;
  grid-template-areas: none;
  gap: 0.45rem;
}

.bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.bar-head .act-name {
  font-size: calc(var(--fs-5) * 1.05 * 1.1 * 1.1);
  font-weight: 600;
  color: var(--wes-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-head .act-name.is-returner {
  color: var(--wes-red);
}

.bar-head .act-name.is-new {
  color: var(--wes-blue);
}

.bar-head .act-name.is-new.is-pre {
  color: var(--wes-blue-dark);
}

.bar-head .bar-value {
  flex-shrink: 0;
  min-width: auto;
  text-align: right;
}

.bar-row--count .bar-track {
  grid-area: auto;
  width: 100%;
}

.bar-row--count .year-pills {
  margin-top: 0;
}


.bar-label {
  grid-area: label;
  font-weight: 600;
  font-size: var(--fs-5);
  line-height: 1.25;
  min-width: 0;
  word-break: break-word;
}

.bar-label .act-name {
  font-size: calc(var(--fs-5) * 1.05 * 1.1 * 1.1);
  font-weight: 600;
  color: var(--wes-ink);
}

.bar-label small {
  display: block;
  font-weight: 500;
  color: var(--wes-ink-soft);
  font-size: var(--fs-1);
  margin-top: 0.12rem;
}

.bar-track {
  grid-area: track;
  height: 18px;
  border-radius: var(--radius);
  background: var(--track);
  overflow: hidden;
  min-width: 0;
}

.bars.tall .bar-track {
  height: 18px;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--wes-blue);
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.pink {
  background: var(--wes-red);
}

.bar-fill.pre {
  background: var(--wes-blue-dark);
}

.bar-fill.lilac {
  background: var(--wes-lilac);
}

.bar-fill.blend {
  background: var(--wes-blue);
}

.bar-value {
  grid-area: value;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--fs-4);
  color: var(--wes-blue);
  min-width: 3.1rem;
  text-align: right;
}

/* —— Chips: horizontal scroll on narrow screens —— */
.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -0.15rem;
  padding: 0.1rem 0.15rem 0.25rem;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius);
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--wes-blue);
  color: #fff;
  font: inherit;
  font-size: var(--fs-2);
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease;
}

.chip.is-active {
  background: var(--wes-red);
  color: #fff;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch);
  font-size: var(--fs-4);
  font-weight: 600;
  color: var(--wes-ink-soft);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.toggle input {
  accent-color: var(--wes-blue);
  width: 1.15rem;
  height: 1.15rem;
}

.pill-row {
  margin-bottom: 0.85rem;
}

/* —— Year mini chart —— */
.year-chart-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.year-chart-head .stat-label {
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin: 0;
  font-size: var(--fs-0);
  font-weight: 600;
  color: var(--wes-ink-soft);
  white-space: nowrap;
}

.chart-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  background: transparent;
  padding: 0.15rem 0.05rem;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.chart-legend .legend-item:hover {
  color: var(--wes-ink);
}

.chart-legend .legend-item:not(.is-active) {
  opacity: 0.4;
}

.chart-legend .legend-item:not(.is-active) i {
  background: transparent !important;
  box-shadow: none !important;
  border: 1.5px solid currentColor;
}

.chart-legend .leg-new,
.chart-legend .leg-pre,
.chart-legend .leg-ret {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.chart-legend .leg-new {
  background: var(--wes-blue);
}

.chart-legend .leg-pre {
  background: var(--wes-blue-dark);
}

.chart-legend .leg-ret {
  background: var(--wes-red);
}

.chart-legend .leg-frauen {
  width: 0.8rem;
  height: 0.2rem;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(10, 10, 46, 0.4);
  flex-shrink: 0;
}

.year-chart {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.06rem;
  min-height: 8rem;
  overflow: visible;
  width: 100%;
  margin: 0;
  padding: 0;
}

.year-frauen-curve {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.frauen-curve-outline {
  fill: none;
  stroke: rgba(10, 10, 46, 0.4);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frauen-curve-line {
  fill: none;
  stroke: #fff;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frauen-point {
  fill: #fff;
  stroke: rgba(10, 10, 46, 0.45);
  stroke-width: 1.5;
}

.frauen-tooltip {
  position: absolute;
  transform: translate(-50%, -100%) translateY(-0.6rem);
  background: var(--wes-ink);
  color: #fff;
  font-size: var(--fs-0);
  font-weight: 700;
  white-space: nowrap;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 3;
}

.frauen-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.year-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  flex: 1 1 0;
  height: 8rem;
  min-width: 0;
  width: auto;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.year-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  width: 100%;
  padding: 0.2rem 0;
  border-radius: var(--radius);
  box-sizing: border-box;
}

.year-col.is-active .year-body {
  background: #fff;
}

.year-col.is-active .year-label {
  color: var(--wes-blue);
  font-weight: 700;
}

.year-plot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 4.8rem;
}

.year-stack {
  position: relative;
  width: 82%;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 4px;
}

.year-seg {
  width: 100%;
  min-height: 0;
}

.year-seg.new {
  background: var(--wes-blue);
  transition: opacity 0.15s ease;
}

.year-col.is-pre .year-seg.new {
  background: var(--wes-blue-dark);
}

.year-chart.hide-new .year-col:not(.is-pre) .year-seg.new {
  opacity: 0;
}

.year-chart.hide-pre .year-col.is-pre .year-seg.new {
  opacity: 0;
}

.year-chart.hide-ret .year-seg.ret {
  opacity: 0;
}

.year-chart.hide-frauen .year-frauen-curve,
.year-chart.hide-frauen .frauen-tooltip {
  display: none;
}

.year-seg.ret {
  background: var(--wes-red);
  transition: opacity 0.15s ease;
}

.year-label {
  font-size: clamp(0.42rem, 2.1vw, 0.55rem);
  font-weight: 600;
  color: var(--wes-ink-soft);
  letter-spacing: -0.06em;
  line-height: 1;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.year-ratio {
  font-size: clamp(0.38rem, 1.9vw, 0.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--wes-ink-soft);
  white-space: nowrap;
  letter-spacing: -0.05em;
  max-width: 100%;
  overflow: hidden;
}

.year-ratio .n-total {
  color: var(--wes-blue);
  font-weight: 700;
}

.year-col.is-pre .year-ratio .n-total {
  color: var(--wes-blue-dark);
}

.year-ratio .n-ret {
  color: var(--wes-red);
  font-weight: 700;
}

.year-col.is-pre.is-active .year-label {
  color: var(--wes-blue-dark);
}

.year-detail {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(10, 10, 46, 0.08);
}

.year-detail-head h2 {
  margin: 0;
}

.year-detail-head .section-note {
  margin: 0.25rem 0 0.75rem;
}

.year-newcomers {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(10, 10, 46, 0.12);
}

.year-newcomers[hidden] {
  display: none;
}

.year-newcomers summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: var(--fs-1);
  color: #fff;
  background: #4a4a57;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  user-select: none;
  transition: background 0.15s ease;
}

.year-newcomers summary::-webkit-details-marker {
  display: none;
}

.year-newcomers summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  transition: transform 0.15s ease;
}

.year-newcomers[open] summary::before {
  transform: rotate(90deg);
}

.year-newcomers summary:hover {
  background: #33333d;
}

.year-newcomers .bars {
  margin-top: 0.5rem;
}

.footnote {
  margin: 0.1rem 0.15rem 0;
  color: var(--wes-ink-soft);
  font-size: var(--fs-1);
  line-height: 1.4;
}

.foot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x) max(1.5rem, env(safe-area-inset-bottom));
  color: var(--wes-ink-soft);
  font-size: var(--fs-2);
}

.foot a {
  color: var(--wes-blue);
  font-weight: 600;
  text-decoration: none;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}

.foot-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.year-pill {
  display: inline-block;
  padding: 0.12rem 0.32rem;
  border-radius: var(--radius);
  background: var(--wes-blue);
  color: #fff;
  font-size: var(--fs-0);
  font-weight: 700;
  flex: 0 0 auto;
}

.year-pill.pre {
  background: var(--wes-blue-dark);
  color: #fff;
}

.year-pill.ret {
  background: var(--wes-red);
  color: #fff;
}

.year-pill.focus {
  background: #fff;
  color: var(--wes-blue);
}

.year-pill.pre.focus {
  background: #fff;
  color: var(--wes-blue-dark);
}

.year-pill.ret.focus {
  background: #fff;
  color: var(--wes-red);
}

/* —— Tablet+ —— */
@media (min-width: 600px) {
  :root {
    --pad-x: 1.25rem;
    --gap: 1rem;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stat:first-child {
    grid-column: 1 / -1;
  }

  .hero-stat.wide {
    grid-column: 1 / -1;
  }

  .stat-row--frauen {
    grid-template-columns: 1fr;
  }

  .stat-row--frauen > .hero-stat:first-child {
    grid-column: auto;
  }

  .stat-cluster {
    grid-template-columns: repeat(3, 1fr);
  }

  .year-chart {
    min-height: 11rem;
    gap: 0.1rem;
  }

  .year-col {
    height: 11rem;
  }

  .year-plot {
    height: 7rem;
  }

  .year-body {
    padding: 0.35rem 0;
    gap: 0.15rem;
  }

  .year-stack {
    width: 78%;
  }

  .year-label {
    font-size: var(--fs-0);
    letter-spacing: -0.03em;
  }

  .year-ratio {
    font-size: var(--fs-0);
    letter-spacing: -0.02em;
  }

  .year-chart-head {
    margin-bottom: 0.75rem;
  }

  .chart-legend {
    font-size: var(--fs-1);
    gap: 0.75rem;
  }

  .foot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .foot a {
    min-height: auto;
  }

  .chip-row {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* —— Desktop —— */
@media (min-width: 840px) {
  :root {
    --pad-x: 1.25rem;
    --gap: 1.35rem;
  }

  .topbar-inner {
    padding: 0.85rem var(--pad-x);
  }

  .brand {
    opacity: 1;
  }

  .brand-logo {
    height: 2.45rem;
  }

  .tabs {
    width: auto;
    max-width: none;
    background: rgba(235, 234, 239, 0.16);
  }

  .tab {
    flex: none;
    min-height: 1.85rem;
    padding: 0.3rem 0.75rem;
    color: var(--wes-mist);
  }

  .tab.is-active {
    background: #fff;
    color: var(--wes-blue);
  }

  .tab:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .tab.is-active:hover {
    background: #fff;
    color: var(--wes-blue);
  }

  main {
    padding: 2rem var(--pad-x) 4rem;
  }

  h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
  }

  .surface-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  h2 {
    font-size: 1.25rem;
  }

  .stat-row {
    grid-template-columns: 1.6fr repeat(3, 1fr);
    width: 100%;
  }

  .hero-stat:first-child {
    grid-column: auto;
  }

  .hero-stat.wide {
    grid-column: auto;
  }

  #panel-frauen .stat-row--frauen {
    grid-template-columns: 1fr 2fr;
    gap: 2.75rem;
    align-items: start;
  }

  #panel-frauen .stat-row--frauen > .hero-stat {
    justify-self: start;
    width: 100%;
    max-width: 100%;
  }

  #panel-frauen .stat-cluster {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 1.75rem;
    width: 100%;
  }

  #panel-frauen .stat-cluster .hero-stat {
    text-align: right;
    flex: 0 1 auto;
    min-width: 0;
  }

  #panel-wieder .stat-row {
    grid-template-columns: 1fr 1fr;
  }

  #panel-wieder .year-chart-card {
    grid-column: 1 / -1;
    width: 100%;
  }

  .stat-value {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
  }

  .stat-value.sm {
    font-size: clamp(2rem, 3vw, 2.8rem);
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .bars,
  .surface,
  .year-chart,
  .year-detail {
    width: 100%;
  }

  .year-chart {
    gap: 0.12rem;
    min-height: 12.5rem;
  }

  .year-col {
    height: 12.5rem;
  }

  .year-plot {
    height: 8rem;
  }

  .year-body {
    padding: 0.4rem 0;
  }

  .year-stack {
    width: 72%;
  }

  .year-label,
  .year-ratio {
    font-size: var(--fs-1);
    letter-spacing: -0.02em;
  }

  .bar-row {
    grid-template-columns: minmax(8rem, 30%) 1fr auto;
    grid-template-areas: "label track value";
    gap: 0.85rem;
    padding: 1.05rem 1.15rem;
  }

  .bars.tall .bar-row {
    grid-template-columns: minmax(9rem, 34%) 1fr auto;
  }

  .bar-row--count {
    display: grid;
    grid-template-columns: minmax(11rem, 0.38fr) 1fr;
    grid-template-rows: auto auto;
    gap: 0.45rem 1rem;
    align-items: center;
  }

  .bar-row--count .bar-head {
    grid-column: 1;
    grid-row: 1;
  }

  .bar-row--count .year-pills {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .bar-row--count .bar-track {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .bar-track {
    height: 22px;
  }

  .bars.tall .bar-track {
    height: 18px;
  }

  .chip:hover {
    transform: translateY(-1px);
  }
}

@media (hover: none) {
  .chip:hover,
  .tab:hover {
    transform: none;
  }
}
