/* seo-page.css — öffentliche Tor-Seiten (/de/tor/N, /en/gate/N).
   Farben ausschließlich aus den Tokens in nav.css, damit Hell/Dunkel wie im Rest der Seite greift. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Kopfzeile wie auf den übrigen Seiten; nav.js baut sie beim Laden einheitlich um */
header {
  background: var(--navy);
  color: #fff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.seo-brand { color: #fff; text-decoration: none; font-weight: 600; }

.seo-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem max(16px, 1.25rem) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.seo-crumbs a { color: var(--blue); text-decoration: none; font-size: 0.9rem; }
.seo-crumbs a:hover { text-decoration: underline; }

.seo-page h1 { font-size: 1.7rem; line-height: 1.25; text-wrap: balance; }

.seo-crumbs { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Titelzeile mit Hexagramm (Zeichen + sechs Linien, oben Linie 6) */
.seo-title { display: flex; align-items: center; gap: 1rem; }
.seo-hex { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.seo-hex-char {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Ming', serif;
  font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--text); margin-bottom: 2px;
}
/* Linien in Textfarbe statt --navy: --navy wäre im dunklen Design auf dunklem Grund unsichtbar */
.seo-hex-line { width: 48px; height: 6px; border-radius: 1px; }
.seo-hex-line.yang { background: var(--text); }
.seo-hex-line.yin { display: flex; gap: 10px; }
.seo-hex-line.yin::before, .seo-hex-line.yin::after {
  content: ''; flex: 1; height: 6px; background: var(--text); border-radius: 1px;
}
.seo-hex-line.active.yang,
.seo-hex-line.active.yin::before, .seo-hex-line.active.yin::after { background: var(--gold); }

.seo-line-context { color: var(--text-dim); font-size: 0.95rem; margin-top: -0.5rem; }
.seo-lines li.active { font-weight: 600; }
.seo-lines li.active .seo-line-no { color: var(--gold); }

/* Zentrum-Grafik auf eigener, IMMER heller Kachel - unabhängig vom Design.
   Grund: schwarze Umrisse und dunkle Tor-Farben verschwanden im dunklen Design (detail.html). */
.seo-center { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.seo-center-tile {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  width: min(220px, 60vw);
  aspect-ratio: 1;
  max-width: 100%;
}
.seo-center-tile svg { width: 100%; height: 100%; display: block; }
.seo-center figcaption { font-size: 0.85rem; color: var(--text-dim); }

/* Notizen */
.seo-notes-locked { color: var(--text-dim); }
.seo-notes-toolbar { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; }
.seo-notes-fmt {
  padding: 0.2rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-dim); font-weight: 600; cursor: pointer;
}
.seo-notes-fmt:hover { background: var(--border); }
.seo-notes-text, .seo-notes-preview {
  width: 100%; min-height: 120px; padding: 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-md); font: inherit; font-size: 0.9rem; line-height: 1.6;
  color: var(--text); background: var(--surface);
}
.seo-notes-text { resize: vertical; }
.seo-notes-text:focus { outline: none; border-color: var(--blue); }
.seo-notes-preview p { margin-bottom: 0.5rem; }
.seo-notes-preview ul { padding-left: 1.25rem; }
.seo-notes-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.6rem; }
.seo-notes-status { font-size: 0.8rem; color: var(--text-dim); }
.seo-num { color: var(--gold); font-variant-numeric: tabular-nums; }

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
/* Gesundheits-Hinweis der Variablen: sichtbar, aber kleiner als der Inhalt (wie der Kasten auf variables.html) */
.seo-card.seo-note {
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, var(--surface));
  padding: 0.9rem 1.25rem;
}
.seo-card.seo-note .seo-text { font-size: 0.84rem; line-height: 1.55; }
.seo-card h2 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

/* Steckbrief als Zwei-Spalten-Liste, auf dem Handy untereinander */
.seo-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; }
.seo-facts dt { font-size: 0.75rem; letter-spacing: 0.04em; color: var(--text-dim); padding-top: 0.2rem; }
.seo-facts dd { font-size: 0.95rem; }
.seo-gated p { color: var(--text-dim); margin-bottom: 0.9rem; max-width: 65ch; }
.seo-facts-wide { grid-column: 1 / -1; color: var(--text-dim); font-size: 0.9rem; padding-top: 0.25rem; }
.seo-facts-wide + .seo-facts-wide { padding-top: 0; }
@media (max-width: 520px) {
  .seo-facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .seo-facts dd { margin-bottom: 0.5rem; }
}

