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

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: Georgia, "Times New Roman", serif;
    text-align: center;
}

.video-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.video-container,
.video-container video {
    width: 100%;
    height: 100%;
}

.video-container video {
    object-fit: cover;
    opacity: 0.28;
}

.main-content {
    position: relative;
    z-index: 1;
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    padding: 60px 0;
}

.page-header {
    margin-bottom: 55px;
}

.site-title {
    display: inline-block;
    margin-bottom: 20px;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 6px;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(77, 166, 255, 0.5);
}

.site-title:hover,
.site-title:focus {
    color: #4da6ff;
}

.slogan {
    color: #4da6ff;
    font-size: 28px;
    font-style: italic;
    text-shadow: 0 0 15px rgba(77, 166, 255, 0.3);
}

.store-introduction,
.catalogue-panel {
    margin-bottom: 40px;
    padding: 35px;
    background: rgba(0, 0, 0, 0.82);
    border-left: 3px solid #4da6ff;
    text-align: left;
}

.store-introduction h1 {
    margin-bottom: 25px;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
}

.store-introduction p {
    margin-bottom: 22px;
    color: #b0b0b0;
    font-size: 17px;
    line-height: 1.9;
}

.store-introduction p:last-child {
    margin-bottom: 0;
}

.catalogue-toolbar {
    display: grid;
    grid-template-columns: auto minmax(250px, 1fr) auto;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}

.catalogue-toolbar label {
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.catalogue-toolbar input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #4a4a4a;
    color: #ffffff;
    font-size: 16px;
}

.catalogue-toolbar input:focus {
    outline: none;
    border-color: #4da6ff;
    box-shadow: 0 0 18px rgba(77, 166, 255, 0.25);
}

