/* SecSight UI - void black + crisp white, monospace terminal aesthetic */

/* Tokens */
:root {
  /* backgrounds */
  --bg: #020202;
  --s0: #070707;
  --s1: #0d0d0d;
  --s2: #131313;
  --s3: #191919;
  --s4: #1f1f1f;

  /* borders */
  --b1: rgba(255, 255, 255, .05);
  --b2: rgba(255, 255, 255, .10);
  --b3: rgba(255, 255, 255, .18);
  --b4: rgba(255, 255, 255, .32);
  --b5: rgba(255, 255, 255, .55);

  /* text - BRIGHT */
  --t1: #f2f2f2;
  /* primary */
  --t2: #c8c8c8;
  /* secondary  (was #999) */
  --t3: #8a8a8a;
  /* muted      (was #555) */
  --t4: #505050;
  /* very muted (was #2e2e2e) */

  /* Accent. Referenced by the login page, error page, resources eyebrow and
     landing hero, but it was never actually declared - so every one of those
     fell back to a hardcoded #3b82f6 blue (or to inherited colour where no
     fallback was given). On a monochrome theme that read as a bug. Declaring
     it here fixes all of them at once; it matches .btn-solid, which is white
     on black. */
  --accent: #f2f2f2;

  /* verdict colours */
  --c-danger: #ff5a5a;
  --c-warn: #ffaa44;
  --c-low: #ffd060;
  --c-ok: #6ee89a;
  --c-info: #7dcfff;

  /* glow helpers */
  --glow-xs: 0 0 6px rgba(255, 255, 255, .06);
  --glow-sm: 0 0 14px rgba(255, 255, 255, .10);
  --glow-md: 0 0 28px rgba(255, 255, 255, .12);

  /* radii */
  --r1: 5px;
  --r2: 9px;
  --r3: 13px;
  --r4: 24px;

  /* easing */
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* layout */
  --topbar: 60px;
  --sbar: 318px;

  /* fonts */
  --f-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button,
input,
textarea {
  font: inherit;
}

ul {
  list-style: none;
}

/* Base */
/* Text scale. Nearly every size below is in rem, so scaling the root element
   scales the whole UI proportionally instead of leaving fixed-px labels behind.
   base.html sets --font-scale from each user's Settings choice. */
html {
  height: 100%;
  font-size: calc(16px * var(--font-scale, 1.1));
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--f-ui);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 0%, transparent 100%);
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, .025) 0%, transparent 70%);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--b3);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--b4);
}

/* Loading bar */
.load-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, transparent 0%, #fff 50%, transparent 100%);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

.load-bar.loading {
  opacity: 1;
  animation: bar-run 1.6s var(--ease) infinite;
}

@keyframes bar-run {
  0% {
    width: 0%;
    left: 0;
  }

  50% {
    width: 60%;
    left: 20%;
  }

  100% {
    width: 0%;
    left: 100%;
  }
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  background: rgba(2, 2, 2, .9);
  border-bottom: 1px solid var(--b2);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.topbar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .45));
  animation: logo-pulse 4s ease-in-out infinite;
}

.logo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  animation: ring-turn 14s linear infinite;
  pointer-events: none;
}

@keyframes logo-pulse {

  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, .35));
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, .65));
  }
}

@keyframes ring-turn {
  to {
    transform: rotate(360deg);
  }
}

.brand-name {
  display: block;
  font-family: var(--f-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--t1);
  line-height: 1;
}

.brand-tag {
  display: block;
  font-size: .66rem;
  color: var(--t3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-chips {
  display: flex;
  gap: 7px;
  flex: 1;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r4);
  font-family: var(--f-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .7px;
  text-transform: uppercase;
  user-select: none;
  transition: all .2s var(--ease);
}

.chip-on {
  border: 1px solid var(--b3);
  background: var(--b1);
  color: var(--t1);
}

.chip-off {
  border: 1px solid var(--b1);
  background: transparent;
  color: var(--t4);
}

.chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-on .chip-dot {
  background: #fff;
  box-shadow: 0 0 7px rgba(255, 255, 255, .85);
  animation: dot-beat 2.2s ease-in-out infinite;
}

.chip-off .chip-dot {
  background: var(--t4);
}

@keyframes dot-beat {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 5px rgba(255, 255, 255, .7);
  }

  50% {
    opacity: .4;
    box-shadow: 0 0 2px rgba(255, 255, 255, .2);
  }
}

.topbar-end {
  flex-shrink: 0;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--r2);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .25px;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all .18s var(--ease);
  white-space: nowrap;
}

.btn-outline {
  background: var(--b1);
  border: 1px solid var(--b3);
  color: var(--t1);
}

.btn-outline:hover {
  background: var(--b2);
  border-color: var(--b4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 15px rgba(255, 255, 255, .08);
}

.btn-solid {
  background: var(--t1);
  color: #000;
  border: 1px solid var(--t1);
  padding: 7px 13px;
  font-size: .75rem;
  flex-shrink: 0;
}

.btn-solid:hover {
  background: #ddd;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 18px rgba(255, 255, 255, .25);
}

.btn-solid:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* FLASH */
.flash-stack {
  position: relative;
  z-index: 50;
  padding: 8px 22px 0;
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: var(--r2);
  border: 1px solid var(--b2);
  background: var(--s2);
  margin-bottom: 7px;
  font-size: .84rem;
  animation: slide-in .22s var(--ease);
}

.flash-warning {
  border-color: rgba(255, 255, 255, .28);
}

.flash-error {
  border-color: rgba(255, 255, 255, .48);
}

.flash-info {
  border-color: var(--b2);
}

.flash-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--f-mono);
  line-height: 1;
}

.flash-ico-warning {
  background: rgba(255, 170, 68, .18);
  color: #ffaa44;
  border: 1px solid rgba(255, 170, 68, .35);
}
.flash-ico-warning::before { content: '!'; }

.flash-ico-error {
  background: rgba(255, 90, 90, .18);
  color: #ff5a5a;
  border: 1px solid rgba(255, 90, 90, .35);
}
.flash-ico-error::before { content: '\00d7'; }

.flash-ico-info,
.flash-ico-success {
  background: rgba(125, 207, 255, .12);
  color: #7dcfff;
  border: 1px solid rgba(125, 207, 255, .25);
}
.flash-ico-info::before,
.flash-ico-success::before { content: 'i'; }

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* LAYOUT */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sbar) 1fr;
  height: calc(100vh - var(--topbar));
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  border-right: 1px solid var(--b2);
  background: rgba(5, 5, 5, .8);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 28px;
  display: flex;
  flex-direction: column;
}

/* Hero card */
.hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  background: linear-gradient(145deg, var(--s3) 0%, var(--s1) 100%);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.05);
  border-color: var(--b3);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, .05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-orb {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
}

.orb-r1 {
  inset: -4px;
  animation: ring-turn 18s linear infinite;
}

.orb-r2 {
  inset: -10px;
  border-color: rgba(255, 255, 255, .04);
  animation: ring-turn 32s linear reverse infinite;
}

.hero-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, .35));
}

.hero-title {
  font-family: var(--f-mono);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--t1);
  line-height: 1.2;
}

.hero-sub {
  font-size: .65rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-top: 4px;
}

/* Sidebar blocks */
.sidebar-block {
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--b1);
}

.sidebar-block-last {
  border-bottom: none;
}

.block-label {
  font-family: var(--f-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t3);
  padding: 12px 2px 8px;
}

/* Session history */
.block-label-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--f-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t3);
  padding: 12px 2px 8px;
  cursor: pointer;
  transition: color .15s;
}

.block-label-btn:hover {
  color: var(--t2);
}

.hist-count {
  background: var(--b2);
  border: 1px solid var(--b2);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: .58rem;
  color: var(--t2);
  min-width: 20px;
  text-align: center;
}

.hist-chevron {
  margin-left: auto;
  transition: transform .2s var(--ease);
}

.block-label-btn.hist-open .hist-chevron,
.block-label-btn[aria-expanded="true"] .block-chevron {
  transform: rotate(180deg);
}

/* Generic collapsible sidebar block */
.block-chevron {
  margin-left: auto;
  transition: transform .2s var(--ease);
}

.sidebar-block.is-collapsed > *:not(.block-label-btn) {
  display: none;
}

.sidebar-block.is-collapsed {
  padding-bottom: 0;
}

.block-label-btn:focus-visible {
  outline: 1px solid var(--t3);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Pivot suggestion chips (auto-generated next steps) */
.pivot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0 18px;
  padding-top: 8px;
  border-top: 1px dashed var(--b2);
}

