:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --line-strong: #bac3d1;
  --mandatory: #126e5a;
  --mandatory-bg: #e8f4ef;
  --recommended: #8a4b13;
  --recommended-bg: #fff2df;
  --header-bg: #273447;
  --header-text: #ffffff;
  --group-header-height: 34px;
  --time-header-height: 56px;
  --number-column-width: 56px;
  --vaccine-column-width: 280px;
  --sticky-shadow: 8px 0 14px rgb(23 32 51 / 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 32px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  max-width: 920px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.summary {
  display: flex;
  gap: 12px;
}

.summary div {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fbfcfe;
}

.summary dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.summary dd {
  margin-top: 2px;
  font-size: 1.35rem;
  font-weight: 800;
}

main {
  padding: 22px 32px 36px;
}

.section-heading {
  margin-bottom: 12px;
}

.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 210px);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.number-col {
  width: var(--number-column-width);
}

.vaccine-col {
  width: var(--vaccine-column-width);
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

th,
td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

thead th {
  position: sticky;
  z-index: 3;
  padding: 8px;
  background: var(--header-bg);
  color: var(--header-text);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.column-group-header {
  top: 0;
  height: var(--group-header-height);
  padding: 6px 8px;
  border-bottom-color: #6e7b8d;
}

.time-column {
  top: var(--group-header-height);
  height: var(--time-header-height);
}

.number-column,
.number-cell {
  left: 0;
  min-width: var(--number-column-width);
  width: var(--number-column-width);
}

.vaccine-column,
.vaccine-cell {
  left: var(--number-column-width);
  min-width: var(--vaccine-column-width);
  width: var(--vaccine-column-width);
}

.number-column,
.number-cell,
.vaccine-column,
.vaccine-cell {
  position: sticky;
  z-index: 2;
}

thead .number-column,
thead .vaccine-column {
  top: 0;
  z-index: 5;
  height: calc(var(--group-header-height) + var(--time-header-height));
}

.column-group-header {
  z-index: 4;
}

.number-column,
.number-cell,
.vaccine-column,
.vaccine-cell {
  box-shadow: var(--sticky-shadow);
}

.column-label,
.column-meta,
.column-group-label,
.column-group-meta,
.vaccine-short,
.vaccine-label,
.vaccine-bg {
  display: block;
}

.column-group-label {
  line-height: 1.1;
  white-space: nowrap;
}

.column-group-meta {
  margin-top: 2px;
  color: #c8d4e6;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.column-label {
  line-height: 1.15;
  white-space: nowrap;
}

.column-meta {
  margin-top: 3px;
  color: #c8d4e6;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

tbody th,
tbody td {
  min-height: 54px;
  padding: 8px;
  background: var(--surface);
}

.group-row th {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 0.82rem;
  text-align: left;
  text-transform: uppercase;
}

.group-row.mandatory th {
  background: var(--mandatory);
}

.group-row.recommended th {
  background: var(--recommended);
}

.number-cell {
  background: #f4f7fb;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.vaccine-cell {
  background: #fbfcfe;
  text-align: left;
}

.vaccine-short {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.vaccine-label,
.vaccine-bg {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
}

.time-column,
.time-cell {
  width: auto;
}

.time-cell {
  height: 54px;
  padding: 6px;
  text-align: center;
}

.filled-cell.mandatory {
  background: var(--cell-bg, var(--mandatory-bg));
}

.filled-cell.recommended {
  background: var(--cell-bg, var(--recommended-bg));
}

.dose {
  display: inline;
  margin: 2px;
  color: var(--mandatory);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: pre;
}

.dose.recommended {
  color: var(--recommended);
}

.muted-dose {
  opacity: 0.58;
}

.noted-dose {
  outline-offset: 2px;
  cursor: help;
}

.noted-dose::after {
  content: "*";
  margin-left: 2px;
}

.divider-after th,
.divider-after td {
  border-bottom: 3px solid var(--line-strong);
}

.sources-section {
  margin-top: 22px;
}

.sources-section h2 {
  margin-bottom: 8px;
}

#source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#source-list a {
  color: #245c9f;
  font-size: 0.92rem;
  font-weight: 700;
}

.error-banner {
  padding: 12px 16px;
  background: #fff0f0;
  color: #9f1d1d;
  border-bottom: 1px solid #e4a6a6;
}

@media (max-width: 760px) {
  :root {
    --number-column-width: 48px;
    --vaccine-column-width: 220px;
  }

  .page-header {
    display: block;
    padding: 22px 18px 18px;
  }

  .summary {
    margin-top: 18px;
  }

  main {
    padding: 18px;
  }

  .table-scroll {
    max-height: calc(100vh - 246px);
  }

  table {
    min-width: max-content;
  }
}
