/* Das Holonetz (seiten/holonetz.mjs). Baut auf tokens.css und site.css
   auf: dieselben Fenster, dieselbe Abschnittsmarke, dieselben Knoepfe.
   Was hier dazukommt, ist der Fraktionsakzent: jede Ansicht, die zu
   einer Fraktion gehoert, traegt data-fraktion, und daran haengen
   --akz und --akz-rgb.

   --akz-rgb steht als Zahlentripel daneben, weil Tonungen (rgba) einen
   Farbwert in Teilen brauchen und color-mix() im Browser des Spiels
   (Comlink) nicht sicher ist. Die Werte sind DIESELBEN wie --c-frame,
   --c-republic und --c-imperial in tokens.css; aendert sich dort eine
   Fraktionsfarbe, muss sie hier mit. */

.hn, [data-fraktion] { --akz: var(--c-frame); --akz-rgb: 79,180,221; }
[data-fraktion="republic"] { --akz: var(--c-republic); --akz-rgb: 240,166,60; }
[data-fraktion="imperial"] { --akz: var(--c-imperial); --akz-rgb: 224,70,75; }

/* --- Schale ----------------------------------------------------------- */
.hn {
  display: grid; grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 110px);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(var(--akz-rgb), .07), transparent 60%),
    var(--c-void);
}
.hn-leiste {
  position: relative; align-self: stretch;
  background: var(--c-body); border-right: 1px solid var(--c-frame-in);
  padding: 14px 10px 24px;
}
.hn-leiste::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.016) 0 1px, transparent 1px 3px);
}
.hn-marke {
  display: flex; align-items: center; gap: 9px; padding: 2px 8px 12px;
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .22em;
  font-size: 12px; font-weight: 600; color: var(--c-bone);
}
.hn-markenpunkt {
  width: 7px; height: 7px; transform: rotate(45deg); background: var(--akz);
  box-shadow: 0 0 10px rgba(var(--akz-rgb), .8);
}
.hn-comlinkmarke {
  margin-left: auto; font-size: 9.5px; letter-spacing: .14em; color: var(--c-beam);
  border: 1px solid var(--c-frame-in); border-radius: var(--r-sm); padding: 1px 6px;
}

/* Wer bin ich gerade */
.hn-ich {
  position: relative; margin: 0 4px 14px; padding: 11px 12px;
  border: 1px solid var(--c-frame-in); border-left: 2px solid var(--akz);
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, rgba(var(--akz-rgb), .10), transparent 70%);
}
.hn-ich.leer { border-left-color: var(--c-frame-in); background: none; text-align: center; }
.hn-ichzeile { display: flex; gap: 10px; align-items: center; }
.hn-ichsym { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--akz); stroke-width: 1.4; }
.hn-ichname { font-family: var(--f-ui); font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.hn-ichweg { font-size: 12px; color: var(--c-ash); }
.kennung { font-variant-numeric: tabular-nums; color: var(--c-ash2); font-size: .92em; }
.hn-wechsel { display: flex; gap: 6px; margin-top: 9px; }
.hn-wechsel select {
  flex: 1; min-width: 0; background: var(--c-recess); color: var(--c-bone);
  border: 1px solid var(--c-frame-in); border-radius: var(--r-sm); padding: 4px 6px;
  font: inherit; font-size: 12.5px;
}

/* Navigation */
.hn-nav { display: flex; flex-direction: column; gap: 1px; }
.hn-gruppe {
  margin: 14px 8px 6px; font-family: var(--f-ui); text-transform: uppercase;
  letter-spacing: .15em; font-size: 10.5px; font-weight: 600; color: var(--c-ash2);
  display: flex; align-items: center; gap: 8px;
}
.hn-gruppe::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--c-frame-in), transparent); }
.hn-punkt {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--c-ash); text-decoration: none; font-size: 13.5px;
}
.hn-punkt.tief { padding-left: 26px; font-size: 13px; }
.hn-punkt.tief::before {
  content: ""; position: absolute; left: 16px; top: 0; bottom: 0; width: 1px;
  background: var(--c-frame-in);
}
.hn-punkt:hover { color: var(--c-bone); background: rgba(79,180,221,.08); }
.hn-punkt.an {
  color: var(--c-bone); background: linear-gradient(90deg, rgba(var(--akz-rgb), .18), rgba(var(--akz-rgb), .03));
  box-shadow: inset 2px 0 0 var(--akz);
}
.hn-sym { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6;
          stroke-linecap: round; stroke-linejoin: round; }