.pivot-label {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t3);
  margin-right: 2px;
}

.pivot-chip {
  font-family: var(--f-mono);
  font-size: .68rem;
  color: var(--t2);
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: 14px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  max-width: 100%;
  text-align: left;
  line-height: 1.35;
}

.pivot-chip:hover {
  background: var(--b2);
  border-color: var(--t3);
  color: var(--t1);
}

.pivot-chip:focus-visible {
  outline: 1px solid var(--t3);
  outline-offset: 2px;
}

/* Streaming caret on the in-progress assistant bubble */
.msg-body.is-streaming::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: caret-blink .9s steps(2) infinite;
  color: var(--t3);
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
  animation: reveal .18s var(--ease);
}

.hist-list[hidden] {
  display: none;
}

.hist-item {
  display: flex;
  align-items: stretch;
  gap: 2px;
  border-radius: var(--r2);
  overflow: hidden;
}

.hist-item:hover {
  background: var(--b1);
}

.hist-active {
  background: var(--b1);
}

.hist-load-form {
  flex: 1;
  min-width: 0;
}

.hist-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
  border-radius: var(--r2);
  transition: all .14s;
}

.hist-btn:hover {
  background: var(--b1);
}

.hist-active .hist-btn {
  background: var(--b2);
}

.hist-icon {
  color: var(--t4);
  flex-shrink: 0;
}

.hist-active .hist-icon {
  color: var(--t3);
}

.hist-title {
  flex: 1;
  min-width: 0;
  font-size: .74rem;
  color: var(--t2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-active .hist-title {
  color: var(--t1);
}

.hist-meta {
  font-family: var(--f-mono);
  font-size: .58rem;
  color: var(--t4);
  flex-shrink: 0;
}

.hist-del-form {
  flex-shrink: 0;
}

.hist-del {
  background: transparent;
  border: none;
  width: 28px;
  color: var(--t4);
  font-size: .9rem;
  cursor: pointer;
  line-height: 1;
  transition: color .14s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hist-del:hover {
  color: var(--t1);
}

/* Scan tabs */
.scan-tabs {
  display: flex;
  gap: 2px;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  padding: 3px;
  margin-bottom: 10px;
}

.stab {
  flex: 1;
  padding: 5px 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .14s var(--ease);
}

.stab:hover {
  color: var(--t2);
  background: var(--b1);
}

.stab-active {
  background: var(--b2);
  color: var(--t1);
  box-shadow: var(--glow-xs);
}

.tab-pane {
  display: none;
  animation: reveal .18s var(--ease);
}

.tab-active {
  display: block;
}

.igrp {
  display: flex;
  gap: 6px;
}

.ifield {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .74rem;
  outline: none;
  transition: all .18s var(--ease);
}

.ifield::placeholder {
  color: var(--t4);
}

.ifield:focus {
  border-color: var(--b4);
  background: var(--s2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .04);
}

/* Themed form controls.
   `.ifield` above is the flex-row variant used inside input groups. The
   classes below were referenced by ~20 inputs, selects and textareas across
   hunt, triage, cases, indicator, extractor, playbooks, search and actors,
   but had no CSS at all - so they rendered as default white browser controls
   on a black page. Same visual language as .ifield, minus the `flex: 1`,
   which is layout-specific and does not belong on a standalone field. */
.input-field,
.textarea-field,
.res-search {
  width: 100%;
  /* Lets the field shrink inside a flex row instead of forcing overflow.
     Safe with the global border-box reset, so padding stays inside width. */
  min-width: 0;
  padding: 8px 10px;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .74rem;
  outline: none;
  transition: all .18s var(--ease);
}

.input-field::placeholder,
.textarea-field::placeholder,
.res-search::placeholder {
  color: var(--t4);
}

.input-field:focus,
.textarea-field:focus,
.res-search:focus {
  border-color: var(--b4);
  background: var(--s2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .04);
}

.textarea-field {
  resize: vertical;
  line-height: 1.5;
}

/* Native selects ignore most inherited styling and render a light OS-drawn
   control unless appearance is reset. The arrow is an inline SVG so it needs
   no extra asset and stays crisp on any background. */
select.input-field,
select.ifield {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 28px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238a8a8a' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
}

/* The dropdown list itself is painted by the OS; these keep it dark. */
select.input-field option,
select.ifield option {
  background: var(--s2);
  color: var(--t1);
}

.tab-hint {
  font-size: .64rem;
  color: var(--t4);
  margin-top: 5px;
  padding-left: 2px;
}

/* Dropzone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 16px 10px;
  border: 1px dashed var(--b3);
  border-radius: var(--r2);
  cursor: pointer;
  text-align: center;
  background: var(--s0);
  transition: all .2s var(--ease);
}

.dropzone:hover,
.dropzone.dz-over {
  border-color: var(--b5);
  background: var(--b1);
  box-shadow: var(--glow-sm);
}

.dz-icon {
  opacity: .35;
}

.dz-text {
  font-size: .76rem;
  color: var(--t2);
}

.dz-sub {
  font-size: .62rem;
  color: var(--t3);
  font-family: var(--f-mono);
}

.upload-name {
  font-family: var(--f-mono);
  font-size: .68rem;
  color: var(--t1);
  margin-top: 6px;
  min-height: 14px;
  word-break: break-all;
}

/* Capabilities */
.cap-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cap {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .75rem;
  padding: 5px 6px;
  border-radius: var(--r1);
  transition: background .15s;
}

.cap:hover {
  background: var(--b1);
}

.cap-on {
  color: var(--t2);
}

.cap-off {
  color: var(--t4);
}

.cap-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cap-on .cap-dot {
  background: #fff;
  box-shadow: 0 0 5px rgba(255, 255, 255, .65);
}

.cap-off .cap-dot {
  background: var(--t4);
}

/* CHAT PANEL */
.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px;
  border-bottom: 1px solid var(--b2);
  background: var(--bg);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t1);
}

.cursor-blink {
  font-size: .8rem;
  line-height: 1;
  animation: blink 1.1s step-end infinite;
  color: rgba(255, 255, 255, .7);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

.chat-meta {
  font-family: var(--f-mono);
  font-size: .62rem;
  color: var(--t3);
  letter-spacing: .5px;
}

/* Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 60px 32px;
  margin: auto;
  max-width: 480px;
}

.empty-hex {
  font-size: 3.2rem;
  opacity: .08;
  margin-bottom: 20px;
  animation: hex-float 5s ease-in-out infinite;
}

@keyframes hex-float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

.empty-title {
  font-family: var(--f-mono);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 10px;
}

.empty-sub {
  font-size: .84rem;
  color: var(--t3);
  line-height: 1.55;
  margin-bottom: 22px;
}

.example-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.epill {
  font-family: var(--f-mono);
  font-size: .65rem;
  padding: 5px 12px;
  border: 1px solid var(--b2);
  border-radius: var(--r4);
  color: var(--t3);
  background: var(--b1);
  user-select: all;
  cursor: default;
  transition: all .15s;
}

.epill:hover {
  border-color: var(--b3);
  color: var(--t2);
}

/* Message rows */
.msg {
  animation: reveal .32s var(--ease) both;
  display: flex;
  flex-direction: column;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.msg-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.msg-user {
  align-items: flex-end;
}

.msg-user .msg-label {
  color: var(--t4);
  flex-direction: row-reverse;
}

.msg-assistant .msg-label {
  color: rgba(255, 255, 255, .32);
}

.msg-body {
  font-size: .875rem;
  line-height: 1.75;
  word-break: break-word;
}

/* User bubble */
.msg-user .msg-body {
  background: var(--s3);
  border: 1px solid var(--b3);
  border-radius: var(--r2) var(--r2) 3px var(--r2);
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--t2);
  white-space: pre-wrap;
  padding: 11px 16px;
  max-width: 82%;
}

/* AI bubble */
.msg-assistant .msg-body {
  background: linear-gradient(150deg, rgba(255, 255, 255, .028) 0%, rgba(255, 255, 255, .010) 100%);
  border: 1px solid var(--b2);
  border-radius: 3px var(--r2) var(--r2) var(--r2);
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.msg-assistant .msg-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08), transparent);
  pointer-events: none;
}

/* Markdown body */
.md-body {
  color: var(--t1);
}

.md-body>*:first-child {
  margin-top: 0;
}

