/* Otto docs — on top of /styles.css (tokens, header, footer). Diátaxis:
 * tutorials, how-to guides, reference, explanation (https://diataxis.fr/). */

.nav a[aria-current] { background: var(--bg-alt); color: var(--ink); }
/* The landing page hides its nav on phones; the docs keep theirs, scrolling */
@media (max-width: 760px) {
  .header-inner { gap: 12px; }
  .header-inner .brand span { display: none; }
  nav { display: block; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 6px; font-size: 14px; white-space: nowrap; }
}

.doc { max-width: 760px; padding-top: 48px; padding-bottom: 32px; }
.doc .crumbs { font: 500 13px/1 var(--font-mono); letter-spacing: .06em; color: var(--muted); margin-bottom: 18px; }
.doc .crumbs a { color: var(--muted); }
.doc h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; }
.doc .doc-lede { font-size: 19px; color: var(--muted); margin-bottom: 8px; }
.doc h2 { font-size: 24px; font-weight: 700; margin: 44px 0 14px; }
.doc h3 { font-size: 19px; font-weight: 700; margin: 0 0 10px; }
.doc p, .doc ul, .doc ol, .doc table, .doc pre { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }

.doc pre {
  background: var(--m-term); color: var(--m-text);
  border-radius: 10px; padding: 14px 16px; overflow-x: auto;
  font: 400 14px/1.6 var(--font-mono);
}
.doc pre code { font-size: inherit; }
.doc :not(pre) > code { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }

/* A how-to's steps: numbered cards */
.doc ol.steps { list-style: none; padding: 0; counter-reset: step; }
.doc ol.steps > li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 8px 64px; margin-bottom: 14px;
}
.doc ol.steps > li::before {
  content: counter(step); position: absolute; left: 20px; top: 18px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); font: 700 15px/1 var(--font-display);
}
@media (max-width: 480px) {
  .doc ol.steps > li { padding: 56px 16px 4px; }
  .doc ol.steps > li::before { left: 16px; top: 16px; }
}

.doc table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink); font-weight: 600; }

.doc .see-also { margin-top: 44px; padding-top: 4px; border-top: 1px solid var(--line); }
.doc .see-also h2 { font-size: 18px; margin-top: 24px; }

/* The docs home: one card per quadrant */
.quadrants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
@media (max-width: 640px) { .quadrants { grid-template-columns: 1fr; } }
.quadrant { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); }
.quadrant:hover { border-color: var(--brand-soft); color: var(--text); }
.quadrant h2 { font-size: 20px; margin: 0 0 6px; }
.quadrant p { margin: 0; color: var(--muted); font-size: 15px; }
.doc .empty { color: var(--muted); font-style: italic; }

/* A swarm role's icon (Swarm roles): the line drawing Otto shows beside that sender */
.doc .role-icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: 4px; color: var(--brand-soft); }
.doc td.role-name { white-space: nowrap; }
