/* Layout: SOC-console — full-bleed map stage with live feed rail; selected event opens a dossier card over the map. Single dark look by design. */
#ai-threat-atlas,
#ai-threat-atlas *,
#ai-threat-atlas::before,
#ai-threat-atlas *::before,
#ai-threat-atlas::after,
#ai-threat-atlas *::after {
  box-sizing: border-box;
}
#ai-threat-atlas {
  margin: 0;
}
#ai-threat-atlas img {
  max-width: 100%;
}
#ai-threat-atlas [hidden] {
  display: none !important;
}
#ai-threat-atlas {
  color-scheme: dark;
  --ink: #060a12;
  --panel: #0c1320;
  --panel-2: #111a2b;
  --line: #1c2840;
  --land: #121c2e;
  --fg: #d9e3f2;
  --muted: #7c8ba5;
  --accent: #b9a4ff;
  --brand: #cdbbff;
  --neon: #a78bfa;
  --cyan: #5ee6f0;
  --sev-critical: #ff4d6d;
  --sev-high: #ff9f43;
  --sev-medium: #ffd166;
  --sev-low: #5ec8f2;
  --font-display: "Chakra Petch", "Bahnschrift", "Arial Narrow", sans-serif;
  --font-body:
    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:
    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
#ai-threat-atlas {
  background: var(--ink);
  color: var(--fg);
}
#ai-threat-atlas {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  padding-inline: 16px;
  padding-block: 0 48px;
  padding-top: 4rem;
}
#ai-threat-atlas,
#ai-threat-atlas * {
  box-sizing: border-box;
}
#ai-threat-atlas .wrap {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
#ai-threat-atlas a {
  color: var(--accent);
}
#ai-threat-atlas button {
  font: inherit;
  color: inherit;
}
#ai-threat-atlas:focus-visible,
#ai-threat-atlas :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#ai-threat-atlas .top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px 4px;
  border-bottom: 1px solid var(--line);
}
#ai-threat-atlas .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
#ai-threat-atlas .logo {
  display: flex;
  align-items: center;
  height: 38px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}