.md-body h1,
.md-body h2,
.md-body h3,
.md-body h4,
.md-body h5,
.md-body h6 {
  font-family: var(--f-mono);
  font-weight: 600;
  line-height: 1.3;
  color: var(--t1);
}

.md-body h1 {
  font-size: 1rem;
  margin: 24px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--b2);
  letter-spacing: .3px;
}

.md-body h2 {
  font-size: .84rem;
  margin: 24px 0 10px;
  padding: 7px 12px 7px 14px;
  background: rgba(255, 255, 255, .038);
  border-left: 2px solid rgba(255, 255, 255, .32);
  border-radius: 0 var(--r1) var(--r1) 0;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--t1);
}

.md-body h3 {
  font-size: .8rem;
  margin: 18px 0 8px;
  color: var(--t2);
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.md-body h3::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, .28);
  flex-shrink: 0;
}

.md-body h4,
.md-body h5 {
  font-size: .76rem;
  color: var(--t3);
  margin: 14px 0 6px;
  letter-spacing: .3px;
}

.md-body p {
  margin-bottom: 12px;
  color: var(--t1);
  line-height: 1.78;
}

.md-body p:last-child {
  margin-bottom: 0;
}

/* Lists */
.md-body ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
}

.md-body ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  color: var(--t1);
}

.md-body ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--t4);
  font-family: var(--f-mono);
}

.md-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.md-body ol li {
  margin-bottom: 6px;
  color: var(--t1);
  padding-left: 4px;
}

.md-body ol li::marker {
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .78rem;
}

.md-body li>p {
  margin-bottom: 4px;
}

/* Inline text */
.md-body strong {
  color: var(--t1);
  font-weight: 600;
  background: rgba(255, 255, 255, .07);
  border-radius: 3px;
  padding: 0 3px;
}

.md-body em {
  color: var(--t2);
  font-style: italic;
}

.md-body a {
  color: var(--t1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, .28);
  transition: text-decoration-color .15s;
}

.md-body a:hover {
  text-decoration-color: rgba(255, 255, 255, .75);
}

/* Inline code */
.md-body code {
  font-family: var(--f-mono);
  font-size: .78rem;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--t1);
}

/* Code blocks */
.md-body pre {
  background: var(--s0);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}

.code-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid var(--b2);
}

.code-lang {
  font-family: var(--f-mono);
  font-size: .59rem;
  color: var(--t4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.copy-btn {
  font-family: var(--f-mono);
  font-size: .58rem;
  color: var(--t4);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px 7px;
  cursor: pointer;
  letter-spacing: .8px;
  text-transform: uppercase;
  transition: all .15s;
}

.copy-btn:hover {
  color: var(--t2);
  border-color: var(--b3);
  background: var(--b1);
}

.copy-btn.copied {
  color: var(--c-ok);
  border-color: rgba(110, 232, 154, .22);
}

.md-body pre code {
  display: block;
  background: none;
  border: none;
  padding: 14px 16px;
  font-size: .78rem;
  line-height: 1.65;
  color: var(--t1);
  overflow-x: auto;
}

/* Blockquote */
.md-body blockquote {
  border-left: 2px solid var(--b3);
  padding: 10px 16px;
  color: var(--t2);
  background: rgba(255, 255, 255, .024);
  border-radius: 0 var(--r2) var(--r2) 0;
  margin: 14px 0;
  font-style: italic;
}

.md-body hr {
  border: none;
  border-top: 1px solid var(--b2);
  margin: 22px 0;
}

/* Markdown tables */
.md-body .table-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
  border-radius: var(--r2);
  border: 1px solid var(--b2);
}

.md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.md-body th,
.md-body td {
  padding: 9px 14px;
  text-align: left;
  vertical-align: top;
}

.md-body th {
  background: var(--s2);
  font-family: var(--f-mono);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--t3);
  border-bottom: 1px solid var(--b2);
}

.md-body td {
  color: var(--t1);
  border-bottom: 1px solid var(--b1);
}

.md-body tbody tr:last-child td {
  border-bottom: none;
}

.md-body tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, .012);
}

.md-body tbody tr:hover td {
  background: rgba(255, 255, 255, .04);
}

/* AI Summary section */
.ai-summary-divider {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 32px 0 22px;
}

.ai-summary-divider::before,
.ai-summary-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #2563eb);
}

.ai-summary-divider::after {
  background: linear-gradient(to left, transparent, #2563eb);
}

.ai-summary-divider span {
  font-family: var(--f-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #93c5fd;
  white-space: nowrap;
  background: #06080f;
  padding: 7px 22px;
  border: 1px solid #2563eb;
  box-shadow: 0 0 20px rgba(37,99,235,.3), inset 0 0 14px rgba(37,99,235,.1);
}

/* CHAT FOOTER / INPUT */
.chat-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--b2);
  background: rgba(4, 4, 4, .7);
  flex-shrink: 0;
}

.prompt-form {
  margin: 0;
}

.prompt-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 11px 13px;
  transition: all .2s var(--ease);
}

.prompt-wrap:focus-within {
  border-color: var(--b4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .04), var(--glow-sm);
}

.prompt-sym {
  color: var(--t3);
  font-family: var(--f-mono);
  font-size: 1.05rem;
  line-height: 1.45;
  flex-shrink: 0;
  user-select: none;
  padding-bottom: 1px;
}

.prompt-ta {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--t1);
  font-family: var(--f-ui);
  font-size: .9rem;
  line-height: 1.55;
  resize: none;
  max-height: 160px;
  overflow-y: auto;
}

.prompt-ta::placeholder {
  color: var(--t4);
}

.send-btn,
.stop-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--r1);
  border: 1px solid var(--b3);
  background: var(--b2);
  color: var(--t1);
  cursor: pointer;
  transition: all .18s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-btn:hover {
  background: var(--t1);
  color: #000;
  border-color: var(--t1);
  box-shadow: var(--glow-sm);
}

.stop-btn:hover {
  background: #f85149;
  color: #000;
  border-color: #f85149;
  box-shadow: 0 0 10px rgba(248, 81, 73, 0.3);
}

.send-btn:disabled,
.stop-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.prompt-hints {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: .63rem;
  color: var(--t4);
  padding: 0 2px;
  font-family: var(--f-mono);
}

.dot {
  opacity: .4;
}

.shortcut {
  margin-left: auto;
  opacity: .4;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  :root {
    --sbar: 280px;
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--b2);
    max-height: 55vh;
  }

  .chat-panel {
    height: calc(100vh - var(--topbar) - 55vh);
    min-height: 420px;
  }

  .nav-chips {
    display: none;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding: 0 14px;
    gap: 12px;
  }

  .brand-tag {
    display: none;
  }

  .messages {
    padding: 14px;
    gap: 14px;
  }

  .chat-footer {
    padding: 10px 14px;
  }

  .chat-topbar {
    padding: 11px 14px;
  }
}

/* NAV MENU */
.nav-menu {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.nav-menu a {
  color: var(--t2);
  font-family: var(--f-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--r4);
  transition: all .2s var(--ease);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.nav-menu a:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, .04);
  border-color: var(--b2);
}

.nav-menu a.active {
  color: var(--t1);
  background: rgba(255, 255, 255, .08);
  border-color: var(--b3);
  box-shadow: var(--glow-xs);
}

/* Overflow "More" dropdown - absorbs links that don't fit the topbar */
.nav-more {
  position: relative;
  flex-shrink: 0;
  /* Sits above the topbar's stacking context so the open menu is not
     covered by page content scrolling underneath. */
  z-index: 210;
}

.nav-more-btn {
  background: none;
  cursor: pointer;
  color: var(--t2);
  font-family: var(--f-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--r4);
  border: 1px solid transparent;
  transition: all .2s var(--ease);
}

.nav-more-btn:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, .04);
  border-color: var(--b2);
}

.nav-more-btn.active {
  color: var(--t1);
  background: rgba(255, 255, 255, .08);
  border-color: var(--b3);
  box-shadow: var(--glow-xs);
}

.nav-more-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
  background: var(--s1);
  border: 1px solid var(--b3);
  border-radius: 10px;
  padding: 6px;
  z-index: 300;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

.nav-more.open .nav-more-menu {
  display: flex;
}

/* Links collapsed into the dropdown are no longer descendants of .nav-menu,
   so the `.nav-menu a` rules above do not reach them. Without these they fall
   back to the browser's default anchor styling - blue, underlined, no padding -
   which is why collapsed items looked nothing like the rest of the bar. */
.nav-more-menu a {
  display: block;
  color: var(--t2);
  font-family: var(--f-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--r1);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all .2s var(--ease);
}