.hn-punkt.an .hn-sym { stroke: var(--akz); }
.hn-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-zahl {
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--c-void);
  background: var(--c-beam); border-radius: 9px; padding: 0 7px; font-weight: 600;
}

/* --- Inhalt ------------------------------------------------------------ */
.hn-inhalt { padding: 26px clamp(16px, 3vw, 40px) 70px; min-width: 0; max-width: 1280px; }
.hn-inhalt h1 {
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; font-size: 25px; margin: 2px 0 8px; line-height: 1.15;
}
.hn-kicker {
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .18em;
  font-size: 11px; font-weight: 600; color: var(--akz);
}
.hn-mini { width: 13px; height: 13px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.hn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hn-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .09em;
  font-size: 10.5px; font-weight: 500; color: var(--c-ash);
  border: 1px solid var(--c-frame-in); border-radius: 2px; padding: 2px 8px; white-space: nowrap;
}
.hn-chip.hell   { color: var(--c-beam); border-color: var(--c-frame); }
.hn-chip.gold   { color: var(--c-republic); border-color: var(--c-republic); }
.hn-chip.gut    { color: var(--c-q-prototype); border-color: var(--c-q-prototype); }
.hn-chip.warn   { color: var(--c-republic); border-color: var(--c-republic); }
.hn-chip.schlecht { color: var(--c-imperial); border-color: var(--c-imperial); }
.hn-chip.weg    { color: var(--c-ash2); }
.hn-chip.geheim { color: var(--c-q-artifact); border-color: var(--c-q-artifact); }
.hn-chip.team   { color: var(--c-zypo-hell); border-color: var(--c-zypo); }
.hn-teampunkt {
  display: inline-block; width: 6px; height: 6px; transform: rotate(45deg);
  background: var(--c-zypo-hell); margin-left: 3px; vertical-align: 1px;
}

/* --- Fenster: das HUD-Fenster der Seite ------------------------------- */
.hn-fenster {
  position: relative; background: var(--c-body);
  border: 1px solid var(--c-frame-in); border-radius: var(--r-win);
  margin: 0 0 18px; overflow: hidden;
}
.hn-fenster::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.016) 0 1px, transparent 1px 3px);
}
.hn-fkopf {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 10px 16px 9px;
  background: linear-gradient(180deg, var(--c-hdr-top), var(--c-hdr-bot));
  border-bottom: 1px solid var(--c-frame-in);
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .16em;
  font-size: 11.5px; font-weight: 600;
}
.hn-fkopf::before { content: ""; position: absolute; inset: 0 0 auto 12px; height: 1px; background: var(--c-hdr-edge); opacity: .7; }
.hn-fkopf::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: min(22%, 160px);
  background: var(--akz);
}
.hn-fkopf .hn-sym { stroke: var(--akz); }
.hn-mehr { margin-left: auto; color: var(--c-beam); text-decoration: none; letter-spacing: .1em; font-size: 10.5px; }
.hn-fzahl { margin-left: auto; font-family: var(--f-num); letter-spacing: 0; color: var(--c-ash); font-variant-numeric: tabular-nums; }
.hn-fkoerper { position: relative; padding: 14px 16px; }

/* --- Held und Dossier --------------------------------------------------- */
.hn-held, .hn-dossier, .hn-fraktionsheld {
  position: relative; overflow: hidden;
  border: 1px solid var(--c-frame); border-radius: var(--r-win);
  background:
    linear-gradient(115deg, rgba(var(--akz-rgb), .16), transparent 55%),
    var(--c-body);
  box-shadow: 0 0 0 1px rgba(79,180,221,.30), 0 0 0 2px rgba(79,180,221,.12), 0 18px 46px rgba(0,0,0,.5);
  margin-bottom: 18px;
}
.hn-held::before, .hn-dossier::before, .hn-fraktionsheld::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px);
}
.hn-held { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 30px; }
.hn-heldtext h1 { font-size: 34px; letter-spacing: .12em; }
.hn-heldsym { width: 120px; height: 120px; flex: none; fill: none; stroke: rgba(var(--akz-rgb), .55); stroke-width: .7; }

