.site-stats-page {
    --stats-blue: #146c8f;
    --stats-blue-dark: #0d4d68;
    --stats-plum: #7b2d73;
    --stats-paper: #f8f7f0;
    --stats-rule: #b5b2a8;
    background-color: #e7e5dc;
}

.site-stats-hero {
    border-bottom: 1px solid var(--dark-line);
    background:
        linear-gradient(135deg, rgba(20,108,143,0.1), transparent 38%),
        var(--paper);
}

.site-stats-header-inner,
.stats-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-stats-header-inner {
    padding: 14px 0 22px;
}

.stats-footer a {
    color: var(--stats-blue-dark);
    font-weight: 700;
}

.site-stats-intro {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
}

.stats-eyebrow,
.section-kicker {
    margin: 0 0 6px;
    color: var(--stats-plum);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-stats-intro h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: .95;
    letter-spacing: -.045em;
}

.stats-deck {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

.live-note {
    display: flex;
    gap: 9px;
    align-items: center;
    min-width: max-content;
    padding: 9px 11px;
    border: 1px solid var(--stats-rule);
    background: rgba(255,255,255,0.5);
    box-shadow: inset 1px 1px #fff;
}

.live-note span:last-child {
    display: grid;
    gap: 2px;
}

.live-note small {
    color: var(--muted);
    font-size: 10px;
}

.live-dot {
    width: 9px;
    height: 9px;
    border: 1px solid #154b29;
    border-radius: 50%;
    background: #2b8a4b;
    box-shadow: 0 0 0 3px rgba(43,138,75,0.14);
}

.stats-shell {
    padding: 28px 0 44px;
}

.stats-section {
    margin-bottom: 46px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(23px, 4vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.section-heading > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(4, 1fr);
    border: 1px solid var(--dark-line);
    background: var(--stats-paper);
    box-shadow: 4px 4px 0 rgba(56,58,61,0.18);
}

.metric-card {
    display: flex;
    min-width: 0;
    min-height: 168px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border-left: 1px solid var(--stats-rule);
}

.metric-card:first-child {
    border-left: 0;
}

.metric-card-primary {
    background: var(--stats-blue-dark);
    color: #fff;
}

.metric-label {
    min-height: 32px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-transform: uppercase;
}

.metric-card-primary .metric-label,
.metric-card-primary .metric-note {
    color: rgba(255,255,255,0.72);
}

.metric-value {
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 48px);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
}

.metric-note {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.activity-section {
    padding: 24px;
    border: 1px solid var(--dark-line);
    background: var(--stats-paper);
    box-shadow: 4px 4px 0 rgba(56,58,61,0.18);
}

.update-status {
    text-align: right;
}

.activity-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--dark-line);
    background: #fff;
}

.site-activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.site-activity-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.site-activity-table th,
.site-activity-table td {
    padding: 12px 15px;
    border-top: 1px solid var(--stats-rule);
    border-left: 1px solid var(--stats-rule);
    text-align: right;
}

.site-activity-table thead th {
    border-top: 0;
    background: #e9e8e1;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-activity-table th:first-child,
.site-activity-table td:first-child {
    border-left: 0;
    text-align: left;
}

.site-activity-table tbody th {
    color: var(--stats-blue-dark);
    font-size: 14px;
}

.site-activity-table tbody tr:hover {
    background: #f3f8fa;
}

.activity-loading {
    color: var(--muted);
    text-align: center !important;
}

.stage-key {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.stage-key div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px;
    align-items: baseline;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.stage-key strong {
    color: var(--ink);
    white-space: nowrap;
}

.depth-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.moderation-section {
    padding: 24px;
    border: 1px solid var(--dark-line);
    background:
        linear-gradient(135deg, rgba(123,45,115,0.055), transparent 46%),
        var(--stats-paper);
    box-shadow: 4px 4px 0 rgba(56,58,61,0.18);
}

.enrichment-section {
    padding: 24px;
    border: 1px solid var(--dark-line);
    background:
        linear-gradient(135deg, rgba(20,108,143,0.07), transparent 46%),
        var(--stats-paper);
    box-shadow: 4px 4px 0 rgba(56,58,61,0.18);
}

.enrichment-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--dark-line);
    background: #fff;
}

.enrichment-summary-card {
    display: flex;
    min-width: 0;
    min-height: 168px;
    flex-direction: column;
    padding: 18px;
    border-left: 1px solid var(--stats-rule);
}

