/* layer2.report — Institutional Briefing
   Palette:
   #0f2b5b primary navy   |  #2563eb accent blue
   #ffffff main bg        |  #eef4ff ice blue
   #f8fafc zebra          |  #d4dbe6 borders
   #1a2332 body text      |  #6b7280 muted
   #059669 positive       |  #dc2626 alert
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: #1a2332;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono,
.metric-number,
.num,
td.num {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, color 200ms ease;
}

a:hover {
    border-bottom-color: #2563eb;
    color: #0f2b5b;
}

/* ================ Masthead ================ */
.masthead {
    background: #0f2b5b;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 3rem;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #0a1f44;
}

.masthead-inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    color: #ffffff;
}

.domain-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-transform: lowercase;
    position: relative;
    padding-left: 1.25rem;
}

.domain-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 22px;
    background: #2563eb;
    border-radius: 1px;
}

.masthead-nav {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
}

.masthead-nav a {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.masthead-nav a:hover {
    color: #ffffff;
    border-bottom-color: #2563eb;
}

.issue-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.06em;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    padding-left: 1.5rem;
}

/* ================ Briefing Hero ================ */
.briefing {
    background: #ffffff;
    padding: 4rem 3rem 0;
    border-bottom: 1px solid #d4dbe6;
}

.briefing-inner {
    max-width: 1320px;
    margin: 0 auto;
}

.briefing-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #d4dbe6;
}

.briefing-kicker {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #2563eb;
    position: relative;
    padding-left: 2.5rem;
}

.briefing-kicker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: #2563eb;
}

.briefing-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #6b7280;
    letter-spacing: 0.04em;
}

.briefing-headline {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.4vw, 2.85rem);
    line-height: 1.18;
    color: #0f2b5b;
    letter-spacing: -0.015em;
    max-width: 60ch;
    margin-bottom: 1.5rem;
}

.briefing-summary {
    font-size: 1.08rem;
    line-height: 1.7;
    color: #1a2332;
    max-width: 70ch;
    margin-bottom: 2.5rem;
}

.briefing-rule {
    height: 2px;
    background: #0f2b5b;
    width: 100%;
    margin-bottom: 0;
    position: relative;
}

.briefing-rule::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 2px;
    width: 80px;
    background: #2563eb;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 2.25rem 0;
    gap: 1.5rem;
}

.metric {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.metric-divider {
    width: 1px;
    background: #d4dbe6;
    align-self: stretch;
}

.metric-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    color: #0f2b5b;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.metric-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.metric-trend {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.metric-trend.up {
    color: #059669;
}

.metric-trend.down {
    color: #dc2626;
}

/* ================ Report Body ================ */
.report {
    background: #ffffff;
    padding: 0 3rem;
}

.report-section {
    max-width: 1320px;
    margin: 0 auto;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid #d4dbe6;
    position: relative;
}

.report-section:last-of-type {
    border-bottom: none;
}

/* Ghost section number watermark */
.report-section::before {
    content: attr(data-section);
    position: absolute;
    left: -0.25rem;
    top: 2.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 8rem;
    line-height: 1;
    color: rgba(15, 43, 91, 0.06);
    letter-spacing: -0.04em;
    pointer-events: none;
    z-index: 0;
}

.report-grid {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.report-main {
    padding-right: 1rem;
}

.report-main p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.85;
    color: #1a2332;
}

.section-head {
    margin-bottom: 2.25rem;
    position: relative;
}

.section-stamp {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #2563eb;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.45rem, 2.4vw, 1.95rem);
    line-height: 1.25;
    color: #0f2b5b;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    max-width: 36ch;
}

.section-deck {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #1a2332;
    max-width: 60ch;
    border-left: 3px solid #2563eb;
    padding-left: 1.25rem;
    background: #f8fafc;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-right: 1rem;
    margin-bottom: 0.5rem;
}

.section-footnote {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #6b7280;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #d4dbe6;
}

/* ================ Data Tables ================ */
.data-table-wrap {
    margin: 2rem 0;
    border: 1px solid #d4dbe6;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table thead {
    background: #0f2b5b;
    color: #ffffff;
    position: sticky;
    top: 80px;
    z-index: 5;
}

.data-table th {
    text-align: left;
    padding: 0.85rem 1.1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    border-bottom: 2px solid #2563eb;
}

.data-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #d4dbe6;
    color: #1a2332;
}

.data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.data-table tbody tr:hover {
    background: #eef4ff;
    transition: background 150ms ease;
}

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

.num,
.data-table th.num,
.data-table td.num {
    text-align: right;
}

.pos {
    color: #059669;
}

.neg {
    color: #dc2626;
}

/* ================ Right-column data boxes ================ */
.report-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 110px;
    align-self: flex-start;
}

.data-box {
    background: #eef4ff;
    border: 1px solid #d4dbe6;
    border-radius: 6px;
    padding: 1.5rem;
    border-top: 3px solid #2563eb;
    position: relative;
}

.data-box.performance {
    border-top-color: #2563eb;
}

.data-box.security {
    border-top-color: #059669;
}

.data-box.risk {
    border-top-color: #dc2626;
}

.data-box-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 0.5rem;
}

