:root {
  color-scheme: light;
  --page: #f4f6f8;
  --paper: #fff;
  --ink: #102234;
  --muted: #4d6173;
  --line: #d9e2eb;
  --navy: #112a3d;
  --teal: #73e0c6;
  --focus: #157c69;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.chart-card button:focus-visible { outline-color: var(--teal); }
section[id], figure[id] { scroll-margin-top: 2rem; }

.shell { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.skip-link { position: absolute; inset: 0 auto auto 0; padding: .75rem 1rem; background: var(--paper); transform: translateY(-120%); z-index: 1; }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.header-inner { min-height: 4.75rem; padding-block: .8rem; }
.wordmark { display: inline-flex; gap: .62rem; align-items: center; font-weight: 750; letter-spacing: -.035em; }
.brand-mark { width: 1.8rem; height: 1.8rem; display: inline-flex; gap: .17rem; align-items: flex-end; justify-content: center; padding: .42rem; border-radius: .42rem; background: var(--navy); }
.brand-mark i { flex: 1; background: var(--teal); border-radius: .13rem .13rem 0 0; }
.brand-mark i:nth-child(1) { height: 42%; }
.brand-mark i:nth-child(2) { height: 68%; }
.brand-mark i:nth-child(3) { height: 100%; }
.site-header nav { display: flex; flex-wrap: wrap; gap: clamp(.85rem, 3vw, 2rem); }
.site-header nav a { font-weight: 600; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25rem; }

.hero { padding-block: clamp(2.8rem, 8vw, 6.4rem); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(3rem, 5.5vw, 5.05rem); line-height: 1.01; letter-spacing: -.064em; font-weight: 780; max-width: 9ch; text-wrap: balance; }
.hero-copy p { margin-block: 1.45rem 1.8rem; max-width: 36ch; color: var(--muted); font-size: clamp(1.07rem, 1.65vw, 1.22rem); }
.button { display: inline-flex; min-height: 2.95rem; align-items: center; justify-content: center; padding: .6rem 1rem; border: 1px solid transparent; border-radius: .62rem; font-weight: 650; text-align: center; }
.button-primary { background: var(--navy); color: white; }
.button-primary:hover { background: #204763; }
.button-outline { background: var(--paper); border-color: var(--line); }
.button-outline:hover { border-color: #7b95a7; }

.chart-card { min-width: 0; padding: clamp(1.1rem, 3vw, 1.9rem); border-radius: 1.3rem; background: var(--navy); color: #f5fbff; box-shadow: 0 1.1rem 2.65rem #182c3f22; }
.chart-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; column-gap: .8rem; row-gap: .85rem; margin-bottom: 1.6rem; }
.chart-kicker { font-size: .875rem; color: #a9c2d4; margin-bottom: .22rem; }
.chart-header h2 { font-size: clamp(1.24rem, 2.2vw, 1.6rem); line-height: 1.14; letter-spacing: -.04em; }
.view-switch { display: flex; gap: .2rem; border: 1px solid #526a7c; border-radius: .6rem; padding: .2rem; }
.view-switch button { font: inherit; font-size: .875rem; font-weight: 650; border: 0; border-radius: .4rem; padding: .32rem .57rem; color: #e3eef6; background: transparent; cursor: pointer; }
.view-switch button[aria-pressed="true"] { color: #102e37; background: var(--teal); }
.view-switch button:hover:not([aria-pressed="true"]) { background: #29475d; }
.plot { display: grid; grid-template-columns: 2.65rem minmax(0, 1fr); grid-template-rows: clamp(8.7rem, 21vw, 13rem) auto; column-gap: .55rem; font-variant-numeric: tabular-nums; }
.ticks { display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: #a9c2d4; font-size: .8125rem; line-height: 1; transform: translateY(-.4rem); }
.plot-area { position: relative; border-bottom: 1px solid #6c8294; background-image: linear-gradient(to bottom, #99b7cf3e 1px, transparent 1px); background-size: 100% 25%; }
.bars, .months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(.22rem, 1.15vw, .8rem); text-align: center; }
.bars { height: 100%; align-items: end; }
.bar { position: relative; width: min(78%, 2.8rem); height: var(--bar-height, 0%); margin-inline: auto; background: linear-gradient(180deg, #86efda, #45bba6); border-radius: .35rem .35rem 0 0; }
.bar:nth-child(1) { --bar-height: 51.67%; }
.bar:nth-child(2) { --bar-height: 58.33%; }
.bar:nth-child(3) { --bar-height: 70.83%; }
.bar:nth-child(4) { --bar-height: 73.33%; }
.bar:nth-child(5) { --bar-height: 85.83%; }
.bar:nth-child(6) { --bar-height: 95%; }
.bar span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); padding-bottom: .25rem; white-space: nowrap; font-weight: 650; font-size: .875rem; }
.months { grid-column: 2; color: #c6d8e6; font-size: .875rem; padding-top: .48rem; }
.chart-note { margin-top: 1.12rem; min-height: 2.7em; color: #c6d8e6; font-size: .875rem; }

.method, .dataset { margin-bottom: clamp(2.8rem, 6vw, 4.8rem); }
.section-heading { margin-bottom: 1.3rem; }
.section-heading h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.14; letter-spacing: -.045em; }
.section-heading p { margin-top: .5rem; color: var(--muted); }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.method-grid > div { padding: 1.35rem clamp(.85rem, 2.5vw, 1.8rem); border-inline-end: 1px solid var(--line); }
.method-grid > div:first-child { padding-inline-start: 0; }
.method-grid > div:last-child { border-inline-end: 0; padding-inline-end: 0; }
.method-grid h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.method-grid p { color: var(--muted); }
.dataset .section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .9rem; }
.table-frame { background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: .7rem clamp(.45rem, 2vw, 1.1rem); }
thead th { background: #e9f0f5; font-size: .875rem; line-height: 1.4; }
tbody th { font-weight: 650; }
tbody tr + tr { border-top: 1px solid var(--line); }
td, th:not(:first-child) { text-align: right; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.4rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 50rem) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
  .hero-copy p { max-width: 52ch; }
}

@media (max-width: 37rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { gap: .65rem 1rem; }
  .site-header nav { font-size: .9rem; }
  .hero h1 { font-size: clamp(2.7rem, 10vw, 3.6rem); }
  .plot { grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: .35rem; }
  .bar span { font-size: .8rem; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid > div { padding-inline: 0; border-inline-end: 0; }
  .method-grid > div + div { border-top: 1px solid var(--line); }
}
