#header-model-search {
  --header-ink: #eff5f7;
  --header-muted: #afbfca;
  --header-warm: #f6c897;
  --header-line: #344956;
  box-sizing: border-box;
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  max-width: none;
  z-index: 100000;
  color-scheme: dark;
  color: var(--header-ink);
  background: #102230;
  border: 1px solid #60798a;
  border-radius: 10px;
  box-shadow: 0 16px 48px #02070e70;
  font: 14px/1.45 "Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;
  text-align: start;
  overflow: hidden;
}
#header-model-search:not([hidden]) { display: flex; flex-direction: column; }
#header-model-search[hidden], #header-model-search [hidden] { display: none; }
#header-model-search *, #header-model-search *::after { box-sizing: border-box; }
.header-model-field {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  height: 100%;
  box-sizing: border-box;
  padding: 0 3px 0 14px;
  --header-ink: #f5f8ff;
  --header-muted: #cbd9e4;
}
#header-model-query {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 8px 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--header-ink);
  font: 500 17px/1.4 var(--model-font, "Segoe UI", sans-serif);
  font-variant-numeric: tabular-nums;
}
#header-model-query::placeholder { color: #a9bdc9; font: 15px/1.4 "Microsoft YaHei", sans-serif; }
#header-model-close, #header-model-more {
  border: none;
  box-shadow: none;
  cursor: pointer;
  border-radius: 5px;
  background: transparent;
  color: var(--header-muted);
}
#header-model-close { display: grid; place-content: center; min-width: 42px; min-height: 42px; padding: 0; font: 20px/1 Arial,sans-serif; border-radius: 50%; }
#header-model-close:hover { background: rgb(226 239 248 / 10%); color: white; }
#header-model-search :is(button, a):focus-visible { outline: 2px solid var(--header-warm); outline-offset: -2px; }
.header-model-status {
  flex: none;
  margin: 0;
  padding: 9px 17px;
  border-top: 1px solid var(--header-line);
  color: var(--header-muted);
  font-size: 12px;
}
.header-model-status:empty { display: none; }
#header-model-results {
  display: block;
  min-height: 0;
  max-height: min(440px, 56dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #536b7a transparent;
}
#header-model-results a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  align-items: center;
  gap: 5px 16px;
  min-width: 0;
  min-height: 68px;
  padding: 10px 17px;
  border-top: 1px solid #2c414e;
  background: #122634;
  color: var(--header-ink);
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  touch-action: manipulation;
}
#header-model-results a[aria-selected=true] { background: #203949; box-shadow: inset 2px 0 var(--header-warm); }
@media(hover:hover) {
  #header-model-results a:hover { background: #1c3343; }
}
.header-model-body, .header-model-specs { display: block; min-width: 0; }
.header-model-name {
  font: 600 16px/1.4 var(--model-font, "Segoe UI", sans-serif);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.header-model-suffix { color: var(--header-warm); }
.header-model-meta { display: block; margin-top: 3px; color: var(--header-muted); font-size: 12px; overflow-wrap: anywhere; }
.header-model-specs { font-size: 12px; }
.header-model-pair { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; margin-block: 2px; }
.header-model-key { color: var(--header-muted); }
.header-model-value { color: #e4eef3; overflow-wrap: anywhere; font: 500 13px/1.4 var(--model-font, "Segoe UI", sans-serif); }
#header-model-more {
  flex: none;
  width: 100%;
  min-height: 40px;
  padding: 7px 12px;
  border-top: 1px solid var(--header-line);
  border-radius: 0;
  color: var(--header-warm);
  font: inherit;
}
#header-model-more:disabled { opacity: .6; }
.header-model-documents {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  padding: 5px 16px;
  border-top: 1px solid var(--header-line);
  background: #101f2a;
}
.header-model-document-model { flex: 1 1 125px; overflow-wrap: anywhere; color: #c3d3dc; font: 500 12px/1.4 var(--model-font,"Segoe UI",sans-serif); }
.header-model-documents a { padding: 7px 2px; color: var(--header-warm); font: 13px/1.4 "Segoe UI","Microsoft YaHei",sans-serif; text-decoration: none; white-space: nowrap; }
.header-model-documents a:hover { text-decoration: underline; text-underline-offset: 3px; }
.header-model-doc-state { padding-block: 7px; color: var(--header-muted); font-size: 12px; }
#header-model-search.header-model-compact { overflow-y: auto; overscroll-behavior: contain; }
.header-model-compact #header-model-results { flex: none; max-height: clamp(75px, 25dvh, 140px); }
.header-model-compact .header-model-status { padding-block: 3px; }
@media(max-width: 540px) {
  #header-model-results a { grid-template-columns: minmax(0,1fr); padding-block: 10px; }
  .header-model-specs { display: flex; flex-wrap: wrap; gap: 0 12px; }
  .header-model-pair { gap: 4px; }
  #header-model-query { font-size: 16px; }
}
@media(max-width: 380px) {
  .header-model-field { padding-inline: 11px 4px; gap: 4px; }
  #header-model-results a, .header-model-status { padding-inline: 12px; }
}

#header-model-query::-webkit-search-cancel-button { appearance: none; }
