/* Kairoscope chart styles (used by landing preview + dashboard) */
.kchart { position: relative; width: 100%; border-radius: 12px; outline-offset: 4px; }
.kchart svg { display: block; overflow: visible; }
.kc-grid { stroke: rgba(140, 160, 255, 0.12); stroke-width: 1; stroke-dasharray: 2 5; }
.kc-axis { fill: #8d9bcb; font-size: 11.5px; font-family: var(--font); }
.kc-cross { stroke: rgba(190, 205, 255, 0.5); stroke-width: 1; }
.kc-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: kc-draw 1s ease-out forwards; }
.kc-area { opacity: 0; animation: kc-fade 0.9s 0.2s ease-out forwards; }
.kc-bar { transform-box: fill-box; transform-origin: bottom; animation: kc-grow 0.7s ease-out both; transition: opacity 0.15s; }
.kc-bar.dim { opacity: 0.35; }
@keyframes kc-draw { to { stroke-dashoffset: 0; } }
@keyframes kc-fade { to { opacity: 1; } }
@keyframes kc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.kc-tip {
  position: absolute; top: 10px; left: 0; z-index: 5; min-width: 150px; pointer-events: none;
  padding: 10px 12px; border-radius: 12px; font-size: 0.82rem; line-height: 1.5;
  background: rgba(8, 16, 43, 0.96); border: 1px solid var(--line-strong); box-shadow: 0 14px 40px -14px #000;
  opacity: 0; transition: opacity 0.12s;
}
.kc-tip.show { opacity: 1; }
.kc-tip strong { display: block; margin-bottom: 4px; color: #fff; font-size: 0.82rem; }
.kc-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.kc-row i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kc-row b { margin-left: auto; padding-left: 14px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Donut */
.kdonut { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: center; }
.kdonut-chart { position: relative; width: 190px; height: 190px; }
.kdonut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 44px; pointer-events: none; }
.kdonut-center strong { font-size: 1.45rem; letter-spacing: -0.02em; }
.kdonut-center span { font-size: 0.74rem; color: var(--muted); line-height: 1.25; }
.kd-arc { transition: opacity 0.2s, stroke-width 0.2s; cursor: pointer; }
.kd-arc.dim { opacity: 0.28; }
.kdonut-legend li {
  display: grid; grid-template-columns: 10px 1fr auto 52px; gap: 10px; align-items: center;
  padding: 7px 10px; border-radius: 10px; font-size: 0.88rem; color: var(--muted); transition: background 0.15s;
}
.kdonut-legend li.on, .kdonut-legend li:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.kdonut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.kdonut-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.kdonut-legend em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .kdonut { grid-template-columns: 1fr; justify-items: center; } .kdonut-legend { width: 100%; } }

/* Re-renders caused by resizing must not replay the draw-in animation */
.kc-noanim .kc-line, .kc-noanim .kc-area, .kc-noanim .kc-bar { animation: none; stroke-dashoffset: 0; opacity: 1; transform: none; }
.kc-noanim .kc-bar.dim { opacity: 0.35; }

@container (max-width: 440px) { .kdonut { grid-template-columns: 1fr; justify-items: center; } .kdonut-legend { width: 100%; } }
.donut-panel { container-type: inline-size; }
