:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2129;
  --bg-hover: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #b1bac4;
  --text-muted: #8b949e;
  --border: #30363d;
  --border-light: #3d444d;
  --critical: #f85149;
  --high: #d29922;
  --medium: #e3b341;
  --low: #3fb950;
  --info: #58a6ff;
  --accent: #bc8cff;
  --shadow: rgba(0,0,0,0.3);
  --radius: 8px;
  --radius-sm: 4px;
  --font-sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --bg-hover: #d0d7de;
  --text-primary: #111418;
  --text-secondary: #32383f;
  --text-muted: #57606a;
  --border: #c8cdd3;
  --border-light: #d8dee4;
  --shadow: rgba(0,0,0,0.12);
  --critical: #cf222e;
  --high: #9a6700;
  --medium: #7d6200;
  --low: #1a7f37;
  --info: #0969da;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  background: linear-gradient(135deg, #2d5a0f, #3d7a14, #4a9319);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.header-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.header-meta .date-display {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.theme-toggle, .view-toggle {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
}

.theme-toggle:hover, .view-toggle:hover { background: rgba(255,255,255,0.25); }
.view-toggle.active { background: rgba(255,255,255,0.3); }

/* Navigation */
.nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 99;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.nav-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-btn.active { color: var(--info); border-bottom-color: var(--info); }

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.stat-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  min-width: 140px;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-card.critical .value { color: var(--critical); }
.stat-card.high .value { color: var(--high); }
.stat-card.info .value { color: var(--info); }
.stat-card.green .value { color: var(--low); }

/* Main content */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Vulnerability cards */
.vuln-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 1rem;
}

.vuln-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.vuln-card:hover {
  border-color: var(--border-light);
  background: var(--bg-tertiary);
}

.vuln-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.vuln-ids {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.euvd-id {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--info);
  font-weight: 600;
}

.cve-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vuln-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-critical { background: rgba(248,81,73,0.2); color: var(--critical); }
.badge-high { background: rgba(210,153,34,0.2); color: var(--high); }
.badge-medium { background: rgba(227,179,65,0.2); color: var(--medium); }
.badge-low { background: rgba(63,185,80,0.2); color: var(--low); }

.badge-epss {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
}

.badge-epss.high { background: rgba(248,81,73,0.15); color: var(--critical); }
.badge-epss.medium { background: rgba(210,153,34,0.15); color: var(--high); }
.badge-epss.low { background: rgba(63,185,80,0.15); color: var(--low); }