.enrichment-summary-card:first-child {
    border-left: 0;
}

.enrichment-summary-card > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.enrichment-summary-card > strong {
    display: block;
    margin: auto 0 12px;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
}

.enrichment-summary-card > small {
    min-height: 32px;
    color: var(--muted);
    line-height: 1.4;
}

.enrichment-summary-card > small b {
    color: var(--ink);
}

.enrichment-summary-card-primary {
    background: var(--stats-blue-dark);
    color: #fff;
}

.enrichment-summary-card-primary > span,
.enrichment-summary-card-primary > small {
    color: rgba(255,255,255,0.72);
}

.enrichment-summary-card-primary > small b {
    color: #fff;
}

.enrichment-operations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 12px;
    border: 1px solid var(--stats-rule);
    background: rgba(255,255,255,0.62);
}

.enrichment-operation-card {
    min-width: 0;
    padding: 15px 18px;
    border-left: 1px solid var(--stats-rule);
}

.enrichment-operation-card:first-child {
    border-left: 0;
}

.enrichment-operation-card > span {
    display: block;
    min-height: 27px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
}

.enrichment-operation-card > strong {
    display: block;
    margin: 10px 0 5px;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
}

.enrichment-operation-card > small {
    display: block;
    min-height: 31px;
    color: var(--muted);
    line-height: 1.4;
}

.enrichment-operation-card > small b {
    color: var(--ink);
}

.enrichment-operation-card-failures > strong {
    color: var(--stats-plum);
}

.enrichment-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.enrichment-detail-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--stats-rule);
    background: rgba(255,255,255,0.76);
}

.enrichment-detail-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: baseline;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--stats-rule);
}

.enrichment-detail-heading .section-kicker {
    margin: 0;
}

.enrichment-detail-heading h3 {
    margin: 0;
    font-size: 16px;
}

.enrichment-coverage-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #dedcd4;
}

.enrichment-coverage-row:first-of-type {
    border-top: 0;
}

.enrichment-coverage-row > div:first-child {
    display: grid;
    gap: 3px;
}

.enrichment-coverage-row > div:first-child span,
.enrichment-coverage-row > small {
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.enrichment-coverage-row .progress-track {
    margin: 0;
}

.enrichment-category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 22px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.enrichment-category-list li > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    font-size: 11px;
}

.enrichment-category-list li > div:first-child strong {
    overflow: hidden;
    color: var(--stats-blue-dark);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enrichment-category-list li > div:first-child span {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.enrichment-category-track {
    height: 4px;
    margin-top: 5px;
    background: #d8d6cc;
}

.enrichment-category-track span {
    display: block;
    height: 100%;
    background: var(--stats-blue);
}

.enrichment-schema-table-wrap {
    margin-top: 16px;
}

.enrichment-schema-table tbody th {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.enrichment-key {
    margin-bottom: 0;
}

.moderation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--dark-line);
    background: #fff;
}

.moderation-card {
    min-width: 0;
    padding: 20px;
    border-left: 1px solid var(--stats-rule);
}

.moderation-card:first-child {
    border-left: 0;
}

.moderation-card > strong {
    display: block;
    margin-top: 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    letter-spacing: -0.035em;
}

.moderation-card > strong small {
    color: var(--muted);
    font-size: 16px;
    letter-spacing: 0;
}

.moderation-card p {
    min-height: 38px;
    margin: 4px 0 18px;
    color: var(--muted);
    line-height: 1.35;
}

.moderation-card > small {
    display: block;
    min-height: 32px;
    color: var(--muted);
    line-height: 1.45;
}

.moderation-card-final .progress-track span {
    background: var(--stats-plum);
}

.moderation-key {
    margin-bottom: 0;
}

.depth-card {
    min-height: 236px;
    padding: 20px;
    border: 1px solid var(--stats-rule);
    background: rgba(248,247,240,0.72);
    box-shadow: inset 1px 1px #fff;
}

.depth-heading {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--stats-rule);
}

.depth-heading h3 {
    margin: 0;
    font-size: 15px;
}

