/* parallel.quest - Minimalist Documentation Portal */
/* Font: Inter semibold (Google Fonts) - Inter" variant with optical sizing */
/* Colors:
   White       #FFFFFF - background
   Near Black  #1A1A1A - headings
   Dark Gray   #4A4A4A - body text
   Medium Gray #9CA3AF - metadata, secondary
   Blue Link   #2563EB - links, interactive
   Light Gray  #F3F4F6 - code blocks, expanded backgrounds
*/

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #4A4A4A;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Sidebar Navigation (Desktop) === */
#sidebar {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    z-index: 100;
}

#sidebar ul {
    list-style: none;
}

#sidebar ul li {
    margin-bottom: 0.5rem;
}

#sidebar .nav-link {
    display: block;
    padding: 0.35rem 0 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: #9CA3AF;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#sidebar .nav-link:hover {
    color: #4A4A4A;
}

#sidebar .nav-link.active {
    color: #1A1A1A;
    border-left-color: #2563EB;
}

/* === Mobile Navigation === */
#mobile-nav {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

#mobile-nav a {
    display: inline-block;
    margin-right: 1.25rem;
    font-size: 0.8rem;
    color: #9CA3AF;
    text-decoration: none;
}

#mobile-nav a:hover {
    color: #1A1A1A;
}

/* === Main Content === */
#content {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* === Hero === */
#hero {
    margin-bottom: 2.5rem;
}

#hero h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1rem;
    color: #4A4A4A;
    margin-bottom: 1.5rem;
}

.hero-rule {
    border: none;
    border-top: 1px solid #F3F4F6;
}

/* === Document Sections === */
.doc-section {
    margin-bottom: 2.5rem;
}

.doc-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    flex-shrink: 0;
}

.section-summary {
    font-size: 0.95rem;
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.section-rule {
    border: none;
    border-top: 1px solid #F3F4F6;
    margin-top: 0.5rem;
}

/* === Details / Progressive Disclosure === */
details {
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

details summary {
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1A1A1A;
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #2563EB;
}

details[open] summary {
    margin-bottom: 0.5rem;
}

.details-content {
    padding: 0 0.75rem 0.75rem 1.5rem;
    background-color: #F3F4F6;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    padding-top: 0.75rem;
}

.details-content p {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.details-content p:last-child {
    margin-bottom: 0;
}

.details-content ul {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    list-style: none;
}

.details-content ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.details-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #2563EB;
}

.details-content strong {
    color: #1A1A1A;
    font-weight: 600;
}

.details-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    background-color: #FFFFFF;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    color: #1A1A1A;
}

/* === Code Blocks === */
.code-block {
    background-color: #FFFFFF;
    border: 1px solid #F3F4F6;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
}

.code-block code {
    display: block;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #1A1A1A;
    background: none;
    padding: 0;
    white-space: pre;
}

/* === Footer === */
#footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #F3F4F6;
    text-align: center;
}

#footer p {
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* === Links === */
a {
    color: #2563EB;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Responsive Design === */

/* Desktop: sidebar visible, content offset */
@media (min-width: 1024px) {
    #content {
        margin-left: calc(2rem + 180px + 3rem);
        margin-right: auto;
    }

    #mobile-nav {
        display: none;
    }
}

/* Tablet and smaller: hide sidebar, show mobile nav */
@media (max-width: 1023px) {
    #sidebar {
        display: none;
    }

    #mobile-nav {
        display: block;
    }

    #content {
        max-width: 680px;
        margin: 0 auto;
        padding: 2rem 1.25rem 3rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    #content {
        padding: 1.5rem 1rem 2.5rem;
    }

    .details-content {
        padding-left: 0.75rem;
    }
}
