/* ==========================================================================
   schweigertIT – research.css
   Research-Seite (research.html): CVE-Tabelle, Advisory-Karten und der Verweis
   auf die Writeups – sowie die Writeup-Übersicht (writeups/index.html, seit dem
   01.09.2026 zurückgehalten in _intern/zurueckgehalten/) mit den Karten der Reihe
   „Poking on ILIAS“ und der Research-Teaser der Startseite.
   Setzt base.css voraus (keine Abhängigkeit zu home.css).
   ========================================================================== */

/* ==========================================================================
   Grundraster der Sektion
   ========================================================================== */
.research-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .research-grid { grid-template-columns: 1fr; } }

.research-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.research-head p { color: var(--text-muted); }
.research-head p + p { margin-top: 1.1rem; }

.sub-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.sub-head h2,
.sub-head h3 {
  font-family: var(--font-accent);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.sub-head .sub-note {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Advisory-Karte (Panel mit Metadaten)
   ========================================================================== */
.cve-grid {
  display: grid;
  font-family: var(--font-accent);
  font-size: 0.88rem;
}
.cve-grid > div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
  align-items: baseline;
}
.cve-grid > div:last-child { border-bottom: 0; }
.cve-grid dt {
  color: var(--text-faint);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}
.cve-grid dd { color: var(--text); }
@media (max-width: 560px) {
  .cve-grid > div { grid-template-columns: 1fr; gap: 0.1rem; }
}

.cve-id { color: var(--accent-strong); font-weight: 700; letter-spacing: 0.04em; }
.cve-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.cve-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.6s steps(1) infinite;
}
.cve-status.is-open { color: var(--text-muted); background: transparent; border-color: var(--border); }
.cve-status.is-open::before { background: var(--text-faint); animation: none; }

/* Schwärzung */
.redacted {
  display: inline-block;
  height: 0.95em;
  vertical-align: -0.12em;
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, var(--border-strong) 0 6px, var(--border) 6px 12px);
}

.cve-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: var(--font-accent);
}

/* ==========================================================================
   CVE-Liste als echte Tabelle
   ========================================================================== */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: var(--mode-transition);
}
.cve-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  text-align: left;
}
.cve-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.9rem 1.15rem 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.cve-table th,
.cve-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cve-table thead th {
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  white-space: nowrap;
  transition: var(--mode-transition);
}
.cve-table tbody th { font-weight: 700; white-space: nowrap; }
.cve-table tbody tr:last-child th,
.cve-table tbody tr:last-child td { border-bottom: 0; }
.cve-table .cve-target { color: var(--text-muted); }
.cve-table .cve-target .redacted { width: 14ch; }

.cve-writeup {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft-border);
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.cve-writeup:hover { border-color: var(--accent-strong); }
.cve-writeup::after { content: " \2192"; }

/* ==========================================================================
   Writeup-Reihe „Poking on ILIAS“
   ========================================================================== */
.series {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  border-top: 1px dashed var(--border);
  padding-top: clamp(2rem, 4vw, 2.75rem);
}
.series-title {
  font-family: var(--font-accent);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.series-title .blink-cur {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: blink 1.2s steps(1) infinite;
}
.series-lead { color: var(--text-muted); max-width: 62ch; }
.series-lead + .series-lead { margin-top: 1.1rem; }

/* Auf der Writeup-Übersicht eröffnet die Reihe die Seite — ohne Trennlinie darüber */
.research-page-head .series { margin-top: 0; border-top: 0; padding-top: 0; }

.writeups {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.1rem;
}
.writeup {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.writeup:hover {
  border-color: var(--accent-soft-border);
  background: var(--surface-hover);
  transform: translateY(-3px);
}
.writeup-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.writeup-part { color: var(--accent-strong); font-weight: 700; }
.writeup h2,
.writeup h3,
.writeup h4 { font-size: 1.06rem; line-height: 1.35; }
.writeup p { color: var(--text-muted); font-size: 0.92rem; }
.writeup-more {
  margin-top: auto;
  padding-top: 0.4rem;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  color: var(--accent-strong);
}
.writeup-more::after { content: " \2192"; }
.writeup.is-draft { opacity: 0.72; pointer-events: none; }
.writeup.is-draft .writeup-more { color: var(--text-faint); }
.writeup-tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* ==========================================================================
   Seitenaufbau research.html
   ========================================================================== */
.research-page-head { padding-top: clamp(2.5rem, 6vw, 4rem); }
.research-page-head h1 { margin-bottom: 1.2rem; }
.research-block { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.research-block:last-of-type { padding-bottom: clamp(1rem, 3vw, 2rem); }
.block-link { margin-top: 1.6rem; }

/* ---------- Angekündigte Writeups: nur gelistet, keine Links (zurückgehalten) ---------- */
.writeup-queue { list-style: none; }
.writeup-queue li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.3rem 1.25rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.writeup-queue li:last-child { border-bottom: 1px solid var(--border); }
.wq-part {
  font-family: var(--font-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.wq-title { font-weight: 600; }
.wq-topic { display: block; font-weight: 400; font-size: 0.9rem; color: var(--text-muted); }
.wq-status {
  font-family: var(--font-accent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .writeup-queue li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- Advisory-Karten ---------- */
.advisories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.25rem;
}
.adv-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--mode-transition);
}
.adv-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.4rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  transition: var(--mode-transition);
}
.adv-card-id {
  font-family: var(--font-accent);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
}
.adv-card-body { padding: 1.3rem 1.4rem 1.5rem; }
.adv-card-body h3 { margin-bottom: 1rem; }
.adv-card-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft-border);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.adv-card-link::after { content: " \2192"; }
.adv-card-link:hover { border-color: var(--accent-strong); }

/* ---------- Abschließender Hinweis: Schwachstellen melden ---------- */
.research-note {
  border: 1px solid var(--accent-soft-border);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: var(--mode-transition);
}
.research-note h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-bottom: 0.8rem; }
.research-note p { color: var(--text-muted); max-width: 60ch; }
.research-note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

/* ==========================================================================
   Research-Teaser auf der Startseite (beide Modi)
   ========================================================================== */
.research-teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.1rem;
}
.teaser-card {
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--mode-transition), transform 0.2s var(--ease);
}
.teaser-card:hover {
  border-color: var(--accent-soft-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.teaser-card h3 { margin-bottom: 0.5rem; }
.teaser-card p { color: var(--text-muted); font-size: 0.95rem; }
.research-teaser-cta { margin-top: clamp(1.6rem, 3vw, 2.2rem); }