.exploited-tag {
  background: rgba(248,81,73,0.15);
  color: var(--critical);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vuln-description {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.vuln-description.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vuln-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vuln-card.expanded .vuln-original {
  -webkit-line-clamp: unset;
}

.vuln-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.vuln-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Expanded card details */
.vuln-details {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.vuln-card.expanded .vuln-details { display: block; }
.vuln-card.expanded .vuln-description.clamped {
  -webkit-line-clamp: unset;
}

.detail-section {
  margin-bottom: 0.75rem;
}

.detail-section h4 {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.detail-section p, .detail-section li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* VEX-panelen när ingen bedömning finns eller hämtningen misslyckades */
.detail-section p.vex-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}
.vex-empty .nowrap { white-space: nowrap; }

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section ul li {
  padding: 0.15rem 0;
}

.detail-section ul li::before {
  content: "\2192 ";
  color: var(--info);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.references-list a {
  display: block;
  font-size: 0.9rem;
  color: var(--info);
  word-break: break-all;
  margin-bottom: 0.2rem;
}

/* Impact boxes */
.impact-box {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.impact-danger {
  background: rgba(248,81,73,0.08);
  border-left: 3px solid var(--critical);
}

.impact-systems {
  background: rgba(88,166,255,0.08);
  border-left: 3px solid var(--info);
}

.impact-who {
  background: rgba(210,153,34,0.08);
  border-left: 3px solid var(--high);
}

.impact-box h4 {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.impact-box p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

[data-theme="light"] .impact-danger { background: rgba(207,34,46,0.06); }
[data-theme="light"] .impact-systems { background: rgba(9,105,218,0.06); }
[data-theme="light"] .impact-who { background: rgba(154,103,0,0.06); }

/* Severity labels */
.severity-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.severity-akut, .severity-kritisk { background: rgba(248,81,73,0.2); color: var(--critical); }
.severity-hög { background: rgba(210,153,34,0.2); color: var(--high); }
.severity-medel { background: rgba(227,179,65,0.2); color: var(--medium); }
.severity-låg { background: rgba(63,185,80,0.2); color: var(--low); }

/* VEX badges */
.vex-inline {
  margin: 0.4rem 0;
}

.vex-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.vex-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.vex-safe {
  background: rgba(63,185,80,0.15);
  color: var(--low);
}

.vex-affected {
  background: rgba(248,81,73,0.15);
  color: var(--critical);
}

.vex-investigating {
  background: rgba(227,179,65,0.15);
  color: var(--medium);
}

.vex-none {
  background: rgba(139,148,158,0.1);
  color: var(--text-muted);
}

.vex-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vex-detail-item {
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Detail toggle buttons */
.detail-toggle-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.detail-toggle-btn {
  background: var(--info);
  border: none;
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.detail-toggle-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.detail-toggle-btn.active {
  background: #1a6dd4;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="light"] .detail-toggle-btn {
  background: #0969da;
}

[data-theme="light"] .detail-toggle-btn.active {
  background: #0550ae;
}

.detail-panel {
  display: none;
  margin-top: 0.6rem;
  animation: fadeIn 0.2s ease;
}

.detail-panel.open {
  display: block;
}

/* AI pending */
.ai-pending {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.vuln-card.has-ai {
  border-left: 3px solid var(--info);
}

/* Archetype cards */
.archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}

.archetype-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.archetype-card:hover { border-color: var(--border-light); }

.archetype-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.archetype-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-SPIKE { background: rgba(248,81,73,0.2); color: var(--critical); }
.status-ELEVATED { background: rgba(210,153,34,0.2); color: var(--high); }
.status-SHIFTING { background: rgba(227,179,65,0.2); color: var(--medium); }
.status-NORMAL { background: rgba(139,148,158,0.2); color: var(--text-secondary); }

.archetype-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.archetype-stats .number {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.trend-rising { color: var(--critical); }
.trend-falling { color: var(--low); }
.trend-stable { color: var(--text-muted); }

.archetype-details {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.archetype-card.expanded .archetype-details { display: block; }

.sparkline-container {
  height: 40px;
  margin-top: 0.5rem;
}

/* Vendor/Product table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-date {
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-date::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--info);
  border: 2px solid var(--bg-primary);
}

.timeline-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem;
  position: relative;
  font-size: 0.95rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.45rem;
  top: 1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-light);
}

/* Charts section */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.chart-container h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-wrapper {
  position: relative;
  height: 300px;
}

/* Filters */
.filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--info);
}

.filter-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--info);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
  .header { flex-direction: column; gap: 0.5rem; padding: 1rem; }
  .header-meta { flex-wrap: wrap; }
  .main { padding: 1rem; }
  .vuln-grid { grid-template-columns: 1fr; }
  .archetype-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .stats-bar { padding: 0.75rem 1rem; }
  .nav { padding: 0 1rem; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .vuln-card-header { flex-direction: column; gap: 0.5rem; }
}

/* Action groups */
.actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.action-group.action-urgent {
  border-left: 3px solid var(--critical);
}

.action-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action-product {
  font-size: 1.1rem;
  font-weight: 600;
}

.action-vendor {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.action-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.action-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.action-items {
  margin-bottom: 0.6rem;
}

.action-item {
  padding: 0.3rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
}

.action-arrow {
  color: var(--info);
  flex-shrink: 0;
}

.action-cves {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.action-btn {
  background: var(--info);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  font-weight: 500;
}

.action-btn:hover { opacity: 0.9; }
.action-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Priority list */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.priority-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.priority-item:hover {
  background: var(--bg-tertiary);
}

.priority-item.priority-akut { border-left: 4px solid var(--critical); }
.priority-item.priority-kritisk { border-left: 4px solid var(--critical); }
.priority-item.priority-hög { border-left: 4px solid var(--high); }
.priority-item.priority-medel { border-left: 4px solid var(--medium); }

.priority-rank {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 2.5rem;
  text-align: center;
  padding-top: 0.2rem;
}

.priority-body { flex: 1; }

.priority-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.priority-ids {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.priority-item .vuln-details { display: none; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.priority-item.expanded .vuln-details { display: block; }

/* Checklist */
.checklist-intro {
  margin-bottom: 1.25rem;
}

.checklist-intro h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.checklist-intro p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.checklist-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.checklist-item:hover { background: var(--bg-tertiary); }

.checklist-item.checklist-danger {
  border-left: 3px solid var(--critical);
}

.checklist-item input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--info);
}

.checklist-item-body {
  flex: 1;
}

.checklist-item-body strong {
  font-size: 0.95rem;
  display: block;
}

.checklist-vendor {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checklist-item-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Report */
.report-controls {
  margin-bottom: 1.5rem;
}

.report {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.report-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.report-header h2 {
  font-size: 1.6rem;
  color: #3d7a14;
}

.report-date {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.3rem;
}

.report-section {
  margin-bottom: 2rem;
}

.report-section h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.report-stat {
  text-align: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

.report-stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.report-stat.critical .report-stat-value { color: var(--critical); }
.report-stat.high .report-stat-value { color: var(--high); }

.report-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.report-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Print styles */
@media print {
  .no-print, .header, .nav, .stats-bar { display: none !important; }
  .section { display: block !important; }
  .section:not(#section-report) { display: none !important; }
  #section-report { display: block !important; }
  body { background: #fff; color: #111; }
  .report { border: none; padding: 0; background: #fff; }
  .report-stat { border: 1px solid #ddd; }
  .data-table th { background: #f0f0f0; }
  .data-table td, .data-table th { border: 1px solid #ddd; }
}

/* Guide page */
.guide {
  max-width: 900px;
}

.guide-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.guide-toc h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.guide-toc ul {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.guide-toc li {
  padding: 0.2rem 0;
}

.guide-toc a {
  font-size: 0.95rem;
}

.guide-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 120px;
}

.guide-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.guide-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.guide-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.guide-section ul {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.guide-section li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

.guide-example {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.guide-example h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.guide-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  background: var(--bg-tertiary);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  margin: 0.3rem 0;
  color: var(--info);
}

.guide-table {
  margin: 0.75rem 0;
  overflow-x: auto;
}

.guide-callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.guide-callout-danger {
  background: rgba(248,81,73,0.08);
  border-left: 3px solid var(--critical);
  color: var(--text-primary);
}

.guide-callout-info {
  background: rgba(88,166,255,0.08);
  border-left: 3px solid var(--info);
  color: var(--text-primary);
}

[data-theme="light"] .guide-callout-danger { background: rgba(207,34,46,0.06); }
[data-theme="light"] .guide-callout-info { background: rgba(9,105,218,0.06); }

.guide-severity-scale {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.guide-severity-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.guide-severity-item .badge {
  flex-shrink: 0;
  min-width: 110px;
  text-align: center;
}

.guide-severity-item p {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.guide-ai-sections {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.guide-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.guide-step-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--info);
  background: rgba(88,166,255,0.1);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-step h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.guide-step p {
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 768px) {
  .guide-toc ul { columns: 1; }
  .guide-severity-item { flex-direction: column; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ===== SBOM-inläsning i Min organisation ===== */

.sbom-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-secondary);
}
.sbom-box h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.sbom-box > p { margin: 0 0 0.75rem; color: var(--text-secondary); font-size: 0.9rem; }
.sbom-note { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5; margin: 0.75rem 0 0; }

.sbom-sammanfattning {
  margin: 1rem 0 0.75rem;
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--accent, #58a618);
  background: var(--bg-tertiary);
  font-size: 0.9rem;
}
.sbom-tabell { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sbom-tabell th {
  text-align: left; padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--border); font-weight: 600;
}
.sbom-tabell td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.sbom-tabell tr:last-child td { border-bottom: 0; }
.sbom-version { color: var(--text-secondary); font-size: 0.82rem; margin-left: 0.4rem; }
.sbom-ungefar { color: var(--text-secondary); font-size: 0.78rem; font-style: italic; }

.sbom-detalj { margin-top: 0.9rem; font-size: 0.88rem; }
.sbom-detalj summary { cursor: pointer; color: var(--text-secondary); }
.sbom-detalj ul { margin: 0.5rem 0 0; padding-left: 1.2rem; max-height: 16rem; overflow-y: auto; }
.sbom-detalj li { margin-bottom: 0.25rem; }
