:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #f5f6f8;
  --ink: #20252b;
  --muted: #59636c;
  --line: #dfe3e7;
  --link: #204ca5;
  --button: #224a96;
  --button-text: #fff;
  --focus: #275fd1;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171b20;
  --surface: #20262e;
  --ink: #e8ecf1;
  --muted: #adb7c3;
  --line: #39434e;
  --link: #a3bfff;
  --button: #a8c1fa;
  --button-text: #142448;
  --focus: #a6c4ff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 15px/1.6 system-ui, sans-serif; }
a { color: var(--link); text-underline-offset: .18em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { display: block; margin: 8px auto; width: max-content; }
header, main, footer { width: min(100% - 56px, 1100px); margin-inline: auto; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
header { min-height: 72px; border-bottom: 1px solid var(--line); }
footer { min-height: 86px; margin-top: 60px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
header a, footer a { text-decoration: none; }
header a:hover, footer a:hover { text-decoration: underline; }
header nav, footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; }
header nav a { color: var(--ink); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 650; }
.logo b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; background: var(--button); color: var(--button-text); font: 700 17px/1 ui-monospace, monospace; letter-spacing: -.08em; }
#theme, .secondary, .command button { border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); padding: 6px 10px; font-size: 13px; }
#theme:hover, .secondary:hover, .command button:hover { background: var(--surface); }
h1 { margin: 0 0 19px; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.045em; font-weight: 670; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.018em; }
.button, form button { display: inline-block; background: var(--button); color: var(--button-text); border: 1px solid transparent; border-radius: 4px; padding: 8px 14px; text-decoration: none; font-weight: 600; }
.button:hover, form button:hover { filter: brightness(.92); }
.directory { min-height: 60vh; }
.search-area { padding: 49px 0 31px; }
#search-form { display: flex; align-items: center; gap: 12px; max-width: 740px; }
#search-form input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
#search-form input::placeholder { color: var(--muted); }
kbd { font: 13px ui-monospace, monospace; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 4px 7px; }
#search-form button { height: 44px; }
.directory-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(228px, 275px); gap: 50px; align-items: start; }
.listing-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.listing-head h2, .registry-tools h2 { margin: 0 0 12px; }
#clear-search { background: none; border: 0; color: var(--link); padding: 0; text-decoration: underline; }
.result-status { min-height: 0; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.result-status:empty { display: none; }
#results { border-top: 1px solid var(--line); }
.package { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.package h3 { margin: 0; overflow-wrap: anywhere; font-size: 15px; }
.package h3 a { text-decoration: none; }
.package h3 a:hover { text-decoration: underline; }
.package p { margin: 3px 0; color: var(--muted); font-size: 14px; }
.package time, .package small, .package .version { color: var(--muted); font-size: 13px; }
.package .version { font-family: ui-monospace, monospace; white-space: nowrap; }
.empty { color: var(--muted); padding: 17px 0; margin: 0; }
#more { margin-top: 17px; }
.registry-tools { border-left: 1px solid var(--line); padding-left: 24px; }
.registry-tools section + section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.registry-tools h2 { font-size: 16px; }
.registry-tools a { font-size: 14px; }
.command { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 6px 7px 6px 10px; margin-bottom: 10px; }
.command code { font-size: 12px; white-space: nowrap; overflow-x: auto; }
.prose { max-width: 850px; padding-top: 42px; }
.prose pre { padding: 14px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
@media (max-width: 720px) {
  header, main, footer { width: calc(100% - 32px); }
  header { padding-block: 12px; flex-wrap: wrap; gap: 10px; }
  header nav, footer nav { gap: 8px 14px; }
  .search-area { padding-top: 32px; }
  .directory-grid { grid-template-columns: 1fr; gap: 32px; }
  .registry-tools { border-left: 0; border-top: 1px solid var(--line); padding: 19px 0 0; }
  .command { max-width: 280px; }
}
@media (max-width: 480px) {
  #search-form kbd { display: none; }
  #search-form { gap: 8px; }
  footer { flex-wrap: wrap; padding-block: 16px; }
}
