:root {
    --study-blue: #6ea8ff;
    --study-green: #63d8ad;
    --study-gold: #e2b96f;
    --study-red: #f08b8b;
    --study-panel: rgba(110, 168, 255, 0.065);
}

main {
    max-width: 900px;
}

article {
    max-width: 800px;
    margin: 0 auto;
}

.date-line {
    margin-bottom: 22px;
    color: rgba(160, 176, 200, 0.62);
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.study-status {
    display: inline-flex;
    margin: 0 0 30px;
    padding: 7px 12px;
    border: 1px solid rgba(226, 185, 111, 0.42);
    border-radius: 999px;
    background: rgba(226, 185, 111, 0.08);
    color: #f1d49d;
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 1.25;
    text-transform: uppercase;
}

.result-box,
.model-card,
.limit-card,
.calculation-box {
    border: 1px solid var(--rule);
    background: var(--study-panel);
}

.result-box {
    margin: 32px 0;
    padding: 24px 26px;
    border-left: 3px solid var(--study-blue);
}

.result-box h2 {
    margin: 0 0 12px;
    font-size: 29px;
}

.result-box p:last-child,
.model-card p:last-child,
.limit-card p:last-child,
.calculation-box p:last-child {
    margin-bottom: 0;
}

.model-grid,
.limit-grid,
.number-grid {
    display: grid;
    gap: 16px;
    margin: 28px 0 34px;
}

.model-grid,
.limit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-card,
.limit-card {
    padding: 20px 22px;
}

.model-label,
.number-label {
    margin: 0 0 7px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.model-card h3,
.limit-card h3 {
    margin: 0 0 10px;
    font-size: 25px;
}

.model-card--pulse {
    border-color: rgba(99, 216, 173, 0.42);
    background: rgba(99, 216, 173, 0.055);
}

.number-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.number-card {
    min-height: 132px;
    padding: 18px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    text-align: center;
}

.number-value {
    display: block;
    margin-bottom: 4px;
    color: var(--heading);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
}

.number-card--pulse .number-value {
    color: var(--study-green);
}

.number-card--observed .number-value {
    color: #fff;
}

.calculation-box {
    margin: 26px 0 32px;
    padding: 22px 24px;
    text-align: center;
}

.calculation {
    margin: 4px 0 10px;
    color: var(--heading);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(27px, 5vw, 38px);
    line-height: 1.25;
}

.calculation-box .explanation {
    color: var(--text-muted);
    font-size: 17px;
}

.wide-figure {
    width: min(960px, calc(100vw - 36px));
    margin: 34px 0 38px 50%;
    transform: translateX(-50%);
}

.chart-shell {
    padding: 18px 18px 12px;
    border: 1px solid rgba(110, 168, 255, 0.22);
    border-radius: 10px;
    background: rgba(7, 12, 26, 0.88);
}

.chart-heading {
    margin: 0 0 4px;
    color: var(--heading-soft);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.25;
}

.chart-subheading {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.45;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-swatch {
    display: inline-block;
    width: 22px;
    height: 3px;
    background: var(--study-blue);
}

.legend-swatch--observed {
    height: 8px;
    border-radius: 999px;
    background: #e8ecf5;
}

.legend-swatch--continuation {
    background: var(--study-red);
}

.legend-swatch--pulse {
    background: var(--study-green);
}

.legend-swatch--primary {
    background: var(--study-blue);
}

.legend-swatch--alternate {
    background: var(--study-gold);
}

.chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(160, 176, 200, 0.17);
    stroke-width: 1;
}

.chart-axis-line {
    stroke: rgba(200, 211, 230, 0.55);
    stroke-width: 1.2;
}

.chart-axis-text,
.chart-note-text,
.chart-label-text {
    fill: rgba(200, 211, 230, 0.72);
    font-family: 'EB Garamond', Georgia, serif;
}

.chart-axis-text {
    font-size: 12px;
}

.chart-note-text {
    font-size: 12px;
}

.chart-label-text {
    fill: rgba(232, 236, 245, 0.94);
    font-size: 13px;
}

.chart-boundary {
    stroke: rgba(226, 185, 111, 0.8);
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
}

.chart-boundary-zone {
    fill: rgba(226, 185, 111, 0.06);
}

.chart-low-noise-zone {
    fill: rgba(99, 216, 173, 0.055);
}

.chart-line-observed {
    fill: none;
    stroke: rgba(232, 236, 245, 0.58);
    stroke-width: 1.5;
}

.chart-line-continuation,
.chart-line-pulse,
.chart-line-primary,
.chart-line-alternate,
.chart-line-fathering {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-continuation { stroke: var(--study-red); }
.chart-line-pulse { stroke: var(--study-green); }
.chart-line-primary { stroke: var(--study-blue); }
.chart-line-alternate { stroke: var(--study-gold); }
.chart-line-fathering { stroke: var(--study-blue); }

.chart-point-observed {
    fill: #e8ecf5;
    stroke: #05070f;
    stroke-width: 2;
}

.chart-point-primary {
    fill: var(--study-blue);
    stroke: #05070f;
    stroke-width: 1.5;
}

.chart-point-alternate {
    fill: var(--study-gold);
    stroke: #05070f;
    stroke-width: 1.5;
}

.chart-delayed-band {
    fill: rgba(110, 168, 255, 0.13);
}

figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.data-details {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.data-details summary {
    cursor: pointer;
    text-align: center;
}

.data-details table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    color: var(--text);
    font-size: 15px;
}

.data-details th,
.data-details td {
    padding: 7px 9px;
    border-bottom: 1px solid rgba(110, 168, 255, 0.12);
    text-align: right;
}

.data-details th:first-child,
.data-details td:first-child {
    text-align: left;
}

.technical-table {
    display: block;
    width: 100%;
    margin: 24px 0 30px;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 17px;
}

.technical-table th,
.technical-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(110, 168, 255, 0.14);
    text-align: right;
    white-space: nowrap;
}

.technical-table th {
    color: var(--heading-soft);
    font-size: 13px;
    letter-spacing: 0.7px;
}

.technical-table th:first-child,
.technical-table td:first-child {
    text-align: left;
}

.claim-ladder {
    margin: 28px 0;
    border-top: 1px solid var(--rule);
}

.claim-row {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.7fr);
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(110, 168, 255, 0.14);
}

.claim-row strong {
    color: var(--heading-soft);
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 16px;
    border: 1px solid var(--study-blue);
    background: rgba(110, 168, 255, 0.08);
    color: #d9e7ff;
    font-size: 12px;
    letter-spacing: 1.1px;
    line-height: 1.25;
    text-decoration: none;
    text-transform: uppercase;
}

.download-link:hover {
    background: var(--study-blue);
    color: #fff;
}

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

@media (max-width: 700px) {
    .model-grid,
    .limit-grid,
    .number-grid {
        grid-template-columns: 1fr;
    }

    .number-grid {
        gap: 0;
    }

    .number-card {
        min-height: auto;
    }

    .wide-figure {
        width: calc(100vw - 20px);
    }

    .chart-shell {
        padding: 14px 8px 10px;
    }

    .chart-heading,
    .chart-subheading,
    .chart-legend {
        padding-right: 8px;
        padding-left: 8px;
    }

    .claim-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .technical-table {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chart-svg * {
        transition: none !important;
    }
}
