/* ============================================================
   prototype.report — Swiss Editorial Report Stylesheet
   Colors: #fafaf9, #1a1a1a, #525252, #d4d4d4, #dc2626, #f5f5f4, #737373, #000000
   Fonts: Barlow Condensed (display), Source Serif 4 (body), Barlow (meta)
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #fafaf9;
    color: #525252;
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
}

/* ---- Typography ---- */
h1, h2, h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}

h4 {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    color: #1a1a1a;
}

/* ---- Grid Container ---- */
.header-inner,
.section-inner,
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 12%;
}

/* ============================================================
   REPORT HEADER
   ============================================================ */
.report-header {
    background: #fafaf9;
    min-height: 40vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}

.header-inner {
    width: 100%;
    padding-top: 56px;
    padding-bottom: 40px;
}

.header-meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.report-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    line-height: 1;
    margin-bottom: 20px;
}

.header-metadata {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 16px;
    margin: 16px 0;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-key {
    font-family: 'Barlow', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #737373;
}

.meta-value {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.meta-divider {
    color: #d4d4d4;
    font-size: 0.85rem;
}

/* ============================================================
   HORIZONTAL RULES
   ============================================================ */
hr.thin-rule,
.thin-rule {
    border: none;
    border-top: 1px solid #d4d4d4;
    margin: 24px 0;
    width: 100%;
}

hr.thick-rule,
.thick-rule {
    border: none;
    border-top: 3px solid #1a1a1a;
    margin: 0 0 24px 0;
    width: 100%;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.report-main {
    background: #fafaf9;
}

/* ---- Section ---- */
.report-section {
    padding: 56px 0;
}

.report-section.section-alt {
    background: #f5f5f4;
}

/* Section inner layout uses the global padding */
.report-section .section-header,
.report-section .thin-rule,
.report-section .content-columns {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12%;
    padding-right: 12%;
}

/* Override padding rules for content that should span full container width */
.report-section .thin-rule {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    width: 100%;
    display: block;
}

/* Wrapper for section content */
.report-section > * {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12%;
    padding-right: 12%;
}

/* Reset for the hr elements inside sections */
.report-section > hr.thin-rule {
    padding-left: 12%;
    padding-right: 12%;
    max-width: 960px;
}

/* ---- Section Header ---- */
.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 0;
}

.section-num {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dc2626;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

/* ---- Content Columns ---- */
.content-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0;
}

.left-col {
    padding-right: 40px;
}

.right-col {
    border-left: 1px solid #d4d4d4;
    padding-left: 32px;
}

/* ---- Body Text ---- */
.body-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #525252;
    margin-bottom: 1.2em;
}

.body-text:last-child {
    margin-bottom: 0;
}

.body-text strong {
    font-weight: 600;
    color: #1a1a1a;
}

.body-text em {
    font-style: italic;
}

/* ---- Subsection Title ---- */
.subsection-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    margin: 1.6em 0 0.8em;
}

/* ============================================================
   PULL QUOTES
   ============================================================ */
.pull-quote {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #1a1a1a;
    border-left: 2px solid #dc2626;
    padding-left: 16px;
    margin-bottom: 32px;
}

/* ============================================================
   REFERENCE BLOCKS (right column data)
   ============================================================ */
.ref-block {
    margin-top: 24px;
}

.ref-label {
    font-family: 'Barlow', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #737373;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d4d4d4;
}

.ref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f4;
}

.ref-key {
    font-family: 'Source Serif 4', serif;
    font-size: 0.85rem;
    color: #525252;
}

.ref-val {
    font-family: 'Barlow', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #1a1a1a;
}

/* ============================================================
   INLINE CSS DIAGRAM (bar chart)
   ============================================================ */
.inline-diagram {
    margin-top: 24px;
    padding: 16px 0;
    border-top: 1px solid #d4d4d4;
}

.diagram-title {
    font-family: 'Barlow', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #737373;
    margin-bottom: 12px;
}

