/* ==========================================================================
   Proxmox CVE – Stylesheet
   Farben als Tokens: hell als Standard, dunkel per System (Auto) oder per
   data-theme="dark" am <html> (Umschalter, assets/theme.js + app.js).
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-grad: #fff4ea;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --field: #ffffff;
  --header: rgba(247, 248, 250, .82);
  --fg: #101828;
  --fg-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --accent: #e57000;
  --accent-btn: #c25700;
  --accent-btn-hover: #a84b00;
  --on-accent: #ffffff;
  --accent-soft: #fff1e5;
  --accent-line: #ffc999;
  --link: #b24f00;
  --focus: #e57000;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --ok-line: #abefc6;
  --danger: #b42318;
  --danger-hover: #912018;
  --danger-soft: #fef3f2;
  --danger-line: #fecdca;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14);

  /* Produkte */
  --pve-bg: #fdead7; --pve-fg: #7a3a00;
  --pbs-bg: #dcebfb; --pbs-fg: #0b3d73;
  --pmg-bg: #ebe4fb; --pmg-fg: #40237a;
  --pdm-bg: #d9f2e3; --pdm-fg: #0d5a2e;
  --pom-bg: #d5f1f2; --pom-fg: #0b5257;

  /* CVSS-Schweregrade: weicher Hintergrund, Text, kraeftige Akzentfarbe */
  --crit-bg: #fde8e8; --crit-fg: #8f1414; --crit: #c01b1b;
  --high-bg: #ffedd5; --high-fg: #8a2f0b; --high: #ea580c;
  --med-bg:  #fef4c3; --med-fg:  #7a4a06; --med:  #d4a00a;
  --low-bg:  #dfeafe; --low-fg:  #1e3f9c; --low:  #3b74e6;
  --na-bg: var(--surface-2); --na-fg: var(--muted); --na: var(--line-2);

  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Dunkle Tokens: zweimal identisch (System-Einstellung bei Auto, sowie manuell gewaehlt) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d12; --bg-grad: #1d140c; --surface: #12151c; --surface-2: #1a1e27; --field: #0e1117;
    --header: rgba(11, 13, 18, .78);
    --fg: #e7e9ee; --fg-2: #c3c8d2; --muted: #8f98a8; --line: #232835; --line-2: #313847;
    --accent: #ff8a1f; --accent-btn: #ff8a1f; --accent-btn-hover: #ffa04d; --on-accent: #1d0e00;
    --accent-soft: rgba(255, 138, 31, .1); --accent-line: rgba(255, 138, 31, .35);
    --link: #ffa857; --focus: #ff9a3d;
    --ok: #6ce9a6; --ok-soft: rgba(108, 233, 166, .08); --ok-line: rgba(108, 233, 166, .3);
    --danger: #ff8a80; --danger-hover: #ffa69e; --danger-soft: rgba(255, 138, 128, .08); --danger-line: rgba(255, 138, 128, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 16px 40px -10px rgba(0, 0, 0, .6);
    --pve-bg: rgba(255, 138, 31, .16); --pve-fg: #ffc48f;
    --pbs-bg: rgba(77, 156, 255, .16); --pbs-fg: #b3d4ff;
    --pmg-bg: rgba(157, 120, 255, .18); --pmg-fg: #d5c7ff;
    --pdm-bg: rgba(60, 200, 120, .15); --pdm-fg: #a6ebc4;
    --pom-bg: rgba(45, 200, 205, .15); --pom-fg: #a3e9ec;
    --crit-bg: rgba(248, 70, 70, .17); --crit-fg: #ffb3ad; --crit: #f04848;
    --high-bg: rgba(249, 115, 22, .17); --high-fg: #fdbb80; --high: #f97316;
    --med-bg:  rgba(234, 179, 8, .15);  --med-fg:  #fbdc6b; --med:  #e0b100;
    --low-bg:  rgba(77, 140, 255, .16); --low-fg:  #a9c8ff; --low:  #5b8def;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12; --bg-grad: #1d140c; --surface: #12151c; --surface-2: #1a1e27; --field: #0e1117;
  --header: rgba(11, 13, 18, .78);
  --fg: #e7e9ee; --fg-2: #c3c8d2; --muted: #8f98a8; --line: #232835; --line-2: #313847;
  --accent: #ff8a1f; --accent-btn: #ff8a1f; --accent-btn-hover: #ffa04d; --on-accent: #1d0e00;
  --accent-soft: rgba(255, 138, 31, .1); --accent-line: rgba(255, 138, 31, .35);
  --link: #ffa857; --focus: #ff9a3d;
  --ok: #6ce9a6; --ok-soft: rgba(108, 233, 166, .08); --ok-line: rgba(108, 233, 166, .3);
  --danger: #ff8a80; --danger-hover: #ffa69e; --danger-soft: rgba(255, 138, 128, .08); --danger-line: rgba(255, 138, 128, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-lg: 0 16px 40px -10px rgba(0, 0, 0, .6);
  --pve-bg: rgba(255, 138, 31, .16); --pve-fg: #ffc48f;
  --pbs-bg: rgba(77, 156, 255, .16); --pbs-fg: #b3d4ff;
  --pmg-bg: rgba(157, 120, 255, .18); --pmg-fg: #d5c7ff;
  --pdm-bg: rgba(60, 200, 120, .15); --pdm-fg: #a6ebc4;
  --pom-bg: rgba(45, 200, 205, .15); --pom-fg: #a3e9ec;
  --crit-bg: rgba(248, 70, 70, .17); --crit-fg: #ffb3ad; --crit: #f04848;
  --high-bg: rgba(249, 115, 22, .17); --high-fg: #fdbb80; --high: #f97316;
  --med-bg:  rgba(234, 179, 8, .15);  --med-fg:  #fbdc6b; --med:  #e0b100;
  --low-bg:  rgba(77, 140, 255, .16); --low-fg:  #a9c8ff; --low:  #5b8def;
}

