/* ============================================================
   Diagrix — guide.css (Benutzerhandbuch)
   ============================================================ */

/* --- Guide Header --- */
.guide-header {
  padding: 120px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
}
.guide-header__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.guide-header__sub {
  font-size: 18px;
  color: var(--c-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Layout --- */
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 96px;
  align-items: start;
}

/* --- TOC Sidebar --- */
.guide-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  scrollbar-width: none;
}
.guide-toc::-webkit-scrollbar { display: none; }

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { line-height: 1; }
.toc-group {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  padding: 20px 0 6px;
}
.toc-group:first-child { padding-top: 0; }

.toc-link {
  display: block;
  font-size: 13px;
  color: var(--c-text-muted);
  padding: 5px 0 5px 10px;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.toc-link:hover { color: var(--c-text); }
.toc-link--active {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
}

/* --- Content --- */
.guide-content {
  min-width: 0;
}

.guide-section {
  padding-bottom: 56px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}
.guide-section:last-child { border-bottom: none; }

.guide-section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  margin-top: 0;
}
.guide-section h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--c-text);
}
.guide-section p {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.guide-muted {
  font-size: 13px !important;
  color: var(--c-text-dim) !important;
}

/* --- Tables --- */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0;
  background: var(--c-bg-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  background: var(--c-bg-3);
  border-bottom: 1px solid var(--c-border);
}
.guide-table td {
  padding: 10px 14px;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.guide-table tr:last-child td { border-bottom: none; }
.guide-table td strong { color: var(--c-text); font-weight: 500; }
.guide-table kbd { vertical-align: middle; }

/* --- kbd Chips --- */
kbd {
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 3px 7px;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border-med);
  border-radius: 5px;
  color: var(--c-text);
  white-space: nowrap;
}

/* --- Callouts --- */
.guide-tip, .guide-note {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text-muted);
  margin: 16px 0;
}
.guide-tip {
  background: rgba(99,102,241,.08);
  border-left: 3px solid var(--c-accent);
}
.guide-tip strong, .guide-note strong { color: var(--c-text); }
.guide-note {
  background: rgba(6,182,212,.08);
  border-left: 3px solid var(--c-accent-3);
}

/* --- Code block --- */
.guide-code {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 12px 0;
}
.guide-code code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.7;
}

/* --- Lists --- */
.guide-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.guide-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}
.guide-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--c-accent);
}
.guide-list li strong { color: var(--c-text); }

.guide-steps {
  padding-left: 24px;
  margin: 10px 0;
}
.guide-steps li {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}
.guide-steps li strong { color: var(--c-text); }

/* --- Chips --- */
.guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.chip {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.chip--active {
  background: rgba(99,102,241,.15);
  border-color: rgba(99,102,241,.4);
  color: var(--c-accent);
}

/* --- Module Header Icon --- */
.guide-module-header {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  color: #fff;
}

/* --- Modules Title --- */
.guide-modules-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text-dim);
  letter-spacing: -.01em;
  padding: 40px 0 8px;
  border-top: 1px solid var(--c-border);
  margin-bottom: 0;
}

/* --- Window Preview --- */
.guide-window-preview {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border-med);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  font-size: 13px;
}
.gwp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--c-bg-2);
  border-bottom: 1px solid var(--c-border);
}
.gwp-dots { display: flex; gap: 6px; }
.gwp-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--c-border-med);
}
.gwp-title { color: var(--c-text-muted); font-size: 12px; flex: 1; text-align: center; }
.gwp-btns { display: flex; gap: 8px; }
.gwp-btns span {
  font-size: 12px; padding: 3px 10px;
  border-radius: 5px; background: var(--c-bg-3);
  border: 1px solid var(--c-border); color: var(--c-text-muted);
}
.gwp-btn-accent {
  background: rgba(99,102,241,.15) !important;
  border-color: rgba(99,102,241,.3) !important;
  color: var(--c-accent) !important;
}
.gwp-body { display: flex; min-height: 140px; }
.gwp-sidebar {
  width: 140px; border-right: 1px solid var(--c-border);
  padding: 8px 0; flex-shrink: 0;
}
.gwp-item {
  padding: 7px 14px; font-size: 12px; color: var(--c-text-muted);
  cursor: pointer;
}
.gwp-item--active {
  background: rgba(99,102,241,.15); color: var(--c-accent);
}
.gwp-lang {
  margin-top: auto; color: var(--c-text-dim) !important;
  font-size: 11px !important;
}
.gwp-canvas {
  flex: 1; display: flex; align-items: center;
  justify-content: center; color: var(--c-text-dim);
  font-size: 12px;
}

/* --- Waypoint Demo --- */
.guide-waypoint-demo {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 24px;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin: 16px 0;
  justify-content: center;
}
.wdemo-node {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,.15);
  border: 2px solid var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--c-accent);
  flex-shrink: 0;
}
.wdemo-line {
  flex: 1; max-width: 200px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent) 50%, transparent 50%);
  background-size: 8px 2px;
  position: relative; display: flex; align-items: center; justify-content: center;
  border-top: 2px dashed rgba(99,102,241,.4);
  margin: 0 4px;
}
.wdemo-wp {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--c-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
  flex-shrink: 0;
  position: relative; z-index: 1;
}

/* --- Export Cards --- */
.guide-export-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.guide-export-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-bg-2);
}
.guide-export-card p {
  font-size: 13px !important;
  color: var(--c-text-dim) !important;
  margin: 8px 0 !important;
}
.gec-label {
  font-size: 16px; font-weight: 700; color: var(--c-text);
}
.guide-export-card--html .gec-label { color: #22c55e; }
.guide-export-card--pdf  .gec-label { color: #ef4444; }
.guide-export-card--word .gec-label { color: #3b82f6; }
.guide-export-card--png  .gec-label { color: #8b5cf6; }
.guide-export-card--jpeg .gec-label { color: #f59e0b; }

/* --- Active nav link --- */
.nav__link--active {
  color: var(--c-accent) !important;
}

/* --- Inline code --- */
.guide-section code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  color: var(--c-accent-3);
}
/* don't double-style code inside pre */
.guide-code code {
  background: none;
  border: none;
  padding: 0;
  color: var(--c-text);
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .guide-toc {
    position: static;
    max-height: none;
    background: var(--c-bg-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 40px;
  }
  .guide-export-grid {
    grid-template-columns: 1fr;
  }
}

/* Breite Tabellen auf Phones horizontal scrollbar statt Seiten-Overflow */
@media (max-width: 600px) {
  .guide-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .guide-section h2 { font-size: clamp(20px, 6vw, 26px); }
}
