/* CLIEAIR Burn-Through Timeline */

#timeline-viz.tl-host {
  margin: 2rem auto;
  max-width: 56rem;
  padding: 1.25rem 1.25rem 1rem;
  background: rgba(13, 27, 42, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 12px;
}

.tl-head { margin-bottom: 0.75rem; border-bottom: 1px solid rgba(201,162,39,0.18); padding-bottom: 0.55rem; }
.tl-title { margin: 0 0 0.25rem; font-size: 1.35rem; color: #f0e6d2; font-weight: 600; }
.tl-sub   { margin: 0; font-size: 0.9rem; color: #a9b6cb; font-style: italic; line-height: 1.5; }

.tl-host svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.5rem;
}

/* Pins */
.tl-pin {
  cursor: pointer;
  transition: transform 160ms ease;
  transform-origin: center;
  transform-box: fill-box;
}
.tl-pin:hover  { transform: scale(1.18); }
.tl-pin:focus  { outline: none; }
.tl-pin:focus circle:nth-of-type(2) { stroke: #f0e6d2; stroke-width: 2.5; }

@media (prefers-reduced-motion: reduce) {
  .tl-pin { transition: none; }
  .tl-pin:hover { transform: none; }
}

/* Legend */
.tl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.tl-legend__chip {
  font-size: 0.78rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.3);
  background: rgba(201,162,39,0.05);
  color: #c9a227;
  font-family: ui-monospace, SFMono-Regular, "Menlo", monospace;
}
.tl-legend__chip--evidence { color: #6c7a90; border-color: rgba(108,122,144,0.4); }
.tl-legend__chip--timing   { color: #c9a227; }
.tl-legend__chip--finding  { color: #d97a3a; border-color: rgba(217,122,58,0.4); }

/* Empty + error states */
.tl-empty {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: #a9b6cb;
}
.tl-empty__hint {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #758496;
}
.tl-stub {
  padding: 1rem;
  text-align: center;
  color: #a9b6cb;
  font-style: italic;
}
.tl-stub--err { color: #c9a227; }

/* Drawer */
.tl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9990;
}

.tl-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(28rem, 92vw);
  background: #0d1b2a;
  border-left: 1px solid rgba(201,162,39,0.35);
  box-shadow: -8px 0 24px rgba(0,0,0,0.4);
  z-index: 9999;
  overflow-y: auto;
}

@media (max-width: 600px) {
  .tl-drawer {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-left: 0;
    border-top: 1px solid rgba(201,162,39,0.35);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
}

.tl-drawer__inner { padding: 1.15rem 1.25rem 1.5rem; color: #f0e6d2; }

.tl-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(201,162,39,0.18);
  padding-bottom: 0.6rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.tl-drawer__kind {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c9a227;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.tl-drawer__kind--evidence    { color: #a9b6cb; border-color: rgba(169,182,203,0.35); }
.tl-drawer__kind--timing_flag { color: #c9a227; }
.tl-drawer__kind--finding     { color: #d97a3a; border-color: rgba(217,122,58,0.4); }

.tl-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  color: #f0e6d2;
  flex: 1 1 100%;
}

.tl-drawer__close {
  background: transparent;
  color: #c9a227;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.tl-drawer__close:focus { outline: 2px solid #c9a227; }

.tl-drawer__body { display: flex; flex-direction: column; gap: 0.7rem; font-size: 0.92rem; line-height: 1.55; color: #d9d3c4; }

.tl-drawer__ts        { margin: 0; color: #a9b6cb; }
.tl-drawer__ts-label  { color: #8a9bb0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tl-drawer__ts em     { color: #c9a227; font-style: italic; }

.tl-drawer__forensics {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.tl-drawer__forensics h4 { margin: 0 0 0.35rem; color: #c9a227; font-size: 0.85rem; }
.tl-drawer__forensics p  { margin: 0 0 0.35rem; font-size: 0.88rem; color: #d9d3c4; }
.tl-drawer__forensics p:last-child { margin-bottom: 0; }
.tl-drawer__forensics strong { color: #f0e6d2; }
.tl-drawer__warn { color: #d4a04a; }
.tl-drawer__map-link {
  color: #a9d6ff;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(169,214,255,0.4);
}
.tl-drawer__map-link:hover { border-bottom-style: solid; }

.tl-drawer__statute,
.tl-drawer__rule {
  font-family: ui-monospace, SFMono-Regular, "Menlo", monospace;
  background: rgba(0,0,0,0.25);
  color: #c9a227;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.tl-drawer__ts-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: #a9b6cb;
}

.tl-drawer__cites, .tl-drawer__sources { display: flex; flex-direction: column; gap: 0.3rem; }
.tl-drawer__cite {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: #c9a227;
  background: rgba(201,162,39,0.06);
  border: 1px solid rgba(201,162,39,0.22);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}
.tl-drawer__src {
  font-size: 0.85rem;
  color: #a9d6ff;
  background: rgba(20,38,58,0.5);
  border: 1px solid rgba(120,160,200,0.3);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}
.tl-drawer__src:hover { background: rgba(40,60,90,0.6); }

.tl-drawer__disclaimer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #758496;
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 0.5rem;
}
