/* ==========================================================================
   Mesh APP Guides — Styles für single-guide.php + archive-guide.php
   Scoped unter .mesh-guide, nutzt die Brand-Basis der Site
   (InterTight, Primärblau #1866DD).
   ========================================================================== */

.mesh-guide {
  --g-ground: #f7f8fb;
  --g-surface: #ffffff;
  --g-surface-2: #eef1f7;
  --g-ink: #101219;
  --g-ink-2: #4b5262;
  --g-ink-3: #7a8196;
  --g-rule: #dbdfe9;
  --g-rule-soft: #e8ebf2;
  --g-accent: #1866dd;
  --g-accent-ink: #1259d3;
  --g-accent-soft: #e6eefc;
  --g-tip: #8a6117;
  --g-tip-soft: #faf2df;
  --g-ok: #1e6f57;
  --g-ok-soft: #e0f0e9;
  --g-warn: #a2402f;
  --g-warn-soft: #fdecea;
  --g-shadow: 0 1px 2px rgba(16, 20, 38, .05), 0 10px 28px -18px rgba(16, 20, 38, .18);
  --g-measure: 66ch;
  --g-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --g-sans: "InterTight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  background: var(--g-ground);
  color: var(--g-ink);
  font-family: var(--g-sans);
  font-size: 17px;
  line-height: 1.64;
}

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

.guide-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }

/* ---------- breadcrumbs ---------- */
.guide-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--g-rule-soft);
  font-family: var(--g-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--g-ink-3);
}
.guide-crumbs a { color: var(--g-ink-3); text-decoration: none; }
.guide-crumbs a:hover { color: var(--g-accent); }
.guide-crumbs .sep { color: var(--g-rule); }
.guide-crumbs .here { color: var(--g-ink-2); }

/* ---------- masthead ---------- */
.guide-masthead {
  border-bottom: 1px solid var(--g-rule);
  padding: 44px 0 34px;
  margin-bottom: 40px;
}
.guide-masthead.hub { padding-top: 56px; }
.guide-eyebrow {
  font-family: var(--g-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--g-accent);
  margin: 0 0 14px;
}
.guide-masthead h1 {
  font-family: var(--g-sans);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -.024em;
  text-wrap: balance;
  margin: 0 0 18px;
  color: var(--g-ink);
}
.guide-standfirst {
  max-width: 56ch;
  color: var(--g-ink-2);
  font-size: 1.08rem;
  margin: 0 0 22px;
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-family: var(--g-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--g-ink-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-meta li {
  border: 1px solid var(--g-rule);
  border-radius: 3px;
  padding: 4px 9px;
  background: var(--g-surface);
}
.guide-meta li.hot {
  border-color: var(--g-accent);
  color: var(--g-accent-ink);
  background: var(--g-accent-soft);
}

/* ---------- layout ---------- */
.guide-cols {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: 90px; /* Platz für den Sticky-Header der Site */
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.guide-toc .toc-title {
  font-family: var(--g-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--g-ink-3);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g-rule);
}
.guide-toc ul { list-style: none; margin: 0; padding: 0; }
.guide-toc li { margin: 0; }
.guide-toc a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--g-ink-2);
  text-decoration: none;
  padding: 5px 8px 5px 10px;
  border-left: 2px solid transparent;
}
.guide-toc a:hover {
  color: var(--g-accent);
  border-left-color: var(--g-accent);
  background: var(--g-accent-soft);
}
.guide-toc .toc-cta {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--g-rule);
  border-radius: 6px;
  background: var(--g-surface);
}
.guide-toc .toc-cta p {
  font-size: 12.5px;
  color: var(--g-ink-2);
  margin: 0 0 10px;
  line-height: 1.4;
}

