/* Refs: one long searchable table of every builtin. Scanned and operated,
   not read top to bottom, so the craft here is information density —
   tight rows, a sticky filter, and nothing between the eye and the names. */

.refhead {
  padding: 44px 0 0; border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.refhead h1 {
  font-family: var(--serif); font-weight: 600; font-size: 36px;
  letter-spacing: -.02em; margin: 0 0 12px;
}
.refhead .lede {
  font-size: 15.5px; color: var(--muted); max-width: 68ch; margin: 0 0 22px;
}

/* The filter follows the page: a reference is unusable if you have to
   scroll back to the top to change what you are looking for. */
.reffind {
  position: sticky; top: 60px; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 16px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(8px);
}
.reffind input {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 14px;
  padding: 10px 14px; border-radius: 7px;
  border: 1px solid var(--rule); background: var(--ground); color: var(--ink);
}
.reffind input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.reffind input::placeholder { color: var(--faint); }
.count {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.refmain { padding: 8px 0 96px; }
.refgroup { margin: 34px 0 0; }
.refgroup h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
  margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1px solid var(--rule);
}
.refgroup h2 .chap {
  font-size: 10.5px; letter-spacing: .06em; text-transform: none;
  color: var(--accent); text-decoration: none;
}
.refgroup h2 .cnt {
  margin-left: auto; font-variant-numeric: tabular-nums; color: var(--faint);
}
.refgroup .note {
  font-size: 14px; color: var(--muted); max-width: 72ch; margin: 12px 0 16px;
}

.reftable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.reftable tr { border-bottom: 1px solid var(--rule-soft); }
.reftable tr:hover { background: var(--rule-soft); }
.reftable td { padding: 9px 14px 9px 0; vertical-align: top; }
.reftable td.nm { width: 1%; white-space: nowrap; }
.reftable td.nm code {
  background: none; padding: 0; color: var(--tok-fn); font-weight: 500;
}
.reftable td.nm code a { color: inherit; text-decoration: none; }
.reftable td.nm code a:hover { text-decoration: underline; }
.reftable td.sg { width: 30%; color: var(--muted); }
.reftable td.sg code { background: none; padding: 0; font-size: 12.5px; }
.reftable td.ds { color: var(--muted); line-height: 1.55; }
.reftable td.ds code { font-size: 12.5px; }

.undoclist { line-height: 2.1; max-width: none; }
.undoclist code { font-size: 12.5px; }
.undoclist code a { color: inherit; text-decoration: none; }
.undoclist code a:hover { text-decoration: underline; }

.noresults { color: var(--muted); padding: 30px 0; font-size: 15px; }

@media (max-width: 820px) {
  .reftable td.sg { display: none; }
  .reftable { font-size: 13px; }
}