.depth-number {
    color: var(--stats-plum);
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

.depth-card > strong {
    display: block;
    margin-top: 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    letter-spacing: -0.035em;
}

.depth-card p {
    min-height: 34px;
    margin: 4px 0 18px;
    color: var(--muted);
    line-height: 1.35;
}

.depth-card small {
    color: var(--muted);
    line-height: 1.4;
}

.depth-card small b {
    color: var(--ink);
}

.progress-track {
    height: 8px;
    margin: 0 0 9px;
    border: 1px solid var(--dark-line);
    background: #d8d6cc;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--stats-blue);
    transition: width 280ms ease-out;
}

.stats-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: baseline;
    padding-top: 18px;
    border-top: 1px solid var(--dark-line);
}

.stats-footer p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.stats-footer strong {
    color: var(--ink);
}

@media (max-width: 900px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-card {
        border-top: 1px solid var(--stats-rule);
    }

    .metric-card-primary {
        grid-column: 1 / -1;
        min-height: 150px;
        border-top: 0;
    }

    .metric-card:nth-child(even) {
        border-left: 0;
    }

    .stage-key {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .moderation-grid {
        grid-template-columns: 1fr;
    }

    .enrichment-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .enrichment-operations-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .enrichment-operation-card:nth-child(odd) {
        border-left: 0;
    }

    .enrichment-operation-card:nth-child(n + 3) {
        border-top: 1px solid var(--stats-rule);
    }

    .enrichment-detail-grid {
        grid-template-columns: 1fr;
    }

    .enrichment-summary-card:nth-child(odd) {
        border-left: 0;
    }

    .enrichment-summary-card:nth-child(n + 3) {
        border-top: 1px solid var(--stats-rule);
    }

    .moderation-card {
        border-top: 1px solid var(--stats-rule);
        border-left: 0;
    }

    .moderation-card:first-child {
        border-top: 0;
    }
}

@media (max-width: 680px) {
    .site-stats-header-inner,
    .stats-shell {
        width: min(100% - 20px, 1180px);
    }

    .site-stats-header-inner {
        padding-bottom: 18px;
    }

    .site-stats-intro,
    .stats-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-note {
        min-width: 0;
    }

    .stats-shell {
        padding-top: 26px;
    }

    .stats-section {
        margin-bottom: 34px;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .update-status {
        text-align: left;
    }

    .activity-section {
        padding: 16px;
    }

    .enrichment-section,
    .moderation-section {
        padding: 16px;
    }

    .site-activity-table,
    .site-activity-table tbody,
    .site-activity-table tr,
    .site-activity-table th,
    .site-activity-table td {
        display: block;
        width: 100%;
    }

    .site-activity-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .site-activity-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        border-top: 1px solid var(--dark-line);
    }

    .site-activity-table tbody tr:first-child {
        border-top: 0;
    }

    .site-activity-table tbody th,
    .site-activity-table tbody td {
        padding: 10px 12px;
        border-top: 0;
        border-left: 1px solid var(--stats-rule);
        text-align: right;
    }

    .site-activity-table tbody th {
        grid-column: 1 / -1;
        border-bottom: 1px solid var(--stats-rule);
        border-left: 0;
        background: #e9e8e1;
        text-align: left;
    }

    .site-activity-table tbody td::before {
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        content: attr(data-label);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .activity-loading {
        grid-column: 1 / -1;
        border-left: 0 !important;
    }

    .depth-grid {
        grid-template-columns: 1fr;
    }

    .enrichment-coverage-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 14px;
    }

    .enrichment-coverage-row .progress-track {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .depth-card {
        min-height: 0;
    }
}

@media (max-width: 430px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .metric-card,
    .metric-card:nth-child(even) {
        min-height: 132px;
        border-top: 1px solid var(--stats-rule);
        border-left: 0;
    }

    .metric-card-primary {
        grid-column: auto;
        border-top: 0;
    }

    .enrichment-summary-grid {
        grid-template-columns: 1fr;
    }

    .enrichment-summary-card,
    .enrichment-summary-card:nth-child(odd) {
        min-height: 148px;
        border-top: 1px solid var(--stats-rule);
        border-left: 0;
    }

    .enrichment-summary-card:first-child {
        border-top: 0;
    }

    .enrichment-operations-grid,
    .enrichment-category-list {
        grid-template-columns: 1fr;
    }

    .enrichment-operation-card,
    .enrichment-operation-card:nth-child(odd) {
        border-top: 1px solid var(--stats-rule);
        border-left: 0;
    }

    .enrichment-operation-card:first-child {
        border-top: 0;
    }

    .enrichment-detail-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .progress-track span {
        transition: none;
    }
}
