/* The manual. Long pages need different rules from a front page: a place to
   stand (the sidebar), one column of text at a comfortable width, and a search
   that answers before you finish typing. */

body.doc { background: var(--void); }

.doc-hero { padding: 10rem 0 3.5rem; position: relative; }
.doc-hero::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 1200px; height: 620px;
  transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, rgba(69,217,255,.10), transparent 70%);
}
.doc-hero h1 {
  font-family: var(--display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -.02em;
  margin: 0 0 1.2rem;
}
.doc-hero .lead { max-width: 54ch; opacity: 1; animation: none; }

/* --- search ------------------------------------------------------------ */

.finder { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; max-width: 640px; }
.finder input {
  flex: 1; font: inherit; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--edge);
  border-radius: 100px; padding: .95rem 1.4rem;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.finder input::placeholder { color: var(--faint); }
.finder input:focus {
  outline: none; border-color: rgba(69,217,255,.55); background: rgba(69,217,255,.05);
  box-shadow: 0 0 0 4px rgba(69,217,255,.08);
}
#found { color: var(--faint); font-size: .88rem; white-space: nowrap; }

/* --- the two columns --------------------------------------------------- */

.doc-body { display: grid; grid-template-columns: 210px 1fr; gap: 4rem; padding-bottom: 7rem; }
@media (max-width: 900px) { .doc-body { grid-template-columns: 1fr; gap: 1.5rem; } }

.doc-nav-inner { position: sticky; top: 100px; display: flex; flex-direction: column; gap: .1rem; }
@media (max-width: 900px) {
  .doc-nav-inner { position: static; flex-direction: row; flex-wrap: wrap; gap: .4rem; }
  .nav-title { display: none; }
}

.nav-title {
  font-family: var(--display); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--faint); margin: 1.6rem 0 .6rem;
}
.nav-title:first-child { margin-top: 0; }

.doc-nav a {
  color: var(--dim); font-size: .93rem; padding: .35rem .7rem; border-radius: 8px;
  border-left: 2px solid transparent; transition: color .2s, background .2s, border-color .2s;
}
.doc-nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.doc-nav a.here { color: var(--cyan); border-left-color: var(--cyan); background: rgba(69,217,255,.06); }
@media (max-width: 900px) {
  .doc-nav a { border: 1px solid var(--edge); border-radius: 100px; font-size: .85rem; }
}

/* --- chapters ---------------------------------------------------------- */

.doc-main { min-width: 0; }

.chapter { padding: 0 0 4.5rem; border: 0; }
.chapter-head { padding: 3rem 0 1.8rem; position: relative; }
.chapter-head h2 {
  font-family: var(--display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 .5rem; letter-spacing: -.01em;
}
.chapter-head .about { margin: 0; color: var(--dim); max-width: 62ch; }
.chapter-head .count {
  position: absolute; top: 3.2rem; right: 0;
  font-family: var(--display); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--faint);
}
@media (max-width: 620px) { .chapter-head .count { display: none; } }

h3.group {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: .82rem; letter-spacing: .24em; color: var(--cyan);
  margin: 2.6rem 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--edge);
}

/* --- entries ----------------------------------------------------------- */

.ref { display: grid; gap: .5rem; }

.entry {
  border: 1px solid transparent; border-radius: 14px;
  padding: 1rem 1.2rem;
  background: linear-gradient(120deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  transition: border-color .25s, background .25s, transform .25s;
}
.entry:hover { border-color: var(--edge); background: rgba(255,255,255,.045); transform: translateX(3px); }

.entry-name {
  font-family: var(--display); font-size: 1.02rem; letter-spacing: .01em;
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .35rem;
}
.entry-name .kind {
  font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--edge); border-radius: 100px; padding: .12rem .55rem;
}
.entry p { margin: 0; color: var(--dim); font-size: .95rem; max-width: 76ch; }
.entry .path {
  display: block; margin-top: .6rem; font-size: .74rem; letter-spacing: .1em;
  color: #4c5468; text-transform: uppercase;
}
.entry kbd {
  font-family: var(--display); font-size: .8rem;
  border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 6px;
  padding: .05rem .4rem; color: var(--text);
}

/* what a search leaves behind */
.entry.hidden, .chapter.hidden, h3.group.hidden { display: none; }
.entry mark { background: rgba(69,217,255,.22); color: var(--text); border-radius: 3px; padding: 0 .15em; }

.nothing { color: var(--faint); padding: 3rem 0; }
