/* Docs — the documentation shell and its prose.
 *
 * Prefixed docs-/side-/prose-; base.css owns the shared chrome. The ground
 * and tokens are portiger-site's: this host carries the umbrella brand, and
 * per the family rule in tokens.css.
 */

/* Brand lockup — same drawing as the product sites. */
.nav__lockup { display: grid; gap: 1px; line-height: 1.1; }
.nav__parent { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.nav__product { font-family: var(--disp); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
@media (max-width: 700px) { .nav__product { font-size: 1.25rem; } }

/* ── shell ──────────────────────────────────────────────────────────────── */

.docs { display: grid; gap: 56px; padding-block: clamp(36px, 5vw, 64px); flex: 1 0 auto; }
.docs--page { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }

.side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 28px; }
.side__title { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.side__list { list-style: none; display: grid; gap: 2px; }
.side__list a {
  display: block; padding: 7px 12px;
  border-left: 2px solid var(--line); border-radius: 0 6px 6px 0;
  font-size: .93rem; color: var(--muted);
}
.side__list a:hover { color: var(--text); border-left-color: var(--line-2); }
.side__list a[aria-current="page"] {
  color: var(--text); border-left-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 940px) {
  .docs--page { grid-template-columns: 1fr; gap: 36px; }
  .side { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  /* The table of contents is twenty-two links now. Stacked above the page on a
     phone it would be a screen and a half of list before the first sentence, so
     the page comes first and the contents follow it. */
  .docs__main { order: -1; }
}

/* ── prose ──────────────────────────────────────────────────────────────── */

.docs__main { display: grid; gap: 16px; align-content: start; }

.docs__main .eyebrow { margin-bottom: -6px; }
.docs__main h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.docs__main h2 { margin-top: 26px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.docs__main h3 { margin-top: 12px; font-size: 1.08rem; }
.docs__main ul, .docs__main ol { padding-left: 22px; display: grid; gap: 8px; color: var(--muted); }
.docs__main table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.docs__main th, .docs__main td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs__main th { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.docs__main td { color: var(--muted); }
.docs__table { overflow-x: auto; }

/* Commands. A block a customer will copy gets a frame, a monospace face and
   sideways scroll — never a wrap that breaks a flag in half. */
.docs__main pre {
  padding: 16px 18px;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; font-size: .88rem; line-height: 1.6; color: var(--text);
}
.docs__main :not(pre) > code {
  padding: 2px 6px; border-radius: 5px;
  background: var(--bg-raise); border: 1px solid var(--line);
  color: var(--text); font-size: .88em;
}

/* Callouts: note (line ground) and warn (amber edge) — no red, docs are not
   an alarm panel. */
.docs__note, .docs__warn {
  padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .94rem; color: var(--muted);
}
.docs__warn { border-color: var(--accent-bd); background: var(--accent-soft); }
.docs__note strong, .docs__warn strong { color: var(--text); }

/* Numbered install steps: the number is a drawn thing, not list-style, so a
   step can hold paragraphs and a command block without the marker drifting. */
.docs__steps { list-style: none; padding-left: 0; display: grid; gap: 22px; counter-reset: step; }
.docs__steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; counter-increment: step; }
.docs__steps > li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-top: 1px;
  border: 1px solid var(--accent-bd); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: .85rem;
}
.docs__steps > li > div { display: grid; gap: 10px; min-width: 0; }
.docs__steps h3 { margin-top: 0; }

/* Definition rows: term left, meaning right — plan tables, value lists. */
.docs__def { display: grid; gap: 0; }
.docs__def > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.docs__def dt { font-family: var(--mono); font-size: .86rem; color: var(--text); overflow-wrap: anywhere; }
.docs__def dd { font-size: .93rem; color: var(--muted); }
@media (max-width: 700px) { .docs__def > div { grid-template-columns: 1fr; gap: 4px; } }

/* ── screenshots ────────────────────────────────────────────────────────── */

/* A panel shot is evidence, so it is framed rather than bled into the prose.
   It carries no max-width of its own: base.css caps every image at the width
   of its column and the shot keeps its natural size below that, so nothing is
   ever scaled up into blur. */
.shot { display: grid; gap: 10px; margin-block: 6px; }
.shot img { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); }
.shot figcaption { font-size: .88rem; color: var(--faint); }
