/* ============================================================
   R4X Beginner v3 · Merged: Editorial + Tool-Hub
   Cormorant Garamond (Display) + Open Sans (Body/Dashboard)
   ============================================================ */

:root {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --bg-card: #10121a;
  --bg-deeper: #0a0b10;
  --bg-elevated: #10121a;
  --border: rgba(212,175,55,.18);
  --border-subtle: #1e2030;
  --text-dim: rgba(245,245,247,.4);
  --text-muted: #b3b3c2;
  --gold: var(--r4x-gold, #d4af37);
  --gold-soft: rgba(212,175,55,.55);
  --gold-glow: rgba(212,175,55,.08);
  --gold-glow-strong: rgba(212,175,55,.16);
  --danger: #e89090;
  --plus-bg: linear-gradient(135deg, #181410 0%, #1c1811 100%);
  --max-content: 720px;
  --max-wide: 860px;
  --max-layout: 1100px;
}

/* ---------- Lokaler Reset, NICHT GLOBAL ---------- */
/* Das globale *-Selektor wird hier bewusst NICHT verwendet, weil das den
   shared-header (inkl. Hamburger-Menue) zerstoeren wuerde. 
   box-sizing nur fuer Beginner-Container-Elemente. */
.r4x-content {
  -webkit-text-size-adjust: 100%;
}
.r4x-content,
.r4x-content *,
.r4x-content *::before,
.r4x-content *::after {
  box-sizing: border-box;
}

/* ---------- Content Container ---------- */
.r4x-content { 
  font-family: var(--font-body); 
  font-size: 15px; 
  line-height: 1.6;
  display: block;
  width: 100%;
}
/* Container-Schutz nur per max-width, KEIN overflow:hidden,
   weil das Tooltips clippen wuerde. Lange Inhalte werden per word-wrap gehandelt. */
.r4x-content > main,
.r4x-content > .layout,
.r4x-content > .beginner-main {
  max-width: 100%;
}

/* Standalone-Seiten (Index, ohne Sidebar): zentrierte Textspalte */
.beginner-main { 
  width: 100%;
  max-width: 720px; 
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Mit Sidebar: beginner-main ist innen */
.layout .beginner-main { 
  max-width: 100%; 
  margin: 0; 
  padding: 0;
  min-width: 0;
}

/* ---------- Layout (Sidebar + Content + Spacer für optische Zentrierung) ---------- */
.layout { 
  display: grid; 
  grid-template-columns: 220px minmax(0, 720px) 220px; 
  gap: 2.5rem; 
  width: 100%;
  max-width: 1240px; 
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.5rem 4rem; 
  align-items: start;
  justify-content: center;
}
.layout > .phase-nav { grid-column: 1; }
.layout > .beginner-main { grid-column: 2; }
/* Spalte 3 bleibt leer - schafft optische Balance zur Sidebar links */

/* ---------- Phase Sidebar ---------- */
.phase-nav { position: sticky; top: 100px; }
.phase-nav-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .18em; color: var(--text-muted); margin-bottom: .8rem; font-weight: 600; }
.phase-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border-subtle); }
.phase-list li { border-bottom: 1px solid var(--border-subtle); position: relative; }
.phase-list a { display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; color: var(--text-muted); font-size: .82rem; transition: color .2s; text-decoration: none; }
.phase-list a:hover { color: var(--text); }
.phase-list .num { font-size: .68rem; font-weight: 600; color: var(--text-dim); min-width: 1.6rem; }
.phase-list li.current a { color: var(--gold); font-weight: 600; }
.phase-list li.current::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--gold); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .78rem; color: var(--text-dim); margin-bottom: 1.2rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

