:root {
    --bg-color: #050505;
    --panel-bg: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #666666;
    --accent-cyan: #00ffcc;
    --accent-red: #ff3333;
    --accent-blue: #3333ff;
    --grid-line: #1a1a1a;

    --font-ui: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-ui);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Scanline Overlay */
.overlay-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 100;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

/* Header */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grid-line);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 2px;
}

.logo-icon {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.status-indicators {
    display: flex;
    gap: 30px;
}

.indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.indicator .label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.indicator .value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
}

.pulsed {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 204, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 204, 0);
    }
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 3fr 2fr;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--grid-line);
    padding: 15px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--grid-line);
    padding-bottom: 8px;
}

.panel-header h2 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.panel-subtitle {
    font-size: 0.55rem;
    color: #444;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.channel-id {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
}

/* Signal Panel */
.viz-container {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--grid-line);
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
}

.metrics-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.m-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.m-value {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.monospace {
    font-family: var(--font-mono);
}

/* Decoder Panel */
.decoder-panel {
    align-items: center;
    justify-content: space-between;
}

.brain-viz {
    width: 100%;
    height: 60%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.implant-graphic {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #222 0%, #111 100%);
    border-radius: 50%;
    border: 1px solid #333;
    z-index: 2;
    position: relative;
}

.implant-body {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #000;
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
}

.decoding-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ring-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed #333;
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.center-readout {
    position: absolute;
    text-align: center;
    top: 120px;
    width: 100%;
}

.readout-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.readout-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    margin: 5px 0;
}

.readout-conf {
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.probability-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.class-bar {
    width: 100%;
}

.class-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.bar-track {
    width: 100%;
    height: 4px;
    background: #222;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: var(--text-primary);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Meta Panel */
.meta-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 4px;
}

.p-header {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.p-value.large {
    font-size: 2.5rem;
    color: var(--text-primary);
}

.p-sub {
    font-size: 0.6rem;
    color: #444;
    margin-top: 5px;
}

.console-log {
    flex: 1;
    background: #000;
    border: 1px solid #222;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #444;
    overflow-y: auto;
    max-height: 150px;
    /* Limit height */
    display: flex;
    flex-direction: column-reverse;
    /* Keep new items at top or bottom depending on pref, but reverse usually keeps newest visible if prepended */
}

.log-line {
    margin-bottom: 4px;
}

/* Cyber Select & Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.cyber-select {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid var(--grid-line);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.cyber-select:hover,
.cyber-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.1);
}

.cyber-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid #333;
    color: var(--text-primary);
    font-family: var(--font-ui);
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.cyber-btn:hover {
    background: var(--text-primary);
    color: #000;
    border-color: var(--text-primary);
}

/* Visualization Legend */
.viz-legend {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: #aaa;
}

.legend-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
}



/* === SCORE PANEL === */
.score-panel {
    align-items: center;
}

.score-gauge-container {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-gauge-container canvas {
    width: 100%;
    height: 100%;
}

.score-overlay {
    position: absolute;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.score-value {
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
}

.score-tier {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
}

.score-context {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.percentile-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.score-tip {
    font-size: 0.65rem;
    color: #555;
    font-style: italic;
    min-height: 1.2em;
}

.tier-badge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.tier-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 2px 10px;
    border: 1px solid currentColor;
    border-radius: 3px;
    text-transform: uppercase;
}

.tier-description {
    font-size: 0.6rem;
    color: var(--text-secondary);
    max-width: 180px;
    text-align: left;
    line-height: 1.3;
}

/* === SIGNAL QUALITY PANEL === */
.signal-bars-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.signal-bar-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sig-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sig-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.sig-strength {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.sig-bar-track {
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.sig-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.5s ease;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

.signal-tip {
    font-size: 0.6rem;
    color: #555;
    margin-top: 8px;
    min-height: 2em;
    line-height: 1.4;
}

.mini-viz-container {
    height: 220px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--grid-line);
    border-radius: 2px;
    overflow: hidden;
}

.mini-viz-container canvas {
    width: 100%;
    height: 100%;
}

/* === LEARNING CURVE PANEL === */
.learning-panel {
    min-height: 0;
}

.learning-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.stat-chip {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-size: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.stat-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.learning-canvas-container {
    flex: 1;
    min-height: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--grid-line);
    border-radius: 2px;
    overflow: hidden;
}

.learning-canvas-container canvas {
    width: 100%;
    height: 100%;
}

/* === BENCHMARK PANEL === */
.benchmark-panel {
    justify-content: center;
}

.benchmark-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.benchmark-bar-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    margin: 30px 0 20px 0;
}

.benchmark-marker {
    position: absolute;
    top: -22px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker-line {
    display: block;
    width: 1px;
    height: 14px;
    background: #333;
    margin-bottom: 2px;
}

.benchmark-marker .marker-line {
    height: 32px;
}

.marker-label {
    font-size: 0.5rem;
    color: #444;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.benchmark-user-marker {
    position: absolute;
    top: -6px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: left 0.6s ease;
    z-index: 2;
}

.user-dot {
    display: block;
    width: 20px;
    height: 20px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.5);
}

.user-label {
    font-size: 0.55rem;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    margin-top: 4px;
}

.benchmark-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.milestones {
    margin-top: 10px;
    min-height: 24px;
}

.milestone-toast {
    display: inline-block;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* === CONTROLS PANEL === */
.controls-panel .controls {
    margin-bottom: 8px;
}

.controls-panel .console-log {
    flex: 1;
    max-height: none;
}

/* Content Pages Support */
.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    overflow-y: auto;
    height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) var(--bg-color);
}

/* Typography for Content */
h1,
h2,
h3,
h4 {
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 1px solid var(--accent-cyan);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-top: 40px;
}

h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

p {
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 20px;
    color: #ccc;
}

li {
    margin-bottom: 0.5rem;
}

code {
    background: #111;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    border: 1px solid #333;
}

pre {
    background: #111;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid var(--grid-line);
    margin-bottom: 1.5rem;
}

/* Unified Navigation */
.main-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--grid-line);
    padding-bottom: 10px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s, text-shadow 0.3s;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}

/* Cards for Landing Page */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.nav-card {
    background: var(--panel-bg);
    border: 1px solid var(--grid-line);
    padding: 30px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.1);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1rem;
    color: var(--accent-cyan);
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Scrollytelling Additions */
.scrolly-container {
    width: 100%;
    margin-top: 50px;
    position: relative;
    z-index: 10;
}

.scroll-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.scroll-content {
    max-width: 800px;
    width: 100%;
    text-align: left;
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.4);
    padding: 40px;
    border: 1px solid var(--grid-line);
    border-radius: 8px;
    opacity: 0.2;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(5px);
}

