/* Compilatio - Elegant Dark Theme
   ========================================
   Design: Elegant Serif with Ghosted Manuscript Border
   Fonts: Cormorant Garamond (headings) + Inter (body)

   Color Palette:
   - Background: #1a1a1a
   - Card/Panel: #232323
   - Card hover: #2a2a2a
   - Primary text: #d8d8d8
   - Heading text: #f5f3ef
   - Secondary text: #888
   - Muted text: #777
   - Accent (ivory): #e8e4dc
   - Borders: #2a2a2a
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #d8d8d8;
    background: #1a1a1a;
    min-height: 100vh;
    position: relative;
}

/* Ghosted border decoration - top */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 240px;
    background-image: url('../images/border-top.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: invert(0.72) sepia(0.55) saturate(1) brightness(0.6);
    opacity: 0.24;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
}

/* Ghosted border decoration - right */
body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 220px;
    background-image: url('../images/border-right.jpg');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    filter: invert(0.72) sepia(0.55) saturate(1) brightness(0.6);
    opacity: 0.20;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to left, black 0%, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 0%, black 50%, transparent 100%);
}

a {
    color: #e8e4dc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1100px;
    width: 100%;
    padding: 3rem 2rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */

header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
}

h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3.5rem;
    color: #f5f3ef;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

h1 a {
    color: inherit;
}

h1 a:hover {
    color: inherit;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ============================================
   SECTION TITLES
   ============================================ */

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* ============================================
   FEATURED MANUSCRIPT (Landing Page)
   ============================================ */

.featured-section {
    margin-bottom: 4rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    background: #232323;
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.featured-card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.featured-thumbnail {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    background: #1a1a1a;
}

.featured-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.85rem;
}

.featured-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.featured-shelfmark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.8rem;
    color: #f5f3ef;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.featured-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1rem;
}

.featured-contents {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e8e4dc;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.featured-link:hover {
    color: #fff;
}

/* ============================================
   REPOSITORY CARDS
   ============================================ */

.repositories-section {
    margin-bottom: 3rem;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.repo-card {
    display: block;
    background: #232323;
    border-radius: 2px;
    padding: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.repo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.repo-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    color: #f5f3ef;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.repo-count {
    font-size: 0.8rem;
    color: #777;
}

.repo-count strong {
    color: #e8e4dc;
    font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
}

.footer-text {
    font-size: 0.8rem;
    color: #555;
    letter-spacing: 0.05em;
}

/* ============================================
   BROWSE PAGE
   ============================================ */

.browse-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #e8e4dc;
}

.breadcrumb-separator {
    color: #555;
}

.browse-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    color: #f5f3ef;
    font-weight: 400;
}

.browse-subtitle {
    font-size: 0.95rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Collection Cards */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.collection-card {
    display: block;
    background: #232323;
    border-radius: 2px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.collection-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    color: #f5f3ef;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.collection-count {
    font-size: 0.8rem;
    color: #777;
}

/* Manuscript Grid */
.manuscript-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.ms-card {
    display: block;
    background: #232323;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ms-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.ms-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #1a1a1a;
}

.ms-thumbnail-placeholder {
    width: 100%;
    height: 160px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.8rem;
}

.ms-info {
    padding: 1rem;
}

.ms-shelfmark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.95rem;
    color: #f5f3ef;
    font-weight: 400;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-title {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0.25rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ms-date {
    font-size: 0.8rem;
    color: #777;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: #232323;
    border: none;
    border-radius: 2px;
    color: #d8d8d8;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.85rem;
    color: #888;
    padding: 0 1rem;
}

.page-input {
    width: 3.5em;
    padding: 0.25rem 0.4rem;
    background: #232323;
    border: 1px solid #444;
    border-radius: 2px;
    color: #e8e4dc;
    font-size: 0.85rem;
    text-align: center;
    -moz-appearance: textfield;
}

.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-input:focus {
    outline: none;
    border-color: #666;
    background: #2a2a2a;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top-color: #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* ============================================
   VIEWER PAGE
   ============================================ */

.viewer-container {
    max-width: 100%;
    padding: 0.75rem 1rem;
}


/* Compact viewer header - single line */
.viewer-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
    text-align: left;
}

.viewer-header .viewer-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    color: #f5f3ef;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.viewer-header .viewer-title:hover {
    color: #fff;
}

.nav-link-back {
    display: inline-block;
    color: #888;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.nav-link-back:hover {
    color: #e8e4dc;
}

/* Manuscript Selector - compact */
.manuscript-selector-section {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #232323;
    border-radius: 2px;
}

.selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.selector-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
}