.nav-more-menu a:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, .05);
  border-color: var(--b2);
}

.nav-more-menu a.active {
  color: var(--t1);
  background: rgba(255, 255, 255, .08);
  border-color: var(--b3);
}

/* LANDING */
.landing-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.landing-hero {
  margin-bottom: 80px;
  animation: slide-in .4s var(--ease);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-title .highlight {
  color: var(--c-info);
  text-shadow: 0 0 20px rgba(125, 207, 255, .3);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--t2);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--r3);
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  text-align: left;
  animation: slide-in .6s var(--ease);
}

.feat-card {
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 28px;
  transition: all .2s var(--ease);
  position: relative;
  overflow: hidden;
  flex: 1 1 280px;
  max-width: 380px;
}

.feat-card:hover {
  border-color: var(--b4);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.feat-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--t2);
}

.feat-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--t1);
}

.feat-card p {
  font-size: .88rem;
  color: var(--t3);
  line-height: 1.6;
}

.hero-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--accent);
  font-family: var(--f-mono);
  margin-bottom: 18px;
}

.integrations-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding: 14px 20px;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: var(--r2);
  font-size: 0.7rem;
  font-family: var(--f-mono);
  animation: slide-in .8s var(--ease);
}

.int-label {
  color: var(--t4);
  letter-spacing: 2px;
  font-size: 0.6rem;
  margin-right: 4px;
}

.int-item { color: var(--t2); }
.int-sep  { color: var(--b2); }

/* NEWS PAGE - Threat Map + Side Panels */

/* Map fills entire viewport below topbar */
#threat-map {
  position: fixed;
  top: var(--topbar);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* Base panel glass card */
.news-panel {
  pointer-events: auto;
  background: rgba(5, 5, 7, .92);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 0;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 16px 40px rgba(0, 0, 0, .6);
  overflow: hidden;
  z-index: 10;
}

/* Feed Panel - full height left */
.news-feed-panel {
  position: fixed;
  left: 0;
  top: var(--topbar);
  bottom: 0;
  width: 390px;
  display: flex;
  flex-direction: column;
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, .07);
}

/* KEV Panel - full height right */
.news-kev-panel {
  position: fixed;
  right: 0;
  top: var(--topbar);
  bottom: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid rgba(255, 255, 255, .07);
}

/* Panel header */
.panel-header {
  padding: 14px 16px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .015);
  flex-shrink: 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title {
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--t2);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
}

.panel-badge {
  font-family: var(--f-mono);
  font-size: .56rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--t3);
  letter-spacing: .5px;
}

.panel-datetime {
  font-family: var(--f-mono);
  font-size: .56rem;
  color: var(--t4);
  letter-spacing: .4px;
  margin-top: 5px;
}

/* Icon button (refresh) */
.icon-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--t4);
  cursor: pointer;
  padding: 4px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--t1);
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
}

.icon-btn.spinning svg {
  animation: spin-refresh .7s linear infinite;
}

@keyframes spin-refresh {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* AI Briefing */
.briefing-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: rgba(255, 255, 255, .025);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: var(--t3);
  font-family: var(--f-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.briefing-toggle:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--t1);
}

.briefing-toggle .chevron-icon {
  transition: transform .25s var(--ease);
}

.briefing-toggle.toggle-open .chevron-icon {
  transform: rotate(180deg);
}

.briefing-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
}

.briefing-body.briefing-open {
  max-height: 260px;
  overflow-y: auto;
  border-bottom-color: rgba(255, 255, 255, .06);
}

.briefing-body::-webkit-scrollbar {
  width: 2px;
}

.briefing-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
}

.briefing-body .parsed-content {
  padding: 14px 16px;
  font-size: .78rem;
  line-height: 1.7;
}

.parsed-content h1,
.parsed-content h2,
.parsed-content h3 {
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 12px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.parsed-content h1:first-child,
.parsed-content h2:first-child,
.parsed-content h3:first-child {
  margin-top: 0;
}

.parsed-content p {
  margin-bottom: 7px;
  color: var(--t2);
}

.parsed-content ul,
.parsed-content ol {
  padding-left: 16px;
  margin-bottom: 7px;
}

.parsed-content li {
  margin-bottom: 4px;
  color: var(--t2);
  font-size: .76rem;
}

.parsed-content strong {
  color: var(--t1);
}

.summary-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .5px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t4);
  animation: dot-beat 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* Feed List */
.feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.feed-list::-webkit-scrollbar {
  width: 2px;
}

.feed-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
}

.feed-item {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: background .12s;
}

.feed-item:hover {
  background: rgba(255, 255, 255, .03);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-empty {
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .72rem;
  padding: 24px 16px;
  text-align: center;
}

/* Filter Bar */
.feed-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  background: rgba(255, 255, 255, .01);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.feed-filter {
  font-family: var(--f-mono);
  font-size: .54rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
  color: var(--t4);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.feed-filter:hover {
  color: var(--t2);
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
}

.filter-count {
  opacity: .55;
  font-weight: 400;
}

/* KEV ransomware-only toggle */
.kev-rw-toggle {
  font-family: var(--f-mono);
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .8px;
  margin-left: auto;
}

.kev-rw-toggle.active {
  color: #ff5050;
  border-color: rgba(255, 80, 80, .45);
  background: rgba(255, 80, 80, .08);
}

.kev-rw-only .kev-item:not(.kev-item-ransomware) {
  display: none;
}

/* Console: clickable source IPs + paused hint */
.col-ip-link {
  color: white;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, .35);
}

.col-ip-link:hover {
  color: var(--c-accent, #7ca8ff);
  border-bottom-color: currentColor;
}

.console-paused-hint {
  color: var(--t4);
  font-size: .6rem;
  letter-spacing: 1px;
}

/* All */
.feed-filter[data-filter="all"].active {
  color: #e6e6e6;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
}

/* Critical
.feed-filter[data-filter="critical"] {
  color: rgba(255, 90, 90, .55);
  border-color: rgba(255, 90, 90, .14);
}
*/
.feed-filter[data-filter="critical"]:hover {
  color: #ff5a5a;
  background: rgba(255, 90, 90, .08);
  border-color: rgba(255, 90, 90, .3);
}

.feed-filter[data-filter="critical"].active {
  color: #ff5a5a;
  background: rgba(255, 90, 90, .12);
  border-color: rgba(255, 90, 90, .38);
  box-shadow: 0 0 10px rgba(255, 90, 90, .14);
}

/* High
.feed-filter[data-filter="high"] {
  color: rgba(255, 160, 50, .55);
  border-color: rgba(255, 160, 50, .14);
}
*/
.feed-filter[data-filter="high"]:hover {
  color: #ffa032;
  background: rgba(255, 160, 50, .08);
  border-color: rgba(255, 160, 50, .3);
}

.feed-filter[data-filter="high"].active {
  color: #ffa032;
  background: rgba(255, 160, 50, .12);
  border-color: rgba(255, 160, 50, .38);
  box-shadow: 0 0 10px rgba(255, 160, 50, .14);
}

/* Ransomware
.feed-filter[data-filter="Ransomware"] {
  color: rgba(248, 81, 73, .55);
  border-color: rgba(248, 81, 73, .14);
}
*/
.feed-filter[data-filter="Ransomware"]:hover {
  color: #f85149;
  background: rgba(248, 81, 73, .08);
  border-color: rgba(248, 81, 73, .3);
}

.feed-filter[data-filter="Ransomware"].active {
  color: #f85149;
  background: rgba(248, 81, 73, .12);
  border-color: rgba(248, 81, 73, .38);
  box-shadow: 0 0 10px rgba(248, 81, 73, .14);
}

/* APT
.feed-filter[data-filter="APT"] {
  color: rgba(180, 100, 255, .55);
  border-color: rgba(180, 100, 255, .14);
}
*/
.feed-filter[data-filter="APT"]:hover {
  color: #b464ff;
  background: rgba(180, 100, 255, .08);
  border-color: rgba(180, 100, 255, .3);
}

.feed-filter[data-filter="APT"].active {
  color: #b464ff;
  background: rgba(180, 100, 255, .12);
  border-color: rgba(180, 100, 255, .38);
  box-shadow: 0 0 10px rgba(180, 100, 255, .14);
}

/* Vulnerability
.feed-filter[data-filter="Vulnerability"] {
  color: rgba(255, 210, 50, .55);
  border-color: rgba(255, 210, 50, .14);
}
*/
.feed-filter[data-filter="Vulnerability"]:hover {
  color: #ffd232;
  background: rgba(255, 210, 50, .08);
  border-color: rgba(255, 210, 50, .3);
}

.feed-filter[data-filter="Vulnerability"].active {
  color: #ffd232;
  background: rgba(255, 210, 50, .12);
  border-color: rgba(255, 210, 50, .38);
  box-shadow: 0 0 10px rgba(255, 210, 50, .12);
}

/* Data Breach
.feed-filter[data-filter="Data Breach"] {
  color: rgba(88, 166, 255, .55);
  border-color: rgba(88, 166, 255, .14);
}
*/
.feed-filter[data-filter="Data Breach"]:hover {
  color: #58a6ff;
  background: rgba(88, 166, 255, .08);
  border-color: rgba(88, 166, 255, .3);
}

.feed-filter[data-filter="Data Breach"].active {
  color: #58a6ff;
  background: rgba(88, 166, 255, .12);
  border-color: rgba(88, 166, 255, .38);
  box-shadow: 0 0 10px rgba(88, 166, 255, .14);
}

/* Active filter label in header */
.feed-active-filter {
  font-family: var(--f-mono);
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  transition: all .2s;
}

.feed-active-filter:empty,
.feed-active-filter[data-filter="all"] {
  display: none;
}

.feed-active-filter[data-filter="critical"] {
  color: #ff5a5a;
  background: rgba(255, 90, 90, .12);
  border: 1px solid rgba(255, 90, 90, .3);
}

.feed-active-filter[data-filter="high"] {
  color: #ffa032;
  background: rgba(255, 160, 50, .12);
  border: 1px solid rgba(255, 160, 50, .3);
}

.feed-active-filter[data-filter="Ransomware"] {
  color: #f85149;
  background: rgba(248, 81, 73, .12);
  border: 1px solid rgba(248, 81, 73, .3);
}

.feed-active-filter[data-filter="APT"] {
  color: #b464ff;
  background: rgba(180, 100, 255, .12);
  border: 1px solid rgba(180, 100, 255, .3);
}

.feed-active-filter[data-filter="Vulnerability"] {
  color: #ffd232;
  background: rgba(255, 210, 50, .12);
  border: 1px solid rgba(255, 210, 50, .3);
}

.feed-active-filter[data-filter="Data Breach"] {
  color: #58a6ff;
  background: rgba(88, 166, 255, .12);
  border: 1px solid rgba(88, 166, 255, .3);
}

.feed-item-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  overflow: hidden;
  min-width: 0;
}

/* Source tags - default */
.source-tag {
  font-family: var(--f-mono);
  font-size: .5rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, .07);
  color: var(--t3);
  border: 1px solid rgba(255, 255, 255, .1);
}

