/* gabs.wiki - Documentation Clean Slate Wiki */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    color: #111827;
    background: #FFFFFF;
}

/* ========== MASTHEAD ========== */

.masthead {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 200;
}

.masthead-left {
    display: flex;
    align-items: baseline;
}

.masthead-brand {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
}

.masthead-tld {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #6B7280;
}

.search-input {
    width: 240px;
    padding: 6px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #FFFFFF;
}

.search-placeholder {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* ========== LAYOUT ========== */

.layout {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

/* ========== LEFT SIDEBAR ========== */

.sidebar {
    width: 256px;
    min-width: 256px;
    background: #F9FAFB;
    border-right: 1px solid #E5E7EB;
    padding: 24px 16px;
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 100;
}

.nav-list {
    list-style: none;
}

.nav-item.top-level {
    margin-bottom: 4px;
}

.nav-item.top-level > .nav-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #111827;
    cursor: pointer;
    display: inline;
}

.nav-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #6B7280;
    margin-right: 6px;
    cursor: pointer;
    vertical-align: middle;
    transition: transform 150ms ease;
}

.nav-chevron.expanded {
    transform: rotate(90deg);
}

.nav-sublist {
    list-style: none;
    padding-left: 16px;
    margin-top: 4px;
}

.nav-sublist.collapsed {
    display: none;
}

.nav-subitem {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #6B7280;
    padding: 4px 8px;
    margin-bottom: 2px;
    cursor: pointer;
    border-radius: 6px;
}

.nav-subitem:hover {
    color: #4F46E5;
}

.nav-subitem.active {
    color: #4F46E5;
    background: #EEF2FF;
}

/* ========== ARTICLE CONTENT ========== */

.article {
    flex: 1;
    margin-left: 256px;
    margin-right: 200px;
    padding: 32px 24px;
    display: flex;
    justify-content: center;
}

.article-inner {
    max-width: 720px;
    width: 100%;
}

.breadcrumb {
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.breadcrumb-link {
    color: #6B7280;
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: #4F46E5;
}

.breadcrumb-sep {
    color: #D1D5DB;
    margin: 0 6px;
}

.breadcrumb-current {
    color: #6B7280;
}

.article-h1 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #111827;
    margin-bottom: 1.5rem;
}

.article-h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body {
    font-family: 'IBM Plex Serif', serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #111827;
    margin-bottom: 1rem;
}

.article-link {
    color: #4F46E5;
    text-decoration: underline;
}

.article-link:hover {
    color: #4338CA;
}

.article-blockquote {
    border-left: 3px solid #E5E7EB;
    padding-left: 16px;
    margin: 1.5rem 0;
}

.article-blockquote p {
    font-family: 'IBM Plex Serif', serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #4B5563;
}

.inline-code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    background: #F3F4F6;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ========== ARTICLE FOOTER ========== */

.article-footer {
    margin-top: 3rem;
}

.article-rule {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin-bottom: 1rem;
}

.article-meta {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-pill {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #6B7280;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 4px 12px;
    cursor: pointer;
}

.tag-pill:hover {
    background: #EEF2FF;
    color: #4F46E5;
}

/* ========== TABLE OF CONTENTS ========== */

.toc {
    width: 200px;
    min-width: 200px;
    position: fixed;
    top: 120px;
    right: 24px;
    z-index: 50;
}

.toc-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.toc-list {
    list-style: none;
}

.toc-item {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #6B7280;
    padding: 4px 0 4px 12px;
    cursor: pointer;
    border-left: 2px solid transparent;
}

.toc-item.active {
    color: #4F46E5;
    border-left-color: #4F46E5;
}

.toc-item:hover {
    color: #4F46E5;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1280px) {
    .toc {
        display: none;
    }

    .article {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .article {
        margin-left: 0;
    }
}