.repository-select,
.manuscript-select {
    min-width: 150px;
    padding: 0.35rem 0.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: #d8d8d8;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 2px;
    cursor: pointer;
}

.repository-select:focus,
.manuscript-select:focus {
    outline: none;
    border-color: #e8e4dc;
}

.manuscript-select {
    flex: 1;
    min-width: 250px;
    max-width: 600px;
}

.manuscript-count {
    font-size: 0.8rem;
    color: #888;
}

.selector-info {
    margin-top: 0.5rem;
}

.selector-info p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.no-iiif-warning {
    color: #c9917a;
}

/* ============================================
   UV OVERRIDES
   ============================================ */

/* Hide attribution watermark overlay (the large title text over the image) */
#uv-viewer [class*="overlay"],
#uv-viewer [class*="Overlay"],
#uv-viewer [class*="attribution"],
#uv-viewer [class*="Attribution"] {
    display: none !important;
}

/* Hide OpenSeadragon navigator minimap (bottom-right thumbnail) */
#uv-viewer .navigator,
#uv-viewer [id*="navigator"],
#uv-viewer .openseadragon-navigator {
    display: none !important;
}

/* Hide credit/rights boxes */
#uv-viewer [class*="credit"],
#uv-viewer [class*="rights"] {
    display: none !important;
}

/* UV header panel - compact single line */
#uv-viewer [class*="headerPanel"] {
    background: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a !important;
}

/* Force the search/navigation bar to stay on one line */
#uv-viewer .search {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* UV footer panel */
#uv-viewer [class*="footerPanel"] {
    background: #1a1a1a !important;
    border-top: 1px solid #2a2a2a !important;
}

/* ============================================
   VIEWER LAYOUT - Two Column Grid
   ============================================ */

.viewer-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    min-height: 600px;
    height: calc(100vh - 140px);
    background: #141414;
    border-radius: 2px;
    overflow: hidden;
}

.viewer-layout.sidebar-collapsed {
    grid-template-columns: 48px 1fr;
}

/* ============================================
   SIDEBAR
   ============================================ */

.manuscript-sidebar {
    display: flex;
    flex-direction: column;
    background: #232323;
    border-right: 1px solid #2a2a2a;
    overflow: hidden;
    position: relative;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.sidebar-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-tab:hover {
    background: #2a2a2a;
    color: #d8d8d8;
}

.sidebar-tab.active {
    background: #2a2a2a;
    color: #d8d8d8;
    border-bottom-color: #e8e4dc;
}

.sidebar-tab:focus {
    outline: none;
}

/* Sidebar Panels */
.sidebar-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-panel.hidden,
.sidebar-panel[hidden] {
    display: none;
}

.panel-placeholder {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    padding: 2rem 1rem;
}

/* Info Panel Content */
.info-content {
    font-size: 0.9rem;
}

.info-primary {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.info-shelfmark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: #f5f3ef;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.info-repo,
.info-date {
    font-size: 0.85rem;
    color: #888;
    margin: 0.25rem 0;
}

.info-section {
    margin-bottom: 0.75rem;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.info-section summary {
    padding: 0.5rem 0.75rem;
    background: #2a2a2a;
    cursor: pointer;
    color: #d8d8d8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.info-section summary:hover {
    background: #333;
}

.info-section[open] summary {
    border-bottom: 1px solid #2a2a2a;
}

.info-list {
    padding: 0.75rem;
    margin: 0;
}

.info-list dt {
    font-weight: 600;
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.5rem;
}

.info-list dt:first-child {
    margin-top: 0;
}

.info-list dd {
    margin: 0.25rem 0 0 0;
    color: #d8d8d8;
    font-size: 0.85rem;
    line-height: 1.5;
}

.info-text {
    padding: 0.75rem;
    margin: 0;
    color: #999;
    font-size: 0.85rem;
    line-height: 1.6;
}

.info-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
}

.info-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #e8e4dc;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.info-link:hover {
    background: #fff;
    color: #1a1a1a;
}

/* Sidebar Collapse Button */
.sidebar-collapse {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 2px;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-collapse:hover {
    background: #e8e4dc;
    color: #1a1a1a;
}

/* Collapsed sidebar state */
.manuscript-sidebar.collapsed .sidebar-tabs,
.manuscript-sidebar.collapsed .sidebar-panel {
    display: none;
}

.manuscript-sidebar.collapsed .sidebar-collapse {
    position: static;
    margin: auto;
    margin-top: 0.5rem;
}

/* ============================================
   MAIN VIEWER
   ============================================ */

.main-viewer {
    display: flex;
    flex-direction: column;
    background: #141414;
    overflow: hidden;
}

.viewer-panel {
    flex: 1;
    overflow: hidden;
}

.viewer-panel.hidden,
.viewer-panel[hidden] {
    display: none;
}

#uv-viewer {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #141414;
}

#uv-viewer > div {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: relative !important;
}