.guide-btn {
  display: inline-block;
  font-family: var(--g-sans);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  color: #ffffff !important;
  background: var(--g-accent);
  border-radius: 6px;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
}
.guide-btn:hover { background: var(--g-accent-ink); color: #ffffff; }
.guide-btn.big { font-size: 15px; padding: 12px 22px; }

.guide-main { min-width: 0; max-width: 820px; }

/* ---------- sections & prose ---------- */
.guide-section h2 {
  font-family: var(--g-sans);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.015em;
  line-height: 1.18;
  text-wrap: balance;
  margin: 56px 0 6px;
  padding-top: 24px;
  border-top: 1px solid var(--g-rule);
  scroll-margin-top: 96px;
  color: var(--g-ink);
}
.guide-main > .guide-section:first-child h2 {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.guide-section { scroll-margin-top: 96px; }
.guide-section h3 {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -.006em;
  margin: 32px 0 4px;
  color: var(--g-ink);
}
.guide-section p,
.guide-section ul,
.guide-section ol,
.guide-prose p,
.guide-prose ul,
.guide-prose ol { max-width: var(--g-measure); }
.guide-section p, .guide-prose p { margin: 14px 0; color: var(--g-ink); }
.guide-section ul, .guide-section ol,
.guide-prose ul, .guide-prose ol { margin: 14px 0; padding-left: 22px; }
.guide-section li, .guide-prose li { margin: 6px 0; }
.guide-section strong, .guide-prose strong { font-weight: 600; color: var(--g-ink); }
.guide-section a:not(.guide-btn), .guide-prose a {
  color: var(--g-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* step marker */
.guide-step h2 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.step-no {
  font-family: var(--g-mono);
  font-size: .56em;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--g-accent-ink);
  background: var(--g-accent-soft);
  border-radius: 4px;
  padding: 4px 8px;
  white-space: nowrap;
  transform: translateY(-3px);
}

/* ---------- screenshot frame ---------- */
.guide-shot {
  margin: 26px 0;
  border: 1px solid var(--g-rule);
  border-radius: 8px;
  background: var(--g-surface);
  box-shadow: var(--g-shadow);
  overflow: hidden;
  max-width: 720px;
}
.guide-shot .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--g-surface-2);
  border-bottom: 1px solid var(--g-rule-soft);
}
.guide-shot .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--g-rule); }
.guide-shot .url {
  margin-left: 8px;
  font-family: var(--g-mono);
  font-size: 10.5px;
  color: var(--g-ink-3);
  letter-spacing: .03em;
}
.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1680 / 851;
  object-fit: cover;
}
.guide-shot figcaption {
  font-size: 12.5px;
  color: var(--g-ink-3);
  padding: 10px 14px;
  border-top: 1px solid var(--g-rule-soft);
}

/* ---------- tip / result ---------- */
.guide-tip,
.guide-result {
  margin: 24px 0;
  max-width: var(--g-measure);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
}
.guide-tip { background: var(--g-tip-soft); border-left: 3px solid var(--g-tip); }
.guide-result { background: var(--g-ok-soft); border-left: 3px solid var(--g-ok); }
.guide-tip .tip-label,
.guide-result .tip-label {
  font-family: var(--g-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.guide-tip .tip-label { color: var(--g-tip); }
.guide-result .tip-label { color: var(--g-ok); }
.guide-tip p { margin: 0; }
.guide-result .guide-prose p:first-child { margin-top: 0; }
.guide-result .guide-prose p:last-child,
.guide-result .guide-prose ul:last-child { margin-bottom: 0; }

/* ---------- checklist ---------- */
.guide-check { list-style: none; padding-left: 0; max-width: var(--g-measure); }
.guide-check li { padding-left: 28px; position: relative; margin: 8px 0; }
.guide-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--g-ok);
}

/* ---------- FAQ ---------- */
.guide-faq {
  max-width: var(--g-measure);
  border: 1px solid var(--g-rule);
  border-radius: 6px;
  background: var(--g-surface);
  margin: 10px 0;
}
.guide-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--g-ink);
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: "+"; color: var(--g-ink-3); font-weight: 500; }
.guide-faq[open] summary::after { content: "–"; }
.guide-faq .answer { padding: 0 18px 16px; }
.guide-faq .answer p { margin: 0 0 10px; font-size: 16px; }
.guide-faq .answer p:last-child { margin-bottom: 0; }

/* ---------- related / hub cards ---------- */
.guide-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.guide-related a {
  display: block;
  border: 1px solid var(--g-rule);
  border-radius: 8px;
  background: var(--g-surface);
  padding: 18px;
  text-decoration: none;
  box-shadow: var(--g-shadow);
  transition: border-color .12s ease;
}
.guide-related a:hover { border-color: var(--g-accent); }
.guide-related .kicker {
  font-family: var(--g-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--g-ink-3);
  margin: 0 0 8px;
}
.guide-related .title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  color: var(--g-ink);
  margin: 0;
}
.guide-related .teaser {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--g-ink-2);
  margin: 8px 0 0;
}

/* hub grouping */
.mesh-guide-hub .hub-group h2 {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.012em;
  margin: 44px 0 4px;
  padding-top: 22px;
  border-top: 1px solid var(--g-rule);
  color: var(--g-ink);
}
.mesh-guide-hub .hub-group:first-of-type h2 { margin-top: 0; border-top: 0; padding-top: 0; }

