/* Document pages: long-form reading on top of the MaiML Ecosystem theme. */

.doc-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--card-border);
}

.doc-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.doc-home {
  font-weight: 600;
}

.doc-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-switch .badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.25);
  text-transform: none;
}

.doc {
  width: min(860px, calc(100% - 32px));
  padding: 40px 0 64px;
}

.doc h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.doc h2 {
  font-size: 1.5rem;
  margin: 48px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

.doc h3 {
  font-size: 1.2rem;
  margin: 32px 0 10px;
}

.doc h4 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
  color: var(--accent-primary);
}

.doc p,
.doc li {
  color: var(--text-main);
  margin-bottom: 14px;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
  margin-bottom: 14px;
}

.doc blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius);
  color: var(--text-sub);
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

/* The contents list sits directly under the status box. */
.doc h2 + ul {
  list-style: none;
  padding-left: 0;
}

.doc h2 + ul li {
  margin-bottom: 6px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.doc th,
.doc td {
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
}

.doc td {
  color: var(--text-sub);
}

.doc img {
  max-width: 100%;
  height: auto;
  margin: 12px 0 24px;
  border-radius: var(--radius);
  background: #ffffff;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-main);
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--card-border);
  margin: 40px 0 24px;
}

.doc-footer {
  padding: 32px 0 56px;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.doc-footer p {
  margin-bottom: 8px;
}

.doc-footer code {
  word-break: break-all;
}

@media (max-width: 640px) {
  .doc h1 {
    font-size: 1.6rem;
  }

  .doc h2 {
    font-size: 1.3rem;
  }
}
