:root {
  color-scheme: light dark;
  --paper: #fbfaf7; --surface: #fff; --ink: #192b36; --muted: #536471;
  --line: #c9d2d5; --brand: #125b60; --tint: #e3f1ef; --code: #f0f3f4;
  font: 100%/1.5 Inter, Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); margin: 0; }
header, main, footer { max-width: 78rem; margin: auto; padding: 1.25rem clamp(1rem, 4vw, 3.5rem); }
header { border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
header strong { letter-spacing: .02em; }
header nav, footer, .pager, .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
h1 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.13; margin: .6rem 0 1rem; overflow-wrap: anywhere; }
h2 { font-size: 1.18rem; margin: 1.6rem 0 .6rem; }
a { color: var(--brand); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid #b96b0c; outline-offset: 2px; }
.muted, small { color: var(--muted); }
input, select, button, .letter { font: inherit; border: 1px solid var(--line); color: var(--ink); background: var(--surface); border-radius: .33rem; padding: .42rem .65rem; }
button, .letter { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
input, select { width: 100%; min-width: 0; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: .9rem; margin: .9rem 0; }
#letters { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 1.2rem; }
.letter { color: var(--brand); text-decoration: none; }
.letter[aria-current], .letter:hover { background: var(--tint); }
#results { list-style: none; margin: 0; padding: 0; }
#results li { padding: .55rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: .5rem; align-items: baseline; }
#results a, dt, dd, li, code, pre { overflow-wrap: anywhere; }
#results a, .identifier, pre, code { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.pager { margin: 1rem 0; }
dl { display: grid; grid-template-columns: minmax(10rem, 27%) minmax(0, 1fr); margin: .5rem 0; }
dt, dd { margin: 0; padding: .6rem .65rem; border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { white-space: pre-wrap; }
pre { white-space: pre-wrap; margin: 0; font-size: .9rem; background: var(--code); padding: .65rem; border-radius: .3rem; }
details { margin: .7rem 0; color: var(--muted); }
summary { cursor: pointer; }
footer { border-top: 1px solid var(--line); margin-top: 1.5rem; }
[hidden] { display: none !important; }
@media (max-width: 38rem) {
  #results li, dl { display: block; }
  #results small { display: block; }
  dd { border: 0; padding-top: .1rem; }
}
@media (prefers-color-scheme: dark) {
  :root { --paper:#132026; --surface:#1b2d35; --ink:#edf2ef; --muted:#b5c6c9; --line:#40565b; --brand:#8edbd1; --tint:#264746; --code:#21343a; }
}
