:root {
  --void: #05060a;
  --void-light: #0d0f14;
  --void-deep: #020304;
  --bone: #dcd8cd;
  --red: #dc2626;
  --red-bright: #ef4444;
  --red-dim: #991b1b;
  --red-glow: rgba(220, 38, 38, 0.4);
  --ghost: #6b6761;
  --ghost-dim: #37352f;
  --success: #10b981;
  --warn: #f59e0b;
  --info: #3b82f6;
  --cyan: #06b6d4;
  --purple: #8b5cf6;

  /* Surfaces & text (layered glass system) */
  --surface-01: rgba(13, 15, 20, 0.72);
  --surface-02: rgba(20, 23, 31, 0.82);
  --surface-3: rgba(30, 34, 45, 0.85);
  --surface-4: rgba(220, 38, 38, 0.16);
  --text-primary: var(--bone);
  --text-secondary: var(--ghost);
  --accent: var(--red);
  --primary: var(--red-bright);

  /* Radii & type */
  --radius-lg: 14px;
  --radius-md: 8px;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--bone);
}

body {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
}

/* Background layers */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 25%, rgba(5, 6, 10, 0.96) 100%),
    radial-gradient(circle at 85% 15%, rgba(220, 38, 38, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 15% 85%, rgba(220, 38, 38, 0.08) 0%, transparent 35%),
    linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(5, 6, 10, 0.5), transparent 20%, transparent 80%, rgba(5, 6, 10, 0.8));
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  opacity: 0.15;
}

/* App structure */
.app {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(5, 6, 10, 0.9);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(220, 38, 38, 0.15);
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red) 50%, transparent);
  opacity: 0.3;
}

.logo {
  font-size: 1.3rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bone);
  text-shadow: 0 0 30px var(--red-glow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo::before {
  content: '▸';
  color: var(--red);
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.logo span {
  color: var(--red);
  font-weight: 900;
}

@media (min-width: 1500px) {
  .header-tagline {
    display: block !important;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ghost);
}

.status-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 3px;
  background: rgba(13, 15, 20, 0.6);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ghost-dim);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid transparent;
  opacity: 0;
}

.status-dot.live {
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

.status-dot.live::after {
  border-color: var(--red);
  opacity: 1;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Main layout */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 290px;
  border-right: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(2, 3, 4, 0.6);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.3);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.5);
}

.nav-section {
  padding: 22px 18px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.12);
}

.nav-title {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ghost-dim);
  margin-bottom: 14px;
  font-weight: 700;
  padding-left: 14px;
}

.nav-item {
  padding: 11px 14px;
  margin: 3px 0;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ghost);
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 70%;
  background: var(--red);
  border-radius: 0 3px 3px 0;
  transition: width 0.2s;
}

.nav-item:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--bone);
  padding-left: 18px;
}

.nav-item.active {
  background: rgba(220, 38, 38, 0.25);
  color: var(--red-bright);
  font-weight: 600;
  padding-left: 18px;
  box-shadow: inset 0 0 20px rgba(220, 38, 38, 0.2);
}

.nav-item.active::before {
  width: 3px;
}

.nav-icon {
  width: 15px;
  height: 15px;
  opacity: 0.65;
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

/* Content */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  padding-bottom: 64px;
  background: rgba(5, 6, 10, 0.5);
}

.content::-webkit-scrollbar {
  width: 10px;
}

.content::-webkit-scrollbar-track {
  background: rgba(5, 6, 10, 0.4);
}

.content::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.3);
  border-radius: 5px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.5);
}

/* Panels */
.panel {
  background: rgba(13, 15, 20, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 7px;
  padding: 26px;
  margin-bottom: 22px;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-glow), transparent);
}

.panel-header {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header::after {
  content: '';
  flex: 1;
  height: 1px;
  margin-left: 20px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.3), transparent);
}