.secondary-button {
    display: inline-block;
    padding: 13px 22px;
    background: transparent;
    border: 1px solid #4da6ff;
    color: #4da6ff;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.secondary-button:hover,
.secondary-button:focus {
    background: rgba(77, 166, 255, 0.12);
    color: #ffffff;
}

.document-count {
    margin-bottom: 18px;
    color: #808080;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 1350px;
    border-collapse: collapse;
    background: rgba(10, 10, 10, 0.88);
}

th,
td {
    padding: 14px 12px;
    border: 1px solid rgba(77, 166, 255, 0.18);
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    background: #151515;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

td {
    color: #b8b8b8;
    font-size: 14px;
    line-height: 1.55;
}

tbody tr:hover {
    background: rgba(77, 166, 255, 0.08);
}

.table-action {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #4da6ff;
    color: #4da6ff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 11px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-action:hover,
.table-action:focus {
    background: rgba(77, 166, 255, 0.14);
    color: #ffffff;
}

.empty-message {
    padding: 40px 15px;
    color: #909090;
    text-align: center;
}

.page-actions {
    margin: 45px 0;
}

footer {
    padding: 30px;
    background: rgba(0, 0, 0, 0.82);
    border-top: 1px solid rgba(77, 166, 255, 0.2);
}

footer p {
    margin-bottom: 12px;
    color: #606060;
    font-size: 14px;
}

footer p:last-child {
    margin-bottom: 0;
}

.system-status {
    font-size: 12px;
}

@media (max-width: 800px) {
    .main-content {
        width: min(100% - 20px, 1500px);
        padding: 35px 0;
    }

    .site-title {
        font-size: 34px;
        letter-spacing: 4px;
    }

    .slogan {
        font-size: 22px;
    }

    .store-introduction,
    .catalogue-panel {
        padding: 25px 18px;
    }

    .catalogue-toolbar {
        grid-template-columns: 1fr;
    }

    .secondary-button {
        width: 100%;
    }
}
/* ==========================================
   Document Catalogue v1.0 additions
   ========================================== */

.catalogue-statistics {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.statistic-card {
    padding: 20px;
    background: rgba(77, 166, 255, 0.06);
    border: 1px solid rgba(77, 166, 255, 0.22);
    border-left: 3px solid #4da6ff;
    text-align: center;
}

.statistic-label {
    display: block;
    margin-bottom: 8px;
    color: #8c8c8c;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.statistic-value {
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 26px;
    font-weight: 300;
}

.catalogue-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
    align-items: end;
    margin-bottom: 25px;
}

.filter-field {
    min-width: 0;
}

.filter-field-wide {
    grid-column: span 2;
}

.filter-action-field {
    display: flex;
    align-items: end;
}

.filter-field label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #4a4a4a;
    color: #ffffff;
    font-size: 14px;
}

.filter-field select option {
    background: #151515;
    color: #ffffff;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #4da6ff;
    box-shadow: 0 0 18px rgba(77, 166, 255, 0.25);
}

.filter-action-field .secondary-button {
    width: 100%;
    min-height: 46px;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
}

.sortable-header:hover,
.sortable-header:focus {
    background: #1e2a35;
    outline: none;
}

.sort-indicator {
    margin-left: 5px;
    color: #4da6ff;
    font-size: 10px;
}

.title-cell {
    min-width: 260px;
    overflow-wrap: anywhere;
}

.commentary-control {
    appearance: none;
    -webkit-appearance: none;
    padding: 7px 10px;
    background: transparent;
    color: #4da6ff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: normal;
    line-height: normal;
}

.table-action-unavailable {
    cursor: default;
    opacity: 0.45;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 22px 0;
}

.page-button {
    min-width: 42px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid rgba(77, 166, 255, 0.5);
    color: #4da6ff;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
}

.page-button:hover:not(:disabled),
.page-button:focus:not(:disabled),
.page-button.active {
    background: rgba(77, 166, 255, 0.18);
    border-color: #4da6ff;
    color: #ffffff;
}

.page-button:disabled {
    cursor: default;
    opacity: 0.35;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    color: #808080;
}

@media (max-width: 1100px) {
    .catalogue-toolbar {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .catalogue-statistics,
    .catalogue-toolbar {
        grid-template-columns: 1fr;
    }

    .filter-field-wide {
        grid-column: span 1;
    }
}
/* Keep long filenames from widening the entire table */
.title-cell {
    width: 260px;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text;
    user-select: text;
}
.sortable-header {
    white-space: nowrap;
}

.sort-indicator {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
}


/* ==========================================
   Archive777 Source Type classification
   ========================================== */

.source-type-methodology {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(77, 166, 255, 0.12);
    text-align: center;
}

.store-introduction .source-type-methodology-title,
.store-introduction .source-type-methodology-note {
    margin: 0 auto 10px;
    color: #606060;
    font-size: 14px;
    line-height: 1.6;
}

.store-introduction .source-type-methodology-title {
    font-weight: 700;
}

.store-introduction .source-type-methodology-note {
    max-width: 980px;
    margin-bottom: 18px;
}

.store-introduction .source-type-methodology-note strong {
    color: #777777;
    font-weight: 700;
}

.source-type-guide-container {
    width: 100%;
    overflow-x: auto;
}

.source-type-guide {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: rgba(10, 10, 10, 0.45);
}

.source-type-guide th,
.source-type-guide td {
    position: static;
    padding: 9px 12px;
    border: 1px solid rgba(77, 166, 255, 0.12);
    text-align: left;
    vertical-align: middle;
}

.source-type-guide th {
    background: rgba(21, 21, 21, 0.72);
    color: #8c8c8c;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.source-type-guide td {
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.45;
}

.source-type-guide td strong {
    color: #b0b0b0;
}

.source-type-guide-dot {
    width: 82px;
    text-align: center !important;
}

.source-type-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: 0 0 7px rgba(255, 255, 255, 0.18);
}

.source-type-official {
    background: #63e6a0;
}

.source-type-reported {
    background: #5b8cff;
}

.source-type-firsthand {
    background: #ffd84d;
}

.source-type-analysis {
    background: #ff964d;
}

.source-type-unverified {
    background: #ff4d6d;
}

.source-type-not-reviewed {
    background: #e6e6e6;
}

.source-type-cell {
    width: 90px;
    min-width: 90px;
    text-align: center;
    vertical-align: middle;
}

.source-type-cell .source-type-dot {
    width: 12px;
    height: 12px;
    cursor: help;
}

@media (max-width: 700px) {
    .store-introduction .source-type-methodology-title,
    .store-introduction .source-type-methodology-note {
        font-size: 12px;
    }

    .source-type-guide {
        min-width: 680px;
    }
}


/* ==========================================
   Archive777 Source Type V5.4 refinements
   ========================================== */

/* Keep the catalogue title centered, but methodology text left aligned. */
.source-type-methodology {
    text-align: left;
}

/* Deliberately subordinate to the introductory catalogue copy. */
.store-introduction .source-type-methodology-title {
    max-width: none;
    margin: 0 0 3px;
    text-align: left;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0;
}

.store-introduction .source-type-methodology-note {
    max-width: 920px;
    margin: 0 0 14px;
    text-align: left;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 400;
}

/* Keep the results table footprint compact. */
.source-type-cell {
    width: 62px;
    min-width: 62px;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
}

.source-type-cell .source-type-dot {
    width: 10px;
    height: 10px;
}

@media (max-width: 700px) {
    .store-introduction .source-type-methodology-title {
        font-size: 11px;
    }

    .store-introduction .source-type-methodology-note {
        font-size: 10px;
    }
}


/* ==========================================
   Archive777 V5.5 search/layout refinements
   ========================================== */

/* Main catalogue introduction centered as requested. */
.store-introduction > p {
    text-align: center;
}

/* Source methodology remains intentionally secondary and left aligned. */
.store-introduction .source-type-methodology,
.store-introduction .source-type-methodology p {
    text-align: left;
}

.store-introduction .source-type-methodology-title {
    font-size: 12px;
    line-height: 1.35;
}

.store-introduction .source-type-methodology-note {
    font-size: 11px;
    line-height: 1.45;
}

/* The new controls occupy only the filter area; results table width is unchanged. */
.filter-field-checkbox {
    display: flex;
    align-items: flex-end;
}

.checkbox-control {
    min-height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #333333;
    background: rgba(22, 22, 22, 0.86);
    color: #bdbdbd;
    box-sizing: border-box;
    cursor: pointer;
}

.checkbox-control input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #4da6ff;
}

@media (max-width: 700px) {
    .store-introduction .source-type-methodology-title {
        font-size: 11px;
    }

    .store-introduction .source-type-methodology-note {
        font-size: 10px;
    }
}


/* Archive777 V5.5.1: lightweight Has Source Link toggle */
.filter-field-checkbox-inline {
    display: flex;
    align-items: flex-end;
}
.checkbox-control-inline {
    width: auto;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #bdbdbd;
    white-space: nowrap;
}
.checkbox-control-inline:hover {
    border: 0;
    background: transparent;
}
.checkbox-control-inline input {
    flex: 0 0 auto;
}
