* { box-sizing: border-box; }
:root { --ink: #192e77; --blue: #294ac9; --paper: #f7f4ec; --muted: #65708a; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; }
.page { max-width: 1120px; margin: auto; padding: 0 42px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 0; border-bottom: 1px solid #d4d6d7; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: 1.1px; }
.brand-mark { font-size: 23px; }
.edition, .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.edition { color: var(--muted); }
.intro { position: relative; padding: 44px 0 37px; }
.intro .eyebrow { margin: 0 0 18px; color: var(--blue); }
h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 5.2vw, 66px); line-height: 1.02; font-weight: 400; letter-spacing: -2.7px; }
h1 em { color: var(--blue); font-weight: 400; }
.description { position: absolute; right: 0; bottom: 40px; max-width: 290px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.medications { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 22px; }
.medications a { display: flex; align-items: center; gap: 10px; padding: 17px 13px; border: 1px solid #cbd0db; border-radius: 4px; text-decoration: none; font-size: 13px; }
.tab-number { opacity: .6; font-size: 9px; }
.tab-arrow { margin-left: auto; }
.medications a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: white; }
.medications a:hover { border-color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
a:focus-visible { outline: 3px solid #c26c32; outline-offset: 4px; }
/* Original SVG has a 1000 × 680 coordinate system. Percentage positions
   keep each live PHP value aligned with its background panel as it scales. */
#chart { position: relative; width: 100%; aspect-ratio: 1000 / 680; background: url('assets/medication-chart.svg') center / 100% 100% no-repeat; container-type: inline-size; }
.chart-heading { position: absolute; top: 7.2%; left: 6%; }
.chart-heading .eyebrow { margin: 0 0 12px; font-size: clamp(9px, 1.05cqw, 12px); }
#medicine { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(30px, 5.7cqw, 61px); font-weight: 400; letter-spacing: -1.8px; }
.chart-subtitle { margin: 11px 0 0; font-size: clamp(10px, 1.3cqw, 14px); color: #596486; }
.box { position: absolute; margin: 0; width: 39%; height: 23%; padding: 0; }
.box dt { margin: 0 0 12px; font-size: clamp(10px, 1.5cqw, 16px); }
.box dd { margin: 0; font-size: clamp(31px, 6.8cqw, 72px); font-weight: 400; letter-spacing: -2px; line-height: 1; font-variant-numeric: tabular-nums; }
.unit { display: block; margin-top: 12px; font-size: clamp(9px, 1.2cqw, 13px); letter-spacing: 0; opacity: .75; }
#patients { left: 7%; top: 37%; color: white; }
#avgage { left: 55%; top: 37%; }
#lowage { left: 7%; top: 68%; }
#highage { left: 55%; top: 68%; }
.chart-footnote { position: absolute; bottom: 1.7%; left: 4%; font-size: clamp(7px, .9cqw, 10px); letter-spacing: 1.4px; color: #5f6a88; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0 27px; color: var(--muted); font-size: 10px; }
footer span { margin: 0 8px; }
.notice { padding: 15px 18px; border: 1px solid #c48d65; background: #fff0df; font-size: 13px; line-height: 1.6; }
@media (max-width: 760px) {
    .page { padding: 0 20px; }
    .edition { display: none; }
    .intro { padding: 32px 0 24px; }
    .description { position: static; margin: 20px 0 0; }
    .medications { display: flex; flex-wrap: wrap; gap: 6px; }
    .medications a { flex: 1 1 135px; padding: 12px; }
    footer { flex-direction: column; gap: 0; }
    footer p { margin: 5px 0; }
}
@media (max-width: 480px) {
    .page { padding: 0 14px; }
    h1 { font-size: 46px; }
    #chart { aspect-ratio: 1000 / 1100; }
    .chart-heading { top: 6%; }
    .chart-heading .eyebrow { font-size: 8px; letter-spacing: 1px; margin-bottom: 8px; }
    #medicine { font-size: 31px; letter-spacing: -1px; }
    .chart-subtitle { max-width: 165px; line-height: 1.5; margin-top: 7px; }
    .box dt { font-size: 10px; margin-bottom: 14px; }
    .box dd { font-size: 37px; letter-spacing: -1px; }
    .unit { font-size: 9px; margin-top: 11px; }
    .chart-footnote { letter-spacing: .6px; font-size: 6px; }
}
