/* Kora Documentation Styles - Swiss Design Inspired */

/* ===================================
   DOCUMENTATION NAVIGATION
   =================================== */

.docs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 100;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.docs-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-nav-left a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.docs-nav-left a:hover {
    color: var(--accent-primary);
}

.nav-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.nav-docs-home {
    color: var(--text-secondary);
}

.docs-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.icon-btn i {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-icon-light,
.theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light {
    display: block;
}

[data-theme="dark"] .theme-icon-dark {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 1023px) {
    .mobile-only {
        display: flex;
    }
}

/* ===================================
   SEARCH OVERLAY
   =================================== */

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(10, 10, 9, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 1.5rem;
    overflow-y: auto;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    width: 100%;
    max-width: 42rem;
}

.search-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color-strong);
    border-radius: 0.5rem;
}

.search-input-wrapper i {
    color: var(--text-secondary);
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

#search-input::placeholder {
    color: var(--text-secondary);
}

.search-results {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 1rem;

    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #ff4d00 transparent;
}

/* WebKit scrollbar styling (Chrome, Safari, Edge) */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background-color: #ff4d00;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background-color: #ff6a26;
}

.search-result-item {
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.search-result-item:hover,
.search-result-item.active {
    border-color: var(--accent-primary);
    background-color: var(--bg-tertiary);
}

.search-result-chapter {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.search-result-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-result-snippet {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.search-result-snippet mark {
    background-color: var(--accent-primary);
    color: var(--inverted-text);
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

.search-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.search-hint kbd {
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

.search-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.search-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ===================================
   DOCS LAYOUT
   =================================== */

.docs-body {
    padding-top: 60px;
}

.docs-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 0;
    position: relative;
    min-height: calc(100vh - 60px);
    width: 100%;
}

@media (min-width: 1280px) {
    .docs-layout {
        grid-template-columns: 280px 1fr 240px !important;
    }
}

@media (max-width: 1023px) {
    .docs-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   SIDEBAR
   =================================== */

.docs-sidebar {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal overflow */
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    z-index: 10;
    display: block !important;
    width: 280px; /* Explicit width */
    max-width: 280px;

    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #ff4d00 transparent;
}

/* WebKit scrollbar styling (Chrome, Safari, Edge) */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background-color: #ff4d00;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #ff6a26;
}

/* Desktop: Sidebar is always visible in grid layout */
@media (min-width: 1024px) {
    .docs-sidebar {
        position: sticky !important;
        transform: none !important; /* Override any JS transforms */
        left: auto !important;
        width: auto !important;
        display: block !important;
    }
}

/* Mobile: Sidebar is hidden by default, shown with hamburger */
@media (max-width: 1023px) {
    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        width: 280px;
        z-index: 90;
        transform: translateX(-100%);
        transition: transform 0.3s;
        box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
    }

    .docs-sidebar.active {
        transform: translateX(0);
    }
}

.sidebar-inner {
    padding: 2rem 1.5rem;
    position: relative;
    width: 100%;
    contain: layout; /* Prevent content from escaping */
}

.sidebar-tech-marker {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    opacity: 0.4;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tech-label {
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tech-coords {
    font-weight: 300;
    font-size: 0.7rem;
    opacity: 0.7;
    color: var(--accent-primary);
}

/* Navigation Tree */
.docs-nav-tree {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative; /* Keep it in flow */
    width: 100%;
    max-width: 100%;
}

.nav-chapter {
    margin-bottom: 1rem;
}

.nav-chapter-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.3s;
}

.nav-chapter-title:hover {
    color: var(--text-primary);
}

.nav-chapter-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s;
}

.nav-chapter.collapsed .nav-chapter-icon {
    transform: rotate(-90deg);
}

.nav-section-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-color);
}

.nav-chapter.collapsed .nav-section-list {
    display: none;
}

.nav-section-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.3s;
    display: block;
}

.nav-section-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.nav-section-item.active {
    color: var(--accent-primary);
    background-color: var(--bg-tertiary);
    font-weight: 700;
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ===================================
   MAIN CONTENT
   =================================== */

.docs-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    contain: layout;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .docs-main {
        padding: 3rem 3rem 6rem;
    }
}

/* Breadcrumb */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.docs-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.docs-breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb-separator {
    opacity: 0.5;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--accent-primary) 0%, var(--accent-primary) var(--progress, 0%), transparent var(--progress, 0%));
    z-index: 99;
}

/* Content Area */
.docs-content {
    position: relative;
    padding: 2rem 0;
}

.content-tech-marker {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-primary);
    opacity: 0.3;
    z-index: 1;
    display: none;
}

@media (min-width: 1024px) {
    .content-tech-marker {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
}

.content-marker-tl {
    top: 0;
    left: -4rem;
}

.content-marker-tr {
    top: 0;
    right: -4rem;
    align-items: flex-end;
}

.content-marker-bl {
    bottom: 0;
    left: -4rem;
}

.content-marker-br {
    bottom: 0;
    right: -4rem;
    align-items: flex-end;
}

/* Content Typography */
.docs-content h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.docs-content h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.docs-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.docs-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.docs-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: opacity 0.3s;
}

.docs-content a:hover {
    opacity: 0.7;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.docs-content li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.docs-content ul {
    list-style-type: none;
}

.docs-content ul li::before {
    content: "→";
    color: var(--accent-primary);
    font-weight: 700;
    display: inline-block;
    width: 1.5rem;
    margin-left: -1.5rem;
}

.docs-content ol {
    list-style-type: decimal;
}

.docs-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-primary);
}