#ai-threat-atlas .logo img {
  height: 34px;
  width: auto;
  display: block;
}
#ai-threat-atlas .logo .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--fg);
}
#ai-threat-atlas .logo .wordmark b {
  color: var(--brand);
  font-weight: 700;
}
#ai-threat-atlas .brand h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.02em;
  margin: 0;
  text-wrap: balance;
  text-transform: uppercase;
  color: var(--brand);
  text-shadow: 0 0 18px color-mix(in srgb, var(--neon) 45%, transparent);
}
#ai-threat-atlas .brand h1 b {
  color: var(--brand);
  font-weight: 700;
}
#ai-threat-atlas .si-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
#ai-threat-atlas .brand .sub {
  color: var(--muted);
  font-size: 13px;
}
#ai-threat-atlas .controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#ai-threat-atlas .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#ai-threat-atlas .live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sev-critical);
  box-shadow: 0 0 0 0 var(--sev-critical);
  animation: ping 1.6s infinite;
}
#ai-threat-atlas .live.paused i {
  background: var(--muted);
  animation: none;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(255, 77, 109, 0);
  }
}
#ai-threat-atlas .btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
#ai-threat-atlas .btn:hover {
  border-color: var(--accent);
}
#ai-threat-atlas .demo-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sev-medium);
  border: 1px solid color-mix(in srgb, var(--sev-medium) 45%, transparent);
  border-radius: 4px;
  padding: 3px 8px;
}
#ai-threat-atlas .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
#ai-threat-atlas .stat {
  background: var(--panel);
  padding: 12px 16px;
  min-width: 0;
}
#ai-threat-atlas .stat .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#ai-threat-atlas .stat .v {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
#ai-threat-atlas .stat .v small {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
  margin-left: 4px;
}
#ai-threat-atlas .main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
#ai-threat-atlas .stage {
  position: relative;
  background:
    radial-gradient(
      ellipse at 50% 45%,
      color-mix(in srgb, var(--neon) 10%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(
        color-mix(in srgb, var(--neon) 6%, transparent) 1px,
        transparent 1px
      )
      0 0/40px 40px,
    linear-gradient(
        90deg,
        color-mix(in srgb, var(--neon) 6%, transparent) 1px,
        transparent 1px
      )
      0 0/40px 40px,
    var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
#ai-threat-atlas #map {
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 360px;
  max-width: 100%;
}
#ai-threat-atlas .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
#ai-threat-atlas .chips-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  align-self: center;
  margin-right: 4px;
}
#ai-threat-atlas .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-size: 12px;
  cursor: pointer;
}
#ai-threat-atlas .chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}
#ai-threat-atlas .chip[aria-pressed="false"] {
  opacity: 0.38;
}
#ai-threat-atlas .chip:hover {
  border-color: var(--c);
}
#ai-threat-atlas .dossier {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 290px);
  overflow: auto;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--accent));
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  z-index: 5;
}
#ai-threat-atlas .dossier header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}
#ai-threat-atlas .dossier .id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
#ai-threat-atlas .dossier h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 2px 0 0;
  line-height: 1.25;
  text-wrap: balance;
}
#ai-threat-atlas .close {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  flex: none;
}
#ai-threat-atlas .route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
#ai-threat-atlas .route .to {
  text-align: right;
}
#ai-threat-atlas .route .lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#ai-threat-atlas .route .arrow {
  color: var(--c, var(--accent));
  font-family: var(--font-mono);
}
#ai-threat-atlas dl.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0;
  font-size: 13px;
}
#ai-threat-atlas dl.kv dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-top: 2px;
}
#ai-threat-atlas dl.kv dd {
  margin: 0;
  min-width: 0;
}
#ai-threat-atlas .dossier h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
  font-weight: 500;
}
#ai-threat-atlas .dossier p {
  margin: 0;
}
#ai-threat-atlas .dossier ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}
#ai-threat-atlas .sev {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 1px 7px;
  color: var(--ink);
  background: var(--s);
}
#ai-threat-atlas .mono {
  font-family: var(--font-mono);
  font-size: 12px;
}
#ai-threat-atlas .rail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: min(760px, calc(100vh - 40px));
}
#ai-threat-atlas .rail-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
#ai-threat-atlas .rail-h h2 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}
#ai-threat-atlas .rail-h span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
#ai-threat-atlas #feed {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
}
#ai-threat-atlas #feed li button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--c);
  padding: 9px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}
#ai-threat-atlas #feed li button:hover,
#ai-threat-atlas #feed li button[aria-current="true"] {
  background: var(--panel-2);
}
#ai-threat-atlas #feed .row1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
#ai-threat-atlas #feed .cat {
  font-weight: 600;
  font-size: 13px;
}
#ai-threat-atlas #feed .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ai-threat-atlas #feed li.new button {
  animation: flash 1.2s ease-out;
}
@keyframes flash {
  from {
    background: color-mix(in srgb, var(--c) 22%, transparent);
  }
  to {
    background: transparent;
  }
}
#ai-threat-atlas .lower {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
#ai-threat-atlas .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  min-width: 0;
}
#ai-threat-atlas .card h2 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
#ai-threat-atlas .bars {
  display: grid;
  gap: 8px;
}
#ai-threat-atlas .bar {
  display: grid;
  grid-template-columns: 150px 1fr 34px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
