:root {
--dark: #141c25; --blue: #3b8bbf; --blue-d: #357aa8; --line: #e2e6ea;
--text: #2c3744; --muted: #8a97a4; --ok: #2e7d52; --warn: #8a5a00;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: #f7f9fb;
font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
html.panel-open, body.panel-open { overflow: hidden; }
.topbar { display: flex; align-items: center; background: var(--dark); color: #fff; height: 56px; padding: 0 18px; }
.brand { font-weight: 800; letter-spacing: 1px; font-size: 19px; }
.topbar-title { flex: 1; text-align: center; font-weight: 700; font-size: 18px; }
.basket-btn { display: inline-flex; align-items: center; gap: 7px; margin-right: 10px; background: transparent; color: #dbe5ec; border: 1px solid #43515f; border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.basket-btn:hover { color: #fff; background: #1d2a36; border-color: #667786; }
.basket-btn:focus-visible { outline: 2px solid #8bc7ed; outline-offset: 2px; }
.basket-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; color: #fff; background: var(--blue); border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.category-select { width: 100%; padding: 10px 12px; border-radius: 7px; border: 1px solid #33424f; background: #1d2731; color: #fff; font-size: 15px; cursor: pointer; }
.category-select:focus { outline: none; border-color: var(--blue); }
.category-select option:disabled { color: #7d8b98; }
/* The search bar in code-lookup mode: monospace, because what goes in it is a
code. The placeholder stays proportional so the hint reads as prose. */
.query-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.query-code::placeholder { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 270px; flex-shrink: 0; background: var(--dark); color: #cdd6df; padding: 22px 20px; }
.side-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; margin: 22px 0 8px; color: #fff; }
.side-label:first-child { margin-top: 0; }
#system-filters, #code-lookup { margin-top: 26px; border-top: 1px solid #2a3742; padding-top: 14px; }
/* The count box doubles as a vertical scrubber. The chevrons and the
ns-resize cursor are the whole affordance; clicking without dragging
focuses it for typing as usual. */
.k-input { width: 100%; padding: 10px 30px 10px 12px; border-radius: 7px; border: 1px solid #33424f; background: #1d2731; color: #fff; font-size: 15px;
cursor: ns-resize; touch-action: none; appearance: textfield; -moz-appearance: textfield;
background-image: url('data:image/svg+xml,');
background-repeat: no-repeat; background-position: right 10px center; }
.k-input::-webkit-outer-spin-button, .k-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.k-input:focus { outline: none; border-color: var(--blue); cursor: text; }
.filters { margin: 4px 0; }
.filter-opt { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.filter-opt input { accent-color: var(--blue); width: 15px; height: 15px; }
/* The last selected code system: it stays checked and cannot be cleared, since
a search over no code system has nothing to return. Dimmed rather than
hidden so it still reads as a choice that exists; the row's title says why. */
.filter-opt-locked { cursor: not-allowed; opacity: .55; }
.filter-opt-locked input { cursor: not-allowed; }
/* Collapsed Advanced group: ranking model + result count live here. */
.advanced { margin-top: 26px; border-top: 1px solid #2a3742; padding-top: 14px; }
.advanced > summary { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #8fa1b0; cursor: pointer; }
.advanced > summary:hover, .advanced[open] > summary { color: #fff; }
.advanced .side-label { margin-top: 16px; }
.export { width: 100%; margin-top: 30px; background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 11px; font-size: 14px; cursor: pointer; }
.export:hover { background: var(--blue-d); }
.content { flex: 1; min-width: 0; max-width: 1080px; margin: 0 auto; padding: 30px 24px 70px; width: 100%; overflow-x: clip; }
.search-for { text-align: center; font-size: 12px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin: 6px 0 14px; }
/* The caption retires once there are results, but it keeps its space rather
than collapsing: display:none would pull the search bar upward and the whole
page would jump under the user's cursor mid-task. */
.caption-off { visibility: hidden; }
.search-row { display: flex; gap: 8px; }
.query-wrap { position: relative; flex: 1; display: flex; }
/* Recent searches for the current category. Opens on click with the full list;
a