.source-tag-the-hacker-n {
  background: rgba(255, 60, 60, .12);
  color: #ff6b6b;
  border-color: rgba(255, 60, 60, .2);
}

.source-tag-bleepingcomp {
  background: rgba(88, 166, 255, .12);
  color: #58a6ff;
  border-color: rgba(88, 166, 255, .2);
}

.source-tag-securityweek {
  background: rgba(180, 100, 255, .12);
  color: #b264ff;
  border-color: rgba(180, 100, 255, .2);
}

.source-tag-cisa-advisor {
  background: rgba(46, 204, 113, .12);
  color: #3dd68c;
  border-color: rgba(46, 204, 113, .2);
}

.source-tag-dark-reading {
  background: rgba(255, 160, 0, .12);
  color: #ffab40;
  border-color: rgba(255, 160, 0, .2);
}

.source-tag-krebs-on-sec {
  background: rgba(255, 80, 80, .12);
  color: #ff7070;
  border-color: rgba(255, 80, 80, .2);
}

.source-tag-cisco-talos {
  background: rgba(0, 200, 255, .12);
  color: #00c8ff;
  border-color: rgba(0, 200, 255, .2);
}

.source-tag-malwarebytes {
  background: rgba(100, 220, 100, .12);
  color: #6ddc6d;
  border-color: rgba(100, 220, 100, .2);
}

.source-tag-sans-isc {
  background: rgba(255, 120, 50, .12);
  color: #ff8c50;
  border-color: rgba(255, 120, 50, .2);
}

.source-tag-schneier-on-s {
  background: rgba(160, 160, 255, .12);
  color: #a0a0ff;
  border-color: rgba(160, 160, 255, .2);
}

/* Category tags in feed item headers */
.feed-cat {
  font-family: var(--f-mono);
  font-size: .5rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, .05);
  color: var(--t4);
  border: 1px solid rgba(255, 255, 255, .08);
}

.feed-cat-ransomware {
  background: rgba(255, 60, 60, .12);
  color: #ff6b6b;
  border-color: rgba(255, 60, 60, .25);
}

.feed-cat-apt {
  background: rgba(255, 140, 0, .12);
  color: #ffab40;
  border-color: rgba(255, 140, 0, .25);
}

.feed-cat-vulnerability {
  background: rgba(180, 100, 255, .12);
  color: #b264ff;
  border-color: rgba(180, 100, 255, .25);
}

.feed-cat-data-breach {
  background: rgba(88, 166, 255, .12);
  color: #58a6ff;
  border-color: rgba(88, 166, 255, .25);
}

.feed-cat-malware {
  background: rgba(255, 80, 120, .12);
  color: #ff5070;
  border-color: rgba(255, 80, 120, .25);
}

.feed-cat-phishing {
  background: rgba(255, 200, 50, .12);
  color: #ffd232;
  border-color: rgba(255, 200, 50, .25);
}

.feed-cat-supply-chain {
  background: rgba(100, 220, 180, .12);
  color: #60dcb4;
  border-color: rgba(100, 220, 180, .25);
}

.feed-cat-nation-state {
  background: rgba(255, 100, 60, .12);
  color: #ff7850;
  border-color: rgba(255, 100, 60, .25);
}

.feed-time {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: .5rem;
  color: var(--t4);
  white-space: nowrap;
  letter-spacing: .3px;
}

.feed-title {
  display: block;
  font-size: .8rem;
  color: var(--t1);
  font-weight: 400;
  line-height: 1.45;
  text-decoration: none;
  transition: color .12s;
  letter-spacing: .1px;
}

.feed-title:hover {
  color: #58a6ff;
}

/* KEV List */
.kev-meta {
  font-family: var(--f-mono);
  font-size: .56rem;
  color: var(--t4);
  letter-spacing: .4px;
  margin-top: 4px;
}

.kev-list {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}

.kev-list::-webkit-scrollbar {
  width: 2px;
}

.kev-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
}

.kev-item {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}

.kev-item:hover {
  background: rgba(255, 255, 255, .035);
}

.kev-item:last-child {
  border-bottom: none;
}

.kev-item-ransomware {
  border-left: 2px solid rgba(248, 81, 73, .6);
}

.kev-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.kev-cve-id {
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 700;
  color: #58a6ff;
  letter-spacing: .5px;
}

.kev-tag {
  font-family: var(--f-mono);
  font-size: .5rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.kev-tag-ransomware {
  background: rgba(248, 81, 73, .15);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, .25);
}

.kev-due {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: .54rem;
  color: var(--t4);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.kev-due::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.kev-due-recent {
  color: #ff9a2e;
}

.kev-due-month {
  color: #3fb950;
}

.kev-due-old {
  color: var(--t4);
}

.kev-vendor {
  font-size: .6rem;
  color: var(--t3);
  font-family: var(--f-mono);
  letter-spacing: .3px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kev-name {
  font-size: .68rem;
  color: var(--t2);
  line-height: 1.4;
}

/* Remove unused geo/counter panels */
.news-geo-panel,
.geo-chips,
.geo-chip,
.attack-counter-panel,
.attack-counter-row,
.attack-pulse-ring,
.attack-counter-label,
.attack-counter-num,
.attack-counter-sub {
  display: none !important;
}

.attack-counter-panel {
  position: fixed;
  bottom: 188px;
  left: 16px;
  padding: 12px 16px;
  pointer-events: auto;
  width: 340px;
  z-index: 10;
}

/* Map canvas background (amCharts) */
#threat-map {
  background: #040405;
}

/* HUD Live Attack Console */
.attack-console {
  position: fixed;
  bottom: 0;
  left: 390px;
  right: 320px;
  height: 190px;
  background: rgba(4, 4, 6, 0.92);
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-left: 1px solid rgba(255, 255, 255, .05);
  border-right: 1px solid rgba(255, 255, 255, .05);
  backdrop-filter: blur(20px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .5);
  z-index: 500;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.console-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .018);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: 1.5px;
  color: var(--t3);
  text-transform: uppercase;
}