.hn-dossier {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 8px 24px; align-items: center; padding: 22px 26px;
  border-color: rgba(var(--akz-rgb), .9);
}
.hn-dossier::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--akz);
  box-shadow: 0 0 14px rgba(var(--akz-rgb), .7);
}
.hn-dsym { width: 74px; height: 74px; fill: none; stroke: var(--akz); stroke-width: 1;
           filter: drop-shadow(0 0 6px rgba(var(--akz-rgb), .55)); }
.hn-dname { font-size: 30px !important; letter-spacing: .08em !important; margin: 2px 0 4px !important; }
.hn-fakten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.hn-fakten dt, .hn-fzahlen dt {
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .12em;
  font-size: 10.5px; color: var(--c-ash2);
}
.hn-fakten dd { margin: 1px 0 0; font-size: 14px; }

/* Namen im IC: bekannt, unbekannt, verschollen */
.icname { font-weight: 500; }
.icname.unbekannt { color: var(--c-ash); font-style: normal; }
.icname.unbekannt .kennung { color: var(--c-ash); }
.icname.weg { color: var(--c-ash2); font-style: italic; }
.icname.aufsicht { color: var(--c-bone); border-bottom: 1px dotted var(--c-q-artifact); }

/* --- Kacheln -------------------------------------------------------------- */
.hn-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.hn-kachel {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; padding: 14px 16px;
  background: var(--c-body); border: 1px solid var(--c-frame-in); border-radius: var(--r-win);
  text-decoration: none; color: var(--c-bone);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hn-kachel:hover { border-color: var(--akz); transform: translateY(-1px);
                   box-shadow: 0 0 0 1px rgba(var(--akz-rgb), .25), 0 10px 26px rgba(0,0,0,.4); }
.hn-kachelsym { grid-row: span 2; width: 30px; height: 30px; fill: none; stroke: var(--akz); stroke-width: 1.4;
                stroke-linecap: round; stroke-linejoin: round; }
.hn-kacheltitel { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: 13px; }
.hn-kachelunter { font-size: 12.5px; color: var(--c-ash); }

.hn-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.hn-spalten > .hn-fenster { margin: 0; }

.hn-bek { display: block; text-decoration: none; color: inherit; padding: 10px 0; }
.hn-bek + .hn-bek { border-top: 1px solid var(--c-recess); }
.hn-bekkopf { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hn-bektitel { font-family: var(--f-ui); font-weight: 600; font-size: 14.5px; color: var(--c-bone); }
.hn-bek:hover .hn-bektitel { color: var(--c-beam); }
.hn-auszug { margin: 4px 0 0; color: var(--c-ash); font-size: 13.5px; }

.hn-strom { list-style: none; margin: 0; padding: 0; }
.hn-strom li + li { border-top: 1px solid var(--c-recess); }
.hn-strom a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
              padding: 8px 0; text-decoration: none; color: var(--c-bone); }
.hn-strom a:hover .hn-stromtitel { color: var(--c-beam); }
.hn-stromkanal { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .08em;
                 font-size: 10.5px; color: var(--c-ash2); white-space: nowrap; }
.hn-stromkanal.ic { color: var(--c-beam); }
.hn-stromtitel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hn-strommeta { font-size: 12px; color: var(--c-ash2); white-space: nowrap; }

/* --- Kanal ---------------------------------------------------------------- */
.hn-kanalkopf {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start;
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--c-frame-in);
}
.hn-kanalsym { width: 46px; height: 46px; fill: none; stroke: var(--akz); stroke-width: 1.2;
               stroke-linecap: round; stroke-linejoin: round; padding: 8px;
               border: 1px solid rgba(var(--akz-rgb), .5); border-radius: var(--r-win);
               background: rgba(var(--akz-rgb), .07); }
.hn-kanalaktion { align-self: center; }
.hn-neu > summary { list-style: none; display: inline-block; }
.hn-neu > summary::-webkit-details-marker { display: none; }
.hn-neu[open] { grid-column: 1 / -1; }
.hn-kanalkopf:has(.hn-neu[open]) .hn-kanalaktion { grid-column: 1 / -1; }
.hn-neu[open] > summary { margin-bottom: 12px; }