/* Code Blocks */
.docs-content pre {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-content code {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.875em;
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.docs-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

/* Tables */
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.875rem;
}

.docs-content th,
.docs-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.docs-content th {
    background-color: var(--bg-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.docs-content td {
    color: var(--text-secondary);
}

/* Alerts/Callouts */
.docs-content .alert {
    padding: 1.5rem;
    border-left: 4px solid;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.docs-content .alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: var(--text-primary);
}

.docs-content .alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: var(--text-primary);
}

.docs-content .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: var(--text-primary);
}

.docs-content .alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: var(--text-primary);
}

/* Content Navigation */
.docs-content-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color-medium);
    position: relative;
    width: 100%;
    max-width: 100%;
    contain: layout;
}

@media (max-width: 767px) {
    .docs-content-nav {
        grid-template-columns: 1fr;
    }
}

.content-nav-btn {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
    width: 100%;
}

.content-nav-btn:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-tertiary);
}

.content-nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.content-nav-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.content-nav-prev {
    text-align: left;
    justify-self: start;
    grid-column: 1;
    grid-row: 1;
}

.content-nav-next {
    text-align: right;
    justify-self: end;
    grid-column: 2;
    grid-row: 1;
}

/* ===================================
   TABLE OF CONTENTS
   =================================== */

.docs-toc {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal overflow */
    padding: 2rem 1.5rem;
    border-left: 1px solid var(--border-color);
    width: 240px; /* Explicit width */
    max-width: 240px;
    background-color: var(--bg-primary);
}

@media (max-width: 1279px) {
    .docs-toc {
        display: none;
    }
}

.toc-inner {
    position: relative; /* Changed from sticky to relative for containment */
    width: 100%;
    max-width: 100%;
    contain: layout; /* Prevent content from escaping */
}

.toc-header {
    margin-bottom: 1.5rem;
}

.toc-header .tech-label {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.6;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toc-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-left: 2px solid var(--border-color);
    transition: all 0.3s;
    display: block;
}

.toc-link:hover {
    color: var(--text-primary);
    border-left-color: var(--text-primary);
}

.toc-link.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 700;
}

.toc-link.toc-h3 {
    padding-left: 1.5rem;
}

.toc-link.toc-h4 {
    padding-left: 2.25rem;
    font-size: 0.8125rem;
}

/* ===================================
   DOCS FOOTER
   =================================== */

.docs-footer {
    background-color: #ff4d00;
    color: #ffffff;
    padding: 6rem 1rem 3rem;
    margin-top: 6rem;
}

@media (min-width: 768px) {
    .docs-footer {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.docs-footer-top {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 6rem;
}

.docs-footer-heading-container {
    max-width: 42rem;
}

.docs-footer-heading {
    font-size: 3.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 2rem;
    color: #ffffff;
}

@media (min-width: 768px) {
    .docs-footer-heading {
        font-size: 6rem;
    }
}

.docs-footer-subheading {
    font-size: 1.25rem;
    font-weight: 500;
    max-width: 28rem;
    color: #ffffff;
}

.docs-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .docs-footer-bottom {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.docs-footer-links {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.docs-footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.docs-footer-links a:hover {
    opacity: 0.6;
}

.docs-footer-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
}

.docs-footer-location svg {
    width: 1rem;
    height: 1rem;
}

.docs-footer-separator {
    opacity: 0.5;
    margin: 0 0.5rem;
}

.docs-footer-acknowledgement {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.6;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
    color: #ffffff;
}

@media (min-width: 768px) {
    .docs-footer-acknowledgement {
        font-size: 0.8rem;
    }
}

.docs-footer-copyright {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.5;
    color: #ffffff;
}

/* ===================================
   DOCUMENTATION INDEX PAGE
   =================================== */

.docs-index-main {
    width: 100%;
    padding: 0;
}

.docs-index-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1.5rem 6rem;
    position: relative;
}

@media (min-width: 768px) {
    .docs-index-hero {
        padding: 12rem 3rem 8rem;
    }
}

.docs-index-hero-marker {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    opacity: 0.4;
    margin-bottom: 3rem;
}

.docs-index-title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .docs-index-title {
        font-size: 8rem;
    }
}

@media (min-width: 1024px) {
    .docs-index-title {
        font-size: 10rem;
    }
}

.docs-index-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 42rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .docs-index-subtitle {
        font-size: 1.5rem;
    }
}

.docs-index-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
}

.docs-index-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    color: #ff4d00;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 4rem;
    }
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.docs-index-chapters {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

@media (min-width: 768px) {
    .docs-index-chapters {
        padding: 8rem 3rem;
    }
}

.docs-index-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.docs-index-section-title {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .docs-index-section-title {
        font-size: 3rem;
    }
}

.tech-marker-inline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-primary);
    opacity: 0.4;
}

.docs-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .docs-index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .docs-index-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.docs-chapter-card {
    position: relative;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.docs-chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #ff4d00;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s;
}

.docs-chapter-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.docs-chapter-card:hover {
    border-color: #ff4d00;
    background-color: var(--bg-tertiary);
    transform: translateY(-4px);
}

.chapter-card-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-primary);
    opacity: 0.1;
    line-height: 1;
    font-family: 'Courier New', monospace;
}

.chapter-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.chapter-card-meta {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.chapter-card-arrow {
    margin-top: auto;
    color: #ff4d00;
    transition: transform 0.3s;
}

.docs-chapter-card:hover .chapter-card-arrow {
    transform: translateX(4px);
}

.chapter-card-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 767px) {
    .docs-content h1 {
        font-size: 2rem;
    }

    .docs-content h2 {
        font-size: 1.5rem;
    }

    .docs-content h3 {
        font-size: 1.25rem;
    }

    .docs-content h4 {
        font-size: 1.125rem;
    }

    .docs-content pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    .docs-content table {
        font-size: 0.8125rem;
    }
}
