/* 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;
}
.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 etwas größer, die Tor-Nummern sollen lesbar bleiben */
.seo-page[data-kind="cross"] .seo-center-tile { width: min(360px, 85vw); }

/* 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; }