/* ---- Grundlagen --------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { flex-shrink: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; color: var(--fg); }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.3rem); margin: 0 0 .45em; font-weight: 750; }
h2 { font-size: 1.25rem; margin: 1.6em 0 .6em; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.icon { width: 1.1em; height: 1.1em; vertical-align: -.17em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted, .hint, .meta { color: var(--muted); }
.hint { font-size: .9rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--surface); color: var(--fg); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Buttons ------------------------------------------------------------ */

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--accent-btn); color: var(--on-accent);
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .06s;
  box-shadow: var(--shadow-sm);
}
button:hover, .btn:hover { background: var(--accent-btn-hover); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
.btn-secondary, button.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.btn-secondary:hover, button.btn-secondary:hover { background: var(--surface-2); }
button.danger, .btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-line); box-shadow: none; }
button.danger:hover, .btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }

/* ---- Kopfzeile ---------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.08rem; letter-spacing: -.01em; color: var(--fg); text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #ff9436, #e05f00); color: #fff;
  box-shadow: 0 2px 6px rgba(229, 112, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-mark .icon { width: 19px; height: 19px; vertical-align: 0; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px;
  color: var(--fg-2); font-weight: 550; font-size: .95rem; text-decoration: none; transition: background-color .15s, color .15s;
}
.nav a:not(.btn):hover { background: var(--surface-2); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.nav .btn { margin-left: 6px; }

.switches { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.lang-switch a {
  display: grid; place-items: center; min-height: 30px; min-width: 32px; padding: 0 6px; border-radius: 7px;
  color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-decoration: none;
}
.lang-switch a:hover { color: var(--fg); }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.theme-switch { display: none; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.js .theme-switch { display: inline-flex; }
.theme-switch button {
  min-height: 30px; width: 32px; padding: 0; border: 0; border-radius: 7px; box-shadow: none;
  background: transparent; color: var(--muted);
}
.theme-switch button:hover { background: transparent; color: var(--fg); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.theme-switch .icon { width: 16px; height: 16px; vertical-align: 0; }

@media (max-width: 600px) {
  .top { position: static; }
  html { scroll-padding-top: 16px; }
  .top-inner { flex-wrap: wrap; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
  .switches { margin-left: auto; gap: 6px; }
  .theme-switch button { width: 28px; }
  .lang-switch a { min-width: 28px; padding: 0 4px; }
  .brand { gap: 8px; font-size: 1rem; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .brand-mark .icon { width: 17px; height: 17px; }
  .nav { order: 3; width: 100%; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 350px) { .top .brand > span:last-child { display: none; } }

/* ---- Karten, Hinweise --------------------------------------------------- */