.hn-themenliste { border: 1px solid var(--c-frame-in); border-radius: var(--r-win); background: var(--c-body); overflow: hidden; }
.hn-thema {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 80px 90px; gap: 12px; align-items: center;
  padding: 11px 16px; text-decoration: none; color: var(--c-bone);
}
.hn-thema + .hn-thema { border-top: 1px solid var(--c-recess); }
.hn-thema:hover { background: rgba(79,180,221,.05); }
.hn-thema:hover .hn-themenname { color: var(--c-beam); }
.hn-thema.angeheftet { background: linear-gradient(90deg, rgba(var(--akz-rgb), .08), transparent 60%); }
.hn-themenmarke { color: var(--akz); display: flex; gap: 2px; }
.hn-themenkern { display: flex; flex-direction: column; min-width: 0; }
.hn-themenname { font-family: var(--f-ui); font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-themenwer { font-size: 12.5px; color: var(--c-ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-themenzahl { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.hn-themenzahl b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hn-themenzahl span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--c-ash2); font-family: var(--f-ui); }
.hn-themenzeit { text-align: right; font-size: 12.5px; }
.hn-leer { padding: 22px 16px; margin: 0; }
.hn-blaettern { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }

/* --- Formulare -------------------------------------------------------------- */
.hn-form { display: grid; gap: 12px; max-width: 760px; }
.hn-form label {
  display: grid; gap: 5px; font-family: var(--f-ui); text-transform: uppercase;
  letter-spacing: .1em; font-size: 11px; font-weight: 500; color: var(--c-ash);
}
.hn-form input, .hn-form textarea, .hn-form select {
  font: inherit; font-family: var(--f-num); text-transform: none; letter-spacing: 0;
  font-size: 14.5px; color: var(--c-bone); background: var(--c-recess);
  border: 1px solid var(--c-frame-in); border-radius: var(--r-sm); padding: 8px 10px; width: 100%;
}
.hn-form textarea { resize: vertical; line-height: 1.55; min-height: 90px; }
.hn-form input:focus-visible, .hn-form textarea:focus-visible, .hn-form select:focus-visible {
  outline: none; border-color: var(--c-beam); box-shadow: 0 0 0 1px var(--c-beam);
}
.hn-form button { justify-self: start; }
.hn-zaehler { font-size: 11.5px; color: var(--c-ash2); text-align: right; margin-top: -6px; font-variant-numeric: tabular-nums; }
.hn-als { font-size: 12.5px; color: var(--c-ash); border-left: 2px solid var(--akz); padding: 2px 0 2px 9px; }
.knopf.gefahr { border-color: rgba(224,70,75,.6); color: var(--c-drag-bad); }
.knopf.gefahr:hover { border-color: var(--c-imperial); }
.hn-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.hn-inline select { background: var(--c-recess); color: var(--c-bone); border: 1px solid var(--c-frame-in);
                    border-radius: var(--r-sm); padding: 2px 5px; font: inherit; font-size: 12px; }
.hn-textknopf { background: none; border: 0; padding: 0; color: var(--c-ash2); cursor: pointer;
                font: inherit; font-size: 12px; text-decoration: underline dotted; }
.hn-textknopf:hover { color: var(--c-beam); }

/* --- Thema und Beitraege ------------------------------------------------------ */
.hn-pfad { margin-bottom: 8px; font-size: 13px; }
.hn-pfad a { color: var(--c-ash); text-decoration: none; }
.hn-pfad a:hover { color: var(--c-beam); }
.hn-themenkopf { margin-bottom: 18px; }
.hn-modleiste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.hn-beitraege { display: flex; flex-direction: column; gap: 12px; }
.hn-beitrag {
  position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: 1fr auto;
  background: var(--c-body); border: 1px solid var(--c-frame-in); border-radius: var(--r-win); overflow: hidden;
}
.hn-beitrag.erster { border-color: rgba(var(--akz-rgb), .55); }
.hn-beitrag.geloescht { display: block; opacity: .6; }
.hn-bautor {
  grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 14px; border-right: 1px solid var(--c-recess);
  background: linear-gradient(180deg, rgba(var(--akz-rgb), .08), transparent 80%);
  font-size: 13.5px;
}
.hn-bsym { width: 34px; height: 34px; fill: none; stroke: var(--akz); stroke-width: 1.3; }
.hn-binit {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--c-frame); color: var(--c-beam); font-family: var(--f-ui); font-weight: 600;
}
.hn-bweg { font-size: 11.5px; color: var(--akz); font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.hn-btext { padding: 14px 18px 4px; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.hn-btext p { margin: 0 0 10px; max-width: 75ch; }
.hn-btext blockquote, .hn-legtext blockquote, .hn-antworten blockquote, .hn-vtext blockquote {
  margin: 0 0 10px; padding: 6px 12px; border-left: 2px solid var(--c-frame); color: var(--c-ash);
  background: rgba(79,180,221,.05);
}
.hn-beitrag.ic .hn-btext { font-style: normal; }
.hn-bfuss { display: flex; gap: 10px; align-items: center; padding: 4px 18px 10px; font-size: 12px; }
.hn-antwort { margin-top: 18px; max-width: none; }
.hn-zustand { color: var(--c-ash2); margin-top: 16px; }

/* --- Fraktion -------------------------------------------------------------- */
.hn-fraktionsheld {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 24px 28px; border-color: rgba(var(--akz-rgb), .85);
}
.hn-fraktionsheld::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, var(--akz), transparent 70%);
}
.hn-fraktionsheld.gesperrt { grid-template-columns: auto 1fr; opacity: .85; }
.hn-fsym { width: 86px; height: 86px; fill: none; stroke: var(--akz); stroke-width: .9;
           filter: drop-shadow(0 0 8px rgba(var(--akz-rgb), .6)); }
.hn-fheldtext h1 { font-size: 32px !important; letter-spacing: .1em !important; }
.hn-meinstand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.hn-fzahlen { display: flex; gap: 22px; margin: 0; }
.hn-fzahlen dd { margin: 0; font-family: var(--f-num); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--c-bone); }

