/* AkcjoPilot-Umbau 15.11.2026 - Signalseite /signale/ (nur bei UMBAU geladen; Abschalter UMBAU_AUS).
   Farben: Text #16233a (15,2:1), Grau #4b5563 (7,6:1), Akzent #1f5fa8 (6,3:1), Plus #0a7a3f (5,4:1),
   Minus #b42a22 (6,4:1), Sprzeczne #8a4b00 (6,6:1) - jeweils auf Weiss. */
.sg { color: var(--sg-text); }
.sg [hidden] { display: none !important; }
.sg a { text-decoration: none; }
.sg-zahl { font-size: 15px; font-weight: 700; color: var(--sg-text) !important; line-height: 1.35; }
.sg-stand { font-size: 13px; font-weight: 400; color: var(--sg-grau) !important; line-height: 1.35; }
/* "So liest du die Signale": eine kleine aufklappbare Zeile (Inhalt steht im HTML) */
.sg-jak { margin: 0 0 4px; }
.sg-jak > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--sg-akz); }
.sg-jak > summary::-webkit-details-marker { display: none; }
.sg-jak > summary::after { content: "▾"; font-size: 16px; color: var(--sg-grau); transition: transform .15s; }
.sg-jak[open] > summary::after { transform: rotate(180deg); }
.sg-jak > summary:focus-visible { outline: 3px solid var(--sg-akz); outline-offset: 2px; }
.sg-jak p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--sg-grau); }
.sg-jak p a { font-weight: 700; color: var(--sg-akz); }
.sg-sprz-hinweis { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--sg-grau); }

/* ---- Schalterzeile Alle / Kupno / Sprzedaz / Sprzeczne (nur mit JS = html.js, per CSS, ohne Layoutsprung) ---- */
.sg-tabs, .sg-sprz-hinweis { display: none; }
html.js .sg-tabs { display: flex; margin: 4px 0 8px; border: 1.5px solid var(--k-feld-rand); border-radius: 10px; overflow: hidden; background: var(--k-f1); }
html.js .sg-sprz-hinweis { display: block; }
.sg-tab-b { flex: 1 1 auto; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 0 4px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--sg-text); background: var(--k-f1);
  border: 0; border-left: 1px solid var(--k-seg-rand); border-radius: 0; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.sg-tab-b:first-child { border-left: 0; }
.sg-tab-b span:last-child { font-size: 11.5px; font-weight: 600; color: var(--sg-grau); font-variant-numeric: tabular-nums; }
.sg-tab-b:active { background: var(--k-weich); }
.sg-tab-b[aria-pressed="true"] { background: var(--k-haupt); color: var(--k-haupt-t); }
.sg-tab-b[aria-pressed="true"] span:last-child { color: var(--k-haupt-t); }
.sg-tab-b:focus-visible { outline: 3px solid var(--sg-akz); outline-offset: -3px; }
.sg-stark-wahl { display: none; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; color: var(--sg-text); cursor: pointer; }
html.js .sg-stark-wahl { display: flex; }
.sg-stark-wahl input { width: 22px; height: 22px; margin: 0; accent-color: var(--sg-akz); }

/* ---- Filter ---- */
.sg-filter { margin: 0 0 10px; }
.sg-filter > summary { display: flex; align-items: center; gap: 6px; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--sg-text); }
.sg-aktiv { color: var(--sg-akz); }
.sg-sperre > summary { display: flex; align-items: center; gap: 6px; min-height: 48px; cursor: pointer; font-weight: 600; color: var(--sg-grau); }
.sg-sperre p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--sg-grau); }
.sg-sperre p a { font-weight: 700; color: var(--sg-akz); }

