/* omnist.world: Diagramme
   Gemeinsame Regeln fuer alles, was Skripte zeichnen. Grafiken stehen in
   der Breite ihres Behaelters und beschriften sich in CSS-Pixeln; sie
   werden nicht mehr als ganzes Bild verkleinert (Text auf dem Telefon war
   dadurch rund 7 Pixel gross). Ohne Skript steht in jedem Behaelter eine
   Tabelle oder Liste; das Skript ersetzt sie erst nach erfolgreichem
   Zeichnen. */

.diagramm { width: 100%; overflow: visible; }
.diagramm text { font-family: var(--sans); fill: var(--muted); font-size: 12px; }
.diagramm .achse line, .diagramm .achse path { stroke: var(--line); }
.diagramm .gitter { stroke: var(--line); stroke-width: 0.5; fill: none; }
.diagramm .wertname { fill: var(--muted); font-size: 11px; }
.diagramm .wertname.betont { fill: var(--accent); font-weight: 600; }

.legende { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); font-size: var(--t-s); color: var(--muted); margin-top: var(--s-4); }
.legende span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legende svg { overflow: visible; }

/* Der Kompass bleibt rund und bekommt Luft fuer die Beschriftung. */
#kompass { max-width: 560px; margin: 0 auto; }
#kompass svg { display: block; }
#kompass-legende { justify-content: center; }
.kompass .schnitt { fill: var(--ink); fill-opacity: 0.07; stroke: none; }
.kompass .gitter { stroke: var(--line); fill: none; }
.kompass .ringwert { font-size: 9px; fill: var(--leise); }

/* Eine Tradition im Akzent, die uebrigen grau: Hervorheben statt neun Farben. */
.fokus { stroke: var(--accent); fill: var(--accent); }
.hintergrund { stroke: var(--line-stark); fill: var(--line-stark); }

.schalter {
    display: inline-flex; align-items: center; gap: 0.45rem; font: inherit; font-size: var(--t-s);
    cursor: pointer; background: transparent; color: var(--muted);
    border: 1px solid var(--line-stark); border-radius: 999px; padding: 0 var(--s-4) 0 var(--s-3);
    min-height: 40px;
}
.schalter .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--blau); opacity: 0.35; }
.schalter .zahl { color: var(--leise); font-size: var(--t-xs); }
.schalter.an { color: var(--ink); border-color: var(--accent); }
.schalter.an .punkt { opacity: 1; background: var(--accent); }
.schalter:hover { border-color: var(--accent); }
#kompass-legende { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }

/* Verlaeufe: kleine Kacheln, eine je Wert. */
.verlaeufe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s-5) var(--s-6); }
.verlauf { min-width: 0; }


/* Hantel: zwei Punkte auf einer Achse, je Zeile. Name oben, Achse darunter;
   ab 640 px steht der Name links neben der Achse. */
.hantel { margin: var(--s-4) 0 var(--s-3); }
.hantel-legende { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  font: var(--t-s)/1.2 var(--sans); color: var(--muted); margin-bottom: var(--s-4); }
.hantel-legende span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hantel .punkt { display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--paper); box-sizing: content-box; }
.hantel .punkt.a { background: var(--accent); }
.hantel .punkt.b { background: var(--blau); }
.hantel-zeile { display: grid; gap: var(--s-1); padding: var(--s-3) 0;
  border-top: 1px solid var(--line); }
.hantel-name { font: 600 var(--t-s)/1.2 var(--sans); }
.hantel-spur { position: relative; height: 22px; display: block; margin: 0 8px; }
.hantel-spur::before { content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--line); transform: translateY(-50%); }
.hantel-spur .punkt { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.hantel-band { position: absolute; top: 50%; height: 6px; background: var(--line-stark);
  transform: translateY(-50%); border-radius: 3px; }
@media (min-width: 640px) {
  .hantel-zeile { grid-template-columns: 10rem 1fr; align-items: center; gap: var(--s-4); }
}
.tabelle-detail { margin: var(--s-3) 0 var(--s-5); }
.tabelle-detail summary { cursor: pointer; color: var(--muted);
  font: var(--t-s)/1.2 var(--sans); min-height: var(--tipp); display: flex; align-items: center; }
