* { box-sizing: border-box; }
body { font: 16px/1.5 system-ui, -apple-system, sans-serif; color: #17212b; background: #fff; max-width: 1160px; margin: auto; padding: 28px 24px 50px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 23px; line-height: 1.35; margin: 0 0 12px; overflow-wrap: anywhere; }
header > p { max-width: 1000px; margin: 10px 0 24px; color: inherit; }
a { color: #155eaa; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid #1b61a7; outline-offset: 3px; }
.back { display: inline-block; margin-bottom: 14px; }
.formula { display: inline-block; color: inherit; white-space: nowrap; font-size: 17px; }
.formula svg { display: inline-block; max-width: 100%; }
.source { font-size: 15px; margin: -5px 0 12px; }
section { margin: 0 0 32px; scroll-margin-top: 16px; border-top: 1px solid #dfe4e8; padding-top: 20px; }
.count-chart { position: relative; height: clamp(280px, 39vw, 452px); }
canvas { display: block; max-width: 100%; }
.latest { font-size: 15px; margin: 8px 0 0; }
.subdomain-link { font-size: 14px; margin: 6px 0 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 18px 0; }
.toolbar label { font-size: 14px; color: inherit; }
select { font: inherit; color: inherit; background: #fff; border: 1px solid #b7c1ca; border-radius: 3px; padding: 7px 10px; max-width: 100%; min-height: 40px; }
#jump { flex: 1; min-width: 0; }
.legend-entry { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; padding: 5px 0; text-align: left; background: transparent; color: inherit; font: 13px/1.4 system-ui, -apple-system, sans-serif; cursor: pointer; }
.legend-swatch { flex: 0 0 22px; height: 0; border-top: 2px solid var(--line-color); }
.legend-entry[aria-pressed="false"] { opacity: .4; }
.legend-entry[aria-pressed="false"] .legend-name { text-decoration: line-through; }
#plot-error { color: #9b2c23; }
@media (max-width: 650px) {
  body { padding: 20px 10px 40px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .latest { font-size: 13px; }
  .legend-entry { min-height: 44px; font-size: 12px; }
  .toolbar { gap: 8px; }
  select { min-height: 44px; font-size: 14px; }
}
.count-legend { position: absolute; top: 12px; left: 88px; display: grid; gap: 2px; }
.count-legend .legend-entry { padding: 1px 0; width: auto; font-size: 12px; }
.count-legend .legend-swatch { flex-basis: 28px; }
@media (max-width: 650px) {
  .count-legend { left: 76px; top: 9px; gap: 0; }
  .count-legend .legend-entry { min-height: 24px; font-size: 11px; }
}
[hidden] { display: none !important; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.page-heading h1 { flex: 1 1 480px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.frequency-switch { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.frequency-options { display: grid; grid-template-columns: 1fr 1fr; position: relative; padding: 3px; width: 226px; border: 1px solid #aab7c2; border-radius: 24px; background: #fff; }
.frequency-options::before { content: ''; position: absolute; inset: 3px auto 3px 3px; width: calc((100% - 6px) / 2); background: #1b61a7; border-radius: 20px; transition: transform 150ms ease; }
.frequency-options[data-selected="quarterly"]::before { transform: translateX(100%); }
.frequency-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.frequency-options label { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; min-height: 36px; padding: 5px 12px; font-size: 14px; cursor: pointer; border-radius: 20px; }
.frequency-options input:checked + label { color: #fff; }
.frequency-options input:focus-visible + label { outline: 2px solid #1b61a7; outline-offset: 5px; }
@media (max-width: 650px) {
  .page-heading { gap: 4px; }
  .page-heading h1 { flex-basis: 100%; margin-bottom: 6px; }
  .frequency-switch { margin-bottom: 8px; }
  .frequency-options { width: 190px; padding: 0; border: 0; border-radius: 8px; background: #edf1f5; }
  .frequency-options::before { inset: 3px auto 3px 3px; width: calc(50% - 6px); border-radius: 5px; background: #fff; box-shadow: 0 1px 3px #17212b26; }
  .frequency-options[data-selected="quarterly"]::before { transform: translateX(calc(100% + 6px)); }
  .frequency-options label { min-height: 44px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 500; }
  .frequency-options input:checked + label { color: #155eaa; font-weight: 600; }
  .frequency-options input:focus-visible + label { outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) { .frequency-options::before { transition: none; } }
