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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", system-ui, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

header nav {
    display: flex;
    align-items: center;
}

.site-title {
    display: flex;
    align-items: center;
    color: #1a1a1a;
    text-decoration: none;
}

.site-title img {
    height: 32px;
    width: auto;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.site-title:hover {
    text-decoration: none;
    opacity: 0.8;
}

main {
    margin-bottom: 4rem;
}

article h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

article h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.content p {
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content pre {
    background-color: #f5f5f5;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.content code {
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.content pre code {
    background: none;
    padding: 0;
}

.content :not(pre)>code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border: 1px solid #e0e0e0;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.home-nav ul {
    list-style: none;
    margin-left: 0;
    margin-top: 2rem;
}

.home-nav li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.list {
    margin-top: 2rem;
}

.list-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item h2 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.list-item p {
    color: #4a4a4a;
    margin-bottom: 0;
}

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #6a6a6a;
}

footer a {
    color: #6a6a6a;
}

form {
    margin-top: 2rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

form textarea,
form select,
form button {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #d0d0d0;
    background-color: #ffffff;
}

form textarea {
    min-height: 150px;
    resize: vertical;
}

form button {
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

form button:hover {
    background-color: #333333;
}

/* Page Layout with TOC */
.page-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 4rem;
}

.page-grid article {
    max-width: 720px;
    min-width: 0;
}

/* TOC Styling */
.toc-container {
    display: block;
    margin-top: 1rem;
}

.toc-sticky {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.toc-sticky h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a6a6a;
    margin-bottom: 1rem;
    font-weight: 600;
}

#TableOfContents {
    font-size: 0.9rem;
}

#TableOfContents ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

#TableOfContents ul li {
    margin-bottom: 0.6rem;
}

#TableOfContents ul ul {
    padding-left: 1rem;
    margin-top: 0.4rem;
    border-left: 1px solid #e0e0e0;
}

#TableOfContents a {
    color: #4a4a4a;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    transition: color 0.1s;
}

#TableOfContents a:hover {
    color: #0066cc;
}

/* Responsive - Hide TOC sidebar on smaller screens */
@media (max-width: 1000px) {
    .page-grid {
        grid-template-columns: 1fr;
    }

    .toc-container {
        display: none;
    }

    .page-grid article {
        max-width: 100%;
    }

    body {
        max-width: 720px;
    }
}