/* API documentation on top of the shared Cryptanio light theme. */
:root {
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --code-bg: #1f1e24;
  --code-border: #37353c;
  --code-text: #f0edf2;
  --code-key: #f2bf54;
  --code-str: #f7dc9a;
  --code-dim: #9b979f;
  --danger: #b93636;
  --danger-soft: #fdeaea;
}

.docs-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 56px;
  padding-block: 64px 96px;
}

.docs-nav {
  position: sticky;
  top: 112px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav h4 {
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-nav h4:first-child {
  margin-top: 0;
}

.docs-nav a {
  padding: 5px 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 140ms ease, border-color 140ms ease;
}

.docs-nav a:hover {
  border-left-color: var(--accent);
  color: var(--ink);
}

.docs-content {
  min-width: 0;
  max-width: 780px;
}

.docs-content > h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 580;
  letter-spacing: -0.055em;
  line-height: 1;
}

.docs-content > .lede {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.docs-section {
  padding-top: 52px;
}

.docs-section h2 {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.docs-section h3 {
  margin: 26px 0 8px;
  font-size: 1.06rem;
  font-weight: 700;
}

.docs-section p {
  max-width: 68ch;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.docs-section p b,
.docs-section li b {
  color: var(--ink);
  font-weight: 650;
}

.docs-section .code {
  margin: 16px 0;
}

.docs-section ul.bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.docs-section ul.bullets li {
  max-width: 68ch;
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.docs-section ul.bullets li::before {
  flex: none;
  color: var(--accent);
  content: "—";
}

.inline-code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #9c6813;
  font-family: var(--mono);
  font-size: 0.84em;
  white-space: nowrap;
}

.code {
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: 12px;
  background: var(--code-bg);
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--code-border);
  color: var(--code-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.code pre {
  overflow-x: auto;
  margin: 0;
  padding: 16px;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
}

.code code {
  font-family: inherit;
}

.tk-key { color: var(--code-key); }
.tk-str { color: var(--code-str); }
.tk-num,
.tk-cmd { color: #fff; }
.tk-cmt { color: var(--code-dim); font-style: italic; }
.tk-dim { color: var(--code-dim); }

.docs-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.docs-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8f8f8;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.docs-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table td:first-child {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.callout,
.docs-contact {
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid rgba(217, 154, 36, 0.28);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.callout b,
.docs-contact b {
  color: var(--ink);
  font-weight: 650;
}

.method {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(217, 154, 36, 0.35);
  border-radius: 5px;
  background: var(--accent-soft);
  color: #8f5e10;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 750;
  vertical-align: 1px;
}

.method.del {
  border-color: #f5cdcd;
  background: var(--danger-soft);
  color: var(--danger);
}

.docs-link {
  color: #9c6813;
  font-weight: 650;
}

.docs-link:hover {
  text-decoration: underline;
}

.docs-contact {
  margin-top: 72px;
  padding: 24px 28px;
}

.docs-contact h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.docs-contact p {
  margin: 0;
}

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

  .docs-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-shell {
    padding-block: 48px 72px;
  }

  .docs-content > h1 {
    font-size: 2.35rem;
  }

  .docs-table th,
  .docs-table td {
    padding-inline: 12px;
  }

  .docs-contact {
    padding: 20px;
  }
}