.panel-subtitle {
  font-size: 0.7rem;
  color: var(--ghost);
  letter-spacing: 0.08em;
  margin-top: 6px;
  font-weight: 400;
  text-transform: none;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ghost);
  font-weight: 600;
}

.input {
  background: rgba(2, 3, 4, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 5px;
  padding: 11px 14px;
  color: var(--bone);
  font-family: inherit;
  font-size: 0.82rem;
  transition: all 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.input::placeholder {
  color: var(--ghost-dim);
  font-style: italic;
}

.select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23dc2626' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.6;
}

/* Buttons */
.btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 11px 26px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(107, 103, 97, 0.2);
  color: var(--bone);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background: rgba(107, 103, 97, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Quick filters */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-filter {
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--red-bright);
  border: 1px solid rgba(220, 38, 38, 0.25);
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.06em;
}

.quick-filter:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Results */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.results-title {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  font-weight: 700;
}

.results-meta {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ghost);
}

.results-meta span {
  color: var(--red-bright);
  font-weight: 700;
}

/* Cards */
.card {
  background: rgba(13, 15, 20, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.2);
  transform: translateX(4px);
}

.card:hover::before {
  opacity: 1;
}

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

.card-title {
  font-size: 1.05rem;
  color: var(--bone);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: inherit;
}

.card-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.65rem;
  padding: 5px 11px;
  border-radius: 4px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
}

.badge-critical {
  background: rgba(220, 38, 38, 0.2);
  color: #ff6b6b;
  border-color: rgba(220, 38, 38, 0.4);
}

.badge-high {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-medium {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.4);
}

.badge-low {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.badge-open {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.badge-service {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.4);
}

.badge-info {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.4);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 14px 22px;
  font-size: 0.78rem;
}

.card-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  color: var(--ghost-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 600;
}

.field-value {
  color: var(--bone);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field-value.mono {
  font-family: inherit;
}

.field-value.highlight {
  color: var(--red-bright);
}

.field-value.success {
  color: var(--success);
}

.field-value.warn {
  color: var(--warn);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  font-size: 0.66rem;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(107, 103, 97, 0.18);
  color: var(--ghost);
  letter-spacing: 0.08em;
  border: 1px solid rgba(107, 103, 97, 0.25);
}

.tag-service {
  background: rgba(139, 92, 246, 0.18);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.tag-product {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.tag-risk {
  background: rgba(220, 38, 38, 0.18);
  color: #ff6b6b;
  border-color: rgba(220, 38, 38, 0.3);
}

.tag-cve {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(13, 15, 20, 0.85);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.5;
}

.stat-value {
  font-size: 2.2rem;
  color: var(--red-bright);
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--red-glow);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ghost);
  font-weight: 600;
}

.stat-change {
  font-size: 0.68rem;
  margin-top: 6px;
  color: var(--success);
  font-weight: 600;
}

.stat-change.down {
  color: var(--warn);
}

/* Empty / Loading / Error states */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--ghost);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 18px;
  opacity: 0.25;
}

.empty-text {
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  gap: 14px;
  color: var(--ghost);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(220, 38, 38, 0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 20px;
  color: #ff6b6b;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  align-items: center;
}

.page-info {
  color: var(--ghost);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0 16px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.tab {
  padding: 12px 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ghost);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  color: var(--bone);
  background: rgba(220, 38, 38, 0.1);
}

.tab.active {
  color: var(--red-bright);
  border-bottom-color: var(--red);
  background: rgba(220, 38, 38, 0.15);
}

/* Progress bar */
.progress {
  height: 8px;
  background: rgba(2, 3, 4, 0.8);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dim), var(--red-bright));
  transition: width 0.5s ease;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--red-glow);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ghost);
  font-weight: 700;
  border-bottom: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(13, 15, 20, 0.6);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.15);
  color: var(--bone);
}

tr:hover td {
  background: rgba(220, 38, 38, 0.08);
}

