/* Building renderer (skyline.js). Keyframes are prefixed: styles.css already owns `pulse` and `shimmer`. */
@keyframes viz-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes viz-shimmer { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes viz-pop { from { opacity: .55; } to { opacity: 1; } }

.viz svg { width: 100%; height: auto; display: block; }
.viz .viz-pulse { animation: viz-pulse 1.6s ease-in-out infinite; }
.viz .viz-shim { animation: viz-shimmer 2.4s ease-in-out infinite; }
.viz .viz-raised { animation: viz-pop .18s ease-out; }
.viz .viz-hit { outline: none; }
.viz .viz-hit:focus-visible { stroke: #c3c2b7; stroke-width: 1.5px; }

/* Tower panel under the portfolio skyline (filled by skyline.js from text nodes). */
.tower-panel { min-height: 9rem; }
.tower-panel:empty { display: none; }
.tp-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tp-title { font-size: 15px; font-weight: 500; color: var(--text); }
.tp-sub { font-size: 12px; color: var(--text-2); }
.tp-right { text-align: right; }
.tp-pct { font-size: 22px; font-weight: 500; color: var(--text); }
.tp-status { font-size: 12px; }
.tp-status.is-behind { color: var(--danger); }
.tp-status.is-ok { color: var(--success); }
.tp-bar { display: flex; gap: 2px; margin-bottom: 8px; }
.tp-seg { height: 10px; border-radius: 2px; min-width: 2px; }
.tp-seg.is-rest { background: #888780; opacity: .3; }
.tp-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); }
.tp-key { display: inline-flex; align-items: center; gap: 4px; }
.tp-swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.tp-note { color: var(--muted); }
.tp-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.tp-chip { font: inherit; font-size: 12px; color: var(--text-2); background: transparent; border: 0.5px solid var(--border-strong);
  border-radius: 8px; padding: 6px 10px; min-height: 32px; cursor: pointer; text-align: left; }
.tp-chip:hover { background: var(--surface-2); }
.tp-chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tp-chip.is-more { color: var(--muted); }
.tp-open { font: inherit; font-size: 13px; color: var(--text); background: transparent; border: 0.5px solid var(--border-strong);
  border-radius: 8px; padding: 8px 12px; min-height: 36px; cursor: pointer; margin-top: 10px; }
.tp-open:hover { background: var(--surface-2); }
/* Touch screens: buttons at least 44 px tall, and Open spans the panel. */
@media (hover: none) {
  .tp-chip, .tp-open { min-height: 44px; }
  .tp-open { width: 100%; }
}

/* The panel hint names the gesture of the device: a pointer, or a finger when there is no hover. */
.hint-touch { display: none; }
@media (hover: none) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}

/* On narrow screens the skyline scrolls sideways instead of shrinking its labels to nothing. */
@media (max-width: 700px) {
  .viz { overflow-x: auto; }
  .viz svg { min-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  .viz * { animation: none !important; transition: none !important; }
}