/* ---- Liste ---- */
.sg-tab { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sg-tab col.c-d { width: 92px; } .sg-tab col.c-w { width: 21%; } .sg-tab col.c-i { width: 92px; }
.sg-tab col.c-k { width: 136px; } .sg-tab col.c-p { width: 112px; }
.sg-tab th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sg-grau); padding: 8px 8px; border-bottom: 1px solid var(--sg-linie); }
.sg-tab th.num, .sg-tab td.num { text-align: right; }
.sg-tab td { padding: 9px 8px; border-bottom: 1px solid var(--k-linie2); vertical-align: top; font-size: 14px; }
@media (hover: hover) { .sg-tab tr:hover td { background: var(--k-f2h); } }
.sg-w strong { font-size: 15px; }
.sg-w a { color: var(--sg-text); }
.sg-m { display: none; }
.sg-sn { display: block; color: var(--k-t2); }
.sg-x { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--sg-grau); }
.sg-x:empty { display: none; }
.sg-xt { margin-right: 8px; }
/* Trefferquote: immer mit Wort, klein, neutral (nie als Empfehlung gefaerbt) */
.sg-q { position: relative; z-index: 2; display: inline; margin: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--sg-grau); background: none; border: 0; cursor: pointer;
  white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 3px; touch-action: manipulation; }
.sg-q::before { content: ""; position: absolute; inset: -14px -8px; }   /* grosse Tippflaeche ohne die Zeile zu verlaengern */
.sg-q:active, .sg-q[aria-expanded="true"] { color: var(--sg-text); }
.sg-q:focus-visible { outline: 3px solid var(--sg-akz); outline-offset: 0; }
.sg-erkl { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--sg-text); }
.sg-dir { font-size: 14px; font-weight: 700; white-space: nowrap; }
.sg-dir-kauf { color: var(--k-plus); } .sg-dir-verkauf { color: var(--k-minus); } .sg-dir-sprzeczne { color: var(--sg-grau); } .sg-dir-neutral { color: var(--sg-grau); }
.sg-p { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--sg-text); }
.sg-liste { background: var(--k-f1); border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; }
.sg-liste .sg-mehr table { margin: 0; }

/* Filter ueber die Reiter (CSS, JS setzt data-f) */
.sg-liste[data-f="kauf"] tr:not([data-r="kauf"]),
.sg-liste[data-f="verkauf"] tr:not([data-r="verkauf"]),
.sg-liste[data-f="sprzeczne"] tr:not([data-r="sprzeczne"]) { display: none; }
.sg-liste[data-stark="1"] tr[data-s="0"] { display: none; }
.sg-liste:not([data-f="alle"]) .sg-mehr > summary, .sg-liste[data-stark="1"] .sg-mehr > summary { display: none; }

.sg-mehr > summary { display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 6px 0; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 700; color: var(--sg-akz); border: 1.5px solid var(--sg-akz); border-radius: 8px; background: var(--k-f1); }
.sg-mehr > summary::-webkit-details-marker { display: none; }
.sg-mehr[open] > summary { display: none; }
.sg-mehr > summary:focus-visible, .sg-block > summary:focus-visible, .sg-filter > summary:focus-visible, .sg-sperre > summary:focus-visible { outline: 3px solid var(--sg-akz); outline-offset: 2px; }
.sg-leer { margin: 0; padding: 20px 16px 24px; color: var(--sg-grau); }
.sg-leer p { margin: 0 0 12px; }
.sg-leer .btn { min-height: 48px; }

/* ---- Bloecke am Seitenende (Bewaehrt, Treffsicherheit): am Handy zugeklappt ---- */
.sg-block { margin-top: 14px; background: var(--k-f1); border: 1px solid var(--border); border-radius: 8px; padding: 0 16px 12px; }
.sg-block > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; list-style: none; }
.sg-block > summary::-webkit-details-marker { display: none; }
.sg-block > summary::after { content: "▾"; font-size: 18px; color: var(--sg-grau); transition: transform .15s; }
.sg-block[open] > summary::after { transform: rotate(180deg); }
.sg-block > summary h2 { margin: 0; font-size: 17px; color: var(--sg-text); }
.sg-scroll { overflow-x: auto; }
.sg .teilen { margin-top: 14px; }

