/* Documentation pages (docs hub + articles) */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0 20px;
}

.docs-side {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  padding: 20px;
}

.docs-side h4 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-side a {
  display: block;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--muted);
}

.docs-side a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}

.docs-side a.current {
  color: var(--text);
  background: rgba(79, 124, 255, .18);
  font-weight: 700;
}

.docs-main {
  min-width: 0;
  max-width: 820px;
}

.docs-main h2 {
  margin: 44px 0 18px;
  font-size: 28px;
  color: var(--accent2);
}

.docs-main h3 {
  margin: 32px 0 14px;
  font-size: 20px;
}

.docs-main p {
  margin-bottom: 18px;
  line-height: 1.75;
  color: var(--muted);
}

.docs-main strong {
  color: var(--text);
}

.docs-main ul,
.docs-main ol {
  margin: 0 0 24px;
  padding-left: 22px;
  color: var(--muted);
}

.docs-main li {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* UI element reference, e.g. a button caption */
.ui {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-weight: 600;
  font-size: .93em;
  white-space: nowrap;
}

/* Numbered step list */
.docs-steps {
  list-style: none;
  counter-reset: docstep;
  padding: 0;
  margin: 0 0 30px;
}

.docs-steps > li {
  counter-increment: docstep;
  position: relative;
  padding: 0 0 22px 52px;
  margin: 0;
  border-left: 1px solid var(--border);
}

.docs-steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.docs-steps > li::before {
  content: counter(docstep);
  position: absolute;
  left: -17px;
  top: -2px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.docs-steps > li > :first-child {
  margin-top: 0;
}

/* Callouts */
.note {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  border-radius: 12px;
  background: rgba(55, 211, 166, .07);
  padding: 16px 20px;
  margin: 0 0 26px;
}

.note.warn {
  border-left-color: #f0b34a;
  background: rgba(240, 179, 74, .08);
}

.note p:last-child {
  margin-bottom: 0;
}

.note-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: var(--text);
  font-size: 14px;
  letter-spacing: .02em;
}

/* Screenshot slot — degrades to a placeholder until the image is added */
.doc-shot {
  margin: 0 0 30px;
}

.doc-shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.doc-shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.doc-shot.missing img {
  display: none;
}

.doc-shot .shot-ph {
  display: none;
  text-align: center;
  padding: 62px 24px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.doc-shot .shot-ph b {
  color: var(--text);
}

.doc-shot.missing .shot-ph {
  display: block;
}

/* Diagram wrapper — never lets a wide figure scroll the page body */
.doc-figure {
  margin: 0 0 30px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
  padding: 18px;
}

.doc-figure svg {
  display: block;
  min-width: 620px;
  width: 100%;
  height: auto;
}

/* Tables */
.doc-table-wrap {
  overflow-x: auto;
  margin: 0 0 30px;
}

.doc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

.doc-table th,
.doc-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.doc-table th {
  color: var(--text);
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.doc-table td {
  color: var(--muted);
}

/* Article cards on the docs hub */
.doc-card-status {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--accent2);
  color: #062a20;
}

.doc-card-status.soon {
  background: rgba(255, 255, 255, .1);
  color: var(--muted);
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .docs-side {
    position: static;
  }
}