main { padding-top: 32px; padding-bottom: 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h1 { font-size: 1.6rem; }
.narrow { max-width: 580px; margin: 24px auto; }
@media (max-width: 560px) { .card { padding: 20px 18px; } }

.status-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent); }
.status-icon .icon { width: 24px; height: 24px; vertical-align: 0; }
.status-icon.tone-err { background: var(--danger-soft); color: var(--danger); }
.status-icon.tone-ok { background: var(--ok-soft); color: var(--ok); }

.ok, .err, .note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 550; margin: 0 0 18px;
}
.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.err { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.note { color: var(--fg-2); background: var(--surface-2); border-color: var(--line); font-weight: 400; font-size: .92rem; }
.ok .icon, .err .icon, .note .icon { margin-top: .2em; }

.empty { text-align: center; padding: 40px 24px; }
.empty-icon { width: 40px; height: 40px; color: var(--muted); margin-bottom: 8px; }

/* ---- Badges ------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; line-height: 1;
  background: var(--surface-2); color: var(--fg-2);
}
.badge-pve { background: var(--pve-bg); color: var(--pve-fg); }
.badge-pbs { background: var(--pbs-bg); color: var(--pbs-fg); }
.badge-pmg { background: var(--pmg-bg); color: var(--pmg-fg); }
.badge-pdm { background: var(--pdm-bg); color: var(--pdm-fg); }
.badge-pom { background: var(--pom-bg); color: var(--pom-fg); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.cvss { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.cvss-critical { --s-bg: var(--crit-bg); --s-fg: var(--crit-fg); --s: var(--crit); }
.cvss-high     { --s-bg: var(--high-bg); --s-fg: var(--high-fg); --s: var(--high); }
.cvss-medium   { --s-bg: var(--med-bg);  --s-fg: var(--med-fg);  --s: var(--med); }
.cvss-low      { --s-bg: var(--low-bg);  --s-fg: var(--low-fg);  --s: var(--low); }
.cvss-none, .score-na { --s-bg: var(--na-bg); --s-fg: var(--na-fg); --s: var(--na); }
.cvss, .score { background: var(--s-bg); color: var(--s-fg); }

.score {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; padding: 6px 8px; border-radius: 10px; line-height: 1.1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s) 30%, transparent);
}
.score b { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.score small { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.score-na b { font-weight: 500; }

/* ---- Startseite --------------------------------------------------------- */

.home {
  display: grid; gap: 40px 48px;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-areas: "hero sub" "latest sub" "about sub";
  align-items: start;
}
.home .hero { grid-area: hero; padding-top: 16px; }
.home .sub-card { grid-area: sub; }
.home .latest { grid-area: latest; }
.home .about { grid-area: about; }
@media (min-width: 981px) and (min-height: 820px) { .home .sub-card { position: sticky; top: 88px; } }
@media (max-width: 980px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "sub" "latest" "about"; gap: 32px; }
}
body.page-index { background-image: radial-gradient(1100px 520px at 12% -8%, var(--bg-grad), transparent 70%); background-repeat: no-repeat; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px 5px 10px;
  border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft);
  color: var(--link); font-size: .82rem; font-weight: 650;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.1rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: .4em; }
.hero h1 .hl { background: linear-gradient(90deg, #ff8a1f, #e05f00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--fg-2); max-width: 60ch; margin: 0 0 24px; }
.features { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.features li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 550; color: var(--fg-2); box-shadow: var(--shadow-sm);
}
.features .icon { color: var(--accent); }
.covers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .88rem; color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 32px; counter-reset: step; }
.steps li { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%;
  background: var(--accent-soft); color: var(--link); font-weight: 750; font-size: .85rem;
}
.steps strong { display: block; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: .9rem; }
@media (max-width: 680px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 2px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--fg-2); max-width: 70ch; }

/* ---- Anmeldeformular ---------------------------------------------------- */