/* Filter groups for advanced query builder */
.filter-group {
  background: rgba(13, 15, 20, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  padding: 1rem;
}

.filter-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 38, 38, 1);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.filter-input {
  margin-bottom: 0.5rem;
}

.filter-input:last-child {
  margin-bottom: 0;
}

.filter-input::placeholder {
  font-size: 0.85rem;
  opacity: 0.5;
}

.filter-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Query preview enhancements */
.query-preview [contenteditable="true"]:empty::before {
  content: "Filters will appear here...";
  opacity: 0.4;
  font-style: italic;
}

.query-preview [contenteditable="true"]:focus {
  outline: 2px solid rgba(220, 38, 38, 0.5);
  outline-offset: 2px;
}

/* Template modal enhancements */
.template-item {
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-item:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateX(4px);
}

.template-item-title {
  font-weight: 600;
  color: var(--red-bright);
  margin-bottom: 0.25rem;
}

.template-item-query {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Faceted filters styling */
.facets-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.facet-group {
  background: rgba(13, 15, 20, 0.6);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 1rem;
}

.facet-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(220, 38, 38, 0.9);
  margin-bottom: 0.75rem;
}

.facet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
  font-size: 0.85rem;
}

.facet-item:hover {
  background: rgba(220, 38, 38, 0.1);
}

.facet-value {
  color: var(--bone);
}

.facet-count {
  color: var(--red);
  font-weight: 600;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .sidebar {
    width: 260px;
  }
  .content {
    padding: 22px;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .content {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .status {
    gap: 12px;
  }
  .status-item {
    font-size: 0.65rem;
    padding: 5px 10px;
  }
}

/* Faceted Drill-Down */
.facet-drill {
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  border-bottom: 1px dashed transparent;
}

.facet-drill:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateY(-1px);
}

.facet-drill:active {
  transform: translateY(0);
}

.facet-breadcrumb {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface-01);
  border-radius: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.facet-breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-02);
  border-radius: 999px;
  font-size: 0.875rem;
}

.facet-breadcrumb-label {
  color: var(--text-secondary);
}

.facet-breadcrumb-value {
  color: var(--accent);
  font-weight: 600;
}

.facet-breadcrumb-remove {
  cursor: pointer;
  color: var(--text-secondary);
  margin-left: 0.5rem;
  transition: color 0.2s ease;
}

.facet-breadcrumb-remove:hover {
  color: var(--accent);
}

/* 3D Network Map */
.network-3d-canvas {
  width: 100%;
  height: 600px;
  background: #000;
  border-radius: var(--radius-lg);
  cursor: grab;
}

.network-3d-canvas:active {
  cursor: grabbing;
}

.network-3d-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.network-3d-controls button {
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-4);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.network-3d-controls button:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.node-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.node-detail-content {
  background: var(--surface-2);
  border: 1px solid var(--surface-4);
  border-radius: var(--radius-lg);
  min-width: 400px;
  max-width: 600px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.node-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--surface-4);
}

