:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #222222;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --blue: #0d4c8c;
  --blue-soft: rgba(13, 76, 140, 0.08);
  --content-width: 740px;
  --chrome-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.app-shell {
  width: min(calc(100% - 24px), var(--chrome-width));
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.2rem 0 0.38rem;
}

.site-header__icon-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
}

.site-header__icon {
  display: block;
  width: 40px;
  height: 40px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.top-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  height: 48px;
  padding: 0 0.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  min-width: max-content;
}

.top-nav__item {
  flex: 0 0 auto;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.top-nav__item--selected a,
.top-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.hero__logo {
  display: block;
  width: auto;
  max-width: none;
  height: 36px;
}

main {
  display: flex;
  justify-content: center;
}

.note-page {
  width: min(100%, var(--content-width));
  padding: 1.85rem 0 0;
}

.note-header {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.note-header__title {
  margin: 0;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.08;
}

.note-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
}

.note-header__meta a {
  color: var(--muted);
  text-decoration: none;
}

.note-header__meta a:hover,
.note-header__meta a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  outline: none;
}

.intro-copy {
  max-width: 38rem;
  margin-top: 1.28rem;
  color: #444444;
  font-size: 1rem;
}

.intro-copy p {
  margin: 0;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-top: 1.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.section-nav__link {
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.section-nav__link:hover,
.section-nav__link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  outline: none;
}

.dashboard-panel {
  margin-top: 1.4rem;
}

.dashboard {
  display: grid;
  gap: 1.6rem;
}

.section-card {
  padding: 1.48rem 0 0;
  border-top: 1px solid #d4d0ca;
  background: #ffffff;
}

.section-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.section-card__head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.section-card__eyebrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem 0.52rem;
  background: linear-gradient(90deg, var(--blue-soft), rgba(13, 76, 140, 0)) left / 100% 100% no-repeat;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-card__eyebrow a {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: inherit;
  text-decoration: none;
}

.section-card__eyebrow a::after {
  content: "";
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 2.75H3.75A1.75 1.75 0 0 0 2 4.5v7.75C2 13.216 2.784 14 3.75 14h7.75A1.75 1.75 0 0 0 13.25 12.25V10' stroke='%230d4c8c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 2h5v5' stroke='%230d4c8c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13 2.25 6.75 8.5' stroke='%230d4c8c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.9;
}

.section-card__eyebrow a:hover,
.section-card__eyebrow a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  outline: none;
}

.section-card__title {
  margin: 0;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  line-height: 1.1;
}

.section-card__subtitle {
  margin: 0;
  color: #555555;
  font-size: 0.98rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.metric {
  display: grid;
  gap: 0.16rem;
  padding: 0.78rem 0.9rem 0.82rem;
  border: 1px solid #f0ece6;
  background: #fafafa;
}

.metric--link {
  position: relative;
  color: inherit;
  text-decoration: none;
  padding-right: 2rem;
}

.metric--link:hover,
.metric--link:focus-visible {
  border-color: #d8d1c6;
  background: #f7f6f3;
  outline: none;
}

.metric--link::after {
  content: "";
  position: absolute;
  top: 0.82rem;
  right: 0.86rem;
  width: 0.82rem;
  height: 0.82rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 2.75H3.75A1.75 1.75 0 0 0 2 4.5v7.75C2 13.216 2.784 14 3.75 14h7.75A1.75 1.75 0 0 0 13.25 12.25V10' stroke='%230d4c8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 2h5v5' stroke='%230d4c8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13 2.25 6.75 8.5' stroke='%230d4c8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95;
}

.metric__label {
  margin: 0;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric__value {
  margin: 0.08rem 0 0;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.1;
}

.metric__detail {
  margin: 0;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.77rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 0.8rem;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.legend__swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.chart-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #ddd7cd;
  background: #ffffff;
}

.chart-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-frame__caption {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.62rem 0.8rem 0.72rem;
  border-top: 1px solid #f0ece6;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
}

.chart-tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 160px;
  max-width: 220px;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(34, 34, 34, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(34, 34, 34, 0.08);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  line-height: 1.35;
  pointer-events: none;
  z-index: 2;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip__date {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chart-tooltip__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chart-tooltip__row + .chart-tooltip__row {
  margin-top: 0.22rem;
}

.chart-tooltip__label {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
}

.chart-tooltip__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.chart-tooltip__value {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.section-card__notes {
  display: grid;
  gap: 0.3rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.79rem;
}

.section-card__notes li {
  position: relative;
  padding-left: 0.95rem;
}

.section-card__notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #8d8d8d;
}

.section-card__subhead {
  margin: 1.1rem 0 0.7rem;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-grid--secondary {
  margin-bottom: 0;
}

.site-footer {
  width: min(100%, var(--content-width));
  margin: 3.4rem auto 0;
  padding: 2rem 0 0.4rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer__trial {
  padding-bottom: 1.8rem;
}

.site-footer__eyebrow {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer__headline {
  max-width: 18ch;
  margin: 0.55rem auto 0;
  font-family: "Spectral", Georgia, serif;
  font-size: clamp(1.85rem, 3.8vw, 2.15rem);
  font-weight: 600;
  line-height: 1.12;
}

.site-footer__primary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.site-footer__primary:hover,
.site-footer__primary:focus-visible {
  background: #000000;
  outline: none;
}

.site-footer__signin {
  margin: 0.95rem 0 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.86rem;
}

.site-footer__signin a,
.site-footer__legal a,
.site-footer__brand a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.site-footer__meta {
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}

.site-footer__legal,
.site-footer__brand {
  margin: 0;
  color: var(--muted);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

.site-footer__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.site-footer__secondary {
  display: inline-block;
  padding: 0.72rem 0.98rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__secondary:hover,
.site-footer__secondary:focus-visible {
  border-color: #cfcfcf;
  background: #fafafa;
  outline: none;
}

.site-footer__brand {
  margin-top: 1rem;
}

@media (min-width: 700px) {
  .top-nav__items {
    gap: 1.5rem;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 17px;
  }

  .app-shell {
    width: min(calc(100% - 16px), var(--chrome-width));
  }

  .site-header__bar {
    min-height: 40px;
    padding: 0.1rem 0 0.42rem;
  }

  .site-header__brand {
    justify-content: center;
  }

  .site-header__icon-link {
    width: 32px;
    height: 32px;
  }

  .site-header__icon {
    width: 32px;
    height: 32px;
  }

  .hero__logo {
    height: 28px;
  }

  .top-nav {
    justify-content: flex-start;
    padding: 0 0.5rem;
  }

  .top-nav__items {
    justify-content: flex-start;
    gap: 1.1rem;
  }

  .note-page {
    padding-top: 1.2rem;
  }

  .note-header__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .chart-frame__caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .site-footer__headline {
    max-width: 16ch;
  }

  .site-footer__actions {
    gap: 0.55rem;
  }

  .site-footer__secondary {
    font-size: 0.8rem;
    padding: 0.68rem 0.9rem;
  }
}

@media print {
  html {
    background: #ffffff;
    font-size: 12pt;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  a {
    text-decoration: none;
  }
}
