
.history-extra-block { margin-bottom:58px; }
.history-extra-block + .history-extra-block { padding-top:10px; }
.analysis-card { background:#0d1820; border:1px solid #263842; border-radius:12px; padding:20px; }
.analysis-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:16px; }
.driver-legend, .band-legend { display:flex; flex-wrap:wrap; gap:10px 14px; color:#a7b6bc; font-size:.69rem; }
.driver-legend span:before, .band-legend span:before { content:""; display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:6px; vertical-align:-1px; }
.legend-structural:before { background:#8398a1; }
.legend-gpr:before { background:#68d7ef; }
.legend-conflict:before { background:#f0a45b; }
.legend-coelevation:before { background:#ff5a4a; }

.driver-chart-canvas { position:relative; height:330px; margin-left:36px; border-left:1px solid #263842; border-bottom:1px solid #263842; background:linear-gradient(to bottom,transparent 24.8%,#1d2d35 25%,transparent 25.2%,transparent 49.8%,#1d2d35 50%,transparent 50.2%,transparent 74.8%,#1d2d35 75%,transparent 75.2%); }
.driver-chart-canvas svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; cursor:crosshair; }
.driver-y-labels { position:absolute; left:-36px; top:0; bottom:0; width:30px; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-end; color:#9aadb4; font:600 .59rem/1 "IBM Plex Mono",monospace; }
.driver-area-structural { fill:rgba(131,152,161,.72); stroke:none; }
.driver-area-gpr { fill:rgba(104,215,239,.68); stroke:none; }
.driver-area-conflict { fill:rgba(240,164,91,.72); stroke:none; }
.driver-area-coelevation { fill:rgba(255,90,74,.68); stroke:none; }
.driver-tooltip div { display:grid; gap:3px; margin-top:7px; }
.driver-tooltip div span { display:flex; justify-content:space-between; gap:14px; color:#9db0b7; font-size:.63rem; }
.driver-tooltip div b { color:#edf3f5; font-family:"IBM Plex Mono",monospace; }

.history-analysis-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:14px; }
.analysis-card-heading h3 { color:#f2f5f7; font-size:1.05rem; margin:10px 0 6px; }
.analysis-card-heading p { color:#8da0a8; font-size:.78rem; margin:0 0 16px; }
.band-legend { margin-bottom:14px; }
.band-legend .band-background:before { background:#4d7786; }
.band-legend .band-heightened:before { background:#9b925f; }
.band-legend .band-elevated:before { background:#c6874d; }
.band-legend .band-severe:before { background:#ff5a4a; }
.band-legend .band-extreme:before { background:#d83c62; }

.band-years { display:grid; gap:6px; }
.band-year-row { display:grid; grid-template-columns:58px 1fr; gap:9px; align-items:center; }
.band-year-label { color:#9fb0b7; font:600 .61rem/1 "IBM Plex Mono",monospace; }
.band-year-bar { display:flex; height:14px; overflow:hidden; border:1px solid #2b3f48; border-radius:3px; background:#09141b; }
.band-segment { height:100%; }
.band-segment.band-background { background:#4d7786; }
.band-segment.band-heightened { background:#9b925f; }
.band-segment.band-elevated { background:#c6874d; }
.band-segment.band-severe { background:#ff5a4a; }
.band-segment.band-extreme { background:#d83c62; }

.distribution-shell { position:relative; height:260px; margin-top:18px; border-left:1px solid #263842; border-bottom:1px solid #263842; }
.distribution-bars { position:absolute; inset:0; display:grid; grid-template-columns:repeat(20,1fr); gap:3px; align-items:end; padding:0 3px; }
.distribution-bar { min-height:1px; background:linear-gradient(180deg,#8eaab5,#516f7b); border-radius:2px 2px 0 0; }
.distribution-marker { position:absolute; top:-4px; bottom:0; width:2px; background:#ff5a4a; box-shadow:0 0 9px rgba(255,90,74,.42); }
.distribution-marker span { position:absolute; top:5px; right:6px; white-space:nowrap; padding:5px 7px; border-radius:5px; background:#2c1715; color:#ff9a8f; font:700 .61rem/1 "IBM Plex Mono",monospace; }
.distribution-axis { display:flex; justify-content:space-between; margin-top:8px; color:#879ba3; font:600 .6rem/1 "IBM Plex Mono",monospace; }
.distribution-context { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-top:18px; }
.distribution-context span { padding:9px; border:1px solid #2b4049; border-radius:6px; background:#09141b; color:#879ba3; font-size:.68rem; }
.distribution-context strong { display:block; color:#eef3f5; font-size:.9rem; margin-top:3px; }

.history-explorer .chart-axis, .analysis-card .chart-axis { color:#9aadb4; }
.history-explorer .chart-axis span:nth-child(2), .analysis-card .chart-axis span:nth-child(2) { color:#93a4ab; }
.history-accessible-note { color:#93a4ab; }

@media(max-width:900px){ .history-analysis-grid{grid-template-columns:1fr;} }
@media(max-width:720px){
	.analysis-card { padding:16px; }
	.driver-chart-canvas { height:270px; margin-left:30px; }
	.driver-y-labels { left:-30px; width:25px; }
	.driver-legend { width:100%; }
	.band-year-row { grid-template-columns:50px 1fr; }
	.distribution-shell { height:220px; }
	.distribution-context { grid-template-columns:1fr 1fr; }
}