.node-detail-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.node-detail-header button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.node-detail-header button:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.node-detail-body {
  padding: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span {
  color: var(--text-secondary);
}

.detail-row strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Palette Preview */
.palette-preview {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 20px;
  background: rgba(2, 3, 4, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
}

.palette-color {
  flex: 1;
  height: 60px;
  border-radius: 4px;
  position: relative;
  transition: transform 0.2s;
}

.palette-color:hover {
  transform: scale(1.05);
}

.palette-color::after {
  content: attr(data-label);
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--ghost-dim);
  white-space: nowrap;
}

/* ==================== NETWORK MAP TOOLTIP ==================== */

.map-tooltip {
  position: absolute;
  z-index: 1000;
  background: rgba(15, 8, 8, 0.96);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 200px;
  max-width: 260px;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(220, 38, 38, 0.1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.tt-ip {
  font-size: 0.875rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  line-height: 1.4;
}

.tt-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==================== MAP STATS BAR ==================== */

#map-stats-bar {
  background: linear-gradient(135deg, rgba(15, 8, 8, 0.9), rgba(30, 15, 15, 0.9));
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* ============================================================
   UI UPGRADE LAYER — view heroes, glass panels, motion, polish
   ============================================================ */

/* ---------- Page hero (rendered by Views.viewPage) ---------- */
.view-page {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 32px;
  margin-bottom: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(220, 38, 38, 0.22);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(220, 38, 38, 0.14), transparent 55%),
    radial-gradient(120% 180% at 0% 100%, rgba(139, 92, 246, 0.08), transparent 55%),
    linear-gradient(135deg, rgba(13, 15, 20, 0.92), rgba(8, 9, 13, 0.88));
  overflow: hidden;
  animation: viewPageIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.view-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.6;
}
.view-page::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -6%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}
.view-page-glyph {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0.05));
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.view-page-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.view-page-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--bone);
  text-shadow: 0 2px 18px rgba(220, 38, 38, 0.25);
}
.view-page-sub {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--ghost);
  letter-spacing: 0.03em;
  line-height: 1.5;
  max-width: 720px;
}
.view-page-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@keyframes viewPageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Panels: glass + glow refinements ---------- */
.panel {
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(220, 38, 38, 0.03), transparent 120px),
    rgba(10, 12, 17, 0.74);
  border: 1px solid rgba(220, 38, 38, 0.16);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  animation: panelIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.panel:hover {
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(220, 38, 38, 0.08),
    0 6px 32px rgba(220, 38, 38, 0.12);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons: depth, shine, feedback ---------- */
.btn {
  border-radius: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 10px 18px;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}
.btn-secondary {
  border-radius: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

/* ---------- Inputs: cleaner focus rings ---------- */
.input, .select, .textarea {
  border-radius: 9px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14), 0 6px 18px rgba(0, 0, 0, 0.28);
  background: rgba(16, 18, 25, 0.9);
  outline: none;
}
.label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ghost);
}

/* ---------- Quick filter chips ---------- */
.quick-filter {
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.06);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--bone);
  cursor: pointer;
  transition: all 0.18s ease;
}
.quick-filter:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(220, 38, 38, 0.16);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.22);
  color: #fff;
}
.quick-filter:active { transform: translateY(0); }

/* ---------- Cards: lift on hover ---------- */
.card {
  border-radius: 11px;
  border: 1px solid rgba(220, 38, 38, 0.13);
  background: linear-gradient(180deg, rgba(18, 20, 27, 0.85), rgba(12, 14, 19, 0.9));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card:hover {
  transform: translateX(6px) translateY(-2px);
  border-color: rgba(220, 38, 38, 0.38);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), -4px 0 0 rgba(220, 38, 38, 0.55), 0 0 28px rgba(220, 38, 38, 0.1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Stat cards: punchier KPI numbers ---------- */
.stat-card {
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(220, 38, 38, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(18, 20, 27, 0.9), rgba(11, 13, 18, 0.92));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 38, 38, 0.34);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(220, 38, 38, 0.12);
}
.stat-value {
  background: linear-gradient(180deg, #fff, var(--red-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  letter-spacing: -0.01em;
}
.stat-label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 700;
}

/* ---------- Badges: crisp pill geometry ---------- */
.badge {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-critical { border-color: rgba(220, 38, 38, 0.5); box-shadow: 0 0 12px rgba(220, 38, 38, 0.25); }
.badge-high     { border-color: rgba(245, 158, 11, 0.45); box-shadow: 0 0 12px rgba(245, 158, 11, 0.18); }

/* ---------- Tabs: sliding underline ---------- */
.tabs {
  gap: 4px;
  border-radius: 10px;
}
.tab {
  border-radius: 8px 8px 2px 2px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 9px 16px;
  transition: all 0.2s ease;
}
.tab:hover {
  color: var(--bone);
  background: rgba(220, 38, 38, 0.08);
}
.tab.active {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.08));
  box-shadow: 0 -2px 14px rgba(220, 38, 38, 0.14);
}