.seo-text p { margin-bottom: 0.8rem; max-width: 65ch; }
.seo-text p:last-child { margin-bottom: 0; }
.seo-ellipsis { color: var(--text-dim); margin-top: -0.4rem; }

.seo-lock {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.seo-lock h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.seo-lock p { color: var(--text-dim); margin-bottom: 0.9rem; }

.seo-lines { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.seo-line-no { display: inline-block; min-width: 5.5rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.seo-channels { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.seo-channels a, .seo-pager a, .seo-index a { color: var(--blue); text-decoration: none; }
.seo-channels a:hover, .seo-pager a:hover, .seo-index a:hover { text-decoration: underline; }

.seo-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.seo-btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.seo-btn:hover { border-color: var(--blue); }
.seo-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.seo-btn-primary { background: var(--gold); border-color: var(--gold); color: #1a1a2e; }
.seo-btn-primary:hover { filter: brightness(1.05); border-color: var(--gold); }

.seo-pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.9rem; }

.seo-intro { color: var(--text-dim); max-width: 65ch; }
.seo-index {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem 1rem;
}
.seo-index .seo-num { display: inline-block; min-width: 2rem; }

/* ── Bereichsseiten (Kanal, Zentrum, Typ, Autorität, Definition, Profil, Kreuz) ── */
.seo-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: -0.75rem;
}
.seo-visual img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Bodygraph ist hochkant - Kachel nicht quadratisch erzwingen */
.seo-page[data-kind="channel"] .seo-center-tile { aspect-ratio: auto; width: min(280px, 75vw); }
.seo-page[data-kind="channel"] .seo-center-tile svg { height: auto; }

.seo-linklist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.35rem 1rem; }
.seo-linklist a { color: var(--blue); text-decoration: none; }
.seo-linklist a:hover { text-decoration: underline; }

.seo-lock-card p { color: var(--text-dim); margin-bottom: 0.9rem; max-width: 65ch; }

/* Abschnitt, der zum eigenen gespeicherten Chart passt (z.B. "Definiert" beim Zentrum) */
.seo-card.seo-mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.seo-mine-badge {
  display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.5rem; border-radius: 999px;
  background: var(--gold); color: #1a1a2e; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: none;
}
/* Mandala auf den Kreuz-Seiten deutlich größer: Es trägt jetzt Bodygraph, Tierkreis, Faces und
   Quartale - unter ~500px werden Tor-Nummern und Bogenschrift zu klein zum Lesen */
.seo-page[data-kind="cross"] .seo-center-tile { width: min(560px, 100%); }

/* Variablen-Pfeil auf heller Kachel (im dunklen Design war der schwarze Pfeil kaum sichtbar) */
.seo-arrow-tile { aspect-ratio: auto; width: min(260px, 70vw); display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.seo-arrow-tile svg { width: 100px; height: auto; }
.seo-arrow-symbol { font-size: 2.6rem; line-height: 1; }

/* ── Report-Hinweis am Ende jeder SEO-Seite (ReadingPageRenderer.reportCard) ──
   Goldene Kante wie der Variablen-Hinweis: fällt auf, ohne den Inhalt zu überragen */
.seo-card.seo-report {
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, var(--surface));
}
.seo-report p { color: var(--text-dim); margin-bottom: 0.6rem; max-width: 65ch; }
.seo-report-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.seo-report-link:hover { text-decoration: underline; }

/* ── Seite Analyse/Reading (/de/human-design-analyse, /en/human-design-reading) ── */
.seo-reading .seo-text ul, .seo-reading .seo-text ol { margin: 0 0 0.8rem 1.25rem; max-width: 65ch; }
.seo-reading .seo-text li { margin-bottom: 0.25rem; }
.seo-checklist { list-style: none; margin-left: 0 !important; }
.seo-checklist li { padding-left: 1.5rem; position: relative; }
.seo-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.seo-steps { margin-left: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; max-width: 65ch; }
/* Angebot hervorheben; Sprungziel von "Zum PDF-Report" nicht unter der Kopfzeile verstecken */
.seo-card.seo-offer { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); scroll-margin-top: 4.5rem; }
.seo-price { font-size: 1.15rem; margin: 0.4rem 0 0.2rem; }
.seo-price strong { font-size: 1.35rem; }
.seo-price-note { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; max-width: 65ch; }
.seo-faq h3 { font-size: 1rem; margin: 1rem 0 0.25rem; }
.seo-faq h3:first-of-type { margin-top: 0; }
.seo-faq p { max-width: 65ch; }

/* ── Übersichts- und Erklärseiten (SeoGuide: Typen, später Inkarnationskreuz und Zentren) ── */
.seo-guide .seo-text ol, .seo-guide .seo-text ul { margin: 0 0 0.8rem 1.25rem; max-width: 65ch; }
.seo-guide .seo-text li { margin-bottom: 0.25rem; }

/* Vergleichstabelle: auf dem Handy waagerecht scrollen statt die Seite zu verbreitern */
.seo-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.seo-table th, .seo-table td { text-align: left; vertical-align: top; padding: 0.5rem 0.9rem 0.5rem 0; border-bottom: 1px solid var(--border); }
.seo-table thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; }
.seo-table tbody tr:last-child th, .seo-table tbody tr:last-child td { border-bottom: 0; }
.seo-table tbody th { font-weight: 600; min-width: 8rem; }
.seo-table a { color: var(--blue); text-decoration: none; }
.seo-table a:hover { text-decoration: underline; }

