@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #060b14;
  --panel: rgba(15, 19, 29, 0.85);
  --panel-border: rgba(82, 255, 168, 0.2);
  --text: #e4f3ff;
  --muted: #8da3b9;
  --accent: #4de6b0;
  --accent-2: #7aa6ff;
  --danger: #ff5f6d;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --layout-left: 15%;
  --layout-main: 50%;
  --layout-right: 35%;
}

/* Base / Reset */
html {
  box-sizing: border-box;
  font-size: 15px;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 22% 18%, #0a0e1a 0%, #0d1117 52%, #060b14 100%);
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

#network-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  mix-blend-mode: normal;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.04;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0.5px, transparent 0.7px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.18) 0.5px, transparent 0.8px);
  background-size: 3px 3px, 4px 4px;
  mix-blend-mode: soft-light;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  background: rgba(8, 12, 19, 0.36);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #network-bg {
    opacity: 0.45;
  }
}

.hero,
main,
footer {
  position: relative;
  z-index: 10;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Typography */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.5rem;
}

p {
  color: var(--muted);
}

.hero {
  padding: 40px 0 12px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(77, 230, 176, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(122, 166, 255, 0.12), transparent 35%);
  filter: blur(40px);
  opacity: 0.6;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
}

/* Components: badges / tags / chips */
.badge,
.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge {
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(77, 230, 176, 0.08);
}

.bg-debug {
  position: fixed;
  left: 16px;
  bottom: 16px;
  padding: 6px 10px;
  background: rgba(7, 10, 15, 0.8);
  border: 1px solid rgba(77, 230, 176, 0.35);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border-radius: 8px;
  z-index: 5;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  margin: 10px 0 8px;
}

.hero__subtitle {
  margin: 0 0 16px;
  max-width: 680px;
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  animation: glitch 2s infinite linear alternate-reverse;
  color: var(--accent);
}

.glitch::after {
  animation: glitch 1.7s infinite linear alternate-reverse;
  color: var(--accent-2);
}

@keyframes glitch {
  0% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translate(-1px, -1px);
  }
  25% {
    clip-path: polygon(0 15%, 100% 12%, 100% 20%, 0 25%);
    transform: translate(1px, 1px);
  }
  50% {
    clip-path: polygon(0 40%, 100% 45%, 100% 52%, 0 48%);
    transform: translate(-1px, 0);
  }
  75% {
    clip-path: polygon(0 65%, 100% 62%, 100% 70%, 0 72%);
    transform: translate(1px, -1px);
  }
  100% {
    clip-path: polygon(0 85%, 100% 82%, 100% 90%, 0 95%);
    transform: translate(0, 1px);
  }
}

.hero__stats {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(320px, 380px);
  gap: 16px;
  position: relative;
  align-items: start;
}

.dashboard-left {
  display: grid;
  gap: 12px;
  grid-column: 1 / 2;
}

.stat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.stat-card--calendar {
  position: relative;
  z-index: 1;
}

.stat-label {
  margin: 0 0 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.stat-value.small {
  font-size: 1rem;
  line-height: 1.35;
  color: #b8c6d9;
}

/* Calendar */
.calendar-controls {
  margin: 6px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.button--month-nav {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button--month-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button--month-toggle {
  padding: 4px 8px;
  min-height: 26px;
  font-size: 0.72rem;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.button--month-toggle.is-active {
  border-color: rgba(77, 230, 176, 0.6);
  color: rgba(77, 230, 176, 0.95);
}

.button--month-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#month-label.is-disabled {
  opacity: 0.45;
}

.calendar {
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(77, 230, 176, 0.07);
  width: 100%;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar__spacer {
  display: block;
}

.calendar__day {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: all 0.2s ease;
  font-weight: 700;
  min-width: 0;
  padding: 0;
}

.calendar__day .calendar__day-number {
  font-size: 1rem;
}

.calendar__day.has-run {
  border-color: rgba(77, 230, 176, 0.5);
  box-shadow: 0 0 0 2px rgba(77, 230, 176, 0.08), 0 10px 18px rgba(0, 0, 0, 0.25);
}

.calendar__day.has-run:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(77, 230, 176, 0.18), 0 12px 20px rgba(0, 0, 0, 0.35);
}

.calendar__day.active {
  background: linear-gradient(140deg, rgba(77, 230, 176, 0.2), rgba(122, 166, 255, 0.18));
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77, 230, 176, 0.25), 0 12px 20px rgba(0, 0, 0, 0.35);
}

.calendar__day.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(77, 230, 176, 0.18);
  pointer-events: none;
}

.calendar__day.disabled {
  color: rgba(255, 255, 255, 0.35);
  border-style: dashed;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.015);
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.chip input {
  accent-color: var(--accent);
}

.chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(77, 230, 176, 0.12);
}

/* Surfaces: panels / stat cards */
.panel,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel {
  border-radius: 16px;
  padding: 20px;
  margin: 0;
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(77, 230, 176, 0.4), rgba(122, 166, 255, 0.1), rgba(77, 230, 176, 0.3));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.4;
  pointer-events: none;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0;
}