.viewer-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #141414;
    min-height: 400px;
}

.viewer-placeholder p {
    color: #555;
    font-size: 0.95rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

code {
    background: #1a1a1a;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.85em;
    color: #e8e4dc;
}

/* Mobile toggle - hidden by default */
.sidebar-toggle-mobile {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-thumbnail {
        max-height: 300px;
    }

    .featured-info {
        padding: 1.5rem;
    }

    .viewer-layout {
        grid-template-columns: 1fr;
        position: relative;
    }

    .manuscript-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .manuscript-sidebar.open {
        transform: translateX(0);
    }

    .manuscript-sidebar.collapsed {
        transform: translateX(-100%);
    }

    .sidebar-toggle-mobile {
        display: flex;
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        z-index: 50;
        width: 36px;
        height: 36px;
        background: #232323;
        border: 1px solid #333;
        border-radius: 2px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #888;
        font-size: 1.2rem;
    }

    .sidebar-toggle-mobile:hover {
        background: #e8e4dc;
        color: #1a1a1a;
    }

    .sidebar-overlay {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-viewer {
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* Hide right border on mobile */
    body::after {
        display: none;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-thumbnail {
        max-height: 200px;
    }

    .repo-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .manuscript-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .ms-thumbnail {
        height: 120px;
    }

    .selector-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .selector-group {
        width: 100%;
    }

    .repository-select,
    .manuscript-select {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .viewer-layout {
        height: auto;
        min-height: 500px;
    }

    .manuscript-sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-right: none;
        border-top: 1px solid #2a2a2a;
        border-radius: 12px 12px 0 0;
    }

    .manuscript-sidebar.open {
        transform: translateY(0);
    }

    .sidebar-tabs::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #333;
        border-radius: 2px;
        margin: 0.5rem auto;
    }

    .sidebar-panel {
        max-height: calc(50vh - 60px);
    }

    .sidebar-collapse {
        display: none;
    }

    .sidebar-toggle-mobile {
        bottom: 1rem;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .manuscript-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-main {
    max-width: 700px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section + .about-section {
    margin-top: 3rem;
}

.about-section .section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.about-text {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-text a {
    color: #e8e4dc;
}

.about-text strong {
    color: #e8e4dc;
    font-weight: 500;
}

.source-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    columns: 2;
    column-gap: 2rem;
}

.source-list li {
    color: #888;
    padding: 0.3rem 0;
    break-inside: avoid;
}

.source-list a {
    color: #e8e4dc;
}

.source-count {
    color: #666;
    font-size: 0.85rem;
}

.changelog {
    margin: 1rem 0;
}

.changelog dt {
    color: #e8e4dc;
    font-weight: 500;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.changelog dt:first-child {
    margin-top: 0;
}

.changelog dd {
    color: #888;
    margin: 0.3rem 0 0.3rem 1rem;
    font-size: 0.9rem;
}

.footer-sep {
    color: #444;
    margin: 0 0.3rem;
}
