/* Shared compact scale for Explorer and the technical pages. */
.page-header { padding: 28px 0 20px; }
.page-title { font-size: 36px; line-height: 1.2; margin-bottom: 0; }

.page-content {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    padding-block: 8px 48px;
}

/* Compact navigation keeps full touch targets and natural label wrapping. */
.toc {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    min-width: 0;
    padding: 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
.toc-title {
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
}
.toc-nav { display: flex; flex-direction: column; gap: 4px; }
.toc-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.toc-link:hover { color: var(--color-text-primary); background: var(--color-bg-tertiary); }
.toc-link.active { color: var(--color-accent-text); background: var(--color-accent-dim); }

/* Reading copy stays at 16px while headings and vertical rhythm become tighter. */
.content { margin-bottom: 0; }
.content > section + section { margin-top: 40px; }
.content h2 { font-size: 28px; line-height: 1.25; margin: 40px 0 16px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 22px; line-height: 1.3; margin: 28px 0 12px; }
.content h4 { font-size: 18px; line-height: 1.35; margin: 24px 0 10px; }
.content p { font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.content ul, .content ol { margin-bottom: 16px; padding-left: 24px; }
.content li { font-size: 16px; line-height: 1.7; margin-bottom: 6px; }
.content code { font-size: 14px; }
.content pre { padding: 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.content pre code { font-size: inherit; line-height: inherit; }
.content th, .content td { padding: 10px 12px; }
.content th { font-size: 12px; line-height: 18px; }
.content td, .content .table-mono { font-size: 14px; line-height: 21px; }
.content .table-container { margin-bottom: 20px; }

/* Match Explorer's field and button metrics without reducing mobile input text. */
.form-label { font-size: 12px; line-height: 18px; margin-bottom: 6px; }
.form-input, .form-select {
    min-height: 44px;
    height: 44px;
    padding: 10px;
    font-size: 16px;
    line-height: 22px;
}
.api-content .btn, .page-actions .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 22px;
}

@media (max-width: 1024px) {
    .page-content { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .toc { position: static; }
    .toc-nav { flex-direction: row; flex-wrap: wrap; gap: 4px 8px; }
}

@media (max-width: 760px) {
    .content table { display: block; max-width: 100%; overflow-x: auto; }
    .content th, .content td:not(:last-child) { white-space: nowrap; }
    .content td:last-child { min-width: 180px; }
}

@media (max-width: 600px) {
    .page-header { padding: 24px 0 20px; }
    .page-title { font-size: 32px; }
    .page-content { padding-bottom: 32px; }
    .content h2 { font-size: 26px; }
    .content h3 { font-size: 21px; }
}