/* ---------- Sidebar & header polish ---------- */
.nav-item {
  border-radius: 9px;
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
}
.nav-item:hover {
  background: rgba(220, 38, 38, 0.09);
  transform: translateX(3px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0.04));
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.12);
}
.nav-title {
  letter-spacing: 0.18em;
  font-size: 0.62rem;
  font-weight: 800;
}
.header {
  border-bottom: 1px solid rgba(220, 38, 38, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(220, 38, 38, 0.14);
}

/* ---------- Results header & meta ---------- */
.results-title {
  letter-spacing: 0.03em;
  font-weight: 800;
}
.results-meta {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* ---------- Empty & loading states ---------- */
.empty-icon {
  filter: grayscale(0.3) drop-shadow(0 8px 24px rgba(220, 38, 38, 0.22));
}
.spinner {
  border-radius: 50%;
  border-top-color: var(--red-bright);
  box-shadow: 0 0 24px rgba(220, 38, 38, 0.3);
}

/* ---------- Tables ---------- */
table {
  border-radius: 11px;
  overflow: hidden;
}
th {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 800;
}
td {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ---------- Facet & template items ---------- */
.facet-item, .template-item {
  border-radius: 8px;
  transition: all 0.16s ease;
}
.facet-item:hover, .template-item:hover {
  background: rgba(220, 38, 38, 0.1);
  transform: translateX(3px);
}

/* ---------- Custom scrollbars (content area) ---------- */
.content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.facets-container::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.5), rgba(220, 38, 38, 0.22));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.content::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.7);
  background-clip: padding-box;
}

/* ---------- Progress bar ---------- */
.progress {
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-dim), var(--red), var(--red-bright));
  background-size: 200% 100%;
  animation: progressShift 1.6s linear infinite;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.4);
}
@keyframes progressShift {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Selection highlight ---------- */
::selection {
  background: rgba(220, 38, 38, 0.38);
  color: #fff;
}

/* ---------- Responsive hero tweaks ---------- */
@media (max-width: 900px) {
  .view-page { padding: 20px 20px; gap: 14px; }
  .view-page-glyph { width: 50px; height: 50px; font-size: 1.5rem; }
  .view-page-title { font-size: 1.3rem; }
  .view-page-sub { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .view-page, .panel, .card, .progress-bar { animation: none !important; }
}

/* ---------- Header brand cluster & status pills ---------- */
.header-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.version-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(220, 38, 38, 0.85);
  letter-spacing: 1.5px;
  border: 1px solid rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
}
.header-tagline {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1.5px;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  background: rgba(220, 38, 38, 0.05);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.status-pill:hover {
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.1);
}

/* ---------- Dashboard hero (rendered by Views.dashboard) ---------- */
.hero {
  position: relative;
  padding: 38px 42px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(220, 38, 38, 0.28);
  background:
    radial-gradient(120% 180% at 85% -10%, rgba(220, 38, 38, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(10, 10, 15, 0.9) 55%, rgba(220, 38, 38, 0.05) 100%);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 48px rgba(220, 38, 38, 0.08);
  animation: viewPageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.65;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero-title > span:first-child { color: var(--red); }
.hero-tag {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.35rem;
  font-weight: 600;
}
.hero-desc {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  max-width: 720px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-actions .btn,
.hero-actions .btn-secondary {
  padding: 0 24px;
  height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 900px) {
  .hero { padding: 26px 22px; }
  .hero-title { font-size: 1.6rem; }
  .hero-tag { font-size: 1.05rem; }
}

/* ---------- Panel header/subtitle readability fix ---------- */
.panel-header {
  flex-wrap: wrap;
}
.panel-subtitle {
  display: block;
  flex: 0 0 100%;
  order: 1;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--ghost);
}
/* Re-color single-title panel headers (they previously inherited muted ghost) */
.panel-header {
  color: var(--bone);
}