.tag {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.86rem;
}

.tag.live {
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(77, 230, 176, 0.12);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--text);
}

.pill--muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.score {
  color: var(--accent);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(77, 230, 176, 0.18), rgba(122, 166, 255, 0.16));
  box-shadow: 0 6px 16px rgba(77, 230, 176, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  color: var(--muted);
  padding: 8px 10px;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(77, 230, 176, 0.25);
}

[data-tooltip] {
  position: relative;
  z-index: 1;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 110%;
  transform: translate(-50%, -4px);
  background: rgba(7, 10, 15, 0.92);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  font-size: 0.82rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5000;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.field input,
.field select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
}

.field input:focus,
.field select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.toggle input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.history-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #f4b7c2;
  font-size: 0.86rem;
}

/* Cards / Articles */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: stretch;
  grid-auto-rows: minmax(280px, auto);
}

.card {
  background: rgba(12, 16, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  min-height: 280px;
  transition: transform 120ms ease, box-shadow 120ms ease, outline-color 120ms ease;
  outline: 1px solid transparent;
  z-index: 0;
}

.card:hover {
  outline: 1px solid rgba(80, 255, 170, 0.55);
  box-shadow: 0 0 0 1px rgba(80, 255, 170, 0.2), 0 8px 24px rgba(80, 255, 170, 0.1);
  transform: translateY(-1px);
  z-index: 999;
}

.card:focus-within {
  z-index: 999;
}

.card h3 {
  font-size: 0.96rem;
  margin: 0;
}

.card h3 a {
  color: #58a6ff;
  text-decoration: none;
}

.card h3 a:hover,
.card h3 a:focus-visible {
  color: #7dd3fc;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.article-summary {
  color: var(--muted);
  flex: 1;
}

.article-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card .footer .link,
.footer .link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

/* CVE panel */
.cve-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  padding-inline-end: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.cve-list::-webkit-scrollbar {
  width: 6px;
}

.cve-list::-webkit-scrollbar-track {
  background: transparent;
}

.cve-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.cve-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.cve-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.cve-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}

.cve-chip {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0.95;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.cve-chip:hover {
  transform: translateY(-1px);
}

.cve-chip.is-active {
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65), 0 0 14px rgba(255, 255, 255, 0.25);
}

.cve-search {
  width: 100%;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.cve-search::placeholder {
  color: var(--muted);
}

.cve-search:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}


.cve-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.cve-export {
  white-space: nowrap;
  padding: 8px 10px;
}

.cve-export:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.cve-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cve-chip--red {
  background: rgba(255, 70, 70, 0.16);
  color: rgb(255, 120, 120);
}

.cve-chip--orange {
  background: rgba(255, 165, 0, 0.16);
  color: rgb(255, 195, 110);
}

.cve-chip--green {
  background: rgba(80, 200, 120, 0.16);
  color: rgb(145, 235, 175);
}

.cve-chip--maturity {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(230, 235, 245, 0.9);
}

.cve-chip--maturity.is-active {
  box-shadow: 0 0 0 1px rgba(133, 201, 255, 0.7), 0 0 16px rgba(62, 164, 255, 0.3);
}


.cve-chip--kev {
  background: rgba(255, 96, 96, 0.16);
  color: rgb(255, 170, 170);
}

.cve-chip--kev.is-active {
  box-shadow: 0 0 0 1px rgba(255, 130, 130, 0.8), 0 0 16px rgba(255, 96, 96, 0.35);
}

#filters {
  position: relative;
  z-index: 1;
}

.cve-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 4px;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

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

.cve-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.cve-row:hover {
  color: var(--accent);
}

.cve-row:visited {
  color: inherit;
}

.cve-row.cve-maturity-complete .cve-soft {
  font-style: normal;
}

.cve-row.cve-maturity-partial .cve-soft {
  font-style: italic;
  color: rgb(255, 200, 120);
}

.cve-row.cve-maturity-raw .cve-soft {
  font-style: italic;
  color: rgba(195, 202, 215, 0.75);
}