.sub-card h2 { margin: 0 0 4px; font-size: 1.3rem; }
.sub-card .sub-intro { margin: 0 0 16px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.sub-card { padding: 22px; }
.sub-form fieldset, .sub-form .field { margin-bottom: 16px; }
.sub-form .field-hint { font-size: .8rem; line-height: 1.4; }
.sub-form .consent { font-size: .82rem; line-height: 1.45; margin-bottom: 16px; }
body.page-index main { padding-top: 20px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend, .field > label { display: block; font-weight: 650; font-size: .9rem; padding: 0; margin-bottom: 8px; color: var(--fg); }
.field { margin: 0 0 20px; }
.field .hint { margin: 0; }
.field-hint { margin: 8px 0 0; }

input[type=email], input[type=text], input[type=search], input[type=url], select {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--field); color: var(--fg); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); opacity: .8; }
input[type=email]:focus, input[type=text]:focus, input[type=search]:focus, input[type=url]:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Kachel-Auswahl (Radio/Checkbox visuell versteckt, aber fokussierbar) */
.tiles { display: grid; gap: 8px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Mehr als drei Kanaele: Pillen in Textbreite (wie die Produktauswahl), kein einzelner breiter Button in der letzten Zeile */
.tiles-many { display: flex; flex-wrap: wrap; gap: 6px; }
.tiles-many .tile { flex: 0 1 auto; }
.tiles-many .tile-chan .tile-box { min-height: 40px; padding: 8px 8px 8px 7px; gap: 5px; border-radius: 999px; font-size: .86rem; white-space: nowrap; }
.tiles-many .tile-chan .icon { width: 16px; height: 16px; }
/* Handy: Raster mit vier Spalten (Icon ueber dem Namen), sieben Kanaele = zwei Zeilen; "Microsoft" entfaellt */
@media (max-width: 600px) {
  .tile-prefix { display: none; }
  .tiles-many { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles-many .tile-chan .tile-box { flex-direction: column; gap: 3px; min-height: 56px; padding: 7px 2px; border-radius: var(--radius-sm); font-size: .78rem; }
  .tiles-many .tile-chan .icon { width: 18px; height: 18px; }
}
@media (max-width: 360px) {
  .sub-card { padding: 18px 16px; }
  .tiles-many { gap: 5px; }
  .tiles-many .tile-chan .tile-box { font-size: .7rem; padding: 7px 1px; }
}
.tiles-wrap { display: flex; flex-wrap: wrap; }
.tiles-wrap .tile-box { min-height: 40px; padding: 8px 14px 8px 10px; border-radius: 999px; white-space: nowrap; }
.tile { position: relative; display: block; cursor: pointer; }
.tile-box {
  display: flex; align-items: center; gap: 8px; height: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field);
  font-size: .9rem; font-weight: 550; color: var(--fg-2); line-height: 1.25;
  transition: border-color .15s, background-color .15s, box-shadow .15s, color .15s;
}
.tile:hover .tile-box { border-color: var(--muted); }
.tile input:checked + .tile-box { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); box-shadow: inset 0 0 0 1px var(--accent); }
.tile input:focus-visible + .tile-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.tile-check {
  width: 18px; height: 18px; padding: 2px; border-radius: 50%; border: 1.5px solid var(--line-2); color: transparent; stroke-width: 3;
  transition: background-color .15s, border-color .15s;
}
.tile input:checked + .tile-box .tile-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile-chan .tile-box { justify-content: center; gap: 7px; padding: 10px 8px; text-align: center; }
.tile-chan .icon { width: 18px; height: 18px; color: var(--muted); }
.tile-chan input:checked + .tile-box .icon { color: var(--accent); }

/* Turnstile erscheint nur, wenn Cloudflare eine Interaktion verlangt (appearance: interaction-only) */
.captcha:has(iframe) { margin: 0 0 16px; }

/* Eingeklappte Produktauswahl */
.pick { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field); }
.pick summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  list-style: none; cursor: pointer; font-size: .9rem; font-weight: 550; color: var(--fg);
}
.pick summary::-webkit-details-marker { display: none; }
.pick summary:hover .pick-edit { text-decoration: underline; }
.pick-icon { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--accent); color: var(--on-accent); stroke-width: 3; }
.pick.is-empty .pick-icon { background: var(--danger); }
.pick-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-edit { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-size: .85rem; font-weight: 600; }
.pick-edit::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.pick[open] .pick-edit::after { transform: translateY(1px) rotate(-135deg); }
.pick[open] summary { border-bottom: 1px solid var(--line); }
.pick-body { padding: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.5; color: var(--muted); margin: 0 0 18px; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent-btn); }
.sub-form button[type=submit] { width: 100%; }
.feeds { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.feeds a { text-decoration: none; font-weight: 600; }
.feeds a:hover { text-decoration: underline; }

/* ---- Liste der Advisories ----------------------------------------------- */

.advlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.adv-item {
  position: relative; display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 16px 16px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.adv-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s, var(--line)); }