/* ---------- CTA banner ---------- */
.guide-cta {
  margin: 64px 0 0;
  border: 1px solid var(--g-rule);
  border-radius: 10px;
  background: var(--g-surface);
  box-shadow: var(--g-shadow);
  padding: 34px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.guide-cta h2 {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -.015em;
  color: var(--g-ink);
}
.guide-cta p { margin: 0; color: var(--g-ink-2); max-width: 48ch; }
.guide-cta .fine {
  font-family: var(--g-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--g-ink-3);
  margin-top: 10px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .guide-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-toc {
    position: static;
    max-height: none;
    margin-bottom: 36px;
    border: 1px solid var(--g-rule);
    border-radius: 8px;
    padding: 14px 12px;
    background: var(--g-surface);
  }
  .guide-toc ul { columns: 2; column-gap: 20px; }
  .guide-toc .toc-cta { display: none; }
  .guide-masthead { padding-top: 32px; }
  .guide-cta { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 26px 24px; }
}
@media (max-width: 560px) {
  .mesh-guide { font-size: 16px; }
  .guide-toc ul { columns: 1; }
}

.mesh-guide :focus-visible {
  outline: 2px solid var(--g-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .mesh-guide * { animation: none !important; transition: none !important; }
}

/* ---------- Teaser-Block auf Feature-Seiten ---------- */
.mesh-guide-teasers { padding: 64px 0 24px; }
.mesh-guide-teasers .guide-wrap { padding-bottom: 0; }
.mesh-guide-teasers .teaser-head { margin-bottom: 24px; }
.mesh-guide-teasers .teaser-head h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--g-ink);
}
.mesh-guide-teasers .guide-standfirst { margin-bottom: 0; font-size: 1rem; }
.mesh-guide-teasers .teaser-more {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
}
.mesh-guide-teasers .teaser-more a {
  color: var(--g-accent-ink);
  text-decoration: none;
}
.mesh-guide-teasers .teaser-more a:hover { text-decoration: underline; }

/* ---------- Platzhalter: Screenshot fehlt noch ---------- */
.guide-shot.is-empty .canvas,
.guide-video.is-empty .canvas {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, var(--g-surface-2) 14px 15px);
  min-height: 240px;
}
.guide-shot.is-empty .canvas {
  aspect-ratio: 1680 / 851;
  min-height: 0;
}
.guide-shot.is-empty .canvas span,
.guide-video.is-empty .canvas span {
  display: block;
  text-align: center;
  max-width: 44ch;
  background: var(--g-surface);
  border: 1px dashed var(--g-rule);
  border-radius: 6px;
  padding: 18px 22px;
}
.guide-shot.is-empty strong,
.guide-video.is-empty strong {
  display: block;
  font-family: var(--g-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--g-ink-3);
}
.guide-shot.is-empty em,
.guide-video.is-empty em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--g-ink-2);
}

/* ---------- Video ---------- */
.guide-video {
  margin: 26px 0;
  max-width: 720px;
  border: 1px solid var(--g-rule);
  border-radius: 8px;
  background: var(--g-surface);
  box-shadow: var(--g-shadow);
  overflow: hidden;
}
.guide-video iframe,
.guide-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}
.guide-video.is-empty .canvas { min-height: 300px; }
.guide-video.is-empty .play {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid var(--g-rule);
  background: var(--g-accent-soft);
  position: relative;
}
.guide-video.is-empty .play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-left: 12px solid var(--g-accent);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.guide-video-caption {
  font-size: 13.5px;
  color: var(--g-ink-3);
  margin: -10px 0 0;
  max-width: var(--g-measure);
}

/* ---------- Referenztabelle (Begriff → Bedeutung) ---------- */
.guide-table-scroll {
  overflow-x: auto;
  margin: 20px 0;
  max-width: 100%;
  border: 1px solid var(--g-rule);
  border-radius: 8px;
  background: var(--g-surface);
  box-shadow: var(--g-shadow);
}
table.guide-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}
table.guide-table th,
table.guide-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--g-rule-soft);
}
table.guide-table tr:last-child th,
table.guide-table tr:last-child td { border-bottom: 0; }
table.guide-table th[scope="row"] {
  font-weight: 600;
  color: var(--g-ink);
  white-space: nowrap;
  width: 1%;
}
table.guide-table td { color: var(--g-ink-2); }
table.guide-table td.marker { width: 1%; white-space: nowrap; padding-left: 8px; }
table.guide-table td.marker span {
  display: inline-block;
  font-family: var(--g-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--g-accent-ink);
  background: var(--g-accent-soft);
  border-radius: 3px;
  padding: 3px 7px;
}
table.guide-table tr:hover th,
table.guide-table tr:hover td { background: var(--g-accent-soft); }

/* ---------- Achtung-Kasten ---------- */
.guide-warning {
  margin: 24px 0;
  max-width: var(--g-measure);
  padding: 16px 20px;
  background: var(--g-warn-soft, #fdecea);
  border-left: 3px solid var(--g-warn, #a2402f);
  border-radius: 0 6px 6px 0;
}
.guide-warning .tip-label {
  font-family: var(--g-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--g-warn, #a2402f);
  margin: 0 0 6px;
}
.guide-warning p:last-child { margin: 0; }