.cve-maturity-badge {
  font-size: 0.66rem;
  border-radius: 999px;
  padding: 2px 6px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cve-maturity-badge--partial {
  background: rgba(255, 176, 59, 0.2);
  color: rgb(255, 208, 132);
}

.cve-maturity-badge--raw {
  background: rgba(157, 172, 192, 0.18);
  color: rgba(210, 219, 232, 0.9);
}

.cve-maturity-badge--retro {
  background: rgba(87, 192, 255, 0.18);
  color: rgb(154, 217, 255);
}

.cve-soft {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: inherit;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cve-id {
  font-family: 'JetBrains Mono', monospace;
  color: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.75;
  white-space: nowrap;
}



.cve-priority {
  font-size: 0.66rem;
  border-radius: 999px;
  padding: 2px 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cve-priority--critical {
  background: rgba(255, 64, 64, 0.22);
  color: rgb(255, 150, 150);
}

.cve-priority--high {
  background: rgba(255, 165, 0, 0.2);
  color: rgb(255, 205, 130);
}

.cve-priority--medium {
  background: rgba(255, 220, 100, 0.2);
  color: rgb(255, 225, 145);
}

.cve-priority--low {
  background: rgba(160, 160, 160, 0.22);
  color: rgb(210, 210, 210);
}

.cve-kev-icon {
  font-size: 0.6rem;
  cursor: help;
  white-space: nowrap;
  line-height: 1;
}


.cve-details {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-left: auto;
  min-width: 0;
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.78;
  white-space: nowrap;
}

.cve-details span {
  display: inline-flex;
  gap: 4px;
}

.cve-bucket--red .cve-soft,
.cve-bucket--red .cve-meta {
  color: rgb(255, 140, 140);
}

.cve-bucket--orange .cve-soft,
.cve-bucket--orange .cve-meta {
  color: rgb(255, 205, 130);
}

.cve-bucket--green .cve-soft,
.cve-bucket--green .cve-meta {
  color: rgb(155, 245, 185);
}

.cve-bucket--unknown .cve-soft,
.cve-bucket--unknown .cve-meta {
  color: inherit;
  opacity: 0.85;
}

.cve-meta {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.cve-epss {
  font-weight: 600;
  color: var(--accent-2);
  cursor: help;
}

.cve-footnote {
  margin-top: 8px;
  font-size: 0.72rem;
  opacity: 0.65;
}

/* Layout */
.layout {
  margin-top: 12px;
}

.layout,
.dashboard {
  display: grid;
  grid-template-columns: var(--layout-left) var(--layout-main) var(--layout-right);
  gap: 20px;
  align-items: start;
}

/* Use (almost) full viewport width for dashboard to reduce side margins */
@media (min-width: 960px) {
  main.container.dashboard,
  main.container.layout {
    width: min(2800px, calc(100vw - 48px)); /* ~24px gutter each side */
    margin-left: auto;
    margin-right: auto;
  }
}

.sidebar {
  position: static;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  max-height: none;
  min-width: 0;
}

.sidebar--right {
  padding-left: 8px;
  padding-right: 8px;
}

.sidebar--right .stat-card {
  height: fit-content;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-nav {
  display: inline-flex;
  align-self: flex-start;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(9, 14, 22, 0.65);
}

.panel-nav__button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.panel-nav__button.is-active {
  color: var(--text);
  background: rgba(77, 230, 176, 0.16);
  border-color: rgba(77, 230, 176, 0.4);
}

.period-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.period-toggle__button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}

.period-toggle__button.is-active {
  color: var(--text);
  background: rgba(122, 166, 255, 0.18);
}

.trends-loader {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.trends-loader__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: trends-spin 0.8s linear infinite;
}

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

.trends-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.trend-stat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.trend-stat__label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trend-stat__value {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}

.trends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trends-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(9, 14, 22, 0.55);
}

.trends-card--full {
  grid-column: 1 / -1;
}

.trends-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.trends-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.trends-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.trends-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.trends-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cve-empty {
  color: var(--muted);
  margin-top: 4px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

.accordion summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  padding: 12px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal__dialog {
  background: #0b0f1a;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px;
  width: min(680px, 96vw);
  position: relative;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: var(--text);
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.modal__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.modal__summary {
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 960px) {
  .layout,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .sidebar--right {
    order: 3;
  }

  .content {
    order: 2;
  }
}

@media (max-width: 700px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .trends-grid {
    grid-template-columns: 1fr;
  }
}


#events-panel details {
  border: 0;
  background: transparent;
}

#events-panel summary {
  list-style: none;
  cursor: pointer;
}

#events-panel summary::-webkit-details-marker {
  display: none;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.event-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-summary {
  margin: 6px 0 0;
  color: var(--muted);
}

.event-sources {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-sources a {
  color: var(--accent-2);
  text-decoration: none;
}

/* Dashboard catégories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.category-tile {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-tile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-1px);
}

.category-tile--critical { border-left: 4px solid #ef4444; }
.category-tile--notable { border-left: 4px solid #f97316; }
.category-tile--info { border-left: 4px solid #6b7280; }
.category-tile__icon { font-size: 32px; }
.category-tile__label { font-weight: 600; font-size: 14px; color: #fff; margin-top: 8px; }
.category-tile__count { font-size: 13px; color: #9ca3af; margin-top: 6px; }
.category-tile__critical { font-size: 12px; color: #ef4444; font-weight: 500; margin-top: 6px; }

.category-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-detail__counter {
  margin: 0;
  color: #cbd5e1;
}

.criticality-section {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 6px;
}

.criticality-section--critical { background: rgba(239, 68, 68, 0.08); }
.criticality-section--notable { background: rgba(249, 115, 22, 0.06); }
.criticality-section--info { background: transparent; }

.back-button {
  cursor: pointer;
  color: #60a5fa;
  font-size: 14px;
  margin-bottom: 16px;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
}

.article-sources ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

@media (max-width: 700px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