#ai-threat-atlas .bar .t {
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
}
#ai-threat-atlas .bar .t i {
  display: block;
  height: 100%;
  background: var(--c);
  border-radius: 4px;
  transition: width 0.5s;
}
#ai-threat-atlas .bar .n {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
#ai-threat-atlas .patrol {
  position: relative;
  height: 270px;
  border-top: 1px solid var(--line);
  background: linear-gradient(
    var(--panel),
    color-mix(in srgb, var(--neon) 8%, var(--panel))
  );
  overflow: hidden;
}
#ai-threat-atlas .patrol::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--neon) 55%, transparent),
    transparent
  );
}
#ai-threat-atlas .walker {
  position: absolute;
  bottom: 14px;
  left: 40px;
  width: 100px;
  height: 168px;
  transition-property: left;
  transition-timing-function: cubic-bezier(0.45, 0.05, 0.35, 1);
  z-index: 1;
}
#ai-threat-atlas .walker-tilt {
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease-out;
  transform-origin: 50% 90%;
}
#ai-threat-atlas .walker-flip {
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
}
#ai-threat-atlas .walker.left .walker-flip {
  transform: scaleX(-1);
}
#ai-threat-atlas .walker-face {
  position: relative;
  width: 100%;
  height: 100%;
  animation: hover 2.4s ease-in-out infinite;
}
#ai-threat-atlas .walker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px rgba(80, 170, 255, 0.6));
}
#ai-threat-atlas .antenna {
  position: absolute;
  left: calc(var(--ax, 0.43) * 100%);
  top: 3.2%;
  width: 16%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #ffffff 0%,
    #f0d9ff 22%,
    #c77dff 48%,
    rgba(157, 78, 221, 0.6) 64%,
    transparent 74%
  );
  box-shadow: 0 0 8px 2px rgba(199, 125, 255, 0.6);
  opacity: 0.6;
  transition: opacity 0.25s;
  pointer-events: none;
}
#ai-threat-atlas .walker.talking .antenna {
  opacity: 1;
  animation: beacon 1.1s ease-in-out infinite;
}
@keyframes beacon {
  0%,
  100% {
    box-shadow:
      0 0 12px 4px rgba(199, 125, 255, 1),
      0 0 30px 12px rgba(157, 78, 221, 0.8),
      0 0 60px 20px rgba(157, 78, 221, 0.35);
  }
  50% {
    box-shadow:
      0 0 18px 7px rgba(224, 170, 255, 1),
      0 0 44px 18px rgba(157, 78, 221, 0.95),
      0 0 80px 28px rgba(157, 78, 221, 0.45);
  }
}
#ai-threat-atlas .walker-glow {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -8px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(80, 170, 255, 0.6),
    transparent
  );
}
#ai-threat-atlas .bubble {
  position: absolute;
  top: 84px;
  width: max-content;
  max-width: min(340px, calc(100% - 150px));
  text-align: left;
  background: var(--panel-2);
  border: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
  cursor: pointer;
  box-shadow: 0 0 18px color-mix(in srgb, var(--neon) 22%, transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
#ai-threat-atlas .bubble.show {
  opacity: 1;
}
#ai-threat-atlas .bubble.stacked::before {
  display: none;
}
#ai-threat-atlas .bubble::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 10px;
  height: 10px;
  background: var(--panel-2);
  border-left: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
}
#ai-threat-atlas .bubble.side-right::before {
  left: -6px;
  transform: rotate(45deg);
}
#ai-threat-atlas .bubble.side-left::before {
  right: -6px;
  transform: rotate(225deg);
}
#ai-threat-atlas .bubble .oncall {
  display: block;
  margin-top: 6px;
  padding: 4px 0 0 9px;
  border-left: 2px solid #c77dff;
  color: var(--brand);
  font-size: 12px;
}
#ai-threat-atlas .bubble b {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 2px;
}
#ai-threat-atlas .bubble:hover {
  border-color: var(--brand);
}
@media (max-width: 700px) {
  #ai-threat-atlas .patrol {
    height: 250px;
  }
  #ai-threat-atlas .walker {
    width: 72px;
    height: 122px;
  }
  #ai-threat-atlas .bubble {
    font-size: 12px;
    max-width: calc(100% - 100px);
    top: 96px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #ai-threat-atlas .walker {
    transition: none;
  }
  #ai-threat-atlas .walker-face,
  #ai-threat-atlas .walker.talking .antenna {
    animation: none;
  }
}
#ai-threat-atlas .patrol-label {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 12px;
  font-size: 12.5px;
  color: var(--fg);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  z-index: 0;
}
#ai-threat-atlas .patrol-label span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--neon) 70%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--neon) 18%, transparent);
}
@media (max-width: 700px) {
  #ai-threat-atlas .patrol-label {
    font-size: 11.5px;
  }
}
#ai-threat-atlas .engaged {
  border: 1px solid color-mix(in srgb, var(--neon) 55%, transparent);
  background: color-mix(in srgb, var(--neon) 9%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
#ai-threat-atlas .engaged .eh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#ai-threat-atlas .engaged .eh span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
#ai-threat-atlas .fit {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 1px 7px;
  border: 1px solid var(--f);
  color: var(--f);
}
#ai-threat-atlas .engaged ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
#ai-threat-atlas .engaged li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  font-size: 12.5px;
}
#ai-threat-atlas .engaged li b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
#ai-threat-atlas .engaged small {
  color: var(--muted);
  font-size: 11px;
}
#ai-threat-atlas .incidents {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  min-width: 0;
}
#ai-threat-atlas .inc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
#ai-threat-atlas .inc-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  color: var(--brand);
}
#ai-threat-atlas .inc-head p {
  margin: 4px 0 0;
  color: var(--muted);
  max-width: 75ch;
  font-size: 13px;
}
#ai-threat-atlas .legend {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
#ai-threat-atlas .legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#ai-threat-atlas .legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--fg);
}
#ai-threat-atlas .legend i.dia {
  transform: rotate(45deg);
}
#ai-threat-atlas .legend i.tri {
  width: 0;
  height: 0;
  background: none;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid var(--fg);
}
#ai-threat-atlas .btn[aria-pressed="false"] {
  opacity: 0.6;
}
#ai-threat-atlas .inc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#ai-threat-atlas .inc-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
#ai-threat-atlas .inc-tabs button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--neon) 25%, transparent);
  border-color: var(--accent);
  color: var(--fg);
}
#ai-threat-atlas .inc-tabs b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
#ai-threat-atlas .inc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 2px;
}
#ai-threat-atlas .inc-card {
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
#ai-threat-atlas .inc-card:hover,
#ai-threat-atlas .inc-card[aria-current="true"] {
  border-color: var(--accent);
  border-left-color: var(--c);
}
#ai-threat-atlas .inc-card .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
#ai-threat-atlas .inc-card .ttl {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.35;
}
#ai-threat-atlas .inc-card .row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
#ai-threat-atlas .confirmed-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--brand);
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 4px;
}
#ai-threat-atlas .blueprint {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: grid;
  gap: 16px;
}
#ai-threat-atlas .blueprint > h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#ai-threat-atlas .blueprint > p {
  color: var(--muted);
  max-width: 70ch;
  margin: 0;
}
#ai-threat-atlas .bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
#ai-threat-atlas .bp-grid ol,
#ai-threat-atlas .bp-grid ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
#ai-threat-atlas .bp-grid li b {
  color: var(--fg);
}
#ai-threat-atlas .bp-grid li {
  color: var(--muted);
}
#ai-threat-atlas pre {
  margin: 0;
  overflow-x: auto;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg);
}
#ai-threat-atlas .bot-launch {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 18px color-mix(in srgb, var(--neon) 35%, transparent);
}
#ai-threat-atlas .bot-launch img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--panel-2);
}
#ai-threat-atlas .bot-launch:hover {
  border-color: var(--brand);
}
#ai-threat-atlas .bot {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 92px;
  z-index: 4;
  pointer-events: none;
  transition:
    left 1.6s cubic-bezier(0.45, 0.05, 0.3, 1),
    top 1.6s cubic-bezier(0.45, 0.05, 0.3, 1);
}
#ai-threat-atlas .bot.no-anim,
#ai-threat-atlas .bot.no-anim .bot-body {
  transition: none;
}
#ai-threat-atlas .bot-body {
  width: 54px;
  height: 92px;
  transition: transform 0.5s ease-out;
  transform-origin: 50% 85%;
  filter: drop-shadow(0 0 10px rgba(80, 170, 255, 0.75));
}
#ai-threat-atlas .bot-hover {
  animation: hover 2.4s ease-in-out infinite;
}
@keyframes hover {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
#ai-threat-atlas .bot-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#ai-threat-atlas .bot-shadow {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(80, 170, 255, 0.55),
    transparent
  );
}
#ai-threat-atlas .cls {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 1px 7px;
  border: 1px solid var(--k);
  color: var(--k);
}
#ai-threat-atlas .agent-h img,
#ai-threat-atlas .bot-launch img {
  object-position: 50% 20%;
}
#ai-threat-atlas .agent {
  position: absolute;
  left: 12px;
  top: 12px;
  width: min(360px, calc(100% - 24px));
  max-height: calc(100% - 300px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--neon) 55%, transparent);
  border-radius: 12px;
  box-shadow: 0 0 28px color-mix(in srgb, var(--neon) 25%, transparent);
  overflow: hidden;
}
#ai-threat-atlas .agent-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
#ai-threat-atlas .agent-h img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
#ai-threat-atlas .agent-h .who {
  flex: 1;
  min-width: 0;
}
#ai-threat-atlas .agent-h .who b {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--brand);
}
#ai-threat-atlas .agent-h .who span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ai-threat-atlas .agent-log {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 120px;
}
#ai-threat-atlas .msg {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-width: 92%;
  min-width: 0;
  overflow-wrap: anywhere;
}
#ai-threat-atlas .msg.bot-m {
  background: var(--panel-2);
  border: 1px solid var(--line);
  justify-self: start;
}
#ai-threat-atlas .msg.me {
  background: color-mix(in srgb, var(--neon) 22%, var(--panel));
  justify-self: end;
}
#ai-threat-atlas .msg.note {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  justify-self: center;
  text-align: center;
}
#ai-threat-atlas .suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
}
#ai-threat-atlas .suggest button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
#ai-threat-atlas .suggest button:hover {
  border-color: var(--accent);
}
#ai-threat-atlas .agent form {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
#ai-threat-atlas .agent input {
  flex: 1;
  min-width: 0;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
#ai-threat-atlas .agent input:focus {
  outline: none;
  border-color: var(--accent);
}
#ai-threat-atlas .send {
  background: var(--accent);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
}
#ai-threat-atlas .ask-agent {
  justify-self: start;
  background: none;
  border: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
  color: var(--brand);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
}
@media (max-width: 860px) {
  #ai-threat-atlas .agent {
    position: static;
    width: auto;
    max-height: 420px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    backdrop-filter: none;
  }
}
@media (max-width: 980px) {
  #ai-threat-atlas .main {
    grid-template-columns: minmax(0, 1fr);
  }
  #ai-threat-atlas .rail {
    max-height: 420px;
  }
}
@media (max-width: 700px) {
  #ai-threat-atlas #map {
    aspect-ratio: 4/3;
    min-height: 300px;
  }
  #ai-threat-atlas .dossier {
    position: static;
    width: auto;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    backdrop-filter: none;
    background: var(--panel);
  }
  #ai-threat-atlas .bar {
    grid-template-columns: 110px 1fr 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #ai-threat-atlas .live i,
  #ai-threat-atlas #feed li.new button,
  #ai-threat-atlas .bot-hover {
    animation: none;
  }
  #ai-threat-atlas .bot {
    transition: none;
  }
}
