:root {
    /* Surfaces */
    --bg-color: #0a0b0f;
    --card-bg: #12141c;
    --card-bg-hover: #171a24;
    --border-color: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Text */
    --text-main: #e7e9ee;
    --text-muted: #8b93a7;
    --text-faint: #565d6e;

    /* Accent system — one primary interactive color, used with restraint */
    --accent-color: #8b7fff;
    --accent-hover: #a79cff;
    --accent-dim: rgba(139, 127, 255, 0.12);
    --accent-teal: #4fd9c4;
    --star-color: #f5b83d;
    --success-color: #3ecf8e;
    --success-hover: #35b87d;

    /* Type */
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse 900px 520px at 18% -8%, rgba(139, 127, 255, 0.16), transparent 60%),
        radial-gradient(ellipse 700px 480px at 88% 4%, rgba(79, 217, 196, 0.10), transparent 55%),
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: auto, auto, 34px 34px, 34px 34px;
    background-position: 0 0, 0 0, -1px -1px, -1px -1px;
    background-repeat: no-repeat, no-repeat, repeat, repeat;
    color: var(--text-main);
    line-height: 1.6;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content { flex: 1; padding-top: 30px; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ==========================================================================
   Header & hero
   ========================================================================== */
.hero-section {
    padding: 72px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.logo {
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.logo a { color: #fff; text-decoration: none; }
.logo .highlight { color: var(--accent-color); }

.tagline {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.92rem;
    font-family: var(--font-mono);
}

.tagline::before { content: "// "; color: var(--text-faint); }

/* Terminal window chrome — the page's signature element */
.terminal-window {
    max-width: 720px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.02);
    overflow: hidden;
    text-align: left;
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-titlebar-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-left: 6px;
}

/* Search box lives inside the terminal window */
.search-box {
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    padding: 4px 6px 4px 16px;
}

.search-box::before {
    content: "$";
    font-family: var(--font-mono);
    color: var(--accent-teal);
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    padding: 16px 8px;
    font-size: 0.98rem;
    font-family: var(--font-mono);
    outline: none;
}
.search-box input::placeholder { color: var(--text-faint); }

.search-box button {
    padding: 10px 22px;
    background: var(--accent-color);
    color: #0a0b0f;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin: 4px;
}

.search-box button:hover { background: var(--accent-hover); }

/* Popular tags */
.popular-tags-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 20px;
    font-size: 0.85rem;
}

.tags-label { color: var(--text-faint); font-weight: 600; }

.tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.popular-tag-item {
    font-family: var(--font-mono);
    color: var(--accent-teal);
    background: rgba(79, 217, 196, 0.08);
    border: 1px solid rgba(79, 217, 196, 0.22);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.78rem;
    transition: all 0.15s ease;
}

.popular-tag-item:hover {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: #0a0b0f;
}

/* ==========================================================================
   Guide nav tabs
   ========================================================================== */
.guide-nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 0.75rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-main); }

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.guide-content-wrapper { min-height: 300px; }

.guide-placeholder { text-align: center; padding: 3rem 0; color: var(--text-faint); }

/* ==========================================================================
   Landing intro
   ========================================================================== */
.landing-info { margin: 44px 0; }

.intro-block {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent-teal);
    background: rgba(79, 217, 196, 0.08);
    border: 1px solid rgba(79, 217, 196, 0.22);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-teal);
    box-shadow: 0 0 8px var(--accent-teal);
}

.intro-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    line-height: 1.35;
    max-width: 640px;
}
.intro-block p { color: var(--text-muted); font-size: 0.96rem; max-width: 680px; }
.intro-block p.intro-description { line-height: 1.7; }

/* Feature grid — not a numbered sequence, so it reads as a grid, not steps */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.feature-item {
    background: var(--card-bg);
    padding: 22px 24px;
    transition: background 0.15s;
}
.feature-item:hover { background: var(--card-bg-hover); }

.feature-item h4 {
    font-size: 0.98rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}
.feature-item p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

/* Workflow — a genuine sequence, numbering earns its place here */
.workflow-section h4 {
    font-family: var(--font-mono);
    font-size: 0.78rem !important;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600 !important;
}

.workflow-section .features-list {
    grid-template-columns: repeat(3, 1fr);
    background: transparent;
    border: none;
    gap: 14px;
}

.workflow-section .feature-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    padding-top: 30px;
}

.workflow-section .feature-item h4 {
    color: var(--accent-color) !important;
    font-size: 0.72rem !important;
}

