/* ScannerScope: trends page */

.page { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.625rem, 4.5vw, 2.125rem); }
.page-head p { color: var(--text-dim); }

.trends-grid { display: grid; gap: 2rem 2.5rem; }
@media (min-width: 900px) { .trends-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel.wide { grid-column: 1 / -1; } }
.panel { min-width: 0; border-top: 2px solid var(--line-strong); padding-top: 0.7rem; }
.panel h2 { font-size: 1.1875rem; margin-bottom: 0.1rem; }
.panel .sub { color: var(--text-dim); font-size: 0.9375rem; margin-bottom: 0.7rem; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-dim); font-size: 12px; font-family: var(--font-sans); }
.chart .axis line, .chart .grid line { stroke: var(--card-border); }
.chart .bar:hover, .chart .cell:hover { stroke: #fff; stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.875rem; margin-top: 0.5rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.hbar { display: grid; grid-template-columns: minmax(0, 11rem) 1fr 2.6rem; align-items: center; gap: 0.6rem; font-size: 0.9375rem; margin-bottom: 0.35rem; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; background: var(--bg-elevated); overflow: hidden; }
.hbar-fill { height: 100%; background: var(--accent); }
.hbar-n { text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; gap: 0.6rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--card-border); font-size: 0.9375rem; }
.cmp-vals { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.delta { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: right; }
.delta.up { color: var(--urg-urgent); }
.delta.down { color: var(--accent); }
.delta.flat { color: var(--text-dim); }
.list-plain { list-style: none; display: grid; gap: 0.1rem; }
.list-plain a { display: flex; gap: 0.7rem; padding: 0.35rem 0.3rem; color: var(--text); }
.list-plain a:hover { background: var(--card-hover); text-decoration: none; }
.list-plain .when { color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 5.5rem; }
.chart-tip { position: fixed; z-index: 600; pointer-events: none; background: var(--bg-elevated); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.35rem 0.55rem; font-size: 0.875rem; max-width: 240px; }
.chart-scroll { overflow-x: auto; }
.table-view { margin-top: 0.5rem; font-size: 0.9375rem; }
.table-view summary { display: inline; cursor: pointer; }
.data-table { border-collapse: collapse; margin-top: 0.5rem; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 0.2rem 0.5rem; border-bottom: 1px solid var(--card-border); text-align: right; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.table-view > div { max-height: 300px; overflow: auto; }
