
/* General */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    background-color: #f8f9fa;
    color: #333;
}

/* Sidebar */
#sidebar {
    width: 260px;
    min-width: 260px;
    background-color: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 20px 15px;
    overflow-y: auto;
}

#sidebar h2 {
    font-size: 20px;
    margin: 0 0 20px;
}

/* Search */
#search {
    width: 100%;
    padding: 11px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

#search:focus {
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.1);
}

/* Dropdown categories */
#sidebar details {
    margin-bottom: 5px;
}

#sidebar summary {
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    border-radius: 6px;
    list-style: none;
    transition: 0.2s;
}

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

#sidebar summary::before {
    content: "▶";
    font-size: 9px;
    margin-right: 10px;
    display: inline-block;
    transition: 0.2s;
}

#sidebar details[open] > summary::before {
    transform: rotate(90deg);
}

#sidebar summary:hover {
    background-color: #eaf2ff;
    color: #0366d6;
}

/* Sidebar links */
#sidebar a {
    display: block;
    padding: 9px 12px 9px 30px;
    margin: 3px 0;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: 0.2s;
    word-break: break-word;
}

#sidebar a:hover {
    background-color: #f0f4fa;
    color: #0366d6;
}

/* Active file */
#sidebar a.active {
    background-color: #eaf2ff;
    color: #0366d6;
    font-weight: bold;
}

/* Main content */
#content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-width: 1100px;
    line-height: 1.7;
}

/* Headings */
#content h1,
#content h2,
#content h3 {
    color: #222;
    line-height: 1.3;
}

#content h1 {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

/* Paragraphs */
#content p {
    color: #444;
}

/* Links */
#content a {
    color: #0366d6;
    text-decoration: none;
}

#content a:hover {
    text-decoration: underline;
}

/* Code blocks */
pre {
    background: #f1f3f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e5e5e5;
}

code {
    font-family: Consolas, monospace;
    font-size: 14px;
}

/* Inline code */
#content p code,
#content li code {
    background: #edf0f2;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Tables */
#content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#content th,
#content td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

#content th {
    background: #f1f3f5;
}

/* Images */
#content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Blockquotes */
#content blockquote {
    border-left: 4px solid #0366d6;
    margin: 20px 0;
    padding: 5px 15px;
    background: #f1f5fa;
    color: #555;
}

/* Mobile */
@media (max-width: 700px) {
    body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    #sidebar {
        width: 100%;
        min-width: 0;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }

    #content {
        width: 100%;
        padding: 20px;
    }
}

.brand-text h2 a {
    color: #172554;
    text-decoration: none;
}

.brand-text h2 a:hover {
    color: #0366d6;
}