/* Flat threat-ranking rows shared by Top Scanners and Top C2.
 * Opt-in only: no effect outside .threat-row.
 */
.card-list {
  gap: 0.875rem;
}

.card-list .threat-row {
  --row-accent: #22d3ee;
  --row-tint: rgba(34, 211, 238, 0.035);
  background: linear-gradient(105deg, var(--row-tint), rgba(15, 23, 42, 0.38) 42%, rgba(10, 14, 23, 0.62));
  border: 0 !important;
  border-radius: 12px;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  overflow: hidden;
  padding: 1.25rem 1.5rem;
  transition: none !important;
}

.card-list .threat-row:hover,
.card-list .threat-row:focus,
.card-list .threat-row:focus-visible {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  transform: none !important;
}

.card-list .threat-row--c2 {
  --row-accent: #22d3ee;
  --row-tint: rgba(34, 211, 238, 0.035);
}

.card-list .threat-row--heartbeat {
  --row-accent: #22d3ee;
  --row-tint: rgba(34, 211, 238, 0.035);
}

.card-list .threat-row.card-rank-1 { --row-tint: rgba(34, 211, 238, 0.07); }
.card-list .threat-row.card-rank-2 { --row-tint: rgba(148, 163, 184, 0.05); }
.card-list .threat-row.card-rank-3 { --row-tint: rgba(167, 139, 250, 0.055); }

.threat-row__top {
  align-items: flex-start;
  backdrop-filter: none;
  background: transparent;
  border: 0 !important;
  box-shadow: none;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
  position: static;
  transition: none;
  z-index: auto;
}

.threat-row__identity {
  align-items: flex-start;
  display: flex;
  gap: 0.875rem;
  min-width: 0;
}

.threat-row__rank {
  color: var(--row-accent);
  flex: 0 0 2.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5rem;
  opacity: 0.9;
}

.threat-row__identity-copy {
  min-width: 0;
}

.threat-row__ip-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  min-width: 0;
}

.threat-row--heartbeat .threat-row__ip-line,
.threat-row--c2 .threat-row__ip-line,
.threat-row--scanner .threat-row__ip-line {
  flex-wrap: nowrap;
}

.threat-row--heartbeat .threat-row__ip,
.threat-row--heartbeat .active-now,
.threat-row--c2 .threat-row__ip,
.threat-row--c2 .active-now,
.threat-row--scanner .threat-row__ip,
.threat-row--scanner .active-now {
  flex: 0 0 auto;
}

