/* ============================================================
   Archivo Documentation
   Plain, dense docs layout (sidebar + content), intentionally
   low-design. Reuses design tokens from styles.css.
   ============================================================ */

.docs-body { min-height: 100vh; background: var(--paper); }

/* ---- Shell ---------------------------------------------------- */
.docs-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px 80px;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ---- Sidebar -------------------------------------------------- */
.docs-side {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding-right: 8px;
  font-size: 0.9rem;
}

.docs-side__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-brd);
}

.docs-side__title svg { flex: 0 0 auto; }

.docs-nav__group { margin-bottom: 20px; }

.docs-nav__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
  padding-left: 12px;
}

.docs-nav__list { display: flex; flex-direction: column; gap: 1px; }

.docs-nav__list a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  line-height: 1.35;
  border-radius: 0 6px 6px 0;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.docs-nav__list a:hover { color: var(--ink); background: rgba(129, 182, 157, 0.06); }

.docs-nav__list a.is-active {
  color: var(--green-deep);
  font-weight: 600;
  border-left-color: var(--green);
  background: rgba(129, 182, 157, 0.08);
}

/* ---- Content -------------------------------------------------- */
.docs-content { max-width: 780px; min-width: 0; }

.docs-section { display: block; }

/* When JS drives single-section paging, hide all but the active one. */
.docs--spa .docs-section { display: none; }
.docs--spa .docs-section.is-active { display: block; animation: docsFade 0.2s var(--ease); }

@keyframes docsFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.docs-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}

.docs-content h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.95rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
}

.docs-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  letter-spacing: -0.01em;
  margin: 34px 0 12px;
  padding-top: 6px;
  color: var(--ink);
}

.docs-content h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--ink);
}

.docs-content p,
.docs-content li {
  color: var(--ink-soft);
  line-height: 1.72;
  font-size: 0.96rem;
}

.docs-content p { margin: 0 0 13px; }

.docs-lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 20px;
}

.docs-content ul,
.docs-content ol { margin: 0 0 14px; padding-left: 20px; }
.docs-content li { margin-bottom: 6px; }
.docs-content li::marker { color: var(--ink-faint); }

.docs-content a {
  color: var(--green-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(26, 61, 42, 0.3);
  font-weight: 500;
}
.docs-content a:hover { text-decoration-color: var(--green-deep); }

.docs-content strong { color: var(--ink); font-weight: 700; }

.docs-content hr {
  border: 0;
  border-top: 1px solid var(--glass-brd);
  margin: 34px 0;
}

/* Inline + block code, kept muted */
.docs-content code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(90, 120, 100, 0.1);
  padding: 1px 6px;
  border-radius: 5px;
  color: #2a4636;
}

/* ---- Tables (formats, licenses) ------------------------------- */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 6px 0 18px;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--glass-brd);
  vertical-align: top;
  line-height: 1.5;
}

.docs-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.docs-table td { color: var(--ink-soft); }
.docs-table td strong { color: var(--ink); }
.docs-table tr:last-child td { border-bottom: 0; }

/* License tag, deliberately plain */
.docs-lic {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Small note / callout, understated */
.docs-note {
  border-left: 3px solid var(--green-brd);
  background: rgba(129, 182, 157, 0.05);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 6px 0 18px;
}
.docs-note p { margin: 0; font-size: 0.92rem; }

/* Definition rows (key/value pairs) */
.docs-defs { display: grid; grid-template-columns: 190px 1fr; gap: 2px 22px; margin: 4px 0 18px; }
.docs-defs dt { color: var(--ink); font-weight: 600; font-size: 0.92rem; padding: 7px 0; border-bottom: 1px solid var(--glass-brd); }
.docs-defs dd { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; padding: 7px 0; margin: 0; border-bottom: 1px solid var(--glass-brd); }

/* Prev / next footer within content */
.docs-updated {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-brd);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---- Mobile sidebar toggle ------------------------------------ */
.docs-sidebtn {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--glass-brd);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 0; padding-top: 60px; }
  .docs-side {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 8px;
    display: none;
  }
  .docs-side.is-open { display: block; }
  .docs-sidebtn { display: inline-flex; }
}