.diagram-bar-group {
    display: grid;
    grid-template-columns: 60px 1fr 24px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.diagram-bar-label {
    font-family: 'Barlow', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #737373;
    text-align: right;
}

.diagram-bar-track {
    background: #f5f5f4;
    height: 8px;
    border-radius: 0;
    overflow: hidden;
}

.diagram-bar {
    height: 100%;
    background: #1a1a1a;
    min-width: 1px;
}

.diagram-bar-val {
    font-family: 'Barlow', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: right;
}

/* ============================================================
   PROTOTYPE ENTRIES
   ============================================================ */
.prototype-entry {
    border-top: 1px solid #d4d4d4;
    padding: 20px 0;
}

.prototype-entry:last-child {
    border-bottom: 1px solid #d4d4d4;
}

.prototype-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.proto-num {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dc2626;
}

.proto-status {
    font-family: 'Barlow', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
}

.status-active {
    color: #1a1a1a;
    background: #d4d4d4;
}

.status-validated {
    color: #fafaf9;
    background: #1a1a1a;
}

.proto-title {
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.proto-abstract {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #525252;
    margin-bottom: 10px;
}

.proto-meta {
    display: flex;
    gap: 20px;
}

.proto-score,
.proto-domain {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #737373;
}

.proto-score strong {
    color: #1a1a1a;
}

/* ============================================================
   ARCHIVE TABLE
   ============================================================ */
.archive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
}

.archive-table thead {
    border-bottom: 2px solid #1a1a1a;
}

.archive-table th {
    font-family: 'Barlow', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #737373;
    text-align: left;
    padding: 8px 12px 8px 0;
}

.archive-table td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid #d4d4d4;
    color: #525252;
    vertical-align: top;
}

.archive-table tbody tr:last-child td {
    border-bottom: none;
}

.proto-id-cell {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #dc2626;
    white-space: nowrap;
}

.outcome-label {
    font-family: 'Barlow', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 2px;
    white-space: nowrap;
}

.outcome-integrated {
    color: #fafaf9;
    background: #1a1a1a;
}

.outcome-deprecated {
    color: #525252;
    background: #d4d4d4;
}

.outcome-archived {
    color: #737373;
    background: #f5f5f4;
    border: 1px solid #d4d4d4;
}

/* ============================================================
   CLASSIFICATION LIST
   ============================================================ */
.classification-list {
    margin: 16px 0 24px;
    border-top: 1px solid #d4d4d4;
}

.class-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f4;
}

.class-code {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #dc2626;
}

.class-label {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.class-count {
    font-family: 'Barlow', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #737373;
    white-space: nowrap;
}

/* ============================================================
   REPORT FOOTER
   ============================================================ */
.report-footer {
    background: #fafaf9;
    padding: 48px 0 40px;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 12%;
}

.footer-index-header {
    margin-bottom: 16px;
}

.footer-index {
    margin-bottom: 32px;
}

.index-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f4;
    cursor: pointer;
}

.index-item:hover .index-title {
    color: #1a1a1a;
}

.index-num {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dc2626;
    width: 32px;
    flex-shrink: 0;
}

.index-title {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    color: #525252;
    flex: 1;
}

.index-ref {
    font-family: 'Barlow', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #737373;
    flex-shrink: 0;
}

.footer-colophon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.colophon-sep {
    color: #d4d4d4;
}

.meta-label {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #737373;
}

/* ============================================================
   ACTIVE SECTION HIGHLIGHT (JS-driven)
   ============================================================ */
.index-item.is-active .index-title {
    color: #1a1a1a;
}

.index-item.is-active .index-num {
    color: #dc2626;
}

/* ============================================================
   SECTION REVEAL (JS-driven)
   ============================================================ */
.report-section {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.report-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .report-header {
        min-height: 30vh;
    }

    .header-inner,
    .footer-inner {
        padding-left: 6%;
        padding-right: 6%;
    }

    .report-section > * {
        padding-left: 6%;
        padding-right: 6%;
    }

    .content-columns {
        grid-template-columns: 1fr;
    }

    .right-col {
        border-left: none;
        border-top: 1px solid #d4d4d4;
        padding-left: 0;
        padding-top: 24px;
        margin-top: 24px;
    }

    .left-col {
        padding-right: 0;
    }

    .header-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .meta-divider {
        display: none;
    }

    .archive-table {
        font-size: 0.82rem;
    }

    .archive-table th:nth-child(4),
    .archive-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .report-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .proto-meta {
        flex-direction: column;
        gap: 4px;
    }
}
