/* Rewamp — documentation pages (on top of style.css) */

.docs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 112px 24px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
}

/* ---------- Table of contents ---------- */
.docs__toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 0.92rem;
}
.docs__toc p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.docs__toc ol { list-style: none; border-left: 1px solid var(--line); }
.docs__toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.docs__toc a:hover { color: var(--light); border-left-color: var(--magenta); }

/* ---------- Body ---------- */
.docs__body { min-width: 0; }
.docs__body h1 { font-size: 2.2rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.docs__lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 8px; }
.docs__meta { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 40px; }

.docs__body section { padding-top: 24px; margin-bottom: 40px; scroll-margin-top: 80px; }
.docs__body h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.docs__body h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.docs__body p, .docs__body li { color: var(--muted); line-height: 1.7; }
.docs__body p { margin-bottom: 12px; }
.docs__body ul, .docs__body ol.steps { margin: 0 0 14px 22px; }
.docs__body li { margin-bottom: 6px; }
.docs__body b, .docs__body strong { color: var(--light); font-weight: 600; }
.docs__body a { color: var(--cyan); }
.docs__body code, .docs__body kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--light);
  background: rgba(244, 241, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.tip {
  border-left: 3px solid var(--sunset);
  background: rgba(255, 158, 61, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 14px 0 18px;
}
.tip p { margin: 0; }

/* ---------- Screenshots ---------- */
.doc-figs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px 0 24px;
}
.doc-figs figure { width: 220px; }
.doc-figs figure.wide { width: min(100%, 560px); }
.doc-figs figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.doc-figs .wide .shot { aspect-ratio: 16 / 10; border-radius: 12px; }

/* A screenshot still to be taken: same frame, dashed, labelled. */
.shot--todo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  border-style: dashed;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  box-shadow: none;
}

/* ---------- Shortcuts table ---------- */
.keys { width: 100%; border-collapse: collapse; margin: 10px 0 22px; font-size: 0.92rem; }
.keys th, .keys td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.keys th { color: var(--light); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.keys td { color: var(--muted); }
.keys td:not(:first-child) { white-space: nowrap; }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 24px; padding-top: 96px; }
  .docs__toc { position: static; max-height: none; }
  .docs__toc ol { columns: 2; }
}
@media (max-width: 520px) {
  .docs { padding-left: 16px; padding-right: 16px; }
  .docs__toc ol { columns: 1; }
  .doc-figs figure { width: calc(50% - 10px); }
  .keys td:not(:first-child) { white-space: normal; }
}
