
:root {
  --bg: #fbfaf7; --surface: #ffffff; --text: #22201c; --muted: #5d5850; --line: #d9d4ca;
  --accent: #9c3f1c; --accent-ink: #ffffff; --focus: #1f5fbf;
  --verified: #17603f; --sponsored-bg: #fbe8bf; --sponsored: #5e4300; --error: #a01c1c;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2.5rem;
  --radius: .375rem;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.15; margin: var(--s4) 0 var(--s3); }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 var(--s3); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 75rem; margin: 0 auto; padding: 0 var(--s4); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: var(--s2) var(--s3); }
.skip:focus { left: var(--s2); top: var(--s2); z-index: 2; }
.banner { margin: 0; padding: var(--s2) var(--s4); background: var(--text); color: #fff; font-size: .875rem; text-align: center; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; justify-content: space-between; padding-block: var(--s3); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.site-header nav a { display: inline-block; padding: var(--s2) 0; margin-right: var(--s3); }
.site-header nav a:last-child { margin-right: 0; }
main { padding-block: var(--s4) var(--s6); }
main > section, .legend { margin-top: var(--s6); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46rem; margin-top: 0; }
.note { color: var(--muted); font-size: .9rem; max-width: 46rem; }
.panel, .card, .filters, .legend, .empty, .brief fieldset, .profile section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--muted); }

.control { margin-bottom: var(--s4); border: 0; padding: 0; min-width: 0; }
.control > label, .control > legend { display: block; font-weight: 600; margin-bottom: var(--s1); padding: 0; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 2.75rem; padding: var(--s2) var(--s3); font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--muted); border-radius: var(--radius); }
.check { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; min-height: 2.25rem; }
.check input { width: 1.25rem; height: 1.25rem; flex: none; accent-color: var(--accent); }
button, .cta { display: inline-block; min-height: 2.75rem; padding: var(--s2) var(--s5); font: inherit; font-weight: 600; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none; }
.clear { display: inline-block; margin-left: var(--s3); padding-block: var(--s2); }
.search { display: grid; gap: 0 var(--s4); align-items: end; }
.search button { margin-bottom: var(--s4); }
.links { padding-left: var(--s4); }

.results { display: grid; gap: var(--s4); margin-top: var(--s4); }
.filters summary { font-weight: 600; cursor: pointer; min-height: 2rem; }
.filters form { margin-top: var(--s4); }
.count { font-weight: 700; font-size: 1.1rem; margin: 0; }
.card { margin-top: var(--s4); }
.name { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; margin: var(--s2) 0 var(--s3); }
.name h1, .name h2 { margin: 0; }
.fields { margin: 0; display: grid; gap: var(--s3); }
.field dt { font-size: .85rem; color: var(--muted); }
.field dd { margin: 0; overflow-wrap: anywhere; }
.value { margin-right: var(--s1); }

.state { display: inline-block; font-size: .78rem; line-height: 1.3; font-weight: 600; padding: .1rem var(--s2); border-radius: var(--radius); border: 1px solid; overflow-wrap: normal; }
.state-declared { color: var(--muted); border-color: var(--muted); background: transparent; }
.state-verified { color: #fff; background: var(--verified); border-color: var(--verified); }
.state-sponsored { color: var(--sponsored); background: var(--sponsored-bg); border-color: var(--sponsored); }
.state-none { color: var(--muted); border-color: var(--muted); border-style: dashed; font-style: italic; background: transparent; }
.sample { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--accent); }

.legend dl { display: grid; gap: var(--s3); margin: 0; }
.legend dd { margin: var(--s1) 0 0; }
.legend ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
.groups { display: grid; gap: var(--s4); margin-top: var(--s4); }

.notice { background: var(--sponsored-bg); color: var(--sponsored); border: 1px solid var(--sponsored); border-radius: var(--radius); padding: var(--s3) var(--s4); font-weight: 600; max-width: 46rem; }
.errors { border: 2px solid var(--error); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s4); background: var(--surface); max-width: 46rem; }
.errors h2 { color: var(--error); }
.errors ul { margin: 0; padding-left: var(--s4); }
.error { color: var(--error); font-weight: 600; margin: var(--s1) 0 0; }
.hint { color: var(--muted); font-size: .875rem; margin: var(--s1) 0 0; }
.opt { font-weight: 400; color: var(--muted); }
[aria-invalid=true] { border-color: var(--error); border-width: 2px; }
.brief { max-width: 46rem; }
.brief fieldset { margin: 0 0 var(--s4); min-width: 0; }
.brief legend { font-weight: 700; padding: 0 var(--s2); }
.brief .control > :is(label) { font-weight: 600; }
.pair { display: grid; gap: 0 var(--s4); }

.holding { padding-block: var(--s6); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; padding-block: var(--s4); }
.site-footer p { margin: 0 0 var(--s2); max-width: 46rem; }

@media (min-width: 40rem) {
  .search { grid-template-columns: repeat(2, 1fr); }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
  .search { grid-template-columns: repeat(4, 1fr) auto; }
  .results { grid-template-columns: 19rem minmax(0, 1fr); align-items: start; }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Filters stay open beside the results on a wide screen; on a phone they fold so results come first. */
  .filters summary { pointer-events: none; list-style: none; }
  .filters::details-content { content-visibility: visible; block-size: auto; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
