:root {
  --paper: #ece7db;
  --ink: #111;
  --muted: #6a655a;
  --accent: #e12b1a;
  --line: rgba(17, 17, 17, 0.24);
  --panel: #f5f0e5;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #181611;
  --ink: #ece7db;
  --muted: #9a948a;
  --line: rgba(236, 231, 219, 0.24);
  --panel: #211e18;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.55;
}
a { color: inherit; }
button {
  color: inherit;
  font: inherit;
}
button, a {
  min-height: 44px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  transform: translateY(-160%);
  border: 2px solid var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  display: grid;
  width: min(calc(100% - 32px), 1180px);
  min-height: 76px;
  margin: 24px auto 0;
  padding: 10px clamp(14px, 3vw, 28px);
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
}
.identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.identity-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.identity strong,
.identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity strong { font-size: 12px; }
.identity small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.private-badge {
  padding: 6px 9px;
  border: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.header-tools,
.language-switch {
  display: flex;
  align-items: center;
}
.header-tools { gap: 6px; }
.language-switch button,
#gt-theme-btn {
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.language-switch button {
  min-width: 44px;
  padding: 0;
}
.language-switch button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
#gt-theme-btn {
  padding: 0 10px;
  border-color: var(--ink);
  white-space: nowrap;
}
#gt-theme-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.health-main {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding-bottom: 72px;
}
.health-masthead {
  padding: clamp(44px, 7vw, 82px) 0 clamp(38px, 6vw, 64px);
  border-bottom: 2px solid var(--ink);
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.health-masthead h1 {
  max-width: 12ch;
  margin: 22px 0 0;
  font-family: var(--display);
  font-size: clamp(54px, 7.5vw, 96px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.9;
  text-transform: uppercase;
}
.hero-intro {
  max-width: 68ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 20px);
}
.health-action,
.metric-load-more {
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.health-action { margin-top: 28px; }
.health-action:disabled,
.metric-load-more:disabled {
  cursor: wait;
  opacity: 0.55;
}
.health-state {
  margin: 32px 0;
  padding: 24px;
  border: 2px solid var(--ink);
  background: var(--panel);
}
.health-state strong {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  text-transform: uppercase;
}
.health-state p {
  max-width: 68ch;
  margin: 12px 0 0;
  color: var(--muted);
}
.health-state-error { border-color: var(--accent); }
.health-facts {
  display: grid;
  margin: 32px 0 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 2px solid var(--ink);
}
.health-facts div {
  min-width: 0;
  padding: 16px;
  border-right: 1px dashed var(--ink);
}
.health-facts div:last-child { border-right: 0; }
.health-facts dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.health-facts dd {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  overflow-wrap: anywhere;
}
.category-nav {
  display: flex;
  margin: 26px 0 0;
  flex-wrap: wrap;
  gap: 8px;
}
.category-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}
.metric-category {
  padding: 52px 0 0;
}
.metric-category > h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.metric-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--ink);
  background: var(--panel);
}
.metric-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}
.metric-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}
.metric-name {
  max-width: 44%;
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
  text-align: right;
}
.metric-headline {
  display: flex;
  margin: 30px 0 0;
  align-items: baseline;
  gap: 8px;
}
.metric-headline strong {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 400;
  line-height: 0.8;
}
.metric-headline small,
.metric-meta {
  color: var(--muted);
  font-size: 10px;
}
.metric-stats,
.sleep-grid {
  display: grid;
  margin: 24px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px dashed var(--ink);
}
.metric-stat,
.sleep-grid div {
  min-width: 0;
  padding: 12px 8px 12px 0;
  border-bottom: 1px dashed var(--ink);
}
.metric-stat dt,
.sleep-grid dt {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.metric-stat dd,
.sleep-grid dd {
  margin: 5px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.metric-sources { margin-top: 22px; }
.metric-sources > strong {
  font-size: 9px;
  text-transform: uppercase;
}
.source-chips {
  display: flex;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.source-chip {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  font-size: 9px;
  overflow-wrap: anywhere;
}
.metric-details {
  margin-top: 24px;
  border-top: 2px solid var(--ink);
}
.metric-details summary,
.health-infrastructure > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.metric-detail-message {
  color: var(--muted);
  font-size: 10px;
}
.metric-chart-slot { margin: 16px 0; }
.metric-chart {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.metric-chart svg {
  display: block;
  width: 100%;
  height: 160px;
}
.metric-chart polyline {
  stroke: var(--accent);
  stroke-width: 2;
}
.metric-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.metric-detail-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 9px;
}
.metric-detail-table th,
.metric-detail-table td {
  padding: 9px;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}
.metric-load-more { margin-top: 12px; }
.health-infrastructure {
  margin-top: 56px;
  border-top: 2px solid var(--ink);
}
.health-infrastructure .health-grid { margin-top: 0; }
.health-grid {
  display: grid;
  margin-top: 34px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink);
}
.health-card {
  min-width: 0;
  min-height: 280px;
  padding: 24px;
  border-right: 1px dashed var(--ink);
  background: var(--panel);
}
.health-card:last-child { border-right: 0; }
.health-card h2 {
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}
.health-card > p { color: var(--muted); }
.health-card dl { margin: 24px 0 0; }
.health-card dl div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px dashed var(--ink);
}
.health-card dt,
.health-card dd {
  margin: 0;
  font-size: 10px;
}
.health-card dt {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.health-card dd {
  color: var(--muted);
  text-align: right;
}
#health-foundation-status {
  color: var(--accent);
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}
.health-request {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.health-request code {
  color: var(--ink);
  font-family: var(--mono);
  overflow-wrap: anywhere;
  text-transform: none;
}
.site-footer {
  display: grid;
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto 32px;
  padding-top: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  border-top: 1px dashed var(--ink);
  color: var(--muted);
  font-size: 11px;
}
.site-footer strong {
  color: var(--ink);
  text-transform: uppercase;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .health-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-facts div { border-bottom: 1px dashed var(--ink); }
  .metric-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr; }
  .health-card {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px dashed var(--ink);
  }
  .health-card:last-child { border-bottom: 0; }
}
@media (max-width: 700px) {
  .site-header {
    width: 100%;
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .private-badge { display: none; }
  .identity small { display: none; }
  #gt-theme-btn {
    max-width: 92px;
    white-space: normal;
    line-height: 1.15;
  }
  .health-main,
  .site-footer { width: min(calc(100% - 24px), 1180px); }
  .health-main { padding-bottom: 48px; }
  .health-masthead h1 { font-size: clamp(44px, 13vw, 60px); }
  .health-card { padding: 20px; }
  .health-facts { grid-template-columns: 1fr; }
  .health-facts div {
    border-right: 0;
    border-bottom: 1px dashed var(--ink);
  }
  .metric-card-head { display: block; }
  .metric-name {
    display: block;
    max-width: none;
    margin-top: 10px;
    text-align: left;
  }
  .metric-stats,
  .sleep-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
