/* Vulnallery – sticker wall on a cutting mat. No external resources. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  src: url("../fonts/archivo-latin-wdth.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  /* cutting mat (dark) */
  --bg: #1f3d35;
  --grid: rgba(255, 255, 255, 0.055);
  --grid-major: rgba(255, 255, 255, 0.12);
  --ink: #eef4ef;
  --muted: #a9c4b9;
  --surface: #173029;
  --surface-2: #224a40;
  --line: rgba(238, 244, 239, 0.2);
  --accent: #ffd84d;
  --accent-ink: #1b2a12;
  --shadow: rgba(4, 18, 14, 0.55);
  --paper: #ffffff;

  --c-hardware: #ff9a6b;
  --c-crypto: #cfa9ff;
  --c-wireless: #72cdff;
  --c-software: #ff86b0;
  --c-network: #a6e9c9;

  --radius-sticker: 16px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

/* sticker backing paper (light) */
:root[data-theme="light"] {
  --bg: #e6ecf0;
  --grid: rgba(28, 72, 112, 0.07);
  --grid-major: rgba(28, 72, 112, 0.15);
  --ink: #14222b;
  --muted: #4b5f6b;
  --surface: #f7f9fa;
  --surface-2: #dde5ea;
  --line: rgba(20, 34, 43, 0.2);
  --accent: #ffd84d;
  --accent-ink: #14222b;
  --shadow: rgba(20, 40, 60, 0.28);

  --c-hardware: #c4501f;
  --c-crypto: #7a3fc4;
  --c-wireless: #136ea8;
  --c-software: #b3245a;
  --c-network: #1f7d5a;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e6ecf0;
    --grid: rgba(28, 72, 112, 0.07);
    --grid-major: rgba(28, 72, 112, 0.15);
    --ink: #14222b;
    --muted: #4b5f6b;
    --surface: #f7f9fa;
    --surface-2: #dde5ea;
    --line: rgba(20, 34, 43, 0.2);
    --accent: #ffd84d;
    --accent-ink: #14222b;
    --shadow: rgba(20, 40, 60, 0.28);

    --c-hardware: #c4501f;
    --c-crypto: #7a3fc4;
    --c-wireless: #136ea8;
    --c-software: #b3245a;
    --c-network: #1f7d5a;
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  /* the mat: fine 24px grid, heavier line every 5 squares */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button, input, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px var(--gutter);
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 28px; height: 28px; transform: rotate(-6deg); }
.brand-mark path { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.brand-mark .fold { fill: var(--accent); }

.toggles { display: flex; align-items: center; gap: 0.6rem; }

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.seg button, .seg a {
  border: 0;
  background: none;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.seg a { color: inherit; text-decoration: none; }
.seg button[aria-pressed="true"], .seg a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn svg .half { fill: currentColor; stroke: none; }

/* ---------- intro ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

.intro { padding: clamp(24px, 5vw, 64px) 0 clamp(20px, 3vw, 32px); }

.intro h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.4rem, 6.6vw, 5.4rem);
  font-weight: 860;
  font-stretch: 125%;
  line-height: 0.93;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 58ch;
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}
.lede strong { color: var(--ink); font-weight: 650; }

/* ---------- controls ---------- */
.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}
.search svg {
  position: absolute; left: 12px; top: 50%;
  width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 1rem;
}
.search input::placeholder { color: var(--muted); opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 550;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; opacity: 0.7; font-size: 0.82rem; }

.selects { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-left: auto; }
.field { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--muted); }
.field select {
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
}

.count {
  margin: 22px 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- category marker ---------- */
.cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.cat::before {
  content: "";
  width: 0.62rem; height: 0.62rem;
  border-radius: 50%;
  background: var(--c, var(--muted));
  flex: none;
}
[data-cat="hardware"] { --c: var(--c-hardware); }
[data-cat="crypto"]   { --c: var(--c-crypto); }
[data-cat="wireless"] { --c: var(--c-wireless); }
[data-cat="software"] { --c: var(--c-software); }
[data-cat="network"]  { --c: var(--c-network); }
.chip[data-cat]::before {
  content: "";
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--c);
}