.threat-row__network-name {
  color: #94a3b8;
  flex: 1 1 auto;
  font-size: 0.72rem;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threat-row__inline-meta {
  color: #94a3b8;
  flex: 1 1 auto;
  font-size: 0.72rem;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threat-row__ip {
  color: #22d3ee;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5rem;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threat-row__ip:hover {
  color: #67e8f9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.threat-row__meta {
  color: #94a3b8;
  display: flex;
  flex-wrap: nowrap;
  font-size: 0.78rem;
  gap: 0.25rem 0.9rem;
  line-height: 1.45;
  margin-top: 0.2rem;
}

.threat-row__meta-item {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threat-row__meta-item:nth-child(2) {
  flex: 1 1 auto;
}

.threat-row__action {
  align-items: center;
  color: #a78bfa;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.4rem;
  line-height: 1.5rem;
  padding: 0;
  text-decoration: none;
}

.threat-row__action:hover {
  color: #c4b5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.threat-row__body {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 1.2fr);
  min-width: 0;
}

.threat-row__section {
  min-width: 0;
}

.threat-row__eyebrow,
.threat-row__activity-title {
  color: #64748b;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.threat-row__protocols {
  align-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin-top: 0.65rem;
  min-height: 1.35rem;
}

.threat-row .threat-row__protocol {
  align-items: baseline;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  color: #22d3ee;
  display: inline-flex;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 0.35rem;
  letter-spacing: 0.025em;
  line-height: 1.45;
  padding: 0;
  text-transform: uppercase;
}

.threat-row .threat-row__protocol::before {
  background: currentColor;
  border-radius: 999px;
  content: '';
  flex: 0 0 auto;
  height: 4px;
  position: relative;
  top: -0.1em;
  width: 4px;
}

.threat-row .threat-row__protocol.protocol-udp { color: #a78bfa; }
.threat-row .threat-row__protocol.protocol-tcp { color: #22d3ee; }
.threat-row .threat-row__protocol.protocol-other { color: #94a3b8; }

.threat-row__protocol-count {
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.threat-row__observation {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.65rem;
}

.threat-row__observation-item {
  min-width: 0;
}

.threat-row__observation-label {
  color: #64748b;
  display: block;
  font-size: 0.7rem;
  line-height: 1.35;
  text-transform: uppercase;
}

.threat-row__observation-value {
  color: #cbd5e1;
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 0.15rem;
}

.threat-row__meter {
  margin-top: 0.75rem;
}

.threat-row__meter-label {
  color: #64748b;
  display: flex;
  font-size: 0.7rem;
  justify-content: space-between;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.threat-row .volume-bar-track {
  background: rgba(51, 65, 85, 0.52);
  border-radius: 999px;
  height: 3px;
  margin: 0;
  overflow: hidden;
}

.threat-row .volume-bar-fill {
  background: linear-gradient(90deg, #22d3ee, var(--row-accent));
  border-radius: inherit;
  height: 100%;
}

.threat-row__metrics {
  align-content: start;
  display: grid;
  gap: 0.8rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.threat-row__metric {
  min-width: 0;
}

.threat-row__metric-value {
  color: #e2e8f0;
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.threat-row__metric--primary .threat-row__metric-value { color: #22d3ee; }
.threat-row__metric--accent .threat-row__metric-value { color: #c084fc; }

.threat-row__metric-suffix {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
}

.threat-row__metric-label {
  color: #64748b;
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.threat-row__activity-head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.threat-row__activity-note {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.threat-row .timeline-chart-container {
  height: 72px;
  min-width: 0;
}

.threat-row .active-now {
  align-items: center;
  background: transparent;
  border: 0;
  color: #4ade80;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 0.35rem;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
}

.threat-row .active-now .pulse-dot {
  background: #22c55e;
  border-radius: 999px;
  height: 6px;
  width: 6px;
}

/* Editorial context below public rankings. */
.ranking-brief {
  padding-bottom: 5rem;
  padding-top: 3rem;
}

.ranking-brief__shell {
  --brief-accent: var(--ranking-accent, #22d3ee);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(10, 14, 23, 0.82));
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
}

.ranking-brief__shell::before {
  background: linear-gradient(90deg, var(--brief-accent), #8b5cf6, transparent 88%);
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.ranking-brief__header {
  max-width: 46rem;
}

.ranking-brief__kicker,
.ranking-brief__label,
.ranking-brief__source-label {
  color: var(--brief-accent);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ranking-brief__kicker {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
}

.ranking-brief__signal {
  background: var(--brief-accent);
  border-radius: 999px;
  box-shadow: 0 0 12px var(--brief-accent);
  height: 6px;
  width: 6px;
}

.ranking-brief__title {
  color: #f8fafc;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
}

.ranking-brief__subtitle {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0.85rem 0 0;
}

.ranking-brief__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.85fr);
  margin-top: 2rem;
}

.ranking-brief__panel {
  background: rgba(2, 6, 23, 0.3);
  border-radius: 12px;
  min-width: 0;
  padding: 1.35rem;
}

.ranking-brief__label {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.ranking-brief__copy p {
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.75;
  margin: 0;
}

.ranking-brief__copy p + p {
  margin-top: 0.9rem;
}

.ranking-brief a,
.ranking-brief strong {
  color: var(--brief-accent);
  font-weight: 700;
}

.ranking-brief a {
  text-decoration: none;
}

.ranking-brief a:hover,
.ranking-brief a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ranking-brief__uses {
  counter-reset: ranking-use;
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-brief__uses li {
  align-items: start;
  color: #cbd5e1;
  counter-increment: ranking-use;
  display: grid;
  font-size: 0.86rem;
  gap: 0.75rem;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  line-height: 1.55;
}

.ranking-brief__uses li::before {
  color: var(--brief-accent);
  content: counter(ranking-use, decimal-leading-zero);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.65rem;
}

.ranking-brief__source {
  align-items: flex-start;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  display: grid;
  font-size: 0.78rem;
  gap: 0.7rem 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  line-height: 1.6;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.ranking-brief__source-label {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  line-height: 1.6;
  white-space: nowrap;
}

.ranking-brief__source p {
  margin: 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .card-list .threat-row {
    gap: 1rem;
    padding: 1.125rem 1.25rem;
  }

  .threat-row__body {
    gap: 1rem;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(220px, 1.2fr);
  }

  .threat-row__metrics {
    gap: 0.65rem 0.8rem;
  }

  .threat-row .timeline-chart-container {
    height: 72px;
  }
}

@media (max-width: 767px) {
  .ranking-brief {
    padding-bottom: 4rem;
    padding-top: 2rem;
  }

  .ranking-brief__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .threat-row__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threat-row__activity {
    grid-column: 1 / -1;
  }

  .threat-row .timeline-chart-container {
    height: 76px;
  }
}

@media (max-width: 639px) {
  .card-list .threat-row {
    gap: 0.875rem;
    padding: 1rem;
  }

  .threat-row__top {
    gap: 0.75rem;
  }

  .threat-row--c2 .threat-row__top,
  .threat-row--scanner .threat-row__top {
    flex-wrap: wrap;
  }

  .threat-row--c2 .threat-row__identity,
  .threat-row--scanner .threat-row__identity {
    flex: 1 1 100%;
  }

  .threat-row--c2 .threat-row__action,
  .threat-row--scanner .threat-row__action {
    margin-left: 2.7rem;
  }

  .threat-row__identity {
    gap: 0.55rem;
  }

  .threat-row__rank {
    flex-basis: 2.15rem;
    font-size: 0.72rem;
  }

  .threat-row__ip {
    font-size: 0.95rem;
  }

  .threat-row__meta {
    font-size: 0.72rem;
    gap: 0.25rem 0.4rem;
  }

  .threat-row__action {
    font-size: 0.72rem;
  }

  .threat-row__body {
    gap: 0.875rem;
    grid-template-columns: 1fr;
  }

  .threat-row__activity {
    grid-column: auto;
  }

  .threat-row .timeline-chart-container {
    height: 82px;
  }

  .threat-row__protocols,
  .threat-row__observation {
    margin-top: 0.5rem;
  }

  .threat-row__meter {
    margin-top: 0.6rem;
  }

  .threat-row__metrics {
    gap: 0.65rem 1rem;
  }

  .threat-row__activity-head {
    margin-bottom: 0.25rem;
  }

  .back-to-top {
    bottom: 12px;
    height: 38px;
    opacity: 0.58;
    right: 6px;
    width: 38px;
  }

  .back-to-top:hover,
  .back-to-top:focus-visible {
    opacity: 1;
  }

  .ranking-brief__shell {
    border-radius: 12px;
    padding: 1.25rem;
  }

  .ranking-brief__panel {
    padding: 1rem;
  }

  .ranking-brief__source {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 379px) {
  .threat-row__top {
    flex-wrap: wrap;
  }

  .threat-row__action {
    margin-left: 2.7rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .card-list .threat-row {
    animation: none !important;
    opacity: 1 !important;
  }

  .threat-row .active-now .pulse-dot {
    animation: none !important;
  }
}
