/* Akrites advisories — palette and type taken from akrites.org */
:root {
  --bg: #100C1E;
  --surface: #1C1634;
  --surface-2: #251D45;
  --accent: #AA9CE5;
  --accent-strong: #7B60E5;
  --accent-ink: #1C1634;
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.7);
  --faint: rgba(255, 255, 255, 0.5);
  --line: rgba(170, 156, 229, 0.22);

  --sev-critical: #FF6B8B;
  --sev-high: #FF9F6B;
  --sev-medium: #F5D06A;
  --sev-low: #7FD6B4;
  --sev-none: #9A93B8;

  --font-head: "Saira", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 4px;
  --max: 1425px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.15; margin: 0; }

code { font-family: var(--font-mono); font-size: 0.9em; }

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 90px; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

/* Grid background, same as akrites.org. z-index -1 keeps it behind all content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(96, 226, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 226, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
}

/* Linux Foundation Projects banner */
.lfprojects { background: #252525; height: 33px; display: flex; align-items: center; }
.lfprojects .container { display: flex; width: 100%; }
.lfprojects a { display: block; }
.lfprojects img { display: block; width: 270px; max-width: 100%; height: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  box-shadow: 0 3px 45px rgba(0, 0, 0, 0.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { padding: 15px 0; transition: padding 0.32s ease; }
.logo img { display: block; height: 48px; width: auto; transition: height 0.32s ease; }
.site-header.small-nav .logo { padding: 8.33px 0; }
.site-header.small-nav .logo img { height: 42px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: var(--text);
  position: relative;
}
.site-nav a:hover { text-decoration: none; }
.site-nav a:not(.nav-button)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent-strong);
  transform: scaleX(0); transition: transform 0.3s ease-out;
}
.site-nav a:not(.nav-button):hover::after,
.site-nav a:not(.nav-button):focus-visible::after { transform: scaleX(1); }
.site-nav a.nav-button {
  background: var(--accent); color: #000;
  padding: 5px 20px; border-radius: 200px;
  transition: opacity 0.2s ease;
}
.site-nav a.nav-button:hover { opacity: 0.85; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  padding: 110px 0 90px;
  background: radial-gradient(1000px 500px at 85% -10%, rgba(170, 156, 229, 0.20), transparent 60%);
}
.hero h1 { font-size: clamp(34px, 5vw, 58px); max-width: 18ch; }
.lede { font-size: 18px; font-weight: 300; color: var(--muted); max-width: 60ch; margin: 24px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }

/* Two-column sections with a side panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 64px; align-items: center; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.panel-label {
  font-family: var(--font-head); font-weight: 500; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.panel-label:not(:first-child) { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.panel-text { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.panel-link { font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.panel-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }

.summary-total { font-family: var(--font-head); color: var(--muted); margin: 0 0 18px; }
.summary-total span { display: block; font-size: 56px; line-height: 1; color: var(--text); font-weight: 500; }
.summary-sev { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.summary-sev li { display: flex; justify-content: space-between; align-items: center; }
.summary-sev b { font-family: var(--font-head); font-weight: 500; font-size: 18px; }
.summary-latest { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.summary-title { display: block; margin: 4px 0 2px; }

.pgp { margin: 0 0 12px; font-size: 14px; }
.pgp dt { color: var(--faint); font-size: 12px; }
.pgp dd { margin: 0; }
.pgp code { color: var(--text); overflow-wrap: anywhere; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 500; font-size: 16px;
  border-radius: var(--radius);
}
.btn span { transition: transform 0.2s ease; }
.btn:hover { text-decoration: none; }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); padding: 13px 26px; border-radius: 200px; }
.btn-primary:hover { background: #BCB0EC; }
.btn-link { color: var(--accent); padding: 13px 0; }

/* List */
.advisories { padding: 80px 0; background: var(--bg); }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.list-head h2 { font-size: clamp(28px, 3.5vw, 40px); }
.meta { color: var(--faint); font-size: 14px; margin: 0; }

.notice {
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 20px; font-size: 14px;
}

.controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.field { display: flex; align-items: center; gap: 10px; }
.field-search { flex: 1 1 320px; }
.field-label { font-family: var(--font-head); font-size: 14px; color: var(--muted); }
.controls input, .controls select {
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; min-height: 44px;
}
.controls input { width: 100%; }
.controls input::placeholder { color: var(--faint); }
.controls select { padding-right: 34px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.controls select option { background: var(--surface); }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cve-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cve-table th {
  text-align: left; font-family: var(--font-head); font-weight: 500; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  padding: 16px 18px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cve-table td { padding: 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cve-table tbody tr:last-child td { border-bottom: 0; }
.cve-table tbody tr:not(.state):hover { background: var(--surface-2); }

.cve-id { font-family: var(--font-mono); font-size: 14px; white-space: nowrap; font-weight: 600; }
.cve-ext { display: block; font-size: 12px; color: var(--faint); margin-top: 4px; }
.cve-ext:hover { color: var(--accent); }
.cve-title { font-weight: 600; color: var(--text); }
.cve-title:hover { color: var(--accent); }
.cve-desc { color: var(--muted); font-size: 14px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cve-tag { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }
.product { color: var(--text); }
.versions { display: block; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.date { white-space: nowrap; color: var(--muted); }

.sev {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font-head); font-weight: 500; font-size: 13px; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.sev b { font-weight: 700; color: var(--text); }
.sev-CRITICAL { --c: var(--sev-critical); }
.sev-HIGH { --c: var(--sev-high); }
.sev-MEDIUM { --c: var(--sev-medium); }
.sev-LOW { --c: var(--sev-low); }
.sev-NONE { --c: var(--sev-none); }

.state td { text-align: center; color: var(--muted); padding: 48px 18px; }
.state.error td { color: var(--sev-critical); }

/* CTA */
.cta { padding: 48px 0 0; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); max-width: 22ch; margin: 0; }
.cta-text { color: var(--muted); max-width: 56ch; margin: 18px 0 32px; }

/* Footer */
.site-footer { padding: 16px 0 48px; color: var(--faint); font-size: 14px; }
.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 999px) {
  .container { max-width: 88%; padding: 0; }
  .logo, .site-header.small-nav .logo { padding: 12px 0; }
  .logo img, .site-header.small-nav .logo img { height: 36px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px 0 10px 20px;
  }
  .nav-toggle .bar { display: block; height: 2px; background: var(--text); border-radius: 2px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 6%; border-top: 1px solid var(--line); }
  .site-nav a:not(.nav-button)::after { display: none; }
  .site-nav a.nav-button { margin: 12px 6% 16px; padding: 5px 20px; border-top: 0; text-align: center; }
  .hero { padding: 64px 0 56px; }
  .advisories { padding: 56px 0; }
  .cta { padding: 40px 0 0; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 767px) {
  .lfprojects { display: none; }
}

@media (max-width: 760px) {
  .field { flex: 1 1 140px; }
  .field select { flex: 1; }
  .table-wrap { background: none; border: 0; border-radius: 0; }
  .cve-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cve-table, .cve-table tbody, .cve-table tr, .cve-table td { display: block; width: 100%; }
  .cve-table tr:not(.state) {
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 16px; margin-bottom: 14px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  }
  .cve-table td { padding: 0; border: 0; }
  .cve-table td.c-id { grid-column: 1; grid-row: 1; }
  .cve-table td.c-sev { grid-column: 2; grid-row: 1; justify-self: end; }
  .cve-table td.c-title, .cve-table td.c-affected { grid-column: 1 / -1; }
  .cve-table td[data-label]::before {
    content: attr(data-label); display: block;
    font-family: var(--font-head); font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent);
  }
  .state td { background: var(--surface); border-radius: 10px; }
}

/* CVE detail pages (generated by scripts/build_site.py) */
.cve-hero .cve-id { display: block; margin: 0 0 12px; color: var(--accent); }
.cve-hero h1 { max-width: 28ch; }
.cve-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.cve-detail .split { align-items: start; }
.cve-body h2 { font-size: 22px; margin: 32px 0 12px; }
.cve-body h2:first-child { margin-top: 0; }
.cve-body p { color: var(--muted); max-width: 70ch; }
.cve-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }
.cve-list a { overflow-wrap: anywhere; }
.cve-facts dl { margin: 0 0 4px; display: grid; gap: 12px; font-size: 14px; }
.cve-facts dt { color: var(--faint); font-size: 12px; }
.cve-facts dd { margin: 0; overflow-wrap: anywhere; }
