/* Oida docs hub — reusable shell + content styles.
 * Inherits design tokens from /styles/landing.css. Loaded after it so
 * the page picks up --paper, --terra, --moss, --sun, --serif, --sans,
 * --mono, etc. without redefining them.
 */

:root {
  --doc-max: 760px;
  --doc-sidenav: 260px;
}

/* ────────── Layout ────────── */

body.docs {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

.docs-shell {
  display: grid;
  grid-template-columns: var(--doc-sidenav) minmax(0, 1fr);
  max-width: 1200px;
  margin: 0 auto;
  gap: 0;
  min-height: 100vh;
}

@media (max-width: 880px) {
  .docs-shell { grid-template-columns: 1fr; }
}

/* ────────── Topbar (shared with landing) ────────── */

.docs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.docs-topbar a.brand {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.docs-topbar a.brand .dot { color: var(--terra); }
.docs-topbar a.brand small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-left: 12px;
  font-weight: 700;
}
.docs-topbar .nav-back {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: background 160ms, color 160ms;
}
.docs-topbar .nav-back:hover {
  background: rgba(33,24,16,0.04);
  color: var(--ink);
}

/* ────────── Sidebar nav ────────── */

.docs-side {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  background: rgba(245, 238, 220, 0.4);
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}

@media (max-width: 880px) {
  .docs-side {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.docs-side .side-section {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3, #888);
  margin: 20px 0 6px;
  font-weight: 700;
}
.docs-side .side-section:first-child { margin-top: 0; }
.docs-side a {
  display: block;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 6px;
  margin: 1px 0;
  transition: background 120ms, color 120ms;
}
.docs-side a:hover {
  background: rgba(33,24,16,0.05);
  color: var(--ink);
}
.docs-side a.active {
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
}

/* ────────── Article body ────────── */

.docs-article {
  padding: 56px 60px;
  max-width: calc(var(--doc-max) + 120px);
}
@media (max-width: 880px) {
  .docs-article { padding: 32px 24px; }
}

.docs-article .crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3, #888);
  margin-bottom: 16px;
}
.docs-article .crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}
.docs-article .crumbs a:hover { color: var(--terra); }

.docs-article h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
.docs-article h1 em { font-style: italic; color: var(--terra); }

.docs-article .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-2);
  margin-top: 8px;
  margin-bottom: 36px;
  max-width: 60ch;
}

.docs-article h2 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 56px 0 14px;
  color: var(--ink);
}
.docs-article h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  margin: 32px 0 10px;
  color: var(--ink);
}

.docs-article p { margin: 12px 0; max-width: 64ch; }
.docs-article ul, .docs-article ol { max-width: 64ch; padding-left: 24px; }
.docs-article li { margin: 6px 0; }
.docs-article strong { color: var(--ink); font-weight: 600; }
.docs-article em { font-style: italic; }
.docs-article a { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }
.docs-article a:hover { color: var(--terra-deep, #9a4a2a); }
.docs-article code {
  font-family: var(--mono);
  background: rgba(33,24,16,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
}
.docs-article pre {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 22px;
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 24px 0;
}
.docs-article pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
}
.docs-article blockquote {
  margin: 24px 0;
  padding: 18px 24px;
  border-left: 3px solid var(--terra);
  background: rgba(198,106,69,0.06);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  border-radius: 0 12px 12px 0;
}

/* Callouts */
.docs-article .callout {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 14px;
  margin: 24px 0;
  font-size: 14.5px;
}
.docs-article .callout .icon { font-size: 20px; line-height: 1; }
.docs-article .callout strong { display: block; margin-bottom: 4px; }
.docs-article .callout.note    { background: rgba(245,238,220,0.7); border: 1px solid var(--line); }
.docs-article .callout.warn    { background: rgba(198,106,69,0.08); border: 1px solid rgba(198,106,69,0.32); }
.docs-article .callout.success { background: rgba(74,107,71,0.08); border: 1px solid rgba(74,107,71,0.32); }

/* Step lists */
.docs-article .steps {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 18px;
}
.docs-article .steps > li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255,252,244,0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.docs-article .steps > li::before {
  content: counter(stp);
  counter-increment: stp;
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--terra);
  line-height: 1;
}
.docs-article .steps { counter-reset: stp; }
.docs-article .steps strong { display: block; margin-bottom: 4px; font-size: 15px; }

/* Card grid (hub pages) */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.doc-card {
  display: block;
  padding: 22px 24px;
  background: rgba(255,252,244,0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 220ms cubic-bezier(0.16,1,0.3,1), box-shadow 220ms, border-color 220ms;
}
.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(33,24,16,0.10);
  border-color: var(--terra);
}
.doc-card .eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.doc-card .eyebrow.terra { color: var(--terra); }
.doc-card .eyebrow.moss { color: var(--moss); }
.doc-card .eyebrow.sun { color: #c98b1a; }
.doc-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 6px;
}
.doc-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Page footer */
.docs-pagefoot {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-3, #888);
}
.docs-pagefoot a { color: var(--terra); text-decoration: none; }
.docs-pagefoot a:hover { text-decoration: underline; }
