    :root {
      color-scheme: light;
      --ink: #1f2933;
      --muted: #617184;
      --line: #d9e1ea;
      --surface: #ffffff;
      --page: #f6f8fb;
      --accent: #0457d9;
      --accent-dark: #023b93;
      --measure: #e03131;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.5;
      color: var(--ink);
      background: var(--page);
    }

    header {
      position: sticky;
      top: 0;
      z-index: 10;
      border-bottom: 1px solid var(--line);
      background: var(--surface);
      box-shadow: 0 1px 8px rgb(31 41 51 / 0.06);
    }

    .wrap {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
    }

    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      padding: 28px 0 22px;
    }

    h1 {
      margin: 0;
      font-size: clamp(24px, 3vw, 34px);
      font-weight: 760;
      letter-spacing: 0;
    }

    .title-block {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
    }

    .page-switch {
      display: inline-flex;
      width: max-content;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #eef3f8;
    }

    .page-switch button {
      appearance: none;
      border: 0;
      border-right: 1px solid var(--line);
      padding: 7px 14px;
      color: var(--muted);
      background: transparent;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
    }

    .page-switch button:last-child {
      border-right: 0;
    }

    .page-switch button[aria-selected="true"] {
      color: #ffffff;
      background: var(--accent-dark);
    }

    .language-switch {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 44px;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--accent-dark);
      background: #ffffff;
      font-size: 14px;
      font-weight: 800;
      text-decoration: none;
    }

    .page-panel[hidden] {
      display: none;
    }

    .growth-summary {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      position: relative;
      isolation: isolate;
    }

    .growth-summary-panel {
      margin-bottom: 20px;
    }

    .growth-summary-card {
      padding: 14px 16px 16px;
      background: #fbfcfe;
    }

    .summary-table {
      position: relative;
      z-index: 0;
      flex: 0 1 340px;
      min-width: 0;
      border-collapse: collapse;
      border-spacing: 0;
      border: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.15;
    }

    .summary-table caption {
      caption-side: top;
      padding: 0 0 8px;
      color: var(--ink);
      font-weight: 700;
      text-align: center;
    }

    .summary-caption-title,
    .summary-caption-subtitle {
      display: block;
    }

    .summary-caption-subtitle {
      color: var(--muted);
      font-weight: 500;
    }

    .percentile-trend-card {
      position: relative;
      z-index: 3;
      flex: 0 0 380px;
      max-width: 100%;
    }

    .percentile-trend-card .chart-surface {
      position: relative;
      z-index: 1;
      padding: 0;
      background: transparent;
    }

    .percentile-trend-card .result-meta {
      right: 16px;
    }

    .percentile-trend-chart {
      width: 100%;
      height: 270px;
      min-height: 270px;
      background: transparent;
    }

    .summary-table th,
    .summary-table td {
      padding: 2px 0;
      border: 0;
      vertical-align: top;
    }

    .summary-table th {
      padding-right: 18px;
      color: var(--ink);
      font-weight: 650;
      text-align: right;
      white-space: nowrap;
    }

    .summary-table td:last-child {
      white-space: nowrap;
    }

    .chart-jump-link {
      color: var(--ink);
      text-decoration-thickness: 1px;
      text-underline-offset: 3px;
    }

    .chart-jump-link:hover,
    .chart-jump-link:focus-visible {
      color: var(--accent-dark);
    }

    .birth-stats {
      color: var(--muted);
      font-size: 13px;
    }

    .percentile {
      font-weight: 700;
    }

    .percentile-good {
      color: #087f5b;
    }

    .percentile-watch {
      color: #c25a00;
    }

    .percentile-alert {
      color: #c92a2a;
    }

    main {
      padding: 28px 0 42px;
    }

    .grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    .result-card {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 1px 2px rgb(31 41 51 / 0.05);
    }

    .result-card[hidden] {
      display: none;
    }

    .result-card {
      scroll-margin-top: 180px;
    }

    .result-meta {
      position: absolute;
      z-index: 2;
      top: 12px;
      left: 16px;
      right: 116px;
      min-width: 0;
      pointer-events: none;
    }

    h2 {
      margin: 0;
      font-size: 18px;
      line-height: 1.25;
      letter-spacing: 0;
    }

    .chart-surface {
      position: relative;
      min-width: 0;
      padding: 4px 4px 6px;
      background: #fbfcfe;
    }

    .chart {
      position: relative;
      width: 100%;
      height: min(68vh, 560px);
      min-height: 390px;
    }

    .chart-pinned-tooltip {
      position: absolute;
      z-index: 30;
      max-width: min(220px, 56vw);
      padding: 8px 10px;
      border: 1px solid #d9e1ea;
      border-radius: 4px;
      color: #1f2933;
      background: rgb(255 255 255 / 0.96);
      box-shadow: 0 2px 8px rgb(31 41 51 / 0.13);
      font-size: 12px;
      line-height: 1.35;
      pointer-events: none;
      white-space: nowrap;
    }

    .percentile-trend-card .chart {
      height: 270px;
      min-height: 270px;
    }

    .percentile-trend-card h2 {
      font-size: 16px;
    }

    .card-panel {
      padding: 14px 16px 16px;
      background: #fbfcfe;
    }

    .card-panel h2 {
      margin-bottom: 10px;
    }

    .vaccine-link {
      color: var(--accent-dark);
      text-decoration-thickness: 1px;
      text-underline-offset: 3px;
    }

    .calendar-scroll {
      position: relative;
      overflow-x: auto;
      scrollbar-gutter: stable;
    }

    .vaccine-overlays {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
    }

    .vaccine-overlay {
      position: absolute;
      z-index: 3;
      overflow: hidden;
      border: 1px solid currentColor;
      border-radius: 8px;
      box-shadow: 0 1px 4px rgb(31 41 51 / 0.12);
    }

    .vaccine-overlay.schedule-cell {
      z-index: 2;
      box-shadow: none;
    }

    .calendar-column-highlight {
      position: absolute;
      z-index: 0;
      background: #fff2df;
    }

    .immunization-card {
      justify-self: start;
      width: fit-content;
      max-width: 100%;
    }

    .immunization-card .result-meta {
      position: static;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 12px;
      padding: 8px 8px 10px;
      pointer-events: auto;
    }

    .calendar-range-switch {
      flex: 0 0 auto;
      display: inline-flex;
      width: max-content;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #eef3f8;
    }

    .calendar-range-switch button {
      appearance: none;
      border: 0;
      border-right: 1px solid var(--line);
      padding: 5px 11px;
      color: var(--muted);
      background: transparent;
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
    }

    .calendar-range-switch button:last-child {
      border-right: 0;
    }

    .calendar-range-switch button[aria-selected="true"] {
      color: #ffffff;
      background: var(--accent-dark);
    }

    .immunization-table {
      position: relative;
      z-index: 2;
      width: max-content;
      border-collapse: collapse;
      table-layout: auto;
      color: var(--ink);
      font-size: 11px;
      line-height: 1.2;
      background: transparent;
    }

    .immunization-kind-column {
      width: 78px;
    }

    .immunization-table th,
    .immunization-table td {
      padding: 6px 4px;
      border: 0;
      text-align: center;
      vertical-align: middle;
    }

    .immunization-table th[data-column-index],
    .immunization-table td[data-column-index] {
      white-space: nowrap;
    }

    .immunization-table col[data-column-index="3"],
    .immunization-table col[data-column-index="4"],
    .immunization-table col[data-column-index="14"],
    .immunization-table col[data-column-index="22"],
    .immunization-table th[data-column-index="3"],
    .immunization-table th[data-column-index="4"],
    .immunization-table th[data-column-index="14"],
    .immunization-table th[data-column-index="22"],
    .immunization-table td[data-column-index="3"],
    .immunization-table td[data-column-index="4"],
    .immunization-table td[data-column-index="14"],
    .immunization-table td[data-column-index="22"] {
      border-left: 1px dashed #aeb8c8;
    }

    .immunization-table th[data-column-index="0"],
    .immunization-table td[data-column-index="0"] {
      border-left: 1px dashed #aeb8c8;
    }

    .immunization-table thead th {
      background: #ffffff;
      color: var(--ink);
      font-size: 10px;
      font-weight: 700;
      line-height: 1.1;
    }

    .immunization-table .immunization-vaccines-row th {
      background: #fff1f5;
    }

    .immunization-table .immunization-date-header {
      vertical-align: top;
      white-space: normal;
    }

    .immunization-header-group + .immunization-header-group {
      margin-top: 5px;
    }

    .immunization-header-date {
      margin-bottom: 3px;
      color: var(--ink);
      font-weight: 800;
      white-space: nowrap;
    }

    .immunization-header-date.calendar-next-date {
      color: #c92a2a;
      white-space: pre-line;
    }

    .immunization-header-vaccine {
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .immunization-header-vaccine + .immunization-header-vaccine {
      margin-top: 4px;
    }

    .immunization-date-header .vaccine-link {
      display: block;
      font-weight: 700;
    }

    .immunization-table .immunization-left-header,
    .immunization-table tbody th {
      text-align: right;
    }

    .immunization-table .immunization-left-header {
      vertical-align: bottom;
    }

    .immunization-table .immunization-vaccines-header {
      text-align: right;
      vertical-align: top;
    }

    .immunization-table thead tr:last-child th,
    .immunization-table .immunization-section-row th {
      border-top: 1px solid #cbd5e1;
    }

    .immunization-table tbody th {
      background: #f8fafc;
      font-weight: 700;
    }

    .immunization-table .immunization-section-row th {
      padding: 5px 8px;
      background: #f8fafc;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      text-align: left;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .immunization-table td {
      color: var(--accent-dark);
      font-weight: 650;
    }

    .immunization-table .calendar-muted-vaccine {
      color: var(--muted);
    }

    .immunization-table .calendar-note {
      text-decoration: underline dotted rgb(4 87 217 / 0.45);
      text-underline-offset: 3px;
    }

    .immunization-table .calendar-empty {
      color: var(--muted);
      font-weight: 400;
      background: transparent;
    }

    .immunization-table tbody .calendar-todo-column {
      background: transparent;
    }

    footer {
      padding: 0 0 32px;
      color: var(--muted);
      font-size: 13px;
    }

    footer p {
      margin: 0;
      font-size: 13px;
    }

    footer a {
      color: var(--accent-dark);
      font-weight: 650;
      text-decoration-thickness: 1px;
      text-underline-offset: 3px;
    }

    .source-preview {
      position: relative;
      display: inline-block;
    }

    .source-preview-image {
      position: fixed;
      left: 50%;
      top: 50%;
      z-index: 20;
      display: block;
      width: min(96vw, 860px);
      max-height: 88vh;
      object-fit: contain;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #ffffff;
      box-shadow: 0 18px 45px rgb(15 23 42 / 0.24);
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, -50%) scale(0.98);
      transition: opacity 0.12s ease, transform 0.12s ease;
    }

    .source-preview:hover .source-preview-image,
    .source-preview:focus-within .source-preview-image {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    @media (max-width: 760px) {
      header {
        position: static;
      }

      .topbar {
        display: block;
      }

      .title-block {
        gap: 10px;
      }

      .summary-table {
        margin-top: 8px;
      }

      .growth-summary {
        display: block;
      }

      .growth-summary-card {
        padding: 12px 16px 14px;
      }

      .summary-table {
        width: 100%;
      }

      .growth-summary-panel {
        margin-bottom: 18px;
      }

      .percentile-trend-chart {
        height: 390px;
        min-height: 360px;
      }

      .percentile-trend-card {
        margin-top: 12px;
      }

      .chart-surface {
        padding: 2px 0 4px;
      }

      .result-meta {
        top: 10px;
        left: 12px;
        right: 104px;
      }

      .immunization-card .result-meta {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 8px 12px 8px;
      }

      .chart {
        height: 480px;
        min-height: 480px;
      }

      .percentile-trend-card .chart {
        height: 390px;
        min-height: 360px;
      }

      .immunization-table {
        min-width: 0;
      }
    }
