:root {
  color-scheme: light;
  --page: #f0efdf;
  --ink: #17201c;
  --muted: #535e52;
  --accent: #c4ed89;
  --panel: #faf9ef;
  --line: #c7cbba;
  --mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .16em; }
button, input, select { font: inherit; }
button { cursor: pointer; padding: .51rem .75rem; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
button:hover:not([disabled]) { background: #e2edcf; border-color: #779460; }
button[disabled] { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #487a44; outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--accent); }
.wrap { width: min(1190px, calc(100% - 64px)); margin-inline: auto; }
.dark { background: var(--ink); color: #f6f5e9; }
.skip { position: absolute; left: 1rem; top: .5rem; padding: .6rem; background: var(--accent); color: var(--ink); z-index: 3; transform: translateY(-200%); }
.skip:focus { transform: none; }
.nav { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid #465448; font: 600 .82rem/1.4 var(--mono); }
.nav a { text-decoration: none; }
.nav .brand { font: 750 1.18rem/1.15 system-ui,sans-serif; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.brand span:first-child { margin-right: .5rem; font-family: var(--mono); }
.mast { border-bottom: 4px solid #8a9b78; background-image: radial-gradient(#aaba9e26 1px, transparent 1px); background-size: 21px 21px; }
.hero { padding: clamp(35px, 5vw, 69px) 0; display: grid; grid-template-columns: 1fr 290px; align-items: end; gap: 3rem; }
.kicker { color: #426343; font: 700 .68rem/1.5 var(--mono); letter-spacing: .11em; }
.dark .kicker { color: var(--accent); }
h1 { margin: .45rem 0 .85rem; font: 740 clamp(3.05rem, 7.5vw, 6.25rem)/.92 system-ui,sans-serif; letter-spacing: -.078em; }
h1 span { color: var(--accent); }
.intro { max-width: 575px; color: #dee5d6; font-size: clamp(.97rem, 1.6vw, 1.1rem); }
.hero-record { padding: 1rem 1.15rem; background: #223329; border: 1px solid #516250; border-radius: 7px; font-size: .85rem; }
.hero-record strong { display: block; font: 650 clamp(2.3rem, 4vw, 3.6rem)/1.1 var(--mono); margin: .27rem 0; color: #f7f6e9; letter-spacing: -.085em; }
.hero-record span, #updated { color: #c7d4c3; }
#updated { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid #50624f; }
.content { padding-block: 1.5rem 3.7rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.filters { padding: clamp(14px, 2.6vw, 22px); }
label { display: block; font-size: .82rem; font-weight: 680; }
input, select { background: #fffef7; color: var(--ink); border: 1px solid #a3ae9d; border-radius: 5px; padding: .56rem .63rem; min-width: 0; width: 100%; }
select { display: block; margin-top: .26rem; }
.searchrow { display: flex; gap: .55rem; margin-top: .24rem; }
.searchrow input { font-size: 1.06rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .75rem 0 .95rem; }
.chips button { border-radius: 999px; padding: .22rem .65rem; font-size: .78rem; background: #eaeedc; }
.filter-grid { display: grid; grid-template-columns: 1.4fr repeat(5,minmax(0,1fr)); gap: .7rem; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 1.3rem; align-items: start; margin-top: 1.35rem; }
.results-head { min-height: 62px; display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
h2 { font-size: clamp(1.31rem, 2.4vw, 2rem); letter-spacing: -.039em; line-height: 1.18; }
.results-head button { flex: none; font-size: .81rem; }
#status, #page, .fine { color: var(--muted); font-size: .84rem; }
#status { margin-top: .18rem; }
.record { padding: 1rem 1.08rem; margin-bottom: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.record .lead { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .35rem; color: var(--muted); font: 700 .74rem/1.5 var(--mono); }
.record h3 { font-size: 1.11rem; line-height: 1.25; margin: .4rem 0; }
.record h3 button { display: inline-block; text-align: left; font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: #234b31; text-decoration: underline; text-underline-offset: .2em; }
.record p { font-size: .9rem; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .6rem; }
.tag { font: 650 .68rem/1.4 var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: .14rem .38rem; }
.tag.known { background: #f3e7c7; border-color: #bba66a; }
.hist, .source-panel { padding: 1rem; margin-bottom: .7rem; }
.hist h2, .source-panel h2 { font-size: 1.23rem; }
.hist p, .source-panel p { color: var(--muted); font-size: .84rem; margin: .5rem 0; }
#histogram { margin-top: .7rem; }
.bar { width: 100%; display: grid; grid-template-columns: 3rem 1fr 2.2rem; align-items: center; gap: .45rem; padding: .25rem .3rem; border: 0; font: .75rem/1.4 var(--mono); }
.bar-track { display: block; height: 7px; background: #e7e9d9; border-radius: 3px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #679059; }
.bar[aria-pressed=true] .bar-fill { background: #304f33; }
.bar .value { justify-self: end; }
.source-panel a { display: block; font-weight: 650; font-size: .84rem; margin-top: .5rem; }
#pagination { display: flex; justify-content: space-between; align-items: center; padding-top: .4rem; }
.empty { padding: 1.2rem; }
.empty h3 { margin-bottom: .25rem; }
dialog { width: min(735px,calc(100% - 25px)); max-height: 86vh; padding: 1.25rem; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
dialog::backdrop { background: #141e18bc; }
.dialog-header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .6rem; }
#detail-body p { margin: .75rem 0; overflow-wrap: anywhere; }
#detail-body dl { margin: 1rem 0; display: grid; grid-template-columns: minmax(100px,.65fr) 1fr; gap: .28rem .8rem; }
#detail-body dt { font-size: .84rem; font-weight: 700; }
#detail-body dd { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.record-links { display: flex; gap: .65rem; flex-wrap: wrap; }
.record-links a { color: #274d2e; font-weight: 700; font-size: .88rem; }
.record-links button { font-size: .79rem; }
.foot { min-height: 100px; padding: 1rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: .82rem; }
.foot > a { color: var(--accent); font-family: var(--mono); }
.foot p { color: #cbd8cb; }
@media (max-width: 1050px) { .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 850px) { .hero { gap: 1.4rem; grid-template-columns: 1fr 230px; } .workspace { grid-template-columns: minmax(0,1fr) 215px; gap: .8rem; } }
@media (max-width: 650px) { .wrap { width: calc(100% - 28px); } .hero,.workspace { grid-template-columns: 1fr; } .hero-record { max-width: 100%; } .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .results-head { min-height: 61px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

[hidden] { display: none !important; }
.view-switch { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.view-switch button[aria-pressed=true] { background: var(--ink); color: var(--panel); font-weight: 700; }
#canada-coverage { margin: .25rem 0 .9rem; color: var(--muted); }
.ca-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin-top: .75rem; }
.canada-record h3 a, .cve-links a { color: #234b31; }
.canada-record summary { cursor: pointer; font-size: .88rem; }
.canada-record h3 { margin: .45rem 0 .6rem; }
.cve-links { padding-left: 1.25rem; font-size: .86rem; overflow-wrap: anywhere; }
.ca-pager { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
#notice-status { color: var(--muted); }
@media (max-width: 520px) { .ca-controls { grid-template-columns: 1fr; } }
