/* CollHub - public integration page ("API di integrazione"). Uses tokens from base.css and the header/footer of landing.css. */

.doc-hero { padding: 56px 0 28px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-family: var(--font-brand); font-size: 38px; line-height: 1.15; margin: 10px 0 14px; color: var(--ink); }
.doc-hero p { max-width: 720px; color: var(--ink-2); font-size: 16px; margin: 0; }

.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; padding: 36px 24px 64px; }
.doc-toc { position: sticky; top: 76px; align-self: start; font-size: 14px; }
.doc-toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; }
.doc-toc a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; cursor: pointer; }
.doc-toc a:hover { background: var(--primary-50); color: var(--primary-600); }

.doc-body { min-width: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.doc-body section { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.doc-body section:last-child { border-bottom: 0; }
.doc-body h2 { font-family: var(--font-brand); font-size: 26px; color: var(--ink); margin: 0 0 12px; scroll-margin-top: 80px; }
.doc-body h3 { font-size: 17px; color: var(--ink); margin: 22px 0 8px; }
.doc-body code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .9em; background: var(--primary-50); color: var(--primary-600); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.doc-body pre { background: #16202b; color: #e8eef3; border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.doc-body pre code { background: none; color: inherit; padding: 0; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0 14px; display: block; overflow-x: auto; }
.doc-body th, .doc-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-body th { color: var(--ink); background: var(--surface-2); }

.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 14px 0 6px; }
.doc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.doc-card i { color: var(--primary); font-size: 20px; }
.doc-card h3 { margin: 8px 0 6px; font-size: 16px; }
.doc-card p { margin: 0; font-size: 14px; color: var(--muted); }

.doc-note { background: var(--accent-50); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14.5px; }

@media (max-width: 860px) {
    .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 16px 48px; }
    .doc-toc { position: static; }
    .doc-toc ol { display: flex; flex-wrap: wrap; gap: 4px; }
    .doc-hero { padding: 36px 0 22px; }
    .doc-hero h1 { font-size: 30px; }
}

/* The landing hides .header-actions on a phone behind its menu; this page has no menu, so its two links stay. */
.doc-header-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.doc-header-actions .btn { cursor: pointer; }
@media (max-width: 520px) {
    .doc-header-actions .btn-outline { display: none; }
    .brand-wordmark { font-size: 18px; }
}