.console-title-block {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--t2);
  font-weight: 600;
}

.console-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4444;
  box-shadow: 0 0 6px rgba(255, 60, 60, .7);
  animation: live-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

.console-title-text {
  letter-spacing: 2px;
}

.console-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, .1);
  margin: 0 65px;
  flex-shrink: 0;
}

.console-stat-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.console-stat-label {
  font-size: .5rem;
  color: var(--t4);
  letter-spacing: 1px;
  font-weight: bolder;
}

.console-stat-val {
  font-size: .72rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: .5px;
}

.console-table {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.console-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--t1);
}

.console-table th {
  text-align: left;
  padding: 6px 12px;
  color: var(--t4);
  font-weight: 500;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  background: rgba(4, 4, 6, 0.95);
  z-index: 2;
}

.console-table td {
  padding: 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.console-row {
  animation: slide-in 0.3s var(--ease) reverse;
}

.console-row:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.col-time {
  color: var(--t3);
  width: 80px;
}

.col-src {
  color: #ff5555;
}

.col-tgt {
  color: #2ecc71;
}

.col-ip {
  color: white;
}

.col-org {
  color: var(--t2);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ABOUT */
.about-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  position: relative;
  z-index: 1;
}

.about-card {
  background: rgba(10, 10, 10, .7);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 40px;
  backdrop-filter: blur(12px);
}

.about-card h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--t1);
  font-family: var(--f-mono);
}

.about-card p {
  font-size: 1.05rem;
  color: var(--t2);
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-card h3 {
  margin: 30px 0 15px;
  color: var(--t1);
  font-family: var(--f-mono);
  border-bottom: 1px solid var(--b2);
  padding-bottom: 8px;
}

.about-card ul {
  padding-left: 20px;
  list-style-type: square;
  color: var(--t3);
  margin-bottom: 20px;
}

.about-card li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.about-card li strong {
  color: var(--t1);
}

/* RESPONSIVE - NEWS & NAV */
/* Responsive */
@media (max-width: 900px) {
  .news-feed-panel {
    width: 300px;
  }

  .news-kev-panel {
    width: 280px;
  }

  .attack-console {
    left: 300px;
    right: 280px;
  }
}

@media (max-width: 700px) {
  .nav-menu {
    display: none;
  }

  .news-feed-panel {
    width: 100%;
    left: 0;
    right: 0;
    bottom: 48px;
  }

  .news-kev-panel {
    display: none;
  }

  .attack-console {
    left: 0;
    right: 0;
    height: 48px;
  }
}

/* OPTIONS SIDEBAR */
.options-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

.options-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.options-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background: rgba(5, 5, 5, .95);
  border-left: 1px solid var(--b2);
  z-index: 1001;
  box-shadow: -10px 0 30px rgba(0, 0, 0, .5);
  transition: right .4s var(--ease);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
}

.options-panel.open {
  right: 0;
}

.options-header {
  padding: 20px;
  border-bottom: 1px solid var(--b2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.options-title {
  font-family: var(--f-mono);
  font-size: .85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t1);
}

.options-close {
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  padding: 5px;
  transition: color .2s;
}

.options-close:hover {
  color: var(--t1);
}

.options-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.todo-list-container {
  margin-top: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  margin-bottom: 8px;
  transition: transform .2s var(--ease), border-color .2s;
}

.todo-item:hover {
  transform: translateY(-2px);
  border-color: var(--b4);
  box-shadow: var(--glow-xs);
}

.todo-checkbox {
  appearance: none;
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid var(--b3);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.todo-checkbox:checked {
  background: var(--t1);
  border-color: var(--t1);
}

/* Checkmark drawn purely with CSS borders - no glyph dependency. */
.todo-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.todo-text {
  font-size: .8rem;
  color: var(--t2);
  flex: 1;
  transition: color .2s, text-decoration .2s;
}

.todo-item.done .todo-text {
  color: var(--t4);
  text-decoration: line-through;
}

.todo-delete {
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 5px;
}

.todo-delete:hover {
  color: #ff5a5a;
}

.todo-input-grp {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.todo-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .75rem;
  transition: all .2s;
}

.todo-input:focus {
  border-color: var(--t3);
  outline: none;
  background: var(--s2);
}
/* HISTORY PAGE */
.history-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.history-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.history-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.02em;
}

.history-sub {
  font-size: .72rem;
  color: var(--t3);
  font-family: var(--f-mono);
  margin-top: 4px;
}

/* Search */
.history-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.history-search-icon {
  position: absolute;
  left: 13px;
  color: var(--t4);
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .8rem;
  padding: 10px 13px 10px 38px;
  outline: none;
  transition: border-color .15s;
}

.history-search-input:focus {
  border-color: var(--b4);
}

.history-match-count {
  position: absolute;
  right: 13px;
  font-size: .68rem;
  font-family: var(--f-mono);
  color: var(--t4);
  pointer-events: none;
}

/* List */
.history-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  overflow: hidden;
}

/* Row */
.hrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--b1);
  transition: background .12s;
}

.hrow:last-child { border-bottom: none; }
.hrow:hover { background: var(--s2); }

.hrow-pinned {
  background: rgba(255, 200, 60, .04);
  border-left: 2px solid rgba(255, 200, 60, .4);
  padding-left: 12px;
}

/* Pin button */
.hrow-pin {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--t4);
  cursor: pointer;
  transition: color .15s;
  padding: 0;
}

.hrow-pin:hover { color: var(--t2); }
.hrow-pinned .hrow-pin { color: #ffc83c; }

/* Body - clickable */
.hrow-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
}

.hrow-title {
  font-size: .84rem;
  font-weight: 500;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.hrow-date {
  font-family: var(--f-mono);
  font-size: .6rem;
  color: var(--t4);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Action buttons */
.hrow-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hrow-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--f-mono);
  font-size: .62rem;
  padding: 4px 9px;
  border-radius: var(--r1);
  cursor: pointer;
  border: 1px solid var(--b2);
  background: transparent;
  color: var(--t3);
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}

.hrow-btn:hover {
  background: var(--b2);
  color: var(--t1);
}

.hrow-btn-del {
  border-color: transparent;
  color: var(--t4);
  padding: 4px 6px;
}

.hrow-btn-del:hover {
  background: rgba(255, 90, 90, .1);
  border-color: rgba(255, 90, 90, .4);
  color: var(--c-danger);
}

.history-empty {
  text-align: center;
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .78rem;
  padding: 40px 0;
}

.history-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
}

/* Watchlist, correlation, settings, digest, bulk IOC and deep OSINT panels */

/* Shared page layout */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: calc(var(--topbar) + 28px) auto 60px;
  padding: 0 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.01em;
}

.page-sub {
  font-size: .72rem;
  color: var(--t3);
  margin-top: 4px;
  font-family: var(--f-mono);
}

/* Card */
.card {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 18px 20px;
}

/* Empty state */
.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  border: 1px dashed var(--b2);
  border-radius: var(--r3);
  text-align: center;
}

.empty-card .empty-hex {
  font-size: 2rem;
  color: var(--t4);
  margin-bottom: 12px;
}

.empty-card .empty-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 6px;
}

.empty-card .empty-sub {
  font-size: .72rem;
  color: var(--t4);
  font-family: var(--f-mono);
  max-width: 420px;
}

/* Watchlist */
.wl-add-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.wl-add-form .ifield {
  flex: 1;
  min-width: 200px;
}

.wl-table-wrap {
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  overflow: hidden;
  overflow-x: auto;
}

.wl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.wl-table thead tr {
  background: var(--s2);
  border-bottom: 1px solid var(--b2);
}

.wl-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: .7rem;
  font-family: var(--f-mono);
  color: var(--t3);
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}

.wl-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--b1);
  vertical-align: middle;
}

.wl-table tbody tr:last-child td {
  border-bottom: none;
}

.wl-table tbody tr:hover td {
  background: var(--s2);
}

.wl-row.wl-alert td {
  background: rgba(255, 90, 90, .035);
}

.wl-row.wl-alert:hover td {
  background: rgba(255, 90, 90, .06);
}

.wl-ioc {
  font-family: var(--f-mono);
  font-size: .82rem;
}

.wl-ioc-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wl-ioc code {
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--t1);
  background: var(--s3);
  padding: 2px 6px;
  border-radius: 3px;
}

.wl-alert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-danger);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--c-danger);
}