.hn-fraktionsraster { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.hn-spalte { min-width: 0; }

.hn-leiter { list-style: none; margin: 0; padding: 8px 0; counter-reset: stufe; }
.hn-stufe { display: grid; grid-template-columns: 54px minmax(0, 1fr); }
.hn-stufenmarke { position: relative; display: flex; justify-content: center; }
.hn-stufenmarke::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--c-frame-in);
}
.hn-stufe:first-child .hn-stufenmarke::before { top: 18px; }
.hn-stufe:last-child .hn-stufenmarke::before { bottom: calc(100% - 18px); }
.hn-stufennr {
  position: relative; margin-top: 8px; width: 26px; height: 26px; display: grid; place-items: center;
  transform: rotate(45deg); border: 1px solid var(--akz); background: var(--c-body);
  font-size: 0;
}
.hn-stufennr::after {
  content: ""; width: 8px; height: 8px; background: var(--akz); box-shadow: 0 0 8px rgba(var(--akz-rgb), .8);
}
.hn-stufe.leer .hn-stufennr { border-color: var(--c-frame-in); }
.hn-stufe.leer .hn-stufennr::after { background: var(--c-frame-in); box-shadow: none; }
.hn-stufe.geheim .hn-stufennr { border-color: var(--c-q-artifact); }
.hn-stufe.geheim .hn-stufennr::after { background: var(--c-q-artifact); box-shadow: 0 0 8px rgba(169,111,224,.8); }
.hn-stufenkern { padding: 8px 16px 14px 0; min-width: 0; }
.hn-stufe + .hn-stufe .hn-stufenkern { border-top: 1px solid var(--c-recess); }
.hn-stufenkopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; margin-top: 8px; }
.hn-stufenname { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; font-size: 14px; }
.hn-stufe.leer .hn-stufenname { color: var(--c-ash); }
.hn-stufenzahl { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--c-ash); font-size: 13px; }
.hn-personen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hn-person {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border: 1px solid var(--c-frame-in); border-radius: 2px; background: var(--c-recess); font-size: 13px;
}
.hn-person.du { border-color: var(--akz); background: rgba(var(--akz-rgb), .10); }
.hn-du { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; color: var(--akz); }
.hn-schuelerzahl { display: inline-flex; align-items: center; gap: 2px; color: var(--c-ash); font-size: 11.5px; }

.hn-kanalgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hn-kanalkarte {
  display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--c-frame-in); border-radius: var(--r-sm);
  background: var(--c-recess); text-decoration: none; color: var(--c-bone);
}
.hn-kanalkarte .hn-sym { grid-row: span 2; stroke: var(--akz); }
a.hn-kanalkarte:hover { border-color: var(--akz); }
.hn-kanalkarte.zu { color: var(--c-ash2); }
.hn-kanalkarte.zu .hn-sym { stroke: var(--c-ash2); }
.hn-kkname { font-family: var(--f-ui); font-weight: 600; font-size: 13px; }
.hn-kkmeta { font-size: 11.5px; color: var(--c-ash2); }

