:root {
  color-scheme: light;
  --ink: #17201c;
  --cream: #f0efdf;
  --lime: #c4ed89;
  --muted: #4f5d53;
  --line: #d9dbcc;
  --paper: #fcfcf4;
  --ok: #739359;
  --anomaly: #d2a141;
  --confirmed: #a94537;
  --failure: #666489;
  font-family: Inter, system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .14em; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #397821; outline-offset: 4px; }
.wrap { width: min(100% - clamp(28px, 7vw, 104px), 1160px); margin-inline: auto; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 5; background: var(--lime); color: var(--ink); padding: .6rem 1rem; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.masthead { background: var(--ink); color: var(--cream); }
.masthead :focus-visible, .site-footer :focus-visible { outline-color: var(--lime); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; min-height: 68px; border-bottom: 1px solid #394a3e; }
.brand { text-decoration: none; font-weight: 850; font-size: 1.2rem; letter-spacing: -.065em; white-space: nowrap; }
.brand span { color: var(--lime); }
.top nav { display: flex; gap: clamp(.8rem, 3vw, 1.8rem); flex-wrap: wrap; font-size: .85rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.hero { padding-block: clamp(2.7rem, 7vw, 6.5rem); display: grid; grid-template-columns: 1fr minmax(220px, 283px); align-items: end; gap: clamp(1.4rem, 5vw, 4.5rem); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(4rem, 10vw, 8.4rem); letter-spacing: -.088em; line-height: .82; font-weight: 865; }
h1 span { color: var(--lime); }
.hero p { font-size: clamp(1rem, 2.1vw, 1.24rem); color: #d4dcca; max-width: 46ch; margin: 1.6rem 0 1.4rem; }
.hero-note { position: relative; overflow: hidden; padding: 1.25rem; min-height: 160px; border: 1px solid #475d49; background: #202c24; }
.hero-note strong { display: block; font-size: .94rem; max-width: 24ch; }
.hero-note p { font-size: .9rem; margin: .6rem 0 .9rem; }
.hero-note a { color: var(--lime); font-size: .86rem; }
.pulse { width: 12px; height: 12px; border-radius: 50%; display: block; background: var(--lime); margin-bottom: .9rem; box-shadow: 0 0 0 5px #c4ed8926, 0 0 0 12px #c4ed8913; }
.button { min-height: 44px; display: inline-flex; justify-content: space-between; align-items: center; gap: .7rem; width: max-content; padding: .54rem .82rem; border: 1px solid transparent; border-radius: 5px; font-weight: 720; text-decoration: none; white-space: nowrap; }
.button:hover { text-decoration: underline; }
.primary { color: var(--ink); background: var(--lime); }
.dark { background: var(--ink); color: var(--cream); }
.main { padding-block: clamp(2.5rem, 6vw, 5.2rem); }
section { scroll-margin-top: 16px; }
.section-head { margin-bottom: 1.4rem; }
h2 { font-size: clamp(2.05rem, 5.7vw, 3.45rem); line-height: .99; letter-spacing: -.065em; }
.section-head p, .lookup p, .reading p { color: var(--muted); margin-top: .66rem; }
.notice { padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); }
.workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 15px; align-items: start; }
.case-list { display: grid; gap: 7px; }
.case-button { display: grid; position: relative; text-align: left; gap: .13rem; border-radius: 5px; background: transparent; border: 1px solid #cfd2c0; padding: .76rem .84rem; }
.case-button strong { font-size: 1.08rem; overflow-wrap: anywhere; letter-spacing: -.035em; }
.case-button:hover { background: #e4edd4; }
.case-button[aria-pressed="true"] { background: var(--lime); border-color: #8bae65; }
.case-country, .case-window, .case-meta { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .73rem; color: #394d3b; }
.case-country { letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: clamp(14px, 3vw, 32px); background: var(--paper); }
.panel h3 { font-size: clamp(1.76rem, 5vw, 3.25rem); line-height: 1.04; letter-spacing: -.065em; margin-block: .24rem .42rem; overflow-wrap: anywhere; }
.panel-intro p { max-width: 70ch; color: var(--muted); }
.panel-intro a { display: inline-block; margin-top: .45rem; font-size: .92rem; font-weight: 680; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 1.35rem; background: #ecf0e0; border: 1px solid #dde3d0; border-radius: 5px; }
.metric { display: grid; align-content: start; gap: .21rem; padding: .65rem .73rem; }
.metric + .metric { border-left: 1px solid #d9dfce; }
.metric strong { font-size: clamp(1.22rem, 3vw, 2rem); letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric span { color: #425448; font-size: .79rem; line-height: 1.2; }
.plot-header { display: flex; justify-content: space-between; align-items: center; gap: .65rem; margin-bottom: .52rem; }
h4 { font-size: 1.22rem; letter-spacing: -.036em; }
.view-label { display: flex; align-items: center; gap: .35rem; font-size: .76rem; }
select, input { border: 1px solid #a6b2a1; border-radius: 4px; background: #fffef7; }
select { padding: .22rem .25rem; }
.event-note { display: inline-block; border-left: 3px solid var(--confirmed); color: #77332a; font-size: .8rem; background: #f5e9dd; margin: .14rem 0 .7rem; padding: .15rem .44rem; }
.legend { display: flex; gap: .32rem 1rem; flex-wrap: wrap; margin-bottom: .81rem; }
.legend-item { display: inline-flex; align-items: center; gap: .3rem; color: #3a4b3e; font-size: .75rem; }
.swatch { display: inline-block; flex: none; width: .68rem; height: .68rem; border: 1px solid #0002; }
.ok { background: var(--ok); }
.anomaly { background: var(--anomaly); }
.confirmed { background: var(--confirmed); }
.failure { background: var(--failure); }
.gap { background: repeating-linear-gradient(135deg, #e5e5d6 0 2px, #9ba593 2px 3px, #e5e5d6 3px 5px); }
.chart { display: grid; grid-template-columns: minmax(24px, max-content) minmax(0, 1fr); grid-template-rows: clamp(114px, 21vw, 173px) auto; gap: .33rem .45rem; }
.axis { display: flex; flex-direction: column; align-items: end; justify-content: space-between; color: var(--muted); font-size: .7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: clamp(1px, .28vw, 4px); border-bottom: 1px solid #9ba593; border-top: 1px solid #d6dbcb; background: linear-gradient(to bottom, transparent calc(50% - 1px), #d6dbcb calc(50% - 1px) 50%, transparent 50%); }
.day { display: block; min-width: 0; height: 100%; padding: 0; border: 0; position: relative; background: transparent; overflow: visible; }
.day:hover, .day[aria-pressed="true"] { background: #dfebd2; }
.day[aria-pressed="true"] { box-shadow: inset 0 -3px var(--ink); }
.day.event::after { position: absolute; content: ""; inset: 0 auto 0 50%; border-left: 1px dashed #71392c; }
.day:focus-visible { outline-offset: 1px; z-index: 1; }
.stack { display: flex; position: absolute; inset: 0 10% 0; justify-content: flex-start; flex-direction: column-reverse; pointer-events: none; }
.stack span { display: block; min-height: 1px; }
.stack .gap { height: 7px; }
.axis-dates { grid-column: 2; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.selection { border-left: 3px solid #7aa557; display: flex; align-items: center; justify-content: space-between; gap: .48rem .75rem; flex-wrap: wrap; padding: .53rem .65rem; margin: 1rem 0; background: #edf2e1; }
.selection a, .case-footer a { font-weight: 670; font-size: .85rem; }
#selection-outcomes { color: #405143; font-size: .87rem; }
.table-details { padding-block: .63rem; border-top: 1px solid var(--line); font-size: .86rem; }
summary { font-weight: 680; cursor: pointer; }
.table-scroll { overflow: auto; max-height: 320px; margin-top: .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .82rem; white-space: nowrap; }
caption { color: #435247; text-align: left; padding: .2rem .42rem; }
th, td { text-align: right; padding: .38rem .44rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child { text-align: left; }
thead { background: #edf1e2; }
#example-list { margin-block: .45rem 0; }
.case-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .42rem 1rem; border-top: 1px solid var(--line); padding-top: .7rem; font-size: .78rem; color: #47584b; }
.lookup, .reading { margin-top: clamp(2.7rem, 6vw, 5.1rem); display: grid; grid-template-columns: 1fr 1.65fr; gap: clamp(1.2rem, 5vw, 3.7rem); }
.lookup { background: #e5ecd8; padding: clamp(1.05rem, 4vw, 2.35rem); border: 1px solid #cbd9bb; border-radius: 8px; }
.lookup h2, .reading h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
.lookup form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; align-items: end; }
.lookup label { display: grid; gap: .24rem; font-weight: 700; font-size: .83rem; }
.lookup input { min-width: 0; min-height: 42px; width: 100%; padding: .42rem .48rem; font-weight: 450; font-size: .96rem; }
.lookup .form-error { color: #83362d; font-weight: 650; grid-column: 1 / -1; }
.reading dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.reading dt { font-weight: 750; margin: 0 0 .12rem; }
.reading dd { margin: 0; color: var(--muted); font-size: .92rem; }
.site-footer { background: var(--ink); color: var(--cream); }
.footer-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 1rem 2rem; padding-block: 1.6rem; }
.footer-grid p { color: #c8d2c4; font-size: .82rem; max-width: 66ch; }
.footer-grid > a:last-child { font-size: .86rem; }
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .case-list { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-note { min-height: auto; }
  .hero-note strong { max-width: none; }
  .lookup, .reading { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .metric { padding: .57rem .37rem; }
  .metric span { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