/* Typ-Karte: Aura-Grafik links auf heller Kachel (schwarze Umrisse), Text rechts */
.seo-type { display: grid; grid-template-columns: 84px 1fr; gap: 1rem 1.25rem; align-items: start; scroll-margin-top: 4.5rem; }
.seo-type-tile { background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.4rem; }
.seo-type-tile img { width: 100%; height: auto; display: block; }
/* Typ-Name als richtige Überschrift - nicht die kleine Großbuchstaben-Zeile der übrigen Karten */
.seo-type h2 { font-size: 1.2rem; letter-spacing: 0; text-transform: none; color: var(--text); margin-bottom: 0.15rem; }
.seo-type h2 a { color: inherit; text-decoration: none; }
.seo-type h2 a:hover { color: var(--blue); }
.seo-type-keywords { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.6rem; }
.seo-type-body > p { max-width: 65ch; margin-bottom: 0.7rem; }
.seo-type .seo-facts { margin-bottom: 0.7rem; }
@media (max-width: 420px) {
  .seo-type { grid-template-columns: 60px 1fr; gap: 0.75rem; }
}

/* Inkarnationskreuz-Erklärseite: Viertel mit ihren Toren, Listen der 192 Kreuze */
.seo-quarter { padding: 0.75rem 0; border-top: 1px solid var(--border); }
.seo-quarter h3, .seo-cross-kind { font-size: 1.05rem; margin: 0 0 0.25rem; scroll-margin-top: 4.5rem; }
.seo-cross-kind { margin-top: 1.25rem; }
.seo-quarter p { max-width: 65ch; }
.seo-quarter-gates { color: var(--text-dim); font-size: 0.92rem; line-height: 1.8; }
.seo-quarter-gates a { color: var(--blue); text-decoration: none; }
.seo-table-note { margin-top: 0.8rem; }

/* Zentren-Übersicht: Bodygraph ist hochkant (wie bei den Kanal-Seiten), Zentren als Liste mit Trennlinien */
.seo-page[data-kind="centers"] .seo-center-tile { aspect-ratio: auto; width: min(300px, 80vw); }
.seo-page[data-kind="centers"] .seo-center-tile svg { height: auto; }
.seo-center-item { padding: 0.75rem 0.6rem; border-top: 1px solid var(--border); }
.seo-center-item h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.seo-center-item h3 a { color: var(--blue); text-decoration: none; }
.seo-center-item h3 a:hover { text-decoration: underline; }
.seo-center-item p { max-width: 65ch; }
.seo-center-meta { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.2rem; }
/* Markierung "bei dir definiert": goldene Kante wie bei den übrigen persönlichen Hinweisen */
.seo-center-item.seo-mine { border: 1px solid var(--gold); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--gold); margin-top: 0.5rem; }
.seo-center-item h3 .seo-mine-badge { font-size: 0.7rem; font-weight: 400; vertical-align: middle; }

/* Profil-Übersicht: eigene Zeile der Tabelle hervorheben (Rahmen um <tr> geht nicht, darum Hintergrund + Kante) */
.seo-table tr.seo-mine-row { background: color-mix(in srgb, var(--gold) 10%, transparent); box-shadow: inset 3px 0 0 var(--gold); }
.seo-table tr.seo-mine-row th { padding-left: 0.6rem; }