.adv-item.sev-critical { --s: var(--crit); } .adv-item.sev-high { --s: var(--high); }
.adv-item.sev-medium { --s: var(--med); } .adv-item.sev-low { --s: var(--low); } .adv-item.sev-na, .adv-item.sev-none { --s: var(--line-2); }
.adv-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.adv-item:focus-within { border-color: var(--accent); }
.adv-body { flex: 1; min-width: 0; }
.adv-title { display: block; color: var(--fg); font-weight: 650; font-size: 1.02rem; line-height: 1.35; text-decoration: none; margin-bottom: 8px; }
.adv-title::after { content: ""; position: absolute; inset: 0; }
.adv-title:focus-visible { outline: none; }
.adv-item:hover .adv-title { color: var(--link); }
.adv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; color: var(--muted); }
.psa { font-family: var(--mono); font-size: .8rem; color: var(--fg-2); }
.adv-meta time { font-variant-numeric: tabular-nums; }
.adv-pkgs, .adv-cves { margin: 8px 0 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.adv-cves { font-family: var(--mono); font-size: .78rem; }
.adv-score { flex: none; }
.adv-score .score { min-width: 70px; }
@media (max-width: 560px) {
  .adv-item { gap: 12px; padding: 14px 14px 14px 18px; }
  .adv-score .score { min-width: 54px; padding: 5px 6px; }
  .adv-score .score b { font-size: 1rem; }
  .adv-score .score small { font-size: .6rem; }
}

/* ---- Archiv: Kopf, Suche, Filter, Seiten -------------------------------- */

.page-head { margin-bottom: 20px; }
.page-head h1 { margin-bottom: .2em; }
.page-head p { margin: 0; color: var(--muted); }
.toolbar { display: grid; gap: 14px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.search { display: flex; gap: 8px; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input { padding-left: 40px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 5px 13px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--field);
  color: var(--fg-2); font-size: .88rem; font-weight: 550; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--muted); color: var(--fg); text-decoration: none; }
.chip[aria-current="page"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.result-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.result-line a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.result-line a:hover { text-decoration: underline; }
.clear { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
@media (max-width: 560px) { .search button { padding: 10px 14px; } }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 0; }
.pager span { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---- Detailseite -------------------------------------------------------- */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs .sep { opacity: .5; }
.adv-head { margin-bottom: 28px; }
.adv-head h1 { max-width: 34ch; }
.adv-head .adv-meta { font-size: .9rem; }
.adv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.adv-side { grid-column: 2; grid-row: 1; position: sticky; top: 88px; padding: 20px; }
.adv-content { grid-column: 1; grid-row: 1; min-width: 0; }
@media (max-width: 900px) {
  .adv-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .adv-side, .adv-content { grid-column: 1; grid-row: auto; }
  .adv-side { position: static; }
}
.facts { margin: 0 0 18px; display: grid; gap: 14px; }
.facts div { display: grid; gap: 4px; }
.facts dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.facts dd .psa { font-size: .9rem; color: var(--fg); }
.facts .revs { display: flex; flex-wrap: wrap; gap: 6px; }
.facts .revs a { font-family: var(--mono); font-size: .82rem; }
@media (max-width: 900px) { .adv-side .facts { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); } }

.adv-sec { margin: 0 0 32px; }
.adv-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.12rem; }
.adv-sec h2::before { content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--accent); }
.adv-sec p, .adv-sec ul { max-width: 75ch; color: var(--fg-2); overflow-wrap: anywhere; }
.adv-sec p { margin: 0 0 .8em; }
.adv-sec ul { padding-left: 1.25em; margin: 0 0 .8em; }
.adv-sec li { margin: .25em 0; }
.adv-sec li::marker { color: var(--muted); }
.adv-sec.pkgs-sec p { font-family: var(--mono); font-size: .88rem; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.cvetable { border-collapse: collapse; width: 100%; font-size: .9rem; }
.cvetable th { text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: 10px 12px; }
.cvetable td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.cvetable td a { font-family: var(--mono); font-size: .86rem; white-space: nowrap; }
.table-wrap + .hint { margin: 10px 0 0; }
.cvetable .vec { font-family: var(--mono); font-size: .78rem; color: var(--muted); word-break: break-all; }
@media (max-width: 640px) {
  .cvetable thead { display: none; }
  .cvetable, .cvetable tbody, .cvetable tr, .cvetable td { display: block; }
  .cvetable tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  .cvetable tr:first-child { border-top: 0; }
  .cvetable td { display: flex; gap: 12px; padding: 4px 0; border: 0; }
  .cvetable td::before { content: attr(data-label); flex: none; width: 64px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: .15em; }
}

/* ---- ntfy-Topic --------------------------------------------------------- */

.topic-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; margin: 0 0 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.topic { flex: 1; min-width: 0; font-size: 1rem; word-break: break-all; }
.copy { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.copy.is-done { background: var(--ok); color: #fff; }
.card ol { padding-left: 1.2em; color: var(--fg-2); }
.card ol li { margin: .5em 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.danger-zone { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.danger-zone h2 { font-size: 1rem; margin: 0 0 4px; }
.danger-zone p { margin: 0 0 14px; font-size: .9rem; color: var(--muted); }

/* ---- Fusszeile ---------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 48px; padding-top: 32px; padding-bottom: 32px; }
.foot-about p { max-width: 62ch; margin: 12px 0 0; }
.foot .brand { font-size: 1rem; }
.foot .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.foot .brand-mark .icon { width: 15px; height: 15px; }
.foot-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px 20px; }
.foot-links a, .foot-by a { color: var(--fg-2); text-decoration: none; }
.foot-links a:hover, .foot-by a:hover { color: var(--fg); text-decoration: underline; }
.foot-by { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .foot-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---- Aktiv ausgenutzt, EPSS, Status ---------------------------------------- */
.kev {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--crit-bg); color: var(--crit-fg); box-shadow: inset 0 0 0 1px var(--crit);
  font-size: .72rem; font-weight: 700; white-space: nowrap; position: relative; z-index: 1;
}
.kev .icon { width: 12px; height: 12px; vertical-align: 0; }
.fact-sub { display: block; margin-top: 4px; font-size: .8rem; font-weight: 400; color: var(--muted); }
.cve-alt { margin-left: 6px; font-size: .72rem; font-family: var(--font); color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .85rem; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.status.is-stale .dot { background: var(--high); box-shadow: 0 0 0 3px color-mix(in srgb, var(--high) 20%, transparent); }

/* ---- Pruefung, Doku, Statistik --------------------------------------------- */
textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--field); color: var(--fg); font: .85rem/1.5 var(--mono); resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.check-layout { display: grid; gap: 24px; }
.check-result:empty { display: none; }
.check-result .advlist { margin-bottom: 18px; }
.docs pre, .adv-sec pre { overflow-x: auto; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .82rem; }
.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.stats .card h2 { margin: 0 0 14px; font-size: 1.05rem; }
.stat-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.stat-table th { text-align: left; font-weight: 600; padding: 5px 10px 5px 0; white-space: nowrap; }
.stat-table td { padding: 5px 0; }
.stat-table .stat-bar { width: 100%; padding-right: 10px; }
.stat-table .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); padding-right: 10px; }
.stat-table .badges { white-space: nowrap; }
.bar { display: block; width: 100%; height: 10px; }
.bar rect { fill: var(--accent); }
.bar.sev-critical rect { fill: var(--crit); } .bar.sev-high rect { fill: var(--high); } .bar.sev-medium rect { fill: var(--med); }
.bar.sev-low rect { fill: var(--low); } .bar.sev-na rect { fill: var(--line-2); }
@media (max-width: 560px) { .stat-table .badges { display: none; } }
.resend { margin-top: 18px; }

/* Footer: viele Links umbrechen lassen, damit der Hinweistext Platz behaelt */
.foot-links { max-width: 440px; justify-content: flex-end; }
@media (max-width: 720px) { .foot-links { justify-content: flex-start; } }

/* Sortierung im Archiv */
.chips-label { flex: none; align-self: center; margin-right: 2px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* Zusatz-Checkbox unter Kachel-Auswahl (Verwaltung: "ohne CVSS-Wert senden") */
.opt-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: .88rem; line-height: 1.45; color: var(--fg-2); cursor: pointer; }
.opt-check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent-btn); }
.opt-hint { margin: 10px 0 0; }
