.ref-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0 8px;
}
#ref-filter {
  flex: 1 1 260px; max-width: 420px;
  padding: 10px 13px; font-size: 16px;
  border: 1px solid #d9dee5; border-radius: 8px; background: #fff;
}
.ref-live { font-size: 14px; color: #5b6673; }

.ref-toc { margin: 4px 0 28px; }
.ref-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ref-toc li { margin: 0; }
.ref-toc a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #f1f4f8; border: 1px solid #e2e7ee; text-decoration: none;
  font-size: 14px; font-weight: 600; color: #1c2530;
}
.ref-toc a:hover { background: #e4ecf6; border-color: #1e73be; color: #1e73be; }
.ref-n { color: #7a8695; font-weight: 400; margin-left: 7px; }
.ref-here {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #1e73be; color: #fff; font-size: 14px; font-weight: 600;
}
.ref-here .ref-n { color: #cfe2f5; }

.ref-cards {
  display: grid; gap: 12px; margin: 24px 0 40px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.ref-card {
  display: block; padding: 14px 16px; border: 1px solid #e2e7ee;
  border-radius: 10px; background: #fbfcfd; text-decoration: none; color: #1c2530;
}
.ref-card:hover { border-color: #1e73be; background: #f4f8fc; }
.ref-card strong { display: block; font-size: 17px; color: #0b5cab; }
.ref-card-n { display: block; font-size: 13px; color: #7a8695; margin: 2px 0 6px; }
.ref-card-blurb { display: block; font-size: 14px; line-height: 1.5; color: #5b6673; }

.ref-list { list-style: none; margin: 8px 0 40px; padding: 0; }
.ref-list li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 7px 2px; border-bottom: 1px solid #eef1f5; margin: 0;
}
.ref-list li[hidden] { display: none; }
.ref-list a { flex: 0 0 auto; min-width: 150px; text-decoration: none; }
.ref-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 600; color: #0b5cab; background: none; padding: 0;
}
.ref-list-short { color: #5b6673; font-size: 15px; line-height: 1.45; }

.ref-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid #e6eaf0; }

@media (max-width: 520px) {
  .ref-list li { flex-direction: column; gap: 2px; }
  .ref-list a { min-width: 0; }
}

.ref-group { margin: 0 0 8px; }
.ref-group > h2 { margin-top: 44px; }
.ref-blurb { color: #5b6673; margin-top: -6px; }

.ref-cmd {
  border-top: 1px solid #e6eaf0;
  padding: 20px 0 4px;
  scroll-margin-top: 70px;
}
.ref-cmd > h3 {
  margin: 0 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px;
}
.ref-cmd > h3 a { text-decoration: none; color: #0b5cab; }
.ref-cmd > h3 a:hover { text-decoration: underline; }

.ref-syntax { margin: 0 0 10px; }
.ref-syntax code {
  display: inline-block; background: #f6f8fa; border: 1px solid #e2e7ee;
  border-radius: 6px; padding: 5px 10px; font-size: 14px; color: #0b5cab;
}
.ref-short { font-weight: 600; margin: 0 0 10px; }
.ref-body p { margin: 0 0 10px; }
.ref-cmd ul { margin: 0 0 10px; padding-left: 22px; }
.ref-cmd li { margin: 0 0 3px; }

.ref-gotcha {
  background: #fff8e6; border: 1px solid #f0d89a; border-left-width: 4px;
  border-radius: 6px; padding: 12px 14px; margin: 14px 0;
}

.ref-gotcha > strong {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; color: #8a6100; margin-bottom: 5px;
}
.ref-gotcha p { margin: 0; }

.ref-gotcha p + p { margin-top: 9px; }

.ref-ex {
  background: #f6f8fa; border: 1px solid #e2e7ee; border-radius: 8px;
  padding: 12px 14px; overflow-x: auto; margin: 12px 0 6px;
}
.ref-ex code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; white-space: pre; background: none; padding: 0;
}
.ref-exnote { color: #5b6673; font-size: 15px; margin: 0 0 8px; }
.ref-rel { font-size: 15px; color: #5b6673; }

.ref-cmd[hidden], .ref-group[hidden] { display: none; }

@media (max-width: 600px) {
  .ref-cmd > h3 { font-size: 19px; }
  .ref-toc a { font-size: 13px; padding: 5px 10px; }
}

.ref-typed {
  margin: -2px 0 10px;
  font-size: 14px;
  color: #5b6673;
}
.ref-typed code {
  background: #f4f6f9;
  border: 1px solid #e2e7ee;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
}