/* ---------- stickers ---------- */
.sticker {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 14px;
  background: var(--paper);
  border-radius: var(--radius-sticker);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 10px 18px -10px var(--shadow);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sticker img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sticker img[src$=".svg"] { width: 100%; height: 100%; }
.sticker.dark { background: #15171a; }

/* ---------- wall ---------- */
/* Bis die Galerie geladen ist, hält sie Platz frei, damit der Footer nicht
   erst sichtbar ist und dann nach unten springt. */
.wall:empty { min-height: 150vh; }
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 40px 30px;
  padding: 18px 0 72px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  border-radius: var(--radius-sticker);
}
.card:hover .sticker,
.card:focus-visible .sticker {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 2px 2px rgba(0, 0, 0, 0.16),
    0 20px 26px -12px var(--shadow);
}
.card:focus-visible { outline-offset: 6px; }

.label { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.name {
  font-weight: 720;
  font-stretch: 108%;
  font-size: 1.04rem;
  line-height: 1.25;
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.75rem; font-size: 0.85rem; color: var(--muted); }
.meta time { font-variant-numeric: tabular-nums; }
.new-tag {
  position: absolute;
  top: -9px;
  right: -7px;
  z-index: 1;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 750;
  transform: rotate(5deg);
  box-shadow: 0 2px 4px -1px var(--shadow);
}

/* ---------- timeline ---------- */
.timeline { padding: 10px 0 72px; }
.t-year {
  display: grid;
  grid-template-columns: minmax(96px, 180px) 1fr;
  gap: 8px 32px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.t-year h2 {
  position: sticky;
  top: 150px;
  align-self: start;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 820;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.t-year h2 small { display: block; margin-top: 0.4rem; font-size: 0.9rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--muted); }
.t-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 24px; }
.t-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
  padding: 6px;
  border-radius: 12px;
  text-decoration: none;
}
.t-item .sticker { padding: 7px; border-radius: 10px; }
.t-item:hover .sticker, .t-item:focus-visible .sticker { transform: rotate(0deg); }
.t-item:hover .name { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- empty / error ---------- */
.empty, .error, .noscript {
  max-width: 46ch;
  padding: 40px 0 80px;
  font-size: 1.1rem;
}
.empty p { margin: 0 0 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.2;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { border-color: transparent; padding-inline: 0.5rem; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- dialog ---------- */
dialog {
  width: min(920px, calc(100vw - 24px));
  /* 100vh ist auf dem Handy die Höhe ohne Adressleiste; ist sie eingeblendet, ragte der
     mittig gesetzte Dialog oben und unten aus dem Bild. dvh folgt der sichtbaren Höhe. */
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
}
dialog::backdrop { background: rgba(6, 16, 13, 0.62); backdrop-filter: blur(3px); }
dialog[open] { animation: lift 0.2s ease-out; }
@keyframes lift { from { opacity: 0; transform: translateY(12px); } }

.d-inner { position: relative; display: grid; grid-template-columns: 1fr; }
.d-close { position: absolute; right: 14px; top: 14px; z-index: 1; background: var(--surface); }

.d-stage {
  display: grid;
  place-items: center;
  padding: 48px 40px;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.sticker.big { width: min(340px, 100%); padding: 22px; border-radius: 22px; }
@media (max-width: 759px) {
  .d-stage { padding: 28px 24px; }
  .sticker.big { width: min(220px, 70%); padding: 14px; border-radius: 16px; }
}

.d-body { padding: 28px clamp(20px, 4vw, 40px) 24px; }
.d-body h2 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 820;
  font-stretch: 118%;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.d-body h3 { margin: 1.4rem 0 0.5rem; font-size: 0.95rem; font-weight: 650; color: var(--muted); }
.d-desc { max-width: 60ch; margin: 0; font-size: 1.05rem; }

.cves { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cves a {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.86rem;
  text-decoration: none;
}
.cves a:hover { background: var(--surface-2); }

.credit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}
.credit dt { color: var(--muted); }
.credit dd { margin: 0; overflow-wrap: anywhere; }
.credit a { text-underline-offset: 3px; }

.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.d-nav { display: flex; justify-content: space-between; margin-top: 1.4rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }

@media (min-width: 760px) {
  .d-inner { grid-template-columns: 5fr 6fr; }
  .d-stage { min-height: 100%; }
}

/* ---------- vulnerability pages ---------- */
.vpage { padding-top: clamp(16px, 3vw, 32px); padding-bottom: clamp(32px, 6vw, 72px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 0.3rem; }
.crumbs a { color: inherit; text-underline-offset: 3px; }
.vcard {
  max-width: 1040px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
}
.vcard .sticker.big { --tilt: -2deg; }
.vcard .sticker img { height: auto; }
.d-body h1 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 820;
  font-stretch: 118%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.d-body .h3 { margin: 1.4rem 0 0.5rem; font-size: 0.95rem; font-weight: 650; color: var(--muted); }
.d-body .muted { margin: 1.4rem 0 0; }
a.cat { text-decoration: none; }
a.cat:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* story behind the logo (advent text on vulnerability pages) */
.story { margin: 1.4rem 0 0; padding: 1rem 1.2rem; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.story .h3 { margin-top: 0; }
.details > p { max-width: 60ch; margin: 0.5rem 0 0; }
.details .credit { margin-top: 0.8rem; }
.details .sources { margin: 0.8rem 0 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.story p { margin: 0.4rem 0 0; }
.story-q { font-weight: 700; }
.story-door { font-size: 0.92rem; }
.story-door a { text-underline-offset: 3px; }

/* topic pages, related vulnerabilities, footer topics */
.topic .intro { padding-bottom: 0; }
.topic .intro h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.04; max-width: 22ch; }
.topic-chips { margin: 18px 0 0; }
a.chip { text-decoration: none; color: inherit; }
a.chip[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.related { max-width: 1040px; margin-top: clamp(28px, 4vw, 44px); }
.related h2 { margin: 0 0 14px; font-size: 1.3rem; font-weight: 800; font-stretch: 112%; }
.related-wall { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.related-more { margin: 14px 0 0; }
.related-more a { font-weight: 600; text-underline-offset: 3px; }
.foot .topics h3 { margin: 1rem 0 0.4rem; font-size: 0.9rem; color: var(--muted); font-weight: 650; }
.foot .topic-list, .foot .year-list { margin: 0; padding: 0; list-style: none; }
.foot .topic-list li { margin: 0 0 0.35rem; }
.foot .year-list { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-variant-numeric: tabular-nums; }
.foot .year-list li { margin: 0; }
.topics a { text-underline-offset: 3px; }

/* legal pages (imprint, privacy) */
.ldoc { max-width: 72ch; }
.ldoc h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 820; font-stretch: 118%; line-height: 1.04; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ldoc .lede { margin-top: 1rem; }
.ldoc h2 { margin: 2rem 0 0.5rem; font-size: 1.2rem; font-weight: 800; font-stretch: 112%; }
.ldoc p { margin: 0 0 0.8rem; }
.ldoc a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.ldoc code { font-size: 0.92em; }
.ldoc .addr { font-style: normal; }
.lnote { margin: 1.2rem 0 0; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0.95rem; }
.ltoc { margin: 1.4rem 0 0; padding: 0.9rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ltoc ol { margin: 0; padding-left: 1.3rem; columns: 2 16rem; column-gap: 2rem; }
.ltoc li { margin: 0 0 0.3rem; break-inside: avoid; }
.lstand { margin-top: 2rem !important; color: var(--muted); font-size: 0.92rem; }

/* ---------- announcement ---------- */
.announce {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  margin: 1.2rem 0 0;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  font-weight: 600;
}
.announce a { font-weight: 500; text-underline-offset: 3px; }

/* ---------- advent calendar ---------- */
.advent { margin: 0 0 clamp(24px, 4vw, 40px); }
.advent-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.4rem; margin-bottom: 18px; }
.advent-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 820; font-stretch: 112%; letter-spacing: -0.01em; }
.advent-head p { margin: 0; color: var(--muted); flex: 1 1 22rem; }
.advent-head a { font-weight: 600; text-underline-offset: 3px; }
.doors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.door {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transform-origin: left center;
}
.door:not(:disabled):hover { border-color: var(--accent); }
.door:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.door-num { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 860; font-stretch: 118%; line-height: 1; }
.door.locked { cursor: default; color: var(--muted); background: transparent; border-style: dashed; }
.door.today { border: 2px solid var(--accent); }
.door-today {
  position: absolute; bottom: 6px; right: 6px; z-index: 1;
  padding: 0.05rem 0.4rem; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.72rem; font-weight: 700;
}
.door.open { padding: 8px; }
.door.open .door-num {
  position: absolute; left: 8px; top: 6px; z-index: 1;
  font-size: 0.85rem; font-weight: 750;
  padding: 0.05rem 0.4rem; border-radius: 6px; background: var(--surface);
}
.door-logo { width: 100%; height: 100%; padding: 10px; border-radius: 10px; --tilt: 0deg; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .door.opening { animation: door-open 0.65s ease-in forwards; }
  @keyframes door-open {
    to { transform: perspective(700px) rotateY(-80deg); opacity: 0.4; }
  }
}
@media (max-width: 640px) {
  .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.advent-dlg h2 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 820;
  font-stretch: 112%;
  line-height: 1.1;
}
.a-name { font-weight: 650; color: var(--ink); }

/* advent archive page */
.archive-list { display: grid; gap: 18px; margin: 24px 0 0; padding: 0; list-style: none; }
.archive-item { scroll-margin-top: 16px; }
.archive-item .d-body h2 { margin: 0.35rem 0 0.6rem; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 820; font-stretch: 112%; line-height: 1.1; }
.archive-item .d-stage { padding: 28px; }
.archive-item .sticker.big { width: min(240px, 100%); }
.archive-closed { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.archive-closed li { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-weight: 800; font-size: 1.3rem; }

/* ---------- footer ---------- */
.foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
.foot h2 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 750; font-stretch: 112%; }
.foot p { margin: 0 0 0.7rem; max-width: 60ch; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.foot a { text-underline-offset: 3px; }
.foot .more { font-weight: 650; }
.foot .more::after { content: " →"; }
.involve { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.involve .donate { font-weight: 650; }
.foot .mail { margin-top: 0.9rem; color: var(--muted); }

.legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.legal ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.4rem; }
.feed-link { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--ink); }
.feed-link:hover, .feed-link:focus-visible { color: var(--accent-ink); background: var(--accent); }
.feed-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.feed-icon circle { fill: currentColor; stroke: none; }
.legal .colophon { margin: 0; font-size: 0.88rem; }
.colophon-wrap { display: flex; flex-direction: column; gap: 0.2rem; }
.legal .release { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .controls { position: static; }
  .search { max-width: none; flex-basis: 100%; }
  .selects { margin-left: 0; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
  .sticker { padding: 10px; border-radius: 12px; }
  .t-year { grid-template-columns: 1fr; }
  .t-year h2 { position: static; }
  .t-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .sticker { transform: none; }
}

@media print {
  .controls, .toggles { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- 404 ---------- */
.notfound .intro { max-width: 760px; }
.notfound .intro + .intro { padding-top: 0; border-top: 1px solid var(--line); }
.notfound .code {
  margin: 0;
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.notfound h2 { margin-top: 1.6rem; }

/* Widerspruch gegen die Statistik (Datenschutzseite) */
.optout { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.optout button { font: inherit; font-weight: 650; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.optout button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Antworttexte auf Lückenseiten: Kurzfassung und Fragen */
.glance { max-width: 60ch; margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent, currentColor); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 0.95rem; }
.faq { max-width: 1040px; margin-top: clamp(28px, 4vw, 44px); }
.faq h2 { margin: 0 0 14px; font-size: 1.3rem; font-weight: 800; font-stretch: 112%; }
.faq-item { max-width: 72ch; margin: 0 0 14px; }
.faq-item h3 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 750; }
.faq-item p { margin: 0; }

/* Liste aller Lücken */
.vlist-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vlist-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.vlist { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.vlist .nw { white-space: nowrap; }
.vlist caption { text-align: left; padding: 12px 14px 4px; color: var(--muted); font-size: 0.86rem; }
.vlist th, .vlist td { padding: 8px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.vlist thead th { border-top: 0; font-weight: 750; white-space: nowrap; }
.vlist tbody th { font-weight: 650; white-space: nowrap; }
.vlist td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.vlist td:nth-child(2) { white-space: nowrap; }
@media (max-width: 760px) { .vlist th, .vlist td { white-space: nowrap; } }
.vlist a { text-underline-offset: 3px; }
.vlist-data { max-width: 72ch; margin-top: 28px; }
.vlist-data h2 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; font-stretch: 112%; }
.vlist-data .cite { font-style: italic; }

/* Trendseite */
.trends .tsec { margin-top: 2.2rem; max-width: 72rem; }
.trends .tsec h2 { margin: 0 0 0.4rem; font-size: 1.3rem; font-weight: 800; font-stretch: 112%; }
.trends .tsec > .muted { margin: 0 0 0.9rem; max-width: 64ch; }
.tfigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: 12px; margin: 0.8rem 0 0; }
.tfigs > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tfigs dt { color: var(--muted); font-size: 0.82rem; }
.tfigs dd { margin: 0.2rem 0 0; font-weight: 700; }
.tfig { overflow-x: auto; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tchart { display: block; width: 100%; min-width: 560px; height: auto; max-height: 340px; }
.tchart .bar { fill: var(--c); }
.tchart .axis { stroke: var(--line); stroke-width: 1; }
.tchart text { fill: var(--muted); font-size: 10px; text-anchor: middle; font-family: var(--font); }
.tchart .val { fill: var(--ink); font-weight: 700; }
.tlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: 0.9rem; }
.tlegend .sw { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -0.05em; }
.tlegend .n, .tpats .n, .tgroups .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.ttable { margin-top: 12px; }
.ttable summary { cursor: pointer; font-weight: 650; }
.ttable .vlist td, .ttable .vlist tfoot th { font-variant-numeric: tabular-nums; }
.tpats { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.tpats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tpats h3 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 800; }
.tpats p { margin: 0; }
.tgroups { margin: 0; padding-left: 1.4rem; }
.tgroups li { margin: 0 0 0.6rem; }
.trends a { text-underline-offset: 3px; }

/* Logo-Quiz */
.quiz { max-width: 40rem; margin-top: 1.6rem; }
.quiz .muted { margin: 0.8rem 0 0; font-size: 0.88rem; }
.quiz-bar { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.quiz-logo { margin-top: 0.6rem; max-width: 30rem; }
.quiz-ask { margin: 1.2rem 0 0.8rem; font-size: 1.15rem; font-weight: 800; font-stretch: 112%; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 10px; }
.quiz-opt {
  font: inherit; font-weight: 650; text-align: left; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--ink); }
.quiz-opt:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.is-right { border-color: var(--c-network); background: color-mix(in srgb, var(--c-network) 22%, var(--surface)); }
.quiz-opt.is-wrong { border-color: var(--c-software); background: color-mix(in srgb, var(--c-software) 18%, var(--surface)); }
.quiz-opt.is-right::after { content: " ✓"; }
.quiz-opt.is-wrong::after { content: " ✗"; }
.quiz-feedback { min-height: 1.5em; margin: 0.9rem 0; }
.quiz-feedback a { text-underline-offset: 3px; }
.quiz-final { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 820; font-stretch: 118%; }
.quiz-final:focus { outline: none; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.quiz-sharemsg { min-height: 1.5em; margin: 0.8rem 0 0; }
.quiz-sharetext { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.quiz-error { color: var(--c-software); font-weight: 650; }
