:root {
  --page: #f7f8fa;
  --surface: #fff;
  --line: #dfe3e8;
  --line-soft: #edf0f2;
  --text: #20252b;
  --muted: #65717d;
  --link: #235f94;
  --link-hover: #174a75;
  --selected: #eef5fb;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--link); }
button, input { font: inherit; }
.site-header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header h1 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.brand { color: var(--text); text-decoration: none; white-space: nowrap; }
.header-link { color: var(--link); text-decoration: none; font-size: 13px; }
.header-link:hover, .external-link:hover, .record-link:hover { color: var(--link-hover); text-decoration: underline; }
main { max-width: 1280px; padding: 0 24px; margin: auto; }
.hero { padding: 24px 0 22px; }
.hero p { margin: 0 0 22px; color: var(--muted); }
.hero code, footer code { font-family: var(--mono); color: var(--text); }
.search-wrap { position: relative; max-width: 740px; }
.search-wrap label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.search-wrap input { width: 100%; height: 42px; padding: 0 44px 0 13px; color: var(--text); background: var(--surface); border: 1px solid #b8c1c9; border-radius: 4px; outline: none; font: 13px var(--mono); }
.search-wrap input::placeholder { color: #89939d; }
.search-wrap input:focus { border-color: #4b83b4; box-shadow: 0 0 0 2px #dceaf6; }
.search-wrap input::-webkit-search-cancel-button { display: none; }
.clear-search { position: absolute; right: 7px; bottom: 5px; width: 32px; height: 32px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 3px; cursor: pointer; font-size: 22px; line-height: 1; }
.clear-search:hover { color: var(--text); background: var(--selected); }
.clear-search[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.filter { margin-bottom: -1px; padding: 8px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-bottom-color: var(--line); cursor: pointer; font-size: 13px; }
.filter:hover { color: var(--text); }
.filter.active { color: var(--link); background: var(--surface); border-color: var(--line); border-bottom-color: var(--surface); border-radius: 4px 4px 0 0; font-weight: 600; }
.filter span { margin-left: 4px; color: var(--muted); font: 11px var(--mono); font-weight: 400; }
.workspace { display: grid; grid-template-columns: minmax(280px, 35%) minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 48px; }
.list-panel, .detail-panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.panel-heading { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
#result-count { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.results { max-height: 660px; overflow: auto; }
.result { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.result:hover, .result.selected { background: var(--selected); }
.result-secondary { opacity: 0.58; }
.result-secondary:hover, .result-secondary:focus-visible { opacity: 1; }
.result.selected { border-left: 3px solid #5b91bd; padding-left: 11px; }
.result-top { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.kind { flex: none; width: 72px; color: var(--muted); font: 10px var(--mono); }
.result-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px var(--mono); }
.result-sub { display: block; overflow: hidden; margin: 3px 0 0 81px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font: 11px var(--mono); }
.more { display: block; width: 100%; padding: 10px; color: var(--link); background: var(--surface); border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.more:hover { background: var(--selected); }
.more[hidden] { display: none; }
.no-results { padding: 14px; color: var(--muted); }
.detail-panel, .empty-detail { min-height: 480px; }
.empty-detail { display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.detail-heading { padding: 21px 24px 18px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--muted); font-size: 11px; }
h2 { margin: 4px 0 0; overflow-wrap: anywhere; font: 600 clamp(19px, 2.1vw, 26px) var(--mono); letter-spacing: -.035em; }
.detail-body { padding: 8px 24px 24px; }
.group-note { margin: 15px 0 0; }
.more-context { margin: 10px 0 0 !important; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 18px 0 8px; }
.meta-box { min-width: 0; }
.meta-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.meta-box strong { overflow-wrap: anywhere; font: 600 15px var(--mono); }
.meta-box.historical-meta strong { color: var(--muted); font-weight: 500; }
.detail-section { padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin: 0 0 9px; font-size: 13px; font-weight: 600; }
.detail-section p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.mono { overflow-wrap: anywhere; font: 12px var(--mono); }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.record-link { color: var(--link); font: 12px var(--mono); text-decoration: none; overflow-wrap: anywhere; }
.stack-list { display: grid; gap: 6px; }
.stack-item { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.small-tag { color: var(--muted); font: 11px var(--mono); }
.external-link { color: var(--link); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.specification-link { font-size: 12px; line-height: 1; }
.signature { padding: 13px; color: var(--text); background: #f5f7f9; border: 1px solid var(--line); border-radius: 3px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 var(--mono); }
.action-bar { padding-top: 16px; }
.action-bar .external-link { display: inline-flex; align-items: center; padding: 9px 13px; border: 1px solid var(--link); border-radius: 4px; background: #f2f7fc; font-weight: 600; }
.action-bar .external-link:hover { color: #fff; background: var(--link); text-decoration: none; }
footer { max-width: 1280px; margin: auto; padding: 18px 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer span { margin-left: 8px; }
@media (max-width: 800px) { .workspace { grid-template-columns: 1fr; } .results { max-height: 280px; } .detail-panel, .empty-detail { min-height: 280px; } }
@media (max-width: 540px) { main { padding: 0 14px; } .site-header { padding: 0 14px; } .site-header h1 { font-size: 16px; } .header-link { font-size: 12px; } .hero { padding-top: 18px; } .meta-grid { grid-template-columns: 1fr; gap: 13px; } .detail-heading, .detail-body { padding-left: 15px; padding-right: 15px; } .result-top { display: block; } .kind { display: block; width: auto; margin-bottom: 2px; } .result-sub { margin-left: 0; } footer { padding-left: 14px; padding-right: 14px; } }