.wl-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(255, 90, 90, .15);
  border: 1px solid rgba(255, 90, 90, .35);
  border-radius: var(--r4);
  font-size: .65rem;
  font-family: var(--f-mono);
  color: var(--c-danger);
  font-weight: 600;
}

.wl-label {
  font-size: .82rem;
  color: var(--t2);
}

.wl-muted {
  color: var(--t4);
  font-size: .8rem;
}

.wl-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.wl-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: .62rem;
  font-family: var(--f-mono);
  border: 1px solid var(--b2);
  border-radius: var(--r1);
  background: transparent;
  color: var(--t3);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  text-decoration: none;
  white-space: nowrap;
}

.wl-btn:hover {
  background: var(--b2);
  color: var(--t1);
}

.wl-btn-del {
  border-color: transparent;
  color: var(--t4);
  font-size: .8rem;
  padding: 2px 6px;
}

.wl-btn-del:hover {
  background: rgba(255, 90, 90, .1);
  border-color: rgba(255, 90, 90, .4);
  color: var(--c-danger);
}

.wl-detail-row td {
  padding: 0 14px 10px;
}

.wl-detail {
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: var(--r1);
  padding: 10px 14px;
}

.wl-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--b1);
}

.wl-detail-ts {
  font-size: .6rem;
  font-family: var(--f-mono);
  color: var(--t4);
}

.wl-detail-close {
  background: none;
  border: none;
  color: var(--t4);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.wl-detail-close:hover {
  color: var(--t1);
}

.wl-detail-body {
  font-size: .72rem;
  color: var(--t2);
  line-height: 1.6;
  word-break: break-word;
}

.wl-detail-body p { margin: 0 0 6px; }
.wl-detail-body h1,.wl-detail-body h2,.wl-detail-body h3 { font-size: .8rem; color: var(--t1); margin: 8px 0 4px; }
.wl-detail-body ul,.wl-detail-body ol { padding-left: 1.2em; margin: 4px 0; }
.wl-detail-body li { margin-bottom: 2px; }
.wl-detail-body code { font-family: var(--f-mono); font-size: .65rem; background: var(--b1); padding: 1px 4px; border-radius: 3px; }
.wl-detail-body pre { background: var(--b1); padding: 8px; border-radius: 4px; overflow-x: auto; }
.wl-detail-body pre code { background: none; padding: 0; }
.wl-detail-body strong { color: var(--t1); font-weight: 600; }
.wl-detail-body a { color: var(--c-accent); }

/* IOC type badges */
.ioc-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r1);
  font-size: .58rem;
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ioc-ip      { background: rgba(125, 207, 255, .12); color: var(--c-info); border: 1px solid rgba(125, 207, 255, .2); }
.ioc-domain  { background: rgba(110, 232, 154, .10); color: var(--c-ok);   border: 1px solid rgba(110, 232, 154, .2); }
.ioc-hash    { background: rgba(255, 170, 68,  .12); color: var(--c-warn); border: 1px solid rgba(255, 170, 68,  .2); }
.ioc-cve     { background: rgba(255, 90,  90,  .12); color: var(--c-danger); border: 1px solid rgba(255, 90, 90, .2); }
.ioc-url     { background: rgba(200, 160, 255, .12); color: #c8a0ff;       border: 1px solid rgba(200, 160, 255, .2); }
.ioc-email   { background: rgba(255, 200, 60,  .10); color: var(--c-low);  border: 1px solid rgba(255, 200, 60,  .2); }
.ioc-unknown { background: var(--s3); color: var(--t4); border: 1px solid var(--b1); }

/* Score pill */
.score-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r4);
  font-size: .62rem;
  font-family: var(--f-mono);
  font-weight: 700;
}

.score-danger { background: rgba(255, 90, 90, .15); color: var(--c-danger); }
.score-warn   { background: rgba(255, 170, 68, .15); color: var(--c-warn); }
.score-ok     { background: rgba(110, 232, 154, .12); color: var(--c-ok); }

/* Correlation */
.corr-search-form {
  margin-bottom: 24px;
}

.corr-section-label {
  font-size: .65rem;
  font-family: var(--f-mono);
  color: var(--t4);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.corr-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}

.corr-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--b2);
}

.corr-event {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  position: relative;
}

.corr-dot {
  position: absolute;
  left: -20px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--b4);
  border: 1px solid var(--b3);
  flex-shrink: 0;
}

.corr-card {
  flex: 1;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  padding: 12px 16px;
}

.corr-card-title {
  font-size: .82rem;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 4px;
}

.corr-card-meta {
  font-size: .62rem;
  font-family: var(--f-mono);
  color: var(--t4);
}

.corr-count {
  display: inline-block;
  min-width: 28px;
  padding: 3px 8px;
  background: var(--s3);
  border: 1px solid var(--b2);
  border-radius: var(--r1);
  font-size: .75rem;
  font-family: var(--f-mono);
  color: var(--t2);
  text-align: center;
}

/* Settings page */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.preset-card:hover {
  border-color: var(--b3);
  background: var(--s3);
}

.preset-card.preset-active {
  border-color: rgba(125, 207, 255, .5);
  background: rgba(125, 207, 255, .06);
}

.preset-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--t1);
}

.preset-sub {
  font-size: .62rem;
  color: var(--t4);
  font-family: var(--f-mono);
  line-height: 1.4;
}

.settings-ta {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .75rem;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}

.settings-ta:focus {
  border-color: var(--b4);
}

/* Digest page */
.digest-gen-form {
  /* inherits .card padding */
}

.digest-card {
  margin-top: 0;
}

.digest-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--b1);
}

.digest-label {
  font-size: .58rem;
  font-family: var(--f-mono);
  letter-spacing: .1em;
  color: var(--c-info);
  font-weight: 700;
}

.digest-ts {
  font-size: .62rem;
  font-family: var(--f-mono);
  color: var(--t4);
}

.digest-stack {
  font-size: .62rem;
  font-family: var(--f-mono);
  color: var(--t3);
  padding: 2px 8px;
  background: var(--s3);
  border-radius: var(--r1);
}

.digest-body {
  font-size: .84rem;
  color: var(--t2);
}

/* Bulk IOC textarea */
.bulk-ta {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  color: var(--t1);
  font-family: var(--f-mono);
  font-size: .7rem;
  padding: 8px 10px;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  line-height: 1.5;
}

.bulk-ta:focus {
  border-color: var(--b4);
}

.bulk-ta::placeholder {
  color: var(--t4);
}

/* ATT&CK page */
.attack-search-form {
  margin-bottom: 20px;
}

.attack-quick {
  margin-bottom: 20px;
}

.attack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.attack-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r4);
  font-size: .65rem;
  font-family: var(--f-mono);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity .15s, border-color .15s;
  cursor: pointer;
}

.attack-pill:hover {
  opacity: .8;
  border-color: currentColor;
}

.attack-pill-technique { background: rgba(125, 207, 255, .12); color: var(--c-info); }
.attack-pill-group     { background: rgba(255, 90,  90,  .12); color: var(--c-danger); }
.attack-pill-software  { background: rgba(255, 170, 68,  .12); color: var(--c-warn); }
.attack-pill-tactic    { background: rgba(110, 232, 154, .10); color: var(--c-ok); }

.attack-result {
  line-height: 1.7;
  font-size: .84rem;
}

.attack-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.attack-stat-card {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 20px 16px;
  text-align: center;
}

.attack-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--t1);
  font-family: var(--f-mono);
  line-height: 1.1;
}

.attack-stat-label {
  font-size: .65rem;
  color: var(--t4);
  font-family: var(--f-mono);
  margin-top: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}



/* Dashboard */
.dash-metric-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dash-metric-card {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-metric-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--t1);
  font-family: var(--f-mono);
  line-height: 1;
}

