/* sachsen-haus.css — die Hausseite.
 * ════════════════════════════════════════════════════════════════════
 * Ergänzt wettbewerb.css und sachsen.css. Keine eigenen Farben: alles
 * aus --wb-* und den Haustoken. Hier stehen nur die Bauteile, die es
 * bisher nicht gab -- die Wahlleiste, der Organigrammbaum, die
 * Personenkachel und der Steckbrief.
 */

/* ── Die Wahlleiste ───────────────────────────────────────────────── */
.sh-wahl {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  background: var(--wb-tief); padding: 10px max(24px, calc((100% - 1136px) / 2));
}
.sh-wahl__knopf {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.86); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  transition: background .12s, border-color .12s, color .12s;
}
.sh-wahl__knopf:hover { background: rgba(255,255,255,.12); color: #fff; }
.sh-wahl__knopf.is-an {
  background: #fff; color: var(--wb-tief); border-color: #fff;
}
.sh-wahl__zahl {
  font-variant-numeric: tabular-nums; font-size: 11.5px;
  opacity: .72; font-weight: 700;
}
.sh-wahl__knopf--uebersicht { margin-left: auto; border-style: dashed; }
.sh-wahl__knopf:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Der Kopf ─────────────────────────────────────────────────────── */
.sh-hero { padding: 44px 0 40px; }
.sh-hero__art {
  display: inline-block; margin-bottom: 10px;
  color: rgba(255,255,255,.72); letter-spacing: .06em; text-transform: uppercase;
  font-size: 11.5px; font-weight: 700;
}
.sh-hero__zahlen {
  display: flex; gap: 26px; flex-wrap: wrap; margin-top: 22px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2);
}
.sh-hero__zahlen .sx-zahl__kopf { color: rgba(255,255,255,.6); }
.sh-hero__zahlen .sx-zahl__wert { color: #fff; }
.sh-hero__zahlen .sx-zahl__wert--leer { color: rgba(255,255,255,.55); }

/* ── Die Suche ────────────────────────────────────────────────────── */
.sh-sucheband { padding: 24px 0 26px; }
.sh-suchzeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sh-suche { flex: 1 1 380px; min-width: 0; }
.sh-trefferzahl { font-variant-numeric: tabular-nums; color: var(--wb-leise); }
.sh-suchhinweis { margin: 10px 0 0; color: var(--wb-still); }

.sh-main { padding-top: 34px; }

/* ── Ebenen ───────────────────────────────────────────────────────── */
.sh-ebene { margin: 0 0 34px; }
.sh-ebene__kopf {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 14px; font-family: var(--sans);
  font-size: 18px; font-weight: 700; color: var(--wb-tief);
}
.sh-ebene__zahl {
  font-size: 12px; font-weight: 700; color: var(--wb-leise);
  background: var(--wb-hell); border-radius: 999px; padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
.sh-ebene__dek {
  margin: -6px 0 14px; max-width: 64ch;
  font-size: 13.5px; line-height: 1.6; color: var(--wb-leise);
}
.sh-reihe, .sh-karten {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ── Der Baum ─────────────────────────────────────────────────────── */
.sh-spalten {
  display: grid; gap: 16px; margin-bottom: 34px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  align-items: start;
}
.sh-abt {
  background: #fff; border: 1px solid var(--wb-rand); border-radius: 14px;
  padding: 16px 16px 6px;
}
.sh-abt__kopf { margin-bottom: 12px; }
.sh-abt__nr {
  display: block; font-family: var(--sans);
  font-size: 15px; font-weight: 700; color: var(--wb-tief);
}
.sh-abt__sache {
  display: block; margin-top: 3px;
  font-size: 13px; line-height: 1.45; color: var(--wb-leise);
}

/* Die Referate hängen sichtbar unter ihrer Abteilung: eine Leiste
   links macht die Zugehörigkeit zur Form und nicht zur Behauptung. */
.sh-refs, .sh-rest { display: grid; gap: 2px; margin-top: 10px; }
.sh-refs { border-left: 2px solid var(--wb-hell); padding-left: 12px; margin-left: 3px; }
.sh-rest { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sh-rest .sh-ref { border: 1px solid var(--wb-rand); border-radius: 12px; padding: 12px 14px; }

.sh-ref { padding: 8px 0; }
.sh-ref__kopf { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.sh-ref__kopf b { font-size: 13px; color: var(--wb-tief); }
.sh-ref__kopf span { font-size: 12.5px; line-height: 1.45; color: var(--wb-leise); }

/* ── Die Personenkachel ───────────────────────────────────────────── */
.sh-person {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border: 1px solid transparent; border-radius: 10px;
  background: none; font: inherit; text-align: left; cursor: pointer;
  color: inherit; transition: background .12s, border-color .12s;
}
.sh-person:hover { background: var(--wb-hell); border-color: var(--wb-rand); }
.sh-person:focus-visible { outline: 2px solid var(--wb-weit); outline-offset: 1px; }
.sh-person--gross {
  background: #fff; border-color: var(--wb-rand); padding: 13px;
}
.sh-person--gross:hover { border-color: var(--wb-tief); }
.sh-person--leer { opacity: .62; }

/* Das Monogramm. Der Farbton kommt aus dem Namen, Sättigung und
   Helligkeit sind fest -- so bleiben alle Kacheln zusammen ein Bild
   und keine Streuung bunter Punkte. */
.sh-person__mono, .sh-brief__mono {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: hsl(var(--ton, 120) 26% 88%);
  color: hsl(var(--ton, 120) 42% 26%);
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: .01em;
}
.sh-person__bild {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; background: var(--wb-hell);
}
.sh-person--gross .sh-person__mono,
.sh-person--gross .sh-person__bild { width: 46px; height: 46px; font-size: 15px; }

.sh-person__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sh-person__name {
  font-size: 14px; font-weight: 700; color: var(--wb-text); line-height: 1.3;
}
.sh-person__amt, .sh-person__von {
  font-size: 12px; line-height: 1.4; color: var(--wb-leise);
}
.sh-person__von { color: var(--wb-still); font-style: italic; }
.sh-person__dw {
  margin-left: auto; flex: none; align-self: flex-start;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--wb-still);
  background: var(--wb-hell); border-radius: 5px; padding: 2px 6px;
}

/* ── Der Steckbrief ───────────────────────────────────────────────── */
.sh-brief {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--wb-rand); border-radius: 16px;
  padding: 26px 28px 24px; background: #fff; color: var(--wb-text);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.sh-brief::backdrop { background: rgba(10,20,10,.45); }
.sh-brief__zu {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--wb-rand); background: #fff;
  font-size: 19px; line-height: 1; color: var(--wb-leise); cursor: pointer;
}
.sh-brief__zu:hover { background: var(--wb-hell); color: var(--wb-tief); }

.sh-brief__kopf { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.sh-brief__mono, .sh-brief__bild {
  width: 62px; height: 62px; font-size: 20px; flex: none;
}
.sh-brief__bild { border-radius: 50%; object-fit: cover; }
.sh-brief__name {
  margin: 0; font-family: var(--sans); font-size: 21px; font-weight: 700;
  color: var(--wb-tief); letter-spacing: -0.01em; text-wrap: balance;
}
.sh-brief__amt { margin: 3px 0 0; font-size: 14px; color: var(--wb-text); }
.sh-brief__haus { margin: 2px 0 0; font-size: 12.5px; color: var(--wb-still); }

.sh-brief__liste {
  display: grid; grid-template-columns: 116px 1fr; gap: 9px 16px;
  margin: 0; padding: 16px 0; border-top: 1px solid var(--wb-rand);
  border-bottom: 1px solid var(--wb-rand);
  font-size: 13.5px; line-height: 1.55;
}
.sh-brief__liste dt {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--wb-still); padding-top: 2px;
}
.sh-brief__liste dd { margin: 0; overflow-wrap: anywhere; }
.sh-brief__liste a { color: var(--wb-tief); }

.sh-brief__quer { margin-top: 18px; }
.sh-brief__quer h3 {
  margin: 0 0 8px; font-family: var(--sans);
  font-size: 13px; font-weight: 700; color: var(--wb-tief);
}
.sh-brief__quer ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.sh-brief__still {
  font-size: 12px; line-height: 1.55; color: var(--wb-still);
}
.sh-brief__fussnote { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--wb-rand); }

@media (max-width: 560px) {
  .sh-brief__liste { grid-template-columns: 1fr; gap: 3px 0; }
  .sh-brief__liste dd { margin-bottom: 8px; }
}

/* Eine Person, die nur als Kontext dasteht: ihre Abteilung enthält
   einen Treffer, sie selbst ist keiner. Ohne diese Unterscheidung
   liest sich jeder Abteilungsleiter wie ein Suchergebnis. */
.sh-person--kontext { opacity: .55; }
.sh-person--kontext:hover { opacity: 1; }