.hn-paare { list-style: none; margin: 0; padding: 0; }
.hn-paare li { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 9px 0; }
.hn-paare li + li { border-top: 1px solid var(--c-recess); }
.hn-paarseite { display: flex; flex-direction: column; min-width: 0; }
.hn-paarrolle { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .1em; font-size: 9.5px; color: var(--c-ash2); }
.hn-paarlinie { height: 1px; background: linear-gradient(90deg, var(--akz), rgba(var(--akz-rgb), .2)); position: relative; }
.hn-paarlinie::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left-color: rgba(var(--akz-rgb), .6); }
.hn-paarmeta { grid-column: 1 / -1; font-size: 11.5px; color: var(--c-ash2); }

/* --- Bewerbungen ------------------------------------------------------------ */
.hn-artgitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.hn-artkarte {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px;
  background: var(--c-body); border: 1px solid var(--c-frame-in); border-radius: var(--r-win);
}
.hn-artsym { width: 30px; height: 30px; fill: none; stroke: var(--c-beam); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hn-artname { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: 14px; }
.hn-artzustand { flex: 1; }

.hn-tabelle { overflow-x: auto; }
.hn-tabelle table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hn-tabelle th { text-align: left; font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .1em;
                 font-size: 10.5px; font-weight: 500; color: var(--c-ash2); padding: 6px 10px 6px 0; white-space: nowrap; }
.hn-tabelle td { padding: 8px 10px 8px 0; border-top: 1px solid var(--c-recess); }
.hn-tabelle a { color: var(--c-beam); text-decoration: none; }
.hn-filterleiste { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.hn-filter {
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px;
  color: var(--c-ash); text-decoration: none; border: 1px solid var(--c-frame-in); border-radius: 2px; padding: 3px 9px;
}
.hn-filter.an { color: var(--c-bone); border-color: var(--c-frame); background: rgba(79,180,221,.14); }

.hn-schritte { list-style: none; display: flex; gap: 0; margin: 0 0 18px; padding: 0; counter-reset: s; }
.hn-schritte li {
  flex: 1; position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--c-ash2);
  border-top: 2px solid var(--c-frame-in);
}
.hn-schrittpunkt { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid currentColor; flex: none; }
.hn-schritte li.erledigt { color: var(--c-ash); border-top-color: var(--c-frame); }
.hn-schritte li.erledigt .hn-schrittpunkt { background: var(--c-frame); border-color: var(--c-frame); }
.hn-schritte li.jetzt { color: var(--c-bone); border-top-color: var(--c-beam); }
.hn-schritte li.jetzt .hn-schrittpunkt { background: var(--c-beam); border-color: var(--c-beam); box-shadow: 0 0 8px var(--c-beam); }
.hn-schritte li.jetzt.warn { border-top-color: var(--c-republic); }
.hn-schritte li.jetzt.warn .hn-schrittpunkt { background: var(--c-republic); border-color: var(--c-republic); box-shadow: 0 0 8px var(--c-republic); }
.hn-schritte li.jetzt.gut { border-top-color: var(--c-q-prototype); }
.hn-schritte li.jetzt.gut .hn-schrittpunkt { background: var(--c-q-prototype); border-color: var(--c-q-prototype); box-shadow: 0 0 8px var(--c-q-prototype); }
.hn-schritte li.jetzt.schlecht { border-top-color: var(--c-imperial); }
.hn-schritte li.jetzt.schlecht .hn-schrittpunkt { background: var(--c-imperial); border-color: var(--c-imperial); }

.hn-bewerbraster { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.hn-antworten { margin: 0; display: grid; gap: 14px; }
.hn-antworten dt { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: var(--c-ash2); }
.hn-antworten dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.hn-antworten dd p { margin: 0 0 8px; }

.hn-verlauf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hn-vstatus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--c-ash); }
.hn-vpunkt { width: 7px; height: 7px; transform: rotate(45deg); background: var(--c-frame-in); }
.hn-vstatus .hn-vtext { flex-basis: 100%; padding-left: 15px; }
.hn-vnachricht { border: 1px solid var(--c-frame-in); border-radius: var(--r-sm); padding: 9px 12px; background: var(--c-recess); }
.hn-vnachricht.bewerber { border-left: 2px solid var(--c-beam); }
.hn-vnachricht.intern { border-style: dashed; border-color: rgba(169,111,224,.6); }
.hn-vkopf { font-size: 12.5px; color: var(--c-ash); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hn-vtext p { margin: 0 0 6px; }
.hn-aktionen { display: flex; flex-direction: column; gap: 16px; }
.hn-aktionen .hn-form + .hn-form { border-top: 1px solid var(--c-recess); padding-top: 14px; }

/* --- Legendenregister ------------------------------------------------------ */
.hn-legenden { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hn-legende {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px;
  background: linear-gradient(160deg, rgba(var(--akz-rgb), .10), transparent 50%), var(--c-body);
  border: 1px solid var(--c-frame-in); border-top: 2px solid var(--akz); border-radius: var(--r-win);
}
.hn-legende.vergeben { opacity: .85; }
.hn-legende.geschlossen { opacity: .55; }
.hn-legkopf { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hn-legsym { width: 34px; height: 34px; fill: none; stroke: var(--akz); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.hn-legname { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: 16px; line-height: 1.2; }
.hn-legtitel { font-size: 12.5px; color: var(--c-ash); }
.hn-legtext { font-size: 13.5px; color: var(--c-ash); }
.hn-legtext p { margin: 0 0 6px; }
.hn-legfuss { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }

/* --- Handy ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .hn { grid-template-columns: minmax(0, 1fr); }
  .hn-leiste { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--c-frame-in); padding: 10px 12px; }
  .hn-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: thin; }
  .hn-gruppe { display: none; }
  .hn-punkt, .hn-punkt.tief { flex: none; padding: 6px 10px; border: 1px solid var(--c-frame-in); }
  .hn-punkt.tief::before { display: none; }
  .hn-pname { overflow: visible; }
  .hn-ich { margin: 0 0 10px; }
  .hn-dossier { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .hn-dossier .hn-fakten { grid-column: 1 / -1; }
  .hn-dsym { width: 54px; height: 54px; }
  .hn-dname { font-size: 24px !important; }
  .hn-fraktionsheld { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .hn-fzahlen { grid-column: 1 / -1; }
  .hn-fsym { width: 56px; height: 56px; }
  .hn-fheldtext h1 { font-size: 24px !important; }
  .hn-fraktionsraster, .hn-bewerbraster { grid-template-columns: minmax(0, 1fr); }
  .hn-beitrag { grid-template-columns: minmax(0, 1fr); }
  .hn-bautor { grid-row: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--c-recess); padding: 10px 14px; }
  .hn-bsym, .hn-binit { width: 26px; height: 26px; }
  .hn-btext { padding: 12px 14px 2px; }
  .hn-thema { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .hn-themenzeit { display: none; }
  .hn-held { padding: 22px 18px; }
  .hn-heldsym { width: 72px; height: 72px; }
  .hn-heldtext h1 { font-size: 26px; }
  .hn-kanalkopf { grid-template-columns: auto minmax(0, 1fr); }
  .hn-kanalaktion { grid-column: 1 / -1; }
  .hn-schritte li { padding: 8px 4px; font-size: 10px; letter-spacing: .05em; }
  .hn-stufe { grid-template-columns: 40px minmax(0, 1fr); }
}

/* --- Comlink: das Holonetz im Spiel ------------------------------------------
   Ohne Kopf und Fuss der Seite (rahmen nackt). Der Rahmen des Geraets
   kommt vom Spiel (cl_comlink.lua); hier nur eine schmalere Leiste und
   ein leichtes Flimmern der Projektion. */
body.nackt { background: transparent; }
.hn.comlink { min-height: 100vh; grid-template-columns: 220px minmax(0, 1fr); }
.hn.comlink .hn-inhalt { padding: 18px 22px 40px; }
.hn.comlink::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(127,220,255,.025) 0 1px, transparent 1px 4px);
  animation: hn-flimmern 6s steps(60) infinite;
}
@keyframes hn-flimmern { 0%, 100% { opacity: .7; } 50% { opacity: 1; } 51% { opacity: .55; } 52% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .hn.comlink::after { animation: none; } }
