.analysis-main { padding-top: 1.35rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.15rem; }
.summary-grid > div { padding: .95rem 1.1rem; border-radius: .65rem; background: #e9eee4; }
.summary-grid dt { color: #405949; font-size: .8rem; font-weight: 600; }
.summary-grid dd { margin-top: .32rem; }
.summary-grid dd strong { display: block; font-size: clamp(1rem, 2.1vw, 1.42rem); line-height: 1.3; overflow-wrap: anywhere; }
.summary-grid dd span { display: block; color: #405949; font-size: .81rem; margin-top: .35rem; }
.chart-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .95rem; }
.chart-card { grid-column: span 6; min-width: 0; padding: 1.15rem 1.25rem 1.25rem; border: 1px solid #d9e0d4; border-radius: .85rem; background: #fffdf7; }
.chart-card h2 { margin: 0 0 .35rem; font-size: 1.42rem; }
.chart-genres, .chart-timeline { grid-column: span 7; }
.chart-languages, .chart-eras { grid-column: span 5; }
.chart-heatmap { grid-column: 1 / -1; }
.chart-detail, .chart-empty { color: var(--muted); font-size: .84rem; line-height: 1.55; }
.chart-empty { padding: 1rem 0 .3rem; }
.rank-chart, .legend, .era-chart { list-style: none; margin: 0; padding: 0; }
.rank-chart { display: grid; gap: .65rem; margin-top: .88rem; }
.rank-label { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; font-size: .86rem; }
.rank-label span { overflow-wrap: anywhere; }
.rank-label strong, .legend strong { font-variant-numeric: tabular-nums; }
.rank-track { height: .42rem; margin-top: .23rem; border-radius: 1rem; background: #eef0e8; overflow: hidden; }
.rank-track span { display: block; width: var(--bar-size); height: 100%; border-radius: inherit; background: #5d8a70; }
.chart-artists .rank-track span { background: #588098; }
.chart-versions .rank-track span { background: #bd8058; }
.donut { display: grid; place-items: center; margin: 1rem 0; }
.donut-ring { display: grid; place-items: center; width: min(100%, 10.5rem); aspect-ratio: 1; border-radius: 50%; background: var(--ring); }
.donut-ring span { display: grid; align-content: center; justify-items: center; width: 72%; height: 72%; border-radius: 50%; background: #fffdf7; color: var(--muted); font-size: .76rem; }
.donut-ring strong { color: var(--ink); font: 1.85rem/1.1 Georgia, serif; font-variant-numeric: tabular-nums; }
.legend { display: grid; gap: .45rem; }
.legend li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 3.2rem; gap: .48rem; align-items: center; font-size: .83rem; }
.legend i { width: .68rem; height: .68rem; border-radius: .21rem; background: var(--swatch); }
.legend-percent { color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.chart-scroll { overflow-x: auto; }
.chart-scroll:focus-visible { outline: 2px solid #52745e; outline-offset: 2px; }
.era-chart { display: flex; justify-content: space-around; gap: .45rem; min-width: max-content; padding: .95rem .1rem .25rem; }
.era-chart li { display: grid; justify-items: center; min-width: 2.25rem; }
.era-column { position: relative; display: grid; justify-items: center; align-items: end; width: 100%; height: 8rem; margin-top: 1.3rem; }
.era-fill { width: clamp(1rem, 3.2vw, 2.1rem); height: var(--bar-size); min-height: 2px; border-radius: .28rem .28rem 0 0; background: #6e9782; }
.era-count { position: absolute; bottom: calc(var(--bar-size) + .2rem); color: var(--ink); font-size: .72rem; font-variant-numeric: tabular-nums; }
.era-label { color: var(--muted); padding-top: .38rem; font-size: .68rem; white-space: nowrap; }
.timeline { margin: .7rem 0 0; }
.timeline-chart { display: block; width: 100%; height: clamp(9rem, 22vw, 13.5rem); }
.timeline-focus { min-height: 1.3rem; padding: .12rem 0 .32rem; color: #405949; font-size: .81rem; font-variant-numeric: tabular-nums; }
.timeline details summary { border-top: 1px solid #e2e6da; padding: .55rem .15rem .35rem; min-height: 2rem; font-size: .81rem; color: #405949; }
.timeline-table { width: 100%; border-collapse: collapse; font-size: .8rem; text-align: start; }
.timeline-table :is(th, td) { padding: .36rem .42rem; text-align: start; border-bottom: 1px solid #e2e6da; }
.timeline-table tbody th { font-weight: 450; }
.heatmap { width: 100%; min-width: 29rem; margin-top: .58rem; border-collapse: separate; border-spacing: .26rem; }
.heatmap :is(th, td) { padding: .57rem .4rem; text-align: center; font-size: .81rem; }
.heatmap th { font-weight: 600; }
.heatmap tbody th, .heatmap thead th:first-child { text-align: start; }
.heatmap td { width: 16%; border-radius: .3rem; background: var(--heat); font-variant-numeric: tabular-nums; }
.heatmap .heat-dark { color: #fffefa; }
@media (max-width: 52rem) {
  .chart-card { grid-column: span 6; }
  .chart-heatmap { grid-column: 1 / -1; }
}
@media (max-width: 42rem) {
  .summary-grid { gap: .42rem; }
  .summary-grid > div { padding: .62rem .55rem; }
  .summary-grid dt, .summary-grid dd span { font-size: .72rem; }
  .chart-card { grid-column: 1 / -1; padding: 1rem .85rem; }
  .chart-grid { gap: .7rem; }
  .heatmap { min-width: 0; table-layout: fixed; border-spacing: .2rem; }
  .heatmap :is(th, td) { padding: .42rem .18rem; font-size: .69rem; overflow-wrap: anywhere; }
}