/* ====================== Handy ====================== */
@media (max-width: 820px) {
  .sg-jak, .sg-sprz-hinweis, .sg-filter { margin-left: 16px; margin-right: 16px; }
  html.js .sg-tabs { margin-left: 16px; margin-right: 16px; }
  .sg-sym { display: none; }
  .sg-kopf { margin-bottom: 4px; }
  .sg-liste { border-left: 0; border-right: 0; border-radius: 0; padding: 0; }
  .sg-tab, .sg-tab tbody { display: block; width: 100%; }
  .sg-tab colgroup, .sg-tab thead { display: none; }
  .sg-tab tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "w k" "w p" "x x";
    column-gap: 12px; align-items: center; position: relative; min-height: 56px; padding: 9px 16px; border-bottom: 1px solid var(--k-linie2); }
  @media (hover: hover) { .sg-tab tr:hover td { background: transparent; } }
  .sg-tab td { display: block; padding: 0; border: 0; }
  .sg-w { grid-area: w; } .sg-k { grid-area: k; justify-self: end; } .sg-p { grid-area: p; justify-self: end; font-size: 13px; }
  .sg-s { grid-area: x; display: none !important; }
  .sg-tab tr.sg-hat-x .sg-s { display: block !important; margin-top: 2px; }
  .sg-d, .sg-i, .sg-sn { display: none !important; }
  .sg-link::after { content: ""; position: absolute; inset: 0; }
  .sg-link:focus-visible::after { outline: 3px solid var(--sg-akz); outline-offset: -3px; }
  .sg-w strong { font-size: 16px; line-height: 1.3; }
  /* Runde 3 (Reste): Zeile 2 = Teile, die nie mitten im Teil umbrechen. Der Trenner "·" steht VOR dem Teil und wird
     abgeschnitten, wenn der Teil am Zeilenanfang steht (clip-path) - so sitzt nie ein Punkt am Zeilenende oder -anfang. */
  .sg-m { display: flex; flex-wrap: wrap; font-size: 13px; line-height: 1.35; color: var(--sg-grau); margin: 1px 0 0 -14px; clip-path: inset(-16px 0 -16px 14px); }   /* vertikal grosszuegig: die Tippflaeche von .sg-q (::before, 46 px hoch) wird sonst abgeschnitten */
  .sg-m > span { position: relative; margin-left: 14px; white-space: nowrap; max-width: calc(100% - 14px); }
  .sg-m > span:not(:first-child)::before { content: "·"; position: absolute; left: -9px; }
  .sg-m > .sg-m-n { white-space: normal; order: 1; }          /* Signalname: steht hinter Ticker/Index/Datum und darf als EINZIGER Teil in sich umbrechen */
  .sg-x { margin-top: 0; display: flex; flex-wrap: wrap; column-gap: 8px; }
  .sg-xt { margin-right: 0; }
  .sg-q { white-space: nowrap; }                                /* "Trefferquote 47 %" bleibt als eine Einheit in der Zusatzzeile */
  .sg-tab tr { padding-bottom: 5px; }
  .sg-mehr > summary { margin: 10px 16px; }
  .sg-block { border-left: 0; border-right: 0; border-radius: 0; padding: 0 16px 12px; margin-top: 10px; }
}

/* ====================== Desktop ====================== */
@media (min-width: 821px) {
  .sg-tabs { max-width: 560px; }
  .sg-tab-b { gap: 8px; min-height: 44px; font-size: 14px; }
  .sg-tab-b span:last-child { font-size: 12.5px; }
  .sg-filter > summary { min-height: 40px; }
  .sg-jak, .sg-sprz-hinweis { max-width: 110ch; }
  .sg-jak:not([open]) { max-width: 280px; }
  .sg-tab td.sg-s .sg-x { margin-top: 4px; }
}

@media (max-width: 820px) {
  .sg-filter .form-row { display: block; }
  .sg-filter .field { margin: 0 0 8px; width: 100%; }
  .sg-filter .field select, .sg-filter .field .btn { width: 100%; min-height: 48px; font-size: 16px; }
}

/* Runde 4 (16.11.2026): ganze Zeile tippbar. Die Textteile fangen keine Taps ab - der Namens-Link darunter (::after, inset 0)
   bekommt sie; nur der Trefferquote-Knopf (.sg-q, 46 px hohe Tippflaeche) bleibt eigenstaendig. */
@media (max-width: 820px) {
  .sg-m, .sg-m > span, .sg-x { pointer-events: none; }
  .sg-q { pointer-events: auto; }
}