/* ==========================================================================
   Search results
   ========================================================================== */
.result-info {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-family: var(--font-mono);
}
.result-info strong { color: var(--accent-teal); }

.repo-grid { display: flex; flex-direction: column; gap: 10px; }

.repo-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.repo-card:hover {
    border-color: var(--border-strong);
    border-left-color: var(--accent-color);
    background: var(--card-bg-hover);
    transform: translateX(2px);
}

.repo-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.repo-name { font-size: 1.08rem; color: #fff; font-weight: 600; letter-spacing: -0.2px; }
.repo-stars {
    color: var(--star-color);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-mono);
    flex-shrink: 0;
}
.repo-summary { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* ==========================================================================
   Detail page
   ========================================================================== */
.repo-header-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 34px;
    margin-bottom: 24px;
}

.repo-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.repo-title-wrapper h2 {
    font-size: 1.65rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.3px;
    word-break: break-all;
}

.repo-meta { display: flex; align-items: center; gap: 14px; }

.repo-meta .stars {
    color: var(--star-color);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-mono);
}
.repo-card-link { text-decoration: none; color: inherit; display: block; }

.repo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.tag-item {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tag-item:hover {
    color: var(--accent-color);
    background-color: var(--accent-dim);
    border-color: var(--accent-color);
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 7px 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
}

.btn-github:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    color: #fff;
}

.repo-summary-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 22px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    color: #0a0b0f;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.btn-download:hover { background: var(--accent-hover); }

.btn-download.disabled {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-faint) !important;
    border: 1px solid var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* README */
.readme-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 34px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.readme-heading {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 26px;
}

/* ==========================================================================
   Feedback & reviews
   ========================================================================== */
.feedback-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 34px;
    margin-bottom: 40px;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.feedback-header h3 { margin: 0; font-size: 1.1rem; color: #fff; font-weight: 600; }

.avg-rating-text {
    color: var(--star-color);
    font-weight: 700;
    font-size: 1.05rem;
    font-family: var(--font-mono);
}

.total-reviews-text { color: var(--text-muted); font-size: 0.88rem; margin-left: 6px; }

.feedback-form label {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 18px;
}

.star-rating input { display: none; }

.star-rating label {
    font-size: 1.7rem;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
    margin-bottom: 0;
}
.star-rating label:hover { transform: scale(1.1); }

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--star-color);
}

.feedback-form textarea {
    width: 100%;
    height: 90px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 13px;
    font-size: 0.93rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 16px;
    outline: none;
    font-family: var(--font-sans);
    transition: border-color 0.15s;
}

.feedback-form textarea:focus { border-color: var(--accent-color); }
.feedback-form textarea::placeholder { color: var(--text-faint); }

.btn-submit-review {
    background-color: var(--success-color);
    color: #06140d;
    border: none;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.15s;
}

.btn-submit-review:hover { background-color: var(--success-hover); }

.review-list {
    margin-top: 34px;
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
}

