.il-hero {
    padding-block: 2.5rem 2rem;
}

.il-hero-links {
    margin-top: 1rem;
}

.il-demo {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-block: 1.25rem 3.5rem;
}

.il-card {
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.il-card h2 {
    margin: 0.25rem 0 0;
    font-size: 1.12rem;
    overflow-wrap: anywhere;
}

.il-card-header > div {
    min-width: 0;
    max-width: 100%;
}

.il-archive-section {
    border-color: rgba(16, 185, 129, 0.42);
}

.il-synthetic-section {
    border-color: rgba(245, 158, 11, 0.35);
}

.il-tag-historical {
    color: #6ee7b7;
}

.il-tag-synthetic {
    color: #fcd34d;
}

.il-hist-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.il-hist-select-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    max-width: 100%;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.il-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
}

.il-hist-workspace {
    margin-top: 0.85rem;
}

.il-hist-table-wrap {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

#il-hist-svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 820 / 260;
}

.il-hist-bar {
    fill: rgba(16, 185, 129, 0.35);
    stroke: #10b981;
    stroke-width: 1.5;
}

.il-hist-thresh {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.il-top-row,
.il-card-header,
.il-playback-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.il-card-header {
    margin-bottom: 0.75rem;
}

.il-playback-bar {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.il-presets,
.il-playback-btns,
.il-update-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.il-presets button,
.il-update-pills button {
    padding: 0.4rem 0.72rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-soft);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.il-presets button.is-selected,
.il-update-pills button.is-selected {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-cyan);
    color: #fff;
}

.il-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--text-soft);
    cursor: pointer;
}

.il-toggle input {
    accent-color: var(--accent);
}

.il-muted {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.il-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
    gap: 1rem;
    align-items: start;
}

.il-svg-wrap {
    background: #060c19;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

#il-svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 820 / 340;
}

.il-grid { stroke: rgba(148, 163, 184, 0.14); stroke-width: 1; }
.il-axis-text { fill: #94a3b8; font-family: var(--font-mono); font-size: 11px; }
.il-now-line { stroke: rgba(148, 163, 184, 0.5); stroke-width: 1.5; }
.il-thresh-line { stroke: #ef4444; stroke-width: 1.4; stroke-dasharray: 5 5; opacity: 0.8; }
.il-obs-line { fill: none; stroke: #cbd5e1; stroke-width: 2.5; }
.il-pers-line { fill: none; stroke: #f59e0b; stroke-width: 2; stroke-dasharray: 6 4; }
.il-band-poly { fill: rgba(56, 189, 248, 0.15); stroke: rgba(56, 189, 248, 0.35); stroke-width: 1; }
.il-rnn-line { fill: none; stroke: #38bdf8; stroke-width: 3; }
.il-rnn-line.is-fallback { stroke: #f59e0b; stroke-dasharray: 7 4; }
.il-real-line { fill: none; stroke: #10b981; stroke-width: 2.5; stroke-dasharray: 3 3; }
.il-hover-dot { fill: #38bdf8; stroke: #fff; stroke-width: 2; }
.il-hover-dot.is-fallback { fill: #f59e0b; }
.il-step-hit { fill: transparent; cursor: pointer; }

.il-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    margin-top: 0.65rem;
    font-size: 0.82rem;
    color: var(--text-soft);
}

.il-line-swatch {
    display: inline-block;
    width: 14px;
    height: 3px;
    margin-inline-end: 0.35rem;
    vertical-align: middle;
}

.il-sw-obs { background: #cbd5e1; }
.il-sw-rnn { background: #38bdf8; }
.il-sw-rnn.is-fallback { background: #f59e0b; }
.il-sw-band { background: rgba(56, 189, 248, 0.45); height: 8px; }
.il-sw-pers { background: #f59e0b; }
.il-sw-real { background: #10b981; }
.il-sw-thresh { background: #ef4444; }

.il-step-readout {
    margin: 0.6rem 0 0;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-cyan);
    overflow-wrap: anywhere;
}

.il-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.75rem 0 0;
}

.il-metric-box {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.il-metric-box dt { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.il-metric-box dd { margin: 0; font-family: var(--font-mono); font-size: 0.96rem; font-weight: 700; }

.il-context-box {
    margin-top: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.il-context-box p {
    margin: 0.45rem 0 0;
    font-size: 0.87rem;
}

.il-safety-note {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    font-size: 0.83rem;
    color: var(--text-soft);
}

.il-table-wrap { max-width: 100%; overflow-x: auto; }

.il-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.il-table th,
.il-table td {
    padding: 0.48rem 0.65rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.il-table tbody tr {
    cursor: pointer;
}

.il-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

.il-table tbody tr.is-active-row {
    background: rgba(16, 185, 129, 0.14);
}

.status-chip-fallback {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fcd34d;
}

@media (max-width: 960px) {
    .il-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
}
