:root {
  --color-primary: #26CD94;
  --color-primary-dark: #1fb580;
  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-border: #e8e8e8;
  --color-bg: #fff;
  --color-page-bg: #f7f8fa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-page-bg);
}

a {
  color: var(--color-primary);
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
}

.topbar__brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar__brand:hover,
.topbar__brand:focus-visible {
  color: var(--color-primary-dark);
}

.topbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.topbar__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.topbar__toggle[aria-expanded="true"] .topbar__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar__toggle[aria-expanded="true"] .topbar__toggle-bar:nth-child(2) {
  opacity: 0;
}

.topbar__toggle[aria-expanded="true"] .topbar__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.topbar__nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  flex-basis: 100%;
  width: 100%;
  padding: 0.25rem 0 0.125rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.25rem;
}

.topbar__nav.is-open {
  display: flex;
}

.topbar__link {
  display: block;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

.topbar__link:hover,
.topbar__link:focus-visible {
  color: var(--color-primary);
}

.topbar__link--active {
  color: var(--color-primary);
  font-weight: 600;
}

@media (min-width: 768px) {
  .topbar__inner {
    flex-wrap: nowrap;
    padding: 0.875rem 1.5rem;
  }

  .topbar__toggle {
    display: none;
  }

  .topbar__nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-basis: auto;
    width: auto;
    margin-left: auto;
    padding: 0;
    border-top: none;
    margin-top: 0;
  }

  .topbar__link {
    padding: 0;
    white-space: nowrap;
  }
}

/* Page */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

/* Header */

.header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.header h1 {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
}

.header__subtitle {
  margin: 0 auto 1.25rem;
  max-width: 900px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
  text-align: left;
}

.header__cta {
  display: flex;
  justify-content: center;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  min-width: 44px;
  border: 2px solid transparent;
}

.btn--primary,
.btn--filled {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--primary:hover,
.btn--primary:focus-visible,
.btn--filled:hover,
.btn--filled:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn--primary {
  width: 100%;
  max-width: 320px;
  padding: 0.875rem 1.5rem;
  font-size: 1.0625rem;
}

.btn--filled {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.btn--outline {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  color: var(--color-primary);
  background: transparent;
  border-color: var(--color-primary);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: rgba(38, 205, 148, 0.08);
}

/* Charts grid */

.charts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .page {
    padding: 2rem 1.5rem 2.5rem;
  }

  .header h1 {
    font-size: 1.875rem;
    text-align: center;
  }

  .header__subtitle {
    text-align: center;
    font-size: 0.95rem;
  }

  .btn--primary {
    width: auto;
    font-size: 1.125rem;
    padding: 0.875rem 2.5rem;
  }

  .charts-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .charts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Chart card */

.chart-card {
  background: var(--color-bg);
  border-radius: 8px;
  padding: 0.875rem 0.75rem 0.625rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  min-width: 0;
  overflow: hidden;
}

.chart-card__title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.chart-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.chart-wrap .uplot {
  touch-action: none;
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
  padding-bottom: 0.15rem;
  font-size: 12px;
  color: #888;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-legend__swatch {
  display: inline-block;
  width: 16px;
  height: 3px;
  border-radius: 1px;
  flex-shrink: 0;
}

.chart-legend__swatch--izhs {
  background: var(--color-primary);
}

.chart-legend__swatch--snt {
  background: #BF2543;
}

@media (min-width: 768px) {
  .chart-card {
    padding: 1rem 1rem 0.75rem;
  }

  .chart-card__title {
    font-size: 0.95rem;
  }

  .chart-wrap {
    height: 220px;
  }
}

/* Tooltip */

.chart-tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  padding: 0.5rem 0.75rem;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  max-width: calc(100vw - 16px);
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip__month {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.chart-tooltip__row {
  color: #333;
}

/* Methodology */

.methodology {
  margin-bottom: 1.75rem;
}

.methodology h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.methodology p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .methodology h2 {
    font-size: 1.25rem;
  }

  .methodology p {
    font-size: 0.95rem;
  }
}

/* CTA buttons */

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.cta-buttons .btn {
  width: 100%;
}

@media (min-width: 480px) {
  .cta-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .cta-buttons .btn {
    width: auto;
    min-width: 200px;
  }
}

/* Footer */

.footer {
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.footer__copy,
.footer__legal {
  margin: 0 0 0.35rem;
  line-height: 1.4;
}

.footer__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
}

.footer__col {
  min-width: 0;
}

.footer__heading {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li {
  margin-bottom: 0.15rem;
  line-height: 1.35;
}

.footer__links a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.8125rem;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .footer {
    font-size: 0.875rem;
  }

  .footer__heading,
  .footer__links a {
    font-size: 0.875rem;
  }
}

/* SEO */

.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;
}
