/* ----------------------------------------------------
   HEALNIXIS DOCUMENTATION DESIGN SYSTEM v2.0
   Unified with Healnixis Main Website Identity
---------------------------------------------------- */
:root {
    --ink: #0b1526;
    --ink-dark: #050b14;
    --ink-soft: #475569;
    --ink-muted: #64748b;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-light: #eff6ff;
    --blue-dark: #1e3a8a;
    --cyan: #0284c7;
    --mint: #059669;
    --mint-light: #ecfdf5;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --amber: #d97706;
    --amber-light: #fffbeb;
    --rose: #e11d48;
    --rose-light: #ffe4e6;
    --surface: #f8fafc;
    --surface-card: #ffffff;
    --line: #e2e8f0;
    --line-subtle: #f1f5f9;
    --shadow-sm: 0 2px 8px rgba(11, 21, 38, 0.04);
    --shadow-md: 0 10px 25px rgba(11, 21, 38, 0.06);
    --shadow-lg: 0 20px 45px rgba(11, 21, 38, 0.09);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f0f5ff 0%, var(--surface) 380px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }

/* BRAND GRADIENT TEXT */
.brand-name-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: inline-block;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.2s ease;
}
.header-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 32px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--ink);
    font: 800 22px 'Manrope', sans-serif;
    letter-spacing: -0.03em;
}
.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    border: none;
}
.brand-subtag {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid #dbeafe;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 2px;
    letter-spacing: normal;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BUTTONS */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.button-primary {
    color: #fff;
    background: var(--blue);
    border: 1px solid var(--blue);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.button-primary:hover {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
}
.button-outline {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
}
.button-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.button-small {
    padding: 8px 14px;
    font-size: 12.5px;
    border-radius: 8px;
}

/* CONTAINER & LAYOUT */
.container {
    max-width: 1380px;
    width: calc(100% - 48px);
    margin: 36px auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    flex: 1;
}

/* SIDEBAR */
.sidebar {
    position: sticky;
    top: 98px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 22px 18px;
    box-shadow: var(--shadow-sm);
}
.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    padding: 0 10px 14px;
    border-bottom: 1px solid var(--line-subtle);
    margin-bottom: 10px;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    transition: all 0.15s ease;
}
.doc-link-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.doc-link:hover {
    background: var(--blue-light);
    color: var(--blue);
}
.doc-link:hover .doc-link-dot {
    background: var(--blue);
}
.doc-link.active {
    background: var(--ink);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(11, 21, 38, 0.15);
}
.doc-link.active .doc-link-dot {
    background: #38bdf8;
}

/* CONTENT CARD */
.content {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-muted);
    font-weight: 600;
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--ink-muted);
    transition: color 0.15s ease;
}
.breadcrumb a:hover {
    color: var(--blue);
}
.bc-sep {
    color: #cbd5e1;
}
.bc-current {
    color: var(--ink-soft);
    font-weight: 700;
}

.title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin-bottom: 22px;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 26px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line-subtle);
}
.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.meta-badge strong {
    color: var(--ink);
}
.status-published {
    background: var(--mint-light);
    border-color: #a7f3d0;
    color: var(--mint);
    font-weight: 700;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
}

/* TYPOGRAPHY & MARKDOWN RENDERING */
.text {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--ink-soft);
}
.text h1, .text h2, .text h3, .text h4 {
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    letter-spacing: -0.025em;
}
.text h1 {
    font-size: 28px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 16px;
}
.text h2 {
    font-size: 22px;
    font-weight: 800;
    margin-top: 32px;
    margin-bottom: 14px;
}
.text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}
.text p {
    margin-bottom: 20px;
}
.text a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.text a:hover {
    color: var(--blue-hover);
}
.text ul, .text ol {
    padding-left: 24px;
    margin: 16px 0 24px;
}
.text li {
    margin-bottom: 8px;
}
.text blockquote {
    background: #f0f7ff;
    border-left: 4px solid var(--blue);
    padding: 14px 20px;
    border-radius: 0 12px 12px 0;
    color: var(--blue-dark);
    margin: 24px 0;
    font-size: 15px;
    line-height: 1.6;
}
.text code {
    background: #f1f5f9;
    color: var(--blue);
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 13.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.text pre {
    background: #0b1526;
    color: #f8fafc;
    padding: 22px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.text pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.text table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.text th {
    background: #f8fafc;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
}
.text td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 14px;
}
.text tr:last-child td {
    border-bottom: none;
}
.text tr:hover td {
    background: #f8fafc;
}

/* FOOTER */
.docs-footer {
    background: #070d18;
    color: #fff;
    padding: 48px 0 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}
.docs-footer-inner {
    max-width: 1380px;
    width: calc(100% - 48px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.footer-brand-col .brand {
    color: #fff;
    margin-bottom: 8px;
}
.footer-brand-col .brand-name-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-brand-col .brand-subtag {
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    border-color: rgba(255, 255, 255, 0.15);
}
.footer-desc {
    color: #94a3b8;
    font-size: 13px;
    max-width: 480px;
    margin: 0;
    line-height: 1.55;
}
.footer-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    color: var(--ink-muted);
    flex-wrap: wrap;
    gap: 16px;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.footer-links a {
    color: #94a3b8;
    transition: color 0.15s ease;
}
.footer-links a:hover {
    color: #38bdf8;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 24px auto;
    }
    .sidebar {
        position: relative;
        top: 0;
    }
    .content {
        padding: 32px 24px;
    }
}
@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
        height: 64px;
    }
    .brand {
        font-size: 19px;
    }
    .brand-logo {
        width: 30px;
        height: 30px;
    }
    .container {
        width: calc(100% - 24px);
        margin: 16px auto;
    }
    .content {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }
    .title {
        font-size: 26px;
    }
    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