.dash-metric-label {
  font-size: .62rem;
  color: var(--t4);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.dash-bar-label {
  font-size: .65rem;
  min-width: 130px;
  max-width: 130px;
  color: var(--t3);
  font-family: var(--f-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-bar-track {
  flex: 1;
  height: 4px;
  background: var(--s3);
  border-radius: 3px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  background: var(--c-info, #7dcfff);
  border-radius: 3px;
  min-width: 4px;
}

.dash-bar-val {
  font-size: .62rem;
  color: var(--t4);
  font-family: var(--f-mono);
  min-width: 52px;
  text-align: right;
}

.dash-module-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-module {
  padding: 5px 12px;
  border-radius: var(--r1);
  font-size: .65rem;
  font-family: var(--f-mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-module.avail {
  background: rgba(110, 232, 154, .08);
  color: var(--c-ok, #6ee89a);
  border: 1px solid rgba(110, 232, 154, .2);
}

.dash-module.unavail {
  background: var(--s2);
  color: var(--t4);
  border: 1px solid var(--b1);
}

.dash-module-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 900px) {
  .dash-metric-row { grid-template-columns: repeat(3, 1fr); }
  .dash-two-col    { grid-template-columns: 1fr; }
}

/* Tags */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  background: rgba(125, 207, 255, .08);
  border: 1px solid rgba(125, 207, 255, .2);
  border-radius: 20px;
  font-size: .6rem;
  color: var(--c-info, #7dcfff);
  font-family: var(--f-mono);
  text-decoration: none;
  cursor: default;
}

.hrow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

/* Cases */
.case-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .6rem;
  font-family: var(--f-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.status-open          { background: rgba(125,207,255,.1); color: var(--c-info,#7dcfff); border: 1px solid rgba(125,207,255,.25); }
.status-investigating { background: rgba(255,170,68,.1);  color: var(--c-warn,#ffaa44); border: 1px solid rgba(255,170,68,.25); }
.status-closed        { background: var(--s3);            color: var(--t4);             border: 1px solid var(--b1); }

/* Sigma modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: var(--s1);
  border: 1px solid var(--b3);
  border-radius: var(--r3);
  width: min(720px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .7);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--b2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--t1);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--b1);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.sigma-pre {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--t2);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  padding: 14px 16px;
  margin: 0;
}

/* Pinned Indicators Panel */
.pins-panel {
  position: fixed;
  top: 0;
  left: -310px;
  width: 290px;
  height: 100vh;
  background: rgba(6, 6, 8, .96);
  border-right: 1px solid var(--b2);
  z-index: 1001;
  box-shadow: 8px 0 32px rgba(0, 0, 0, .5);
  transition: left .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
}

.pins-panel.open { left: 0; }

.pins-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.pins-overlay.open { opacity: 1; pointer-events: auto; }

.pins-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--b2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.pins-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
}

.pins-fab {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 900;
  background: var(--s2);
  border: 1px solid var(--b3);
  border-radius: 20px;
  padding: 7px 13px;
  color: var(--t3);
  font-family: var(--f-mono);
  font-size: .65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.pins-fab:hover {
  border-color: var(--b5, var(--b3));
  color: var(--t1);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

#pins-fab-badge {
  background: var(--c-danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 3px;
  font-family: var(--f-mono);
}

.pin-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r2);
  margin-bottom: 7px;
  position: relative;
  padding-right: 28px;
}

.pin-item.pin-alert { border-color: rgba(255, 90, 90, .35); }

.pin-indicator {
  font-family: var(--f-mono);
  font-size: .65rem;
  color: var(--t2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pin-remove {
  position: absolute;
  top: 7px;
  right: 8px;
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  font-size: .9rem;
  padding: 0;
  line-height: 1;
}

.pin-remove:hover { color: var(--c-danger); }

/*
 * Indicator detail page
 * */

.verdict-card {
  border-left: 3px solid var(--b3);
}
.verdict-card.verdict-malicious  { border-left-color: var(--c-danger); }
.verdict-card.verdict-suspicious { border-left-color: var(--c-warn); }
.verdict-card.verdict-clean      { border-left-color: var(--c-ok); }
.verdict-card.verdict-unknown    { border-left-color: var(--t4); }

.verdict-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.verdict-label {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .08em;
  margin: 0;
}
.verdict-label-malicious  { color: var(--c-danger); }
.verdict-label-suspicious { color: var(--c-warn); }
.verdict-label-clean      { color: var(--c-ok); }
.verdict-label-unknown    { color: var(--t3); }

.verdict-stats {
  display: flex;
  gap: 28px;
}

.verdict-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.verdict-stat-num {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--t1);
}
.verdict-stat-label {
  font-family: var(--f-mono);
  font-size: .58rem;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.verdict-summary {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--b2);
  font-size: .78rem;
  color: var(--t2);
  line-height: 1.55;
  font-style: italic;
}

/* Sparkline (oldest -> newest, left -> right) */
.verdict-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  padding: 4px 0;
  border-bottom: 1px solid var(--b2);
}
.spark-bar {
  flex: 1;
  min-width: 4px;
  background: var(--t4);
  border-radius: 2px 2px 0 0;
  transition: opacity .15s ease;
}
.spark-bar:hover { opacity: .7; }
.spark-bar.spark-malicious  { background: var(--c-danger); }
.spark-bar.spark-suspicious { background: var(--c-warn); }
.spark-bar.spark-clean      { background: var(--c-ok); }
.spark-bar.spark-unknown    { background: var(--t4); }

/* Clickable IOC cells in tables */
.ioc-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.ioc-link:hover { border-bottom-color: var(--t3); }

/*
 * Topbar global indicator search
 * */

.topbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-search-input {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--b2);
  color: var(--t2);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: .68rem;
  min-width: 180px;
  transition: border-color .15s, background .15s;
}
.topbar-search-input::placeholder { color: var(--t4); }
@media (max-width: 1500px) {
  .topbar-search-input { min-width: 120px; width: 120px; }
}
.topbar-search-input:focus {
  outline: none;
  border-color: var(--b4);
  background: rgba(255, 255, 255, .06);
}

/* Dashboard recent activity feed */
.dash-activity-list { display: flex; flex-direction: column; gap: 6px; }
.dash-activity-row {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--b2);
  border-radius: 6px;
  background: rgba(255, 255, 255, .015);
  font-size: .73rem;
  transition: border-color .15s, background .15s;
}
.dash-activity-row:hover {
  border-color: var(--b3);
  background: rgba(255, 255, 255, .04);
}
.dash-activity-time {
  color: var(--t4);
  font-family: var(--f-mono);
  font-size: .65rem;
}
.dash-activity-indicator code {
  color: var(--t2);
  font-family: var(--f-mono);
  word-break: break-all;
}

/*
 * Inline IOC chips in chat output
 * Clicking jumps straight to /indicator/<value>. Subtle by default,
 * coloured ring on hover so the analyst notices they're interactive.
 * */
.ioc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border: 1px solid var(--b2);
  border-radius: 5px;
  text-decoration: none;
  background: rgba(255, 255, 255, .03);
  transition: border-color .12s, background .12s, transform .12s;
  vertical-align: baseline;
  line-height: 1.4;
}
.ioc-chip:hover {
  border-color: var(--b4);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-1px);
}
.ioc-chip code {
  background: transparent;
  padding: 0;
  color: var(--t1);
  font-size: .82em;
}
.ioc-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t4);
  flex-shrink: 0;
}
.ioc-chip-ip::before     { background: #ff7a7a; }
.ioc-chip-hash::before   { background: #c499ff; }
.ioc-chip-cve::before    { background: #ffaa44; }
.ioc-chip-url::before    { background: #66b3ff; }
.ioc-chip-domain::before { background: #6ee89a; }
.ioc-chip-email::before  { background: #ffd966; }

/*
 * Sparkline legend
 * */
.spark-legend {
  display: flex;
  gap: 14px;
  font-size: .62rem;
  color: var(--t4);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 8px;
}
.spark-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.spark-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.spark-legend-dot.lg-malicious  { background: var(--c-danger); }
.spark-legend-dot.lg-suspicious { background: var(--c-warn); }
.spark-legend-dot.lg-clean      { background: var(--c-ok); }
.spark-legend-dot.lg-unknown    { background: var(--t4); }

/*
 * Keyboard shortcuts overlay
 * Press `?` to open. Click outside or Esc to dismiss.
 * */
.kbd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.kbd-overlay.open { display: flex; }
.kbd-panel {
  background: var(--s1);
  border: 1px solid var(--b3);
  border-radius: 12px;
  padding: 24px 28px;
  min-width: 420px;
  max-width: 90vw;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.kbd-panel h3 {
  margin: 0 0 4px 0;
  font-family: var(--f-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--t1);
  text-transform: uppercase;
}
.kbd-panel p {
  margin: 0 0 18px 0;
  font-size: .7rem;
  color: var(--t4);
  font-family: var(--f-mono);
}
.kbd-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 24px;
  font-size: .78rem;
}
.kbd-grid .kbd-action { color: var(--t2); }
.kbd-key {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--b2);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: .7rem;
  color: var(--t1);
  min-width: 18px;
  text-align: center;
}
