/* nis2-fragebogen.de — Phase 1. Stand 21.08.2026.
   Keine Inline-Styles: CSP style-src 'self' ohne unsafe-inline. */

:root {
  --bg: #fdfaf6;
  --bg2: #f4efea;
  --ink: #16100c;
  --muted: #5d5751;
  --line: #dcd6d1;
  --acc: #bb4800;
  --acc-ink: #f7f5f1;
  --ok: #1f6b3a;
  --warn: #8a5a12;
  --max: 42rem;
  --wide: 52rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--acc);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

a:hover { color: var(--ink); }

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

h1, h2, h3, h4 {
  font-family: Archivo, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(1.35rem, 5.4vw, 2.6rem); font-weight: 800; margin: 0; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 800; margin: 0 0 0.8rem; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin: 1.2rem 0 0.4rem; }
h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.3rem; }

p { margin: 0 0 0.85rem; color: var(--muted); overflow-wrap: break-word; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  min-width: 0;
}

.narrow { max-width: var(--max); }

.kicker {
  margin: 0 0 0.6rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acc);
}

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

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 250, 246, 0.96);
  border-bottom: 2px solid var(--ink);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  min-width: 0;
}

.brand svg { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; }
.brand span { overflow-wrap: anywhere; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.88rem;
  min-width: 0;
}

.header-nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-nav a:hover { color: var(--acc); }

/* ---- Hero ---- */
.hero {
  padding: 1rem 0 0.85rem;
  border-bottom: 2px solid var(--ink);
}

.hero .lead {
  margin: 0.7rem 0 0;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 40rem;
}

/* ---- Lotse ---- */
.lotse {
  padding: 0.9rem 0 1.1rem;
  border-bottom: 2px solid var(--ink);
  background: var(--bg);
}

.notice {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink);
}

.lotse-panel {
  border: 2px solid var(--ink);
  background: #fff;
  padding: 0.85rem;
  min-width: 0;
}

.lotse-row {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.lotse-row label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

select,
button,
.level {
  font: inherit;
}

select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.4rem 0.55rem;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
}

.levels {
  display: grid;
  gap: 0.45rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.levels legend {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding: 0;
}

.level {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
}

.level:hover { border-color: var(--ink); }
.level:has(input:checked) {
  border-color: var(--acc);
  background: #fff6ef;
}
.level:has(input:focus-visible) {
  outline: 3px solid var(--acc);
  outline-offset: 2px;
}

.level input {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.level strong { display: block; color: var(--ink); font-size: 0.95rem; }
.level .wording {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.lotse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 2px solid var(--ink);
  background: var(--acc);
  color: var(--acc-ink);
  font-family: Archivo, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--ink); color: var(--acc-ink); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--acc-ink); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  font-size: 0.88rem;
  color: var(--muted);
}

.disclaimer {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.noscript {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px dashed var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

html.js .noscript { display: none; }
.js-only { display: none; }
html.js .js-only { display: block; }
html.js .js-only-flex { display: flex; }

/* ---- Sections ---- */
.section {
  padding: 2.2rem 0;
  border-bottom: 2px solid var(--ink);
}

.section.alt { background: var(--bg2); }

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-width: 0;
}

.card {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 1rem 1.05rem;
  min-width: 0;
}

.card h3 { margin-top: 0; }

/* ---- Blocks ---- */
.block {
  background: #fff;
  border: 1px solid var(--line);
  margin: 0 0 0.55rem;
  min-width: 0;
}

.block > summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.block > summary::-webkit-details-marker { display: none; }
.block > summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
  color: var(--acc);
  flex: 0 0 auto;
  line-height: 1;
}
.block[open] > summary::after { content: "\2013"; }

.block-kicker {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.block-body {
  padding: 0 1rem 1.1rem;
  border-top: 1px solid var(--line);
}

.law {
  margin: 0.9rem 0 0.8rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.never {
  border-left: 3px solid var(--acc);
  padding: 0.15rem 0 0.15rem 0.8rem;
}

.copy-row { margin: 0.7rem 0 0.3rem; }

/* ---- FAQ / legal pages ---- */
.faq > summary,
.legal-card {
  /* shared */
}

.faq {
  background: #fff;
  border: 1px solid var(--line);
  margin: 0 0 0.55rem;
}

.faq > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 650;
}

.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
  color: var(--acc);
  flex: 0 0 auto;
}
.faq[open] > summary::after { content: "\2013"; }

.faq .fa { padding: 0 1rem 1rem; }

.sources {
  padding-left: 1.15rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sources li { margin-bottom: 0.55rem; overflow-wrap: anywhere; }
.sources a { overflow-wrap: anywhere; }

.contact-plain {
  font-size: 1.05rem;
  color: var(--ink);
}

.contact-plain a { color: var(--acc); }

/* ---- Footer ---- */
.site-footer {
  padding: 1.4rem 0 2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: baseline;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--acc); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

/* ---- Legal pages ---- */
.page-hero { padding: 1.4rem 0 1.6rem; border-bottom: 2px solid var(--ink); }
.page-hero .lead { margin-top: 0.8rem; }

.stack p { margin-bottom: 0.9rem; }
.stack address { font-style: normal; color: var(--ink); line-height: 1.7; }

/* ---- 404 ---- */
.gone { padding: 3rem 0 4rem; }

/* JS-only lotse controls stay compact on first paint */
#lotse-preview {
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  min-width: 0;
}

#lotse-preview[hidden] { display: none !important; }

#print-result { display: none; }

.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--acc-ink);
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  z-index: 80;
}
.toast[hidden] { display: none !important; }

@media (max-width: 900px) {
  body * { min-width: 0; overflow-wrap: break-word; }
  body a { overflow-wrap: anywhere; }
}

@media (max-width: 400px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .header-nav a:not(.keep) { display: none; }
}

@media print {
  .site-header,
  .header-nav,
  .lotse-actions,
  .js-only,
  .noscript,
  .section-why,
  .section-wrong,
  .section-help,
  .section-faq,
  .section-sources,
  .site-footer,
  .block > summary::after,
  .copy-row,
  .levels input {
    display: none !important;
  }

  body { background: #fff; font-size: 11pt; line-height: 1.35; }
  a { color: inherit; text-decoration: none; }

  .hero { border: 0; padding: 0 0 0.4cm; }
  .hero .lead { font-size: 11pt; }

  .lotse {
    border: 0;
    padding: 0;
  }

  .lotse-panel { border: 0; padding: 0; }
  .notice { border: 0; padding: 0; margin-bottom: 0.4cm; }

  #print-result {
    display: block !important;
  }

  .section-blocks {
    display: none;
  }

  .disclaimer { font-size: 9pt; }

  h1 { font-size: 16pt; }
}