/* ---------- Phase Header (Editorial) ---------- */
.phase-header { position: relative; padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--border-subtle); margin-bottom: 2.5rem; overflow: hidden; }
.phase-eyebrow { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--gold); letter-spacing: .08em; margin-bottom: 1rem; position: relative; z-index: 1; }
.phase-title { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 1.5rem; color: var(--text); position: relative; z-index: 1; max-width: 640px; }
.phase-title em { font-style: italic; color: var(--r4x-gold-2, #f0cf76); font-weight: 400; }
.phase-intro { font-size: 1.1rem; line-height: 1.55; color: var(--text-muted); max-width: 580px; font-weight: 300; position: relative; z-index: 1; margin: 0; }
.chapter-bignum { font-family: var(--font-display); font-style: italic; font-size: 11rem; font-weight: 400; color: var(--gold-glow-strong); position: absolute; top: -2.5rem; right: -1rem; line-height: 1; pointer-events: none; user-select: none; z-index: 0; }

/* ---------- Typography ---------- */
h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; line-height: 1.08; color: var(--text); }
h1 em { font-style: italic; color: var(--r4x-gold-2); font-weight: 400; }
h2 { font-family: var(--font-display); font-size: 2.1rem; font-weight: 500; line-height: 1.2; margin: 3.5rem 0 1.2rem; color: var(--text); scroll-margin-top: 100px; }
h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin: 2.2rem 0 .8rem; color: var(--text); }
p { margin: 0 0 1.3rem; color: var(--text); }

/* ---------- Inline Glossar Tooltip ---------- */
.gloss { position: relative; border-bottom: 1px dotted var(--gold-soft); color: var(--text); cursor: help; padding-bottom: 1px; transition: all .2s; text-decoration: none; }
.gloss:hover, .gloss:focus { color: var(--gold); border-bottom-color: var(--gold); border-bottom-style: solid; outline: none; }
.gloss[data-plus-only="true"] { border-bottom-style: dashed; }
.gloss::before { 
  content: attr(data-tip); 
  position: absolute; 
  bottom: calc(100% + 12px); 
  left: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  padding: .9rem 1.1rem; 
  font-family: var(--font-body); 
  font-size: .83rem; 
  line-height: 1.55; 
  color: var(--text); 
  opacity: 0; 
  pointer-events: none; 
  transform: translateY(4px);
  transition: opacity .2s, transform .2s; 
  z-index: 9999; 
  box-shadow: 0 8px 32px rgba(0,0,0,.5); 
  text-align: left; 
  white-space: pre-line; 
  font-weight: 400; 
  font-style: normal; 
}
.gloss::after { 
  content: ''; 
  position: absolute; 
  bottom: calc(100% + 6px); 
  left: 12px;
  border: 6px solid transparent; 
  border-top-color: var(--border); 
  opacity: 0; 
  pointer-events: none; 
  transition: opacity .2s; 
  z-index: 9999;
}
.gloss:hover::before, .gloss:focus::before { 
  opacity: 1; 
  transform: translateY(0); 
}
.gloss:hover::after, .gloss:focus::after { opacity: 1; }

/* Variante: Tooltip nach rechts ausgerichtet wenn Begriff am rechten Rand ist */
.gloss[data-tooltip-position="right"]::before { left: auto; right: 0; }
.gloss[data-tooltip-position="right"]::after { left: auto; right: 12px; }

/* ---------- Callouts (Merksatz, Warnhinweis) ---------- */
.callout { border-left: 2px solid var(--gold); background: var(--bg-elevated); padding: 1.5rem 1.7rem; margin: 2.2rem 0; border-radius: 0 4px 4px 0; max-width: var(--max-content); }
.callout-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--gold); font-weight: 500; margin-bottom: .7rem; display: flex; align-items: center; gap: .55rem; }
.callout-label::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--danger); }
.callout.warn .callout-label { color: var(--danger); }
.callout.warn .callout-label::before { background: var(--danger); }
.callout.merksatz, .callout.callout-merksatz { background: linear-gradient(135deg, #181a20 0%, #1c1913 100%); padding: 1.8rem 2rem; }
.callout.merksatz .callout-body, .callout.callout-merksatz .callout-body { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; line-height: 1.4; color: var(--text); }
.callout.merksatz ul, .callout.callout-merksatz ul { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.5; color: var(--text); margin: 0; padding-left: 1.2rem; }

/* ---------- Prose Content ---------- */
.expand-content { font-size: .95rem; line-height: 1.65; color: var(--text); max-width: var(--max-content); }
.expand-content p { margin: 0 0 1rem; }
.expand-content p:last-child { margin-bottom: 0; }
.expand-content strong { color: var(--text); font-weight: 600; }

/* ---------- FAQ Section (Editorial) ---------- */
.faq-section { margin: 3rem 0 2rem; max-width: var(--max-content); }
.faq-section-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }
details.faq-item { border-bottom: 1px solid var(--border-subtle); }
details.faq-item:first-of-type { border-top: 1px solid var(--border-subtle); }
details.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.1rem 0; font-weight: 500; color: var(--text); transition: color .2s; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); line-height: 1; font-weight: 300; flex-shrink: 0; }
details.faq-item[open] summary::after { content: '−'; }
details.faq-item summary:hover { color: var(--gold); }
details.faq-item p { color: var(--text-muted); padding: 0 0 1.2rem; font-size: .95rem; margin: 0; max-width: 600px; line-height: 1.6; }

