/* Docs — same Auros system, two-column reading layout.
   Content stays in a narrow measure (the reference calls for ~600px) with a sticky
   contents rail; the rail is a Ghost Navigation Link stack, not a component of its own. */

.docs {
  max-width: var(--max); margin: 0 auto;
  padding: var(--s-48) var(--s-40) 0;
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s-64); align-items: start;
}

.toc { position: sticky; top: var(--s-40); display: flex; flex-direction: column; }
.toc-nav { display: flex; flex-direction: column; }
.toc-nav a {
  font-size: var(--t-body); color: var(--silver); text-decoration: none;
  padding: 9px 0 9px var(--s-16); border-left: 1px solid var(--rule);
}
.toc-nav a:hover { color: var(--white); border-left-color: var(--slate); }
.toc-nav a[aria-current="true"] { color: var(--mint); border-left-color: var(--mint); }

.doc-body { max-width: 720px; padding-bottom: var(--s-120); }
.doc-sec { padding-bottom: var(--s-80); scroll-margin-top: var(--s-40); }
.doc-sec .heading-lg { margin: var(--s-16) 0 var(--s-24); }
.doc-sec .heading { margin: var(--s-48) 0 var(--s-20); }
.doc-sec .body { margin-bottom: var(--s-20); max-width: 62ch; }
.lede-l { font-size: var(--t-label); line-height: 1.45; color: var(--mist); letter-spacing: 0; text-transform: none; }

/* callout: a raised surface step, never a left-border accent stripe */
.callout {
  background: var(--shoal); border-radius: var(--r-card);
  padding: var(--s-28) var(--s-32); margin: var(--s-28) 0;
}
.callout.warn { background: var(--abyss); }
.callout .body { margin: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--element-gap); margin-top: var(--s-24); }

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.88em; color: var(--mist);
  background: rgba(24, 74, 84, 0.34); padding: 2px 6px; border-radius: var(--r-small);
}
pre.code {
  background: var(--abyss); border-radius: var(--r-card);
  padding: var(--s-24) var(--s-28); margin: var(--s-24) 0;
  overflow-x: auto;
}
pre.code code {
  background: none; padding: 0; color: var(--mist);
  font-size: 13px; line-height: 1.7; white-space: pre;
}

.tbl { width: 100%; border-collapse: collapse; margin: var(--s-24) 0; }
.tbl th {
  text-align: left; font-size: var(--t-caption); font-weight: var(--w-medium);
  letter-spacing: var(--tr-caption); text-transform: uppercase; color: var(--steel);
  padding: 0 var(--s-16) var(--s-12) 0; border-bottom: 1px solid var(--rule);
}
.tbl td { padding: var(--s-12) var(--s-16) var(--s-12) 0; border-bottom: 1px solid var(--rule-2); font-size: 15px; }
.tbl .r, .tbl th.r { text-align: right; padding-right: 0; }
.tbl .num { font-family: "IBM Plex Mono", monospace; background: none; padding: 0; color: var(--silver); }

.steps { list-style: none; counter-reset: s; margin: var(--s-24) 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: var(--s-16) 0 var(--s-16) var(--s-40);
  border-bottom: 1px solid var(--rule-2);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: var(--s-16);
  font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--mint);
}
.steps b { display: block; font-weight: var(--w-medium); color: var(--white); font-size: 17px; }
.steps span { display: block; margin-top: 5px; color: var(--silver); font-size: 15px; line-height: 1.5; }

.bullets { list-style: none; margin: var(--s-24) 0; padding: 0; }
.bullets li {
  position: relative; padding: var(--s-12) 0 var(--s-12) var(--s-24);
  color: var(--silver); font-size: 15px; line-height: 1.6; max-width: 66ch;
}
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 21px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint); opacity: .8;
}
.bullets b { font-weight: var(--w-medium); color: var(--mist); }

.api { margin-top: var(--s-24); }
.api-row { padding: var(--s-20) 0; border-bottom: 1px solid var(--rule-2); }
.api-row:last-child { border-bottom: 0; }
.api-row .meth {
  background: var(--shoal); color: var(--mint); font-size: 11px;
  letter-spacing: 0.08em; padding: 3px 8px; margin-right: var(--s-12);
}
.api-row .path { background: none; padding: 0; color: var(--mist); font-size: 13px; word-break: break-all; }
.api-row .body { margin: var(--s-12) 0 0; }

@media (max-width: 1080px) {
  /* `1fr` is `minmax(auto, 1fr)`: the track cannot shrink below its content's min-content
     width, so one wide descendant made the single-column layout wider than the phone it
     was on. minmax(0, 1fr) lets the track shrink and hands the overflow to whichever
     child actually owns a scroller. */
  .docs { grid-template-columns: minmax(0, 1fr); gap: var(--s-32); padding: var(--s-32) var(--s-24) 0; }
  .toc, .doc-body { min-width: 0; }
  .toc { position: static; }
  .toc-nav { flex-direction: row; flex-wrap: wrap; gap: var(--s-12); }
  .toc-nav a { border-left: 0; padding: 6px 0; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Wide content scrolls inside itself; the page body never scrolls sideways. */
.doc-sec table, .doc-sec .api { max-width: 100%; }
.doc-sec { min-width: 0; overflow-wrap: break-word; }
.doc-sec code { overflow-wrap: anywhere; }