.data-box-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0f2b5b;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.data-box-note {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.55;
    margin-top: 0.85rem;
    font-style: italic;
}

.kv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.kv-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.88rem;
    border-bottom: 1px dotted #d4dbe6;
    padding-bottom: 0.4rem;
}

.kv-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kv-list li > span:first-child {
    color: #1a2332;
}

.kv-list li > span:last-child {
    color: #0f2b5b;
    font-weight: 500;
}

/* ================ Charts ================ */
.chart {
    width: 100%;
    height: 130px;
    background: #ffffff;
    border: 1px solid #d4dbe6;
    border-radius: 4px;
    margin-top: 0.25rem;
    position: relative;
    overflow: hidden;
}

.chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ================ Audit grid ================ */
.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.audit-card {
    background: #ffffff;
    border: 1px solid #d4dbe6;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    padding: 1.15rem 1.25rem;
}

.audit-card h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f2b5b;
    margin-bottom: 0.5rem;
}

.audit-card-rating {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.audit-card-rating.tier-1 {
    background: #059669;
}

.audit-card-rating.tier-2 {
    background: #2563eb;
}

.audit-card-rating.tier-3 {
    background: #6b7280;
}

.audit-card-rating.tier-4 {
    background: #dc2626;
}

.audit-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f2b5b;
    margin-bottom: 0.4rem;
}

.audit-detail {
    font-size: 0.85rem;
    color: #1a2332;
    line-height: 1.55;
}

/* ================ Incident list ================ */
.incident-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.incident-list li {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 0.85rem;
    align-items: baseline;
    font-size: 0.85rem;
    line-height: 1.5;
    padding-bottom: 0.65rem;
    border-bottom: 1px dotted #d4dbe6;
}

.incident-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.incident-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #2563eb;
    font-weight: 500;
}

.incident-text {
    color: #1a2332;
}

/* ================ Risk register ================ */
.risk-register {
    margin: 2rem 0 1rem;
    border: 1px solid #d4dbe6;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.risk-row {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 0.8fr;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #d4dbe6;
}

.risk-row:last-child {
    border-bottom: none;
}

.risk-row:nth-child(even) {
    background: #f8fafc;
}

.risk-cell.label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f2b5b;
}

.risk-cell.bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: #eef4ff;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: #2563eb;
    transition: width 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bar-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #1a2332;
    white-space: nowrap;
    min-width: 4.5rem;
    text-align: right;
}

.risk-cell.verdict {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: right;
    font-weight: 500;
}

.risk-cell.verdict.high {
    color: #dc2626;
}

.risk-cell.verdict.mid {
    color: #2563eb;
}

.risk-cell.verdict.low {
    color: #059669;
}

/* ================ Archive list ================ */
.archive-list {
    list-style: none;
    margin: 1.5rem 0;
    border: 1px solid #d4dbe6;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.archive-item {
    display: grid;
    grid-template-columns: 5rem 6rem 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #d4dbe6;
    transition: background 150ms ease;
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-item:hover {
    background: #eef4ff;
}

.archive-issue {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

.archive-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #6b7280;
    letter-spacing: 0.04em;
}

.archive-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f2b5b;
    line-height: 1.4;
}

/* ================ Subscribe form ================ */
.subscribe-form {
    margin-top: 1rem;
}

.form-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.subscribe-form input {
    flex: 1;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.88rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d4dbe6;
    background: #ffffff;
    color: #1a2332;
    border-radius: 4px;
    outline: none;
    transition: border-color 200ms ease;
}

.subscribe-form input:focus {
    border-color: #2563eb;
}

.subscribe-form button {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0 1.1rem;
    background: #0f2b5b;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 200ms ease;
}

.subscribe-form button:hover {
    background: #2563eb;
}

.form-status {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    margin-top: 0.6rem;
    min-height: 1rem;
    color: #059669;
}

.form-status.error {
    color: #dc2626;
}

/* ================ Colophon (Footer) ================ */
.colophon {
    background: #0f2b5b;
    color: #eef4ff;
    padding: 3.5rem 3rem 1.5rem;
    margin-top: 3rem;
}

.colophon-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(212, 219, 230, 0.18);
}

.colophon-block .colophon-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem;
}

.colophon-block p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(238, 244, 255, 0.78);
}

.colophon-base {
    max-width: 1320px;
    margin: 1.5rem auto 0;
    display: flex;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: rgba(238, 244, 255, 0.55);
    letter-spacing: 0.04em;
}

/* ================ Reveal animation ================ */
.report-section {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

/* ================ Responsive ================ */
@media (max-width: 1080px) {
    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-aside {
        position: static;
        flex-direction: column;
    }

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

    .report-section::before {
        font-size: 6rem;
    }
}

@media (max-width: 760px) {
    .masthead {
        padding: 0 1.25rem;
    }

    .masthead-nav {
        display: none;
    }

    .briefing,
    .report {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .briefing {
        padding-top: 2.5rem;
    }

    .colophon {
        padding: 2.5rem 1.25rem 1rem;
    }

    .colophon-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .colophon-base {
        flex-direction: column;
        gap: 0.5rem;
    }

    .metric-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .metric-divider {
        height: 1px;
        width: 100%;
    }

    .risk-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .archive-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

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

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.7rem;
    }
}