/* ---------- Mythen (Editorial) ---------- */
.mythen-list { max-width: var(--max-content); }
details.myth-item { border-bottom: 1px solid var(--border-subtle); }
details.myth-item:first-of-type { border-top: 1px solid var(--border-subtle); }
details.myth-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.3rem 0; color: var(--text); transition: color .2s; }
details.myth-item summary::-webkit-details-marker { display: none; }
details.myth-item summary::before { content: 'Mythos'; font-size: .62rem; text-transform: uppercase; letter-spacing: .2em; color: var(--danger); font-weight: 500; padding: .25rem .55rem; border: 1px solid rgba(232,144,144,.3); border-radius: 2px; white-space: nowrap; flex-shrink: 0; }
details.myth-item summary span.myth-text { flex: 1; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; line-height: 1.35; font-weight: 400; }
details.myth-item summary::after { content: '+'; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); line-height: 1; font-weight: 300; flex-shrink: 0; }
details.myth-item[open] summary::after { content: '−'; }
details.myth-item summary:hover { color: var(--gold); }
details.myth-item .myth-answer { color: var(--text-muted); padding: 0 0 1.4rem; font-size: .95rem; margin: 0; line-height: 1.6; max-width: 620px; }

/* ---------- Begriffe Grid ---------- */
.begriffe-section { margin: 3rem 0 0; max-width: var(--max-wide); }
.begriffe-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }
.begriffe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; background: var(--bg-deeper); border: 1px solid var(--border-subtle); border-radius: 4px; padding: 1.5rem; }
.begriffe-item { padding: .8rem; transition: background .2s; border-radius: 3px; display: block; text-decoration: none; }
.begriffe-item:hover { background: var(--bg-card); }
.begriffe-term { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--gold); margin-bottom: .25rem; }
.begriffe-def { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.begriffe-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; flex-wrap: wrap; align-items: center; }
.begriffe-footer-free { color: #c9d1df; border-bottom: 1px solid rgba(201,209,223,.4); padding-bottom: 1px; text-decoration: none; }
.begriffe-footer-free:hover { border-bottom-color: #c9d1df; }
.begriffe-footer-plus { color: var(--gold); display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; text-decoration: none; }
.begriffe-footer-plus:hover { color: var(--r4x-gold-2, #f0cf76); }
.begriffe-footer-plus .badge-plus { font-size: .55rem; padding: .12rem .4rem; }

/* ============================================================
   TOOL CARDS (Dashboard-Stil)
   ============================================================ */
.tool-card { display: block; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 1.5rem 1.6rem; margin-bottom: 1.2rem; transition: border-color .2s; text-decoration: none; color: inherit; overflow: hidden; }
.tool-card:hover { border-color: rgba(212,175,55,.3); text-decoration: none; color: inherit; }
.tool-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.tool-card-icon { font-size: 1.6rem; flex-shrink: 0; width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; background: rgba(212,175,55,.08); border-radius: 8px; }
.tool-card-meta { flex: 1; min-width: 0; }
.tool-card-title { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 0 0 .3rem; line-height: 1.25; }
.tool-card-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge-free { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; padding: .15rem .5rem; border-radius: 3px; font-weight: 600; background: rgba(201,209,223,.12); color: #c9d1df; border: 1px solid rgba(201,209,223,.28); }
.badge-plus { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; padding: .15rem .5rem; border-radius: 3px; font-weight: 600; background: linear-gradient(135deg,#d4af37 0%,#f0cf76 100%); color: #111318; }
.tool-card-desc { font-size: .92rem; line-height: 1.5; color: var(--text-muted); margin: 0 0 1rem; }
.tool-card-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.tool-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 6px; font-size: .85rem; font-weight: 600; transition: all .2s; cursor: pointer; text-decoration: none; border: none; }
.tool-btn-free { background: rgba(245,245,247,.08); color: var(--text); border: 1px solid rgba(245,245,247,.15); }
.tool-btn-free:hover { background: rgba(245,245,247,.14); border-color: rgba(245,245,247,.25); }
.tool-btn-plus { background: linear-gradient(135deg,#d4af37 0%,#f0cf76 100%); color: #111318; border: 1px solid rgba(240,207,118,.42); }
.tool-btn-plus:hover { filter: brightness(1.06); }
.tool-btn-external::after { content: ' ↗'; font-size: .75em; opacity: .6; }

/* Tool-Card Expand (für "Erst lesen") */
.tool-card-expand { margin-top: .8rem; border-top: 1px solid var(--border-subtle); padding-top: .2rem; }
.tool-card-expand summary { font-size: .82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; padding: .7rem 0; list-style: none; display: flex; align-items: center; gap: .5rem; }
.tool-card-expand summary::before { content: '▸'; font-size: .7rem; transition: transform .2s; color: var(--gold); }
.tool-card-expand[open] summary::before { transform: rotate(90deg); }
.tool-card-expand summary::-webkit-details-marker { display: none; }

/* ---------- Section Label ---------- */
.section-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .15em; color: var(--text-muted); font-weight: 600; margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border-subtle); }

/* ---------- Nachschlagewerk-Card ---------- */
.nw-card { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 10px; margin-bottom: .8rem; transition: border-color .2s; text-decoration: none; color: inherit; }
.nw-card:hover { border-color: rgba(212,175,55,.3); }
.nw-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.nw-card-meta { flex: 1; }
.nw-card-title { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0 0 .2rem; }
.nw-card-sub { font-size: .82rem; color: var(--text-muted); margin: 0; }
.nw-card-arrow { color: var(--text-dim); font-size: .9rem; margin-left: auto; }

/* ---------- Plus Slogan ---------- */
.plus-slogan { text-align: center; padding: 2rem 1.5rem; margin: 2rem 0; border: 1px solid rgba(212,175,55,.2); border-radius: 12px; background: linear-gradient(135deg, rgba(212,175,55,.04) 0%, rgba(212,175,55,.02) 100%); }
.plus-slogan-text { font-size: 1.2rem; font-weight: 600; color: var(--r4x-gold-2, #f0cf76); margin: 0 0 .3rem; }
.plus-slogan-sub { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---------- Zentrale Hint ---------- */
.zentrale-hint { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.3rem; margin: 1.5rem 0; background: rgba(74,163,255,.06); border: 1px solid rgba(74,163,255,.15); border-radius: 8px; font-size: .88rem; color: var(--text-muted); }
.zentrale-hint a { color: #4aa3ff; font-weight: 600; text-decoration: none; }

/* ---------- Phase Nav (Bottom) ---------- */
.phase-bottom-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.phase-bottom-nav a { display: block; padding: 1.2rem 1.3rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; transition: border-color .2s; text-decoration: none; color: inherit; }
.phase-bottom-nav a:hover { border-color: var(--gold-soft); }
.phase-nav-dir { font-size: .65rem; text-transform: uppercase; letter-spacing: .15em; color: var(--text-dim); font-weight: 600; margin-bottom: .3rem; }
.phase-nav-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.phase-bottom-nav .next { text-align: right; }


/* Tool-Card, NW-Card, Callout: Word-Wrap Sicherheit */
.tool-card, .nw-card, .callout, .phase-header { 
  width: 100%;
  overflow-wrap: break-word; 
  word-wrap: break-word; 
}
.tool-card-title, .tool-card-desc, .nw-card-title, .nw-card-sub,
.phase-title, .phase-intro, .callout-body,
details.myth-item summary span.myth-text,
details.faq-item summary { 
  overflow-wrap: break-word; 
  word-wrap: break-word;
  min-width: 0;
}
.tool-card-actions { 
  flex-wrap: wrap;
  min-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .layout { 
    grid-template-columns: minmax(0, 1fr); 
    gap: 1.5rem; 
    padding: 2rem 1.2rem 3rem;
    max-width: 100%;
  }
  .layout > .phase-nav,
  .layout > .beginner-main { grid-column: auto; }
  .beginner-main { 
    padding: 2rem 1.2rem 3rem;
    max-width: 100%;
  }
  .phase-header, .tool-card, .nw-card, .callout { max-width: 100%; }
  .phase-nav { position: static; }
  .phase-list { border-left: none; display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .3rem; scrollbar-width: thin; }
  .phase-list li { border-bottom: none; border: 1px solid var(--border-subtle); border-radius: 6px; flex-shrink: 0; }
  .phase-list a { padding: .5rem .8rem; white-space: nowrap; }
  .phase-list li.current::before { display: none; }
  .phase-list li.current { border-color: var(--gold); }
  .chapter-bignum { font-size: 6rem; top: -1.5rem; right: -.5rem; }
  .phase-title { font-size: 2.3rem; }
  .callout.merksatz .callout-body, .callout.callout-merksatz .callout-body { font-size: 1.15rem; }
  .begriffe-grid { grid-template-columns: 1fr; }
  .phase-bottom-nav { grid-template-columns: 1fr; }
  .phase-bottom-nav .next { text-align: left; }
  .tool-card-actions { flex-direction: column; align-items: stretch; }
  .tool-btn { width: 100%; justify-content: center; box-sizing: border-box; }
}
@media (max-width: 640px) {
  .layout { 
    padding: 1.5rem 1rem 2.5rem; 
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .beginner-main { padding: 1.5rem 1rem 2.5rem; }
  .tool-card, .nw-card, .callout { padding: 1.2rem 1rem; }
  .tool-card-header { gap: .7rem; }
  .tool-card-icon { width: 2rem; height: 2rem; font-size: 1.3rem; }
  .tool-card-title { font-size: 1rem; }
  .tool-card-desc { font-size: .88rem; }
  .tool-btn { font-size: .82rem; padding: .55rem .9rem; }
  .phase-header { padding: 1.5rem 0 2rem; margin-bottom: 2rem; }
  .phase-eyebrow { font-size: .95rem; }
  .chapter-bignum { font-size: 4rem; }
  .phase-title { font-size: 1.9rem; }
  .phase-intro { font-size: .98rem; }
  .tool-card { padding: 1.2rem; }
  .callout { padding: 1.2rem 1.3rem; }
  .callout.merksatz .callout-body, .callout.callout-merksatz .callout-body { font-size: 1.05rem; }
  .gloss::before { 
    width: max-content; 
    max-width: min(280px, calc(100vw - 32px)); 
    font-size: .78rem; 
    left: 0; 
    transform: translateY(0);
  }
  .gloss[data-tooltip-position="right"]::before { left: auto; right: 0; }
  details.myth-item summary span.myth-text { font-size: .98rem; }
}
@media (max-width: 380px) {
  .layout { padding: 1.2rem .8rem 2rem; }
  .beginner-main { padding: 1.2rem .8rem 2rem; }
  .chapter-bignum { font-size: 3.2rem; }
  .phase-title { font-size: 1.65rem; }
  .tool-card, .callout, .nw-card { padding: 1rem; }
}



/* ============================================================
   VISUAL UPGRADE COMPONENTS
   ============================================================ */

/* ---------- Sprechblase mit echter Bubble ---------- */
.speech-bubble {
  position: relative;
  background: linear-gradient(135deg, rgba(212,175,55,.08) 0%, rgba(212,175,55,.03) 100%);
  border: 1px solid rgba(212,175,55,.25);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin: 2rem 0 2.5rem 60px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 32px;
  width: 0;
  height: 0;
  border: 12px solid transparent;
  border-right-color: rgba(212,175,55,.25);
  border-left: 0;
  border-top: 0;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 33px;
  width: 0;
  height: 0;
  border: 11px solid transparent;
  border-right-color: #1b1813;
  border-left: 0;
  border-top: 0;
}
.speech-bubble-avatar {
  position: absolute;
  left: -68px;
  top: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #f0cf76 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.speech-bubble p { margin: 0 0 .9rem; }
.speech-bubble p:last-child { margin-bottom: 0; }
.speech-bubble strong { font-style: normal; color: var(--gold); font-weight: 600; }

/* ---------- Icon-List (für "Du lernst Schritt für Schritt") ---------- */
.icon-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
}
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.025);
  border-left: 2px solid var(--gold-soft);
  border-radius: 0 6px 6px 0;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text);
}
.icon-list li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* ---------- Pillar-Cards (für "Worum es geht / Was es nicht ist") ---------- */
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.pillar-card {
  padding: 1.5rem 1.4rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.pillar-card.is-positive { border-left: 3px solid var(--gold); }
.pillar-card.is-negative { border-left: 3px solid rgba(232,144,144,.5); }
.pillar-card-icon {
  font-size: 1.4rem;
  margin-bottom: .6rem;
  display: block;
}
.pillar-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .5rem;
}
.pillar-card.is-negative .pillar-card-title { color: rgba(232,144,144,.95); }
.pillar-card p {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Hero Stats ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 2.5rem;
  padding: 1.4rem;
  background: linear-gradient(135deg, rgba(212,175,55,.06) 0%, rgba(212,175,55,.02) 100%);
  border: 1px solid rgba(212,175,55,.18);
  border-radius: 12px;
}
.hero-stat {
  text-align: center;
  padding: .3rem;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .25rem;
}
.hero-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Phase-Preview Cards (kleine Kacheln für "Phasen im Überblick") ---------- */
.phase-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
  margin: 1.5rem 0 2rem;
}
.phase-preview {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .15s;
}
.phase-preview:hover {
  border-color: rgba(212,175,55,.4);
  transform: translateY(-1px);
}
.phase-preview-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  width: 2.4rem;
  font-weight: 500;
}
.phase-preview-meta { flex: 1; min-width: 0; }
.phase-preview-title { font-weight: 600; font-size: .92rem; color: var(--text); margin: 0 0 .25rem; line-height: 1.25; }
.phase-preview-desc { font-size: .78rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* ---------- Big Quote Block (für "Verstehen statt Zocken") ---------- */
.hero-quote {
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #181a20 0%, #1c1913 100%);
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,.15);
}
.hero-quote-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 .6rem;
}
.hero-quote-text em {
  color: var(--gold);
  font-style: italic;
}
.hero-quote-sub {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 0;
  font-style: normal;
  font-family: var(--font-body);
}

/* ---------- Mobile Adjustments für neue Komponenten ---------- */
@media (max-width: 640px) {
  .speech-bubble { margin-left: 50px; padding: 1.4rem 1.3rem; font-size: .98rem; }
  .speech-bubble-avatar { left: -56px; width: 40px; height: 40px; font-size: 1.2rem; }
  .pillar-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: .8rem; padding: 1.2rem; }
  .hero-stat-value { font-size: 1.6rem; }
  .phase-preview-grid { grid-template-columns: 1fr; }
  .hero-quote { padding: 1.8rem 1.2rem; }
  .hero-quote-text { font-size: 1.25rem; }
}
@media (max-width: 380px) {
  .speech-bubble { margin-left: 0; padding: 1.2rem; }
  .speech-bubble-avatar { position: static; margin-bottom: .8rem; }
  .speech-bubble::before, .speech-bubble::after { display: none; }
}

/* ============================================================
   SCROLL TOP BUTTON
   ============================================================ */
#r4x-scroll-top {
  position: fixed;
  right: 1.8rem;
  bottom: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #f0cf76 100%);
  color: #111318;
  border: none;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 0 1px rgba(240,207,118,.3);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, filter .15s;
  z-index: 100;
}
#r4x-scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#r4x-scroll-top:hover { filter: brightness(1.08); }
#r4x-scroll-top:active { transform: translateY(0) scale(.95); }

@media (max-width: 640px) {
  #r4x-scroll-top {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

/* Plus-Buttons: gesperrt-Indikator (Schloss vor Label) */
.tool-btn[data-locked="true"]::before {
  content: '🔒 ';
  font-size: .85em;
  margin-right: .15rem;
}

/* Section-Label Gold-Highlight für Schluesselbegriffe */
.section-label .sl-gold {
  color: var(--gold);
  font-weight: 700;
}