.review-list-title {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-item { border-bottom: 1px solid var(--border-color); padding: 16px 0; }
.review-item:last-child { border-bottom: none; }

.review-meta-info {
    font-size: 0.83rem;
    color: var(--text-faint);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
}

.review-stars { color: var(--star-color); letter-spacing: 1px; }

.review-comment-text {
    margin: 0;
    font-size: 0.94rem;
    color: var(--text-main);
    line-height: 1.55;
}

/* ==========================================================================
   GitHub Markdown Dark Overrides
   ========================================================================== */
.markdown-body {
    background-color: transparent !important;
    color: var(--text-main) !important;
    font-family: var(--font-sans) !important;
    font-size: 1rem;
    line-height: 1.7;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

.markdown-body a { color: var(--accent-color) !important; text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    color: #fff !important;
    border-bottom-color: var(--border-color) !important;
}

.markdown-body img,
.markdown-body video,
.markdown-body iframe,
.markdown-body svg {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.markdown-body pre {
    background-color: #0a0b0f !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    padding: 16px;
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: pre !important;
    word-break: normal !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

.markdown-body code {
    font-family: var(--font-mono) !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.markdown-body pre code { white-space: pre !important; }

.markdown-body table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.92rem;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid var(--border-color) !important;
    padding: 8px 14px;
    white-space: normal;
    word-break: keep-all;
}

.markdown-body table th {
    background: rgba(255, 255, 255, 0.04);
    color: #fff !important;
    font-weight: 600;
    white-space: nowrap;
}

.markdown-body table tr {
    background-color: transparent !important;
    border-top: 1px solid var(--border-color);
}

.markdown-body table tr:nth-child(2n) { background-color: rgba(255, 255, 255, 0.02) !important; }

.markdown-body table img { max-width: 320px !important; display: inline-block; }

/* ==========================================================================
   Scroll spinner & footer
   ========================================================================== */
.scroll-target { text-align: center; padding: 44px 0; color: var(--text-muted); }
.spinner {
    width: 26px; height: 26px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 60px;
    font-size: 0.84rem;
    color: var(--text-faint);
    background: var(--card-bg);
    font-family: var(--font-mono);
}

.footer-content { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.footer-contact a { color: var(--accent-color); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 6, 9, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 34px 26px 26px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover { color: #fff; }

.modal-content h3 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }

.modal-content p {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin-bottom: 24px;
    word-break: break-word;
    line-height: 1.6;
}

.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions button { cursor: pointer; border: none; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color) !important;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ==========================================================================
   Mobile responsive — app-like UI
   ========================================================================== */
@media (max-width: 768px) {
    .container,
    .readme-container,
    .repo-header-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 14px !important;
        box-sizing: border-box !important;
    }

    body { background-image: none; }

    .hero-section {
        position: relative;
        top: 0;
        z-index: 50;
        padding: calc(env(safe-area-inset-top, 0px) + 16px) 0 16px;
        background: rgba(10, 11, 15, 0.97);
        border-bottom: 1px solid var(--border-color);
    }

    .logo { font-size: 1.35rem; margin-bottom: 10px; }
    .tagline { display: none; }

    .terminal-window { margin: 0 14px; border-radius: 12px; }
    .search-box input { padding: 13px 6px; font-size: 0.9rem; }
    .search-box button { padding: 0 16px; font-size: 0.8rem; }

    .main-content { padding-top: 20px; }

    .repo-card, .repo-header-card, .readme-container, .feedback-section, .intro-block, .feature-item {
        border-radius: 14px;
    }

    .repo-card {
        border: 1px solid var(--border-color);
        border-left: 2px solid transparent;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        padding: 16px 18px;
        -webkit-tap-highlight-color: transparent;
    }

    .repo-card:active { transform: scale(0.98); background: var(--card-bg-hover); }

    .intro-block { border-bottom: none; }

    .features-list { grid-template-columns: 1fr; border-radius: 14px; }

    .workflow-section .features-list { grid-template-columns: 1fr; gap: 12px; }

    .repo-header-card {
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        padding: 18px;
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    }

    .repo-title-wrapper { flex-direction: column; align-items: flex-start; gap: 8px; }
    .repo-title-wrapper h2 { font-size: 1.25rem; word-break: break-word !important; }

    .repo-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
        background: rgba(18, 20, 28, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border-color);
    }

    .btn-download { width: 100%; justify-content: center; padding: 13px 18px; border-radius: 12px; font-size: 0.95rem; }
    .btn-download:active { background: var(--accent-hover); }

    .readme-container, .feedback-section {
        border: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        padding: 20px 14px !important;
        overflow-x: hidden !important;
    }

    .markdown-body { font-size: 0.88rem !important; word-break: break-word !important; overflow-wrap: anywhere !important; }

    .markdown-body img,
    .markdown-body table img,
    .readme-container img,
    .markdown-body a img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        box-sizing: border-box !important;
    }

    .markdown-body table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        font-size: 0.82rem;
        -webkit-overflow-scrolling: touch;
    }
    .markdown-body table th, .markdown-body table td { padding: 6px 10px; }

    .markdown-body pre { overflow-x: auto !important; white-space: pre !important; word-break: normal !important; padding: 12px; font-size: 0.8rem; }
    .markdown-body pre code { white-space: pre !important; word-break: normal !important; }

    .scroll-target { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); }

    .site-footer { font-size: 0.76rem; padding: 24px 0 calc(env(safe-area-inset-bottom, 0px) + 24px); }
}

.doc-layout-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.doc-sidebar {
    position: sticky;
    top: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.doc-toc-top {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.doc-toc-top a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.doc-toc-top a:hover {
    text-decoration: underline;
}

.doc-sidebar h4 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.doc-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.doc-toc-list li {
    margin: 6px 0;
}

.doc-toc-list a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.doc-toc-list a:hover {
    color: var(--accent-color);
}

@media (max-width: 992px) {
    .doc-layout-grid {
        grid-template-columns: 1fr;
    }
    .doc-sidebar {
        display: none;
    }
}