:root {
  color-scheme: dark;
  --bg: #0b1118;
  --panel: #111a24;
  --panel-2: #162230;
  --line: #28394a;
  --text: #eef6ff;
  --muted: #9aacbd;
  --blue: #5ab0ff;
  --cyan: #45e0ce;
  --orange: #ffbd69;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, rgb(39 116 173 / 18%), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
button, input { font: inherit; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link:focus { position: fixed; z-index: 20; top: 1rem; left: 1rem; padding: .7rem 1rem; background: var(--blue); color: #06101a; }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 72px;
  padding: 0 max(1.5rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgb(124 165 199 / 20%);
  background: rgb(11 17 24 / 88%);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; letter-spacing: .04em; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { display: grid; line-height: 1; }
.brand strong { font-size: 1.05rem; }
.brand small { margin-top: .35rem; color: var(--blue); font-size: .62rem; letter-spacing: .2em; }
nav { display: flex; gap: 1.65rem; margin-right: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
nav a:hover, nav a:focus-visible { color: var(--blue); }
.version { padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: .72rem ui-monospace, monospace; }

main { max-width: var(--max); margin: auto; padding: 0 1.5rem 6rem; }
.hero { padding: 6.5rem 0 4.5rem; }
.eyebrow { margin: 0 0 .6rem; color: var(--cyan); font-size: .73rem; font-weight: 800; letter-spacing: .18em; }
h1 { max-width: 780px; margin: 0; font-size: clamp(3rem, 8vw, 6.7rem); line-height: .95; letter-spacing: -.065em; }
.hero > p:not(.eyebrow) { max-width: 680px; margin: 1.5rem 0 2.25rem; color: var(--muted); font-size: 1.1rem; }
.search-box { display: flex; align-items: center; width: min(860px, 100%); border-bottom: 2px solid var(--line); transition: border-color .2s; }
.search-box:focus-within { border-color: var(--blue); }
.search-icon { color: var(--blue); font-size: 2rem; }
.search-box input { flex: 1; min-width: 0; padding: 1rem; border: 0; outline: 0; background: transparent; color: var(--text); font-size: clamp(1.15rem, 2vw, 1.65rem); }
.search-box input::placeholder { color: #647688; }
kbd { padding: .15rem .48rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); font: .75rem ui-monospace, monospace; }

.shortcuts, .catalog { padding: 2.8rem 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.035em; }
#result-count { color: var(--muted); font: .82rem ui-monospace, monospace; }
.category-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; }
.category-button { display: flex; justify-content: space-between; gap: .75rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.category-button span { color: var(--muted); font: .72rem ui-monospace, monospace; }
.category-button:hover, .category-button[aria-pressed="true"] { border-color: var(--blue); background: rgb(90 176 255 / 9%); color: var(--blue); }
.text-button { border: 0; background: none; color: var(--blue); cursor: pointer; }
.active-filter { margin: -1rem 0 1.3rem; color: var(--muted); }

.entry-section { margin: 0 0 3.25rem; scroll-margin-top: 100px; }
.entry-section > h3 { margin: 0 0 .8rem; color: var(--blue); font-size: 1.35rem; }
.entry-row { display: grid; grid-template-columns: 220px minmax(170px, .75fr) 2fr 36px; gap: 1.1rem; width: 100%; padding: .82rem .7rem; border: 0; border-top: 1px solid rgb(71 93 112 / 48%); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.entry-row:last-child { border-bottom: 1px solid rgb(71 93 112 / 48%); }
.entry-row:hover, .entry-row:focus-visible { outline: none; background: var(--panel); }
.entry-group { color: var(--muted); font-size: .8rem; }
.entry-name { color: var(--blue); font: .9rem ui-monospace, "Cascadia Code", monospace; overflow-wrap: anywhere; }
.entry-description { color: #d1dce7; font-size: .9rem; }
.entry-arrow { color: var(--cyan); font-size: 1.1rem; }
.empty-state { display: grid; gap: .35rem; padding: 4rem 1rem; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); }

.detail { position: fixed; z-index: 30; top: 0; right: 0; width: min(720px, 100%); height: 100%; padding: 3.5rem clamp(1.25rem, 5vw, 3.5rem); overflow-y: auto; border-left: 1px solid var(--line); background: #0d151f; box-shadow: -24px 0 80px rgb(0 0 0 / 45%); transform: translateX(102%); transition: transform .25s ease; }
.detail.open { transform: translateX(0); }
.backdrop { position: fixed; z-index: 25; inset: 0; background: rgb(0 0 0 / 55%); }
.close-button { position: absolute; top: 1.2rem; right: 1.4rem; border: 0; background: transparent; color: var(--muted); font-size: 2rem; cursor: pointer; }
.detail-kind { color: var(--cyan); font: .74rem ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.detail h2 { margin: .6rem 0 1rem; font: clamp(1.6rem, 5vw, 2.7rem) ui-monospace, monospace; overflow-wrap: anywhere; }
.detail-summary { color: var(--muted); font-size: 1.02rem; }
.detail h3 { margin: 2.2rem 0 .7rem; font-size: 1rem; }
pre { padding: 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: #080d13; color: #d7e8f8; white-space: pre-wrap; }
code { font: .85rem/1.55 ui-monospace, "Cascadia Code", monospace; }
.argument-list { display: grid; gap: .6rem; margin: 0; }
.argument { padding: .8rem; border-left: 2px solid var(--line); background: var(--panel); }
.argument dt { color: var(--blue); font: .82rem ui-monospace, monospace; }
.argument dd { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.doc-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.doc-links a { padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 4px; color: var(--blue); text-decoration: none; font: .78rem ui-monospace, monospace; }
body.drawer-open { overflow: hidden; }
footer { display: flex; justify-content: space-between; gap: 1rem; max-width: var(--max); margin: auto; padding: 2rem 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

@media (max-width: 850px) {
  nav { display: none; }
  .version { margin-left: auto; }
  .category-list { grid-template-columns: repeat(2, 1fr); }
  .entry-row { grid-template-columns: 150px 1fr 30px; }
  .entry-description { grid-column: 2; }
  .entry-arrow { grid-column: 3; grid-row: 1 / 3; align-self: center; }
}
@media (max-width: 560px) {
  .hero { padding: 4rem 0 3rem; }
  .category-list { grid-template-columns: 1fr; }
  .entry-row { grid-template-columns: 1fr 28px; }
  .entry-group { grid-column: 1; }
  .entry-name { grid-column: 1; }
  .entry-description { grid-column: 1; }
  .entry-arrow { grid-column: 2; grid-row: 1 / 4; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
