/* ========== ILPER – Technisches Handbuch Layout (Single Artikel) ========== */

/* 0) Mobile-Overflow & saubere Breite */
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
  color: #111 !important;
  background: #ffffff !important;
}

/* Quartz Root darf nicht breiter als Viewport werden */
#quartz-root,
.page,
#quartz-body,
.center {
  max-width: 100% !important;
}

/* 1) Navigation & Sidebars komplett entfernen */
#quartz-body > .left.sidebar,
#quartz-body > .right.sidebar,
.left.sidebar,
.right.sidebar,
.explorer,
.backlinks,
.breadcrumb-container,
footer,
.page-footer,
.search,
.search-button,
.search-container,
.darkmode,
.readermode {
  display: none !important;
}

/* Tags ausblenden */
.tags {
  display: none !important;
}

/* 2) Quartz-Grid auf 1 Spalte zwingen */
#quartz-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
}

.page > #quartz-body {
  grid-template-columns: 1fr !important;
}

/* 3) Inhalt mittig + responsive Breite */
.center {
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  width: min(980px, calc(100% - 2rem)) !important;
  margin: 0 auto !important;
  padding: 1.5rem 1rem !important;
  box-sizing: border-box !important;
}

/* 4) Header */
.page-header {
  display: block !important;
  margin: 0 0 18px 0 !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 1px solid rgba(0,0,0,0.15) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Titel */
.article-title {
  font-size: 32px !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
  margin: 0 0 6px 0 !important;
  color: #111 !important;
  letter-spacing: -0.01em !important;
}

/* Datum */
.content-meta {
  font-size: 13px !important;
  color: rgba(0,0,0,0.75) !important;
  margin: 0 !important;
}

/* 5) Artikeltext */
.center article,
.center article p,
.center article li,
.center article span,
.center article div {
  color: #111 !important;
  opacity: 1 !important;
}

.center article {
  font-size: 16px !important;
  line-height: 1.7 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Fettschrift kräftig und gut lesbar */
.center article strong,
.center article b {
  font-weight: 700 !important;
  color: #111 !important;
}

/* Zwischenüberschriften */
.center article h2 {
  font-size: 20px !important;
  font-weight: 750 !important;
  margin: 26px 0 10px 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(0,0,0,0.08) !important;
  color: #111 !important;
}

.center article h3 {
  font-size: 17px !important;
  font-weight: 750 !important;
  margin: 18px 0 8px 0 !important;
  color: #111 !important;
}

/* Listen */
.center article ul,
.center article ol {
  margin: 12px 0 18px 22px !important;
}

.center article li {
  margin: 6px 0 !important;
}

/* Medien */
.center img,
.center video,
.center iframe,
.center svg,
.center canvas {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
}

/* Bilder */
.center img {
  border: 1px solid rgba(0,0,0,0.10) !important;
  border-radius: 6px !important;
  background: #fff !important;
}

/* Tabellen & Code */
.center table {
  display: block !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}

.center pre {
  max-width: 100% !important;
  overflow-x: auto !important;
}

.center code {
  word-break: break-word !important;
}

/* Links */
.center a {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Mobile */
@media (max-width: 600px) {
  .center {
    width: calc(100% - 1.25rem) !important;
    padding: 1.25rem 0.75rem !important;
  }

  .article-title {
    font-size: 28px !important;
    line-height: 1.12 !important;
  }

  .center article {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }

  .content-meta {
    font-size: 12.5px !important;
  }
}

/* ===== Glossary Tooltips (Single Artikel) ===== */
.glossary {
  position: relative;
  display: inline-block;
}

.glossary__term {
  cursor: help;
  border-bottom: 1px dotted rgba(0,0,0,0.5);
}

.glossary__tip {
  position: absolute;
  z-index: 9999;
  left: 0;
  top: 1.6em;
  min-width: 240px;
  max-width: 520px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: none;
}

.glossary:hover .glossary__tip,
.glossary:focus-within .glossary__tip {
  display: block;
}

/* Glossar Farben - in Single-Artikel-Ansicht wie normaler Text */
.glossary--sys .glossary__term,
.glossary--norm .glossary__term {
  color: #111 !important;
  border-bottom: none !important;
}

.glossary__ref {
  opacity: 0.8;
  font-size: 0.9em;
  margin-top: 0.4em;
  padding-top: 0.4em;
  border-top: 1px solid rgba(0,0,0,0.12);
}

/* ========================================================================
   CALLOUT BOXES – STABIL FÜR SINGLE-ARTIKEL
   ======================================================================== */

.callout {
  margin: 1.5rem 0 !important;
  padding: 1rem 1rem 0.9rem 1rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  background: rgba(148, 163, 184, 0.08) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.callout .callout-title {
  display: flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  margin: 0 0 0.85rem 0 !important;
  padding: 0 !important;
}

.callout .callout-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.1rem !important;
  height: 1.1rem !important;
  flex: 0 0 1.1rem !important;
}

.callout .callout-icon svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.callout .callout-title-inner {
  font-weight: 700 !important;
}

.callout .callout-content {
  margin: 0 !important;
  padding: 0 !important;
}

.callout .callout-content > :first-child {
  margin-top: 0 !important;
}

.callout .callout-content > :last-child {
  margin-bottom: 0 !important;
}

.callout .callout-content p,
.callout .callout-content ul,
.callout .callout-content ol {
  margin-top: 0 !important;
}

.callout .callout-content ul,
.callout .callout-content ol {
  margin-left: 1.35rem !important;
}

/* Standardtypen farbig */
.callout[data-callout="note"],
.callout[data-callout="info"] {
  border-color: rgba(59, 130, 246, 0.28) !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.callout[data-callout="note"] .callout-title,
.callout[data-callout="info"] .callout-title,
.callout[data-callout="note"] .callout-icon,
.callout[data-callout="info"] .callout-icon {
  color: #2563eb !important;
}

.callout[data-callout="tip"],
.callout[data-callout="hint"],
.callout[data-callout="success"] {
  border-color: rgba(16, 185, 129, 0.28) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.callout[data-callout="tip"] .callout-title,
.callout[data-callout="hint"] .callout-title,
.callout[data-callout="success"] .callout-title,
.callout[data-callout="tip"] .callout-icon,
.callout[data-callout="hint"] .callout-icon,
.callout[data-callout="success"] .callout-icon {
  color: #059669 !important;
}

.callout[data-callout="warning"],
.callout[data-callout="caution"] {
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.callout[data-callout="warning"] .callout-title,
.callout[data-callout="caution"] .callout-title,
.callout[data-callout="warning"] .callout-icon,
.callout[data-callout="caution"] .callout-icon {
  color: #d97706 !important;
}

.callout[data-callout="danger"],
.callout[data-callout="error"] {
  border-color: rgba(239, 68, 68, 0.28) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.callout[data-callout="danger"] .callout-title,
.callout[data-callout="error"] .callout-title,
.callout[data-callout="danger"] .callout-icon,
.callout[data-callout="error"] .callout-icon {
  color: #dc2626 !important;
}

.callout[data-callout="important"],
.callout[data-callout="attention"] {
  border-color: rgba(139, 92, 246, 0.28) !important;
  background: rgba(139, 92, 246, 0.08) !important;
}

.callout[data-callout="important"] .callout-title,
.callout[data-callout="attention"] .callout-title,
.callout[data-callout="important"] .callout-icon,
.callout[data-callout="attention"] .callout-icon {
  color: #7c3aed !important;
}

/* faltbare Callouts */
.callout.is-collapsible > .callout-title {
  cursor: pointer !important;
}

.callout.is-collapsed > .callout-content {
  display: none !important;
}

.callout .fold-callout-icon {
  margin-left: auto !important;
  width: 1rem !important;
  height: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.callout .fold-callout-icon svg {
  width: 1rem !important;
  height: 1rem !important;
  transition: transform 0.15s ease !important;
}

.callout.is-collapsed .fold-callout-icon svg {
  transform: rotate(-90deg) !important;
}

/* Mobile Callouts */
@media (max-width: 600px) {
  .callout {
    padding: 0.9rem 0.9rem 0.8rem 0.9rem !important;
    margin: 1.25rem 0 !important;
  }

  .callout .callout-title {
    font-size: 0.95rem !important;
  }
}