.scroll-section.active .scroll-content {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1);
    color: var(--text-primary);
}

/* End content (button and links) */
.end-section {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    padding-bottom: 80px;
}

/* ════════════════════════════════════════════
   INLINE CITATION STYLES
   ════════════════════════════════════════════ */
.cite {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.78em;
    font-weight: 500;
    cursor: pointer;
    vertical-align: super;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, text-shadow 0.2s;
    padding: 0 1px;
}

.cite:hover {
    border-bottom-color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(0, 255, 204, 0.5);
}

.ref-highlight {
    animation: ref-flash 1.6s ease-out;
}

@keyframes ref-flash {
    0% {
        background: rgba(0, 255, 204, 0.25);
    }

    100% {
        background: transparent;
    }
}

/* ════════════════════════════════════════════
   MOBILE RESPONSIVE — ALL PAGES
   ════════════════════════════════════════════ */

/* ── Tablet & below (≤ 900px) ── */
@media (max-width: 900px) {

    /* Allow the page to scroll on content pages */
    body {
        overflow-y: auto;
        height: auto;
        width: 100%;
    }

    /* App container: full scroll */
    .app-container {
        height: auto;
        padding: 12px;
    }

    /* ── ml-demo: collapse 3-col grid to single column ── */
    .main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
    }

    /* Score gauge — shrink canvas height */
    .score-gauge-container {
        height: 180px;
    }

    /* Brain viz shrinks */
    .brain-viz {
        height: 180px;
    }

    .decoding-ring {
        width: 150px;
        height: 150px;
    }

    /* Status bar: wrap on small screens */
    .status-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .status-indicators {
        gap: 16px;
        flex-wrap: wrap;
    }

    /* ── Content pages: shrink padding ── */
    .content-container {
        padding: 16px 16px 40px;
        max-width: 100%;
    }

    /* ── Nav bar ── */
    .main-nav {
        flex-wrap: wrap;
        gap: 10px 16px;
        margin-bottom: 24px;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    /* ── Card grids: 1 column ── */
    .card-grid {
        grid-template-columns: 1fr;
        margin-top: 20px;
        gap: 12px;
    }

    .nav-card {
        padding: 20px;
    }

    /* ── Tables: horizontal scroll ── */
    table {
        font-size: 0.8rem;
    }

    /* ── Report nav ── */
    .report-nav {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* ── Report container ── */
    .report-container {
        max-width: 100%;
        padding: 0 12px;
    }

    /* ── Headings ── */
    .report-title {
        font-size: clamp(1.4rem, 5vw, 2.5rem);
    }

    .section-title {
        font-size: 1.3rem;
    }

    /* ── Figure images ── */
    .figure-img-wrap img {
        max-width: 100% !important;
    }

    /* ── TOC panel ── */
    .toc-panel {
        display: none;
        /* Hide TOC sidebar on mobile — use scroll */
    }

    /* ── Author grid ── */
    .author-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* ── Stats grid (results page) ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Phone (≤ 600px) ── */
@media (max-width: 600px) {

    /* ── ml-demo status bar: hide non-essential indicators ── */
    .indicator:not(.connection) {
        display: none;
    }

    /* Full-width panels with reduced padding */
    .panel {
        padding: 12px;
    }

    /* Gauge smaller */
    .score-gauge-container {
        height: 140px;
    }

    /* Mini viz taller for readability */
    .mini-viz-container {
        height: 160px;
    }

    /* ── Homepage hero ── */
    .hero-title {
        font-size: clamp(1.8rem, 9vw, 3rem);
        letter-spacing: 4px;
    }

    /* Scrollytelling: full width text cards */
    .step {
        padding: 0 5%;
    }

    .step__content {
        max-width: 100%;
        padding: 24px 20px;
    }

    .step:nth-child(even) {
        justify-content: flex-start;
    }

    /* ── Nav ── */
    .nav-link {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    /* ── Report ── */
    .report-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    .author-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .report-links-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Stats grid: single column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Subsection blocks */
    .subsection-block {
        padding: 12px;
    }

    /* Figure cards full width */
    .figure-card {
        margin-left: 0;
        margin-right: 0;
    }

    /* Tables: enforce horizontal scroll */
    .report-section div[style*="overflow-x"],
    div[style*="overflow-x: auto"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Console log reduce height */
    .console-log {
        max-height: 100px;
    }

    /* Benchmark bar wider tap targets */
    .benchmark-marker .marker-label {
        font-size: 0.55rem;
    }

    /* Milestone text smaller */
    .milestone-text {
        font-size: 0.7rem;
    }

    /* Back to top button */
    .back-top {
        bottom: 16px;
        right: 12px;
        padding: 6px 10px;
        font-size: 0.6rem;
    }
}