/* AkcjoPilot-Umbau 15.11.2026, Phase 4 - /maerkte/ (nur bei UMBAU geladen).
   Handy (<= 820 px, wie die App-Huelle): zweite Reiterzeile, dichte Zeilen, Zusatzinhalte als <details>.
   Desktop: zweispaltig wie bisher; Erklaertext + FAQ unter den Daten, Rueckmeldefeld am Ende der Seitenspalte. */
/* Farben: umbau_farben.css (--m-* bilden auf die Palette ab) */

/* ---------- gemeinsam: <details> mit Ueberschrift in der Summary ---------- */
.mkn-det > summary { list-style: none; cursor: pointer; }
.mkn-det > summary::-webkit-details-marker { display: none; }
.mkn-det > summary h2 { display: inline; margin: 0; }
.mkn-kopflink { margin: 0 0 6px; text-align: right; }
.mkn-tabs { display: none; }

/* ---------- Desktop (>= 821 px): alles offen sichtbar, keine Reiterzeile ---------- */
@media (min-width: 821px) {
  .mkn-det > summary { cursor: default; margin-bottom: 8px; }
  .mkn-det > summary h2 { font-size: 14.5px; }
  .mkn-det > summary h2::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 1px; }
  .mkn-alle { margin-top: 12px; }
  .mkn-alle > summary { margin-bottom: 0; }
  .mkn-alle .mk-head, .mkn-alle > .mk-links { margin-top: 8px; }
  .mkn .mk-tile-chg[data-r]::before { content: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  .mkn { display: flex; flex-direction: column; gap: 8px; }
  .mkn .mk-layout, .mkn .mk-haupt, .mkn .mk-seite { display: contents; }
  .mkn > section, .mkn .mk-card, .mkn .mkn-det { margin: 0 !important; }

  /* Kopf kurz: Lead auf zwei Zeilen, Kennzahlen als eine Textzeile */
  .mk-titel { padding: 0 16px; margin: 10px 0 8px; gap: 4px; display: block; }
  .mk-titel h1 { font-size: 22px; }
  .mk-titel .mk-lead { display: block; font-size: 13px; line-height: 1.4; color: var(--k-grau); margin: 6px 0 0; }
  .mk-titel .mk-meta { font-size: 12.5px; line-height: 1.4; color: var(--k-grau); margin: 4px 0 0; }
  .mk-zahlen { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 6px 0 0; }
  .mk-zahlen > div { flex-direction: row; align-items: baseline; gap: 4px; }
  .mk-zahlen b { font-size: 13px; }
  .mk-zahlen span { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--k-grau); }

  /* Zweite Reiterzeile */
  .mkn-tabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: var(--k-f1); border-bottom: 1px solid var(--k-linie); padding: 0 6px; }
  .mkn-tabs::-webkit-scrollbar { display: none; }
  .mkn-tabs a { flex: none; display: flex; align-items: center; min-height: 48px; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--m-grau); border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; }
  .mkn-tabs a[aria-selected="true"] { color: var(--m-akz); border-bottom-color: var(--m-akz); font-weight: 700; }
  .mkn-tabs a:focus-visible { outline: 3px solid var(--m-akz); outline-offset: -3px; }
  .mkn-js [data-panel]:not(.mkn-an) { display: none; }

  .mkn .mk-card, .mkn-det { padding: 8px 16px 10px; background: var(--k-f1); border-radius: 0; border: 0; }
  .mkn .mk-card .mk-head { margin-bottom: 4px; }
  .mkn .mk-card h2::before, .mkn .mk-head h2::before { display: none; }
  .mkn .mk-more { min-height: 48px; font-size: 14px; }

  /* dichte Zeilen: gemeinsam */
  .mkn .pos, .mkn .neg { font-weight: 700; }
  .mkn .pos { color: var(--m-plus); }
  .mkn .neg { color: var(--m-minus); }
  .mkn .mk-chg.pos::before, .mkn .mk-movers td.pos::before, .mkn .mk-kat td.pos[data-chg]::before { content: "\25B2\00a0"; font-size: .8em; }
  .mkn .mk-chg.neg::before, .mkn .mk-movers td.neg::before, .mkn .mk-kat td.neg[data-chg]::before { content: "\25BC\00a0"; font-size: .8em; }
  .mkn .mk-sparkinfo .pos::before, .mkn .mk-sparkinfo .neg::before { content: none; }

  /* Indexzeilen (Marktleiste) */
  .mkn #indeksy { background: var(--k-f1); padding: 2px 16px; }
  .mkn .mk-strip { display: block; margin: 0; }
  .mkn .mk-idxcard { display: grid; grid-template-columns: minmax(0, 1fr) 56px auto; grid-template-areas: "l s v" "i s c"; column-gap: 10px; align-items: center; min-height: 60px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--m-linie); border-radius: 0; }
  .mkn .mk-idxcard:last-child { border-bottom: 0; }
  .mkn .mk-idxcard .mk-label { grid-area: l; font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--m-text); }
  .mkn .mk-idxcard .mk-value { grid-area: v; justify-self: end; font-size: 16px; color: var(--m-text); }
  .mkn .mk-idxcard .mk-chg { grid-area: c; justify-self: end; font-size: 14px; }
  .mkn .mk-idxcard .mk-spark, .mkn .mk-idxcard .mk-sparkleer { grid-area: s; width: 56px; height: 28px; margin: 0; }
  .mkn .mk-idxcard .mk-sparkinfo { grid-area: i; font-size: 12px; color: var(--m-grau); margin: 0; }

  /* WIG20: Kacheln werden Zeilen */
  .mkn .mk-heat { display: block; }
  .mkn .mk-tile { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--m-linie); border-radius: 0; background: none !important; }
  .mkn .mk-tile:last-child { border-bottom: 0; }
  .mkn .mk-tile .mk-tile-name { display: block; -webkit-line-clamp: unset; font-size: 15px; font-weight: 600; color: var(--m-text) !important; text-shadow: none !important; }
  .mkn .mk-tile .mk-tile-chg { flex: none; font-size: 14px; font-weight: 700; text-shadow: none !important; color: var(--m-grau) !important; }
  .mkn .mk-tile .mk-tile-chg[data-r="+"] { color: var(--m-plus) !important; }
  .mkn .mk-tile .mk-tile-chg[data-r="-"] { color: var(--m-minus) !important; }
  .mkn .mk-tile-chg[data-r="+"]::before { content: "\25B2\00a0"; font-size: .8em; }
  .mkn .mk-tile-chg[data-r="-"]::before { content: "\25BC\00a0"; font-size: .8em; }

  /* Tabellen -> Zeilen (Gewinner/Verlierer, Signale, Waluty/Krypto/Surowce) */
  .mkn .mk-zwei { display: block; }
  .mkn .mk-card h3 { margin: 10px 0 0; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--m-grau); }
  .mkn table.mk-movers, .mkn table.mk-signale, .mkn table.mk-kat { display: block; min-width: 0; }
  .mkn table.mk-movers tbody, .mkn table.mk-signale tbody, .mkn table.mk-kat tbody { display: block; }
  .mkn table.mk-movers tr, .mkn table.mk-signale tr, .mkn table.mk-kat tr { position: relative; display: grid; align-items: center; column-gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--m-linie); }
  .mkn table.mk-movers tr:last-child, .mkn table.mk-signale tr:last-child, .mkn table.mk-kat tr:last-child { border-bottom: 0; }
  .mkn table.mk-movers td, .mkn table.mk-signale td, .mkn table.mk-kat td { padding: 0; border: 0; font-size: 15px; background: none; }
  @media (hover: hover) { .mkn table.mk-movers tr:hover td, .mkn table.mk-signale tr:hover td, .mkn table.mk-kat tr:hover td { background: none; } }
  .mkn table.mk-movers td a::after, .mkn table.mk-signale td a::after, .mkn table.mk-kat td a::after { content: ""; position: absolute; inset: 0; }
  .mkn table.mk-movers td a:focus-visible, .mkn table.mk-signale td a:focus-visible, .mkn table.mk-kat td a:focus-visible { outline: none; }
  .mkn table.mk-movers tr:focus-within, .mkn table.mk-signale tr:focus-within, .mkn table.mk-kat tr:focus-within { outline: 3px solid var(--m-akz); outline-offset: -3px; }
  .mkn td a strong { font-weight: 700; color: var(--m-text); }

  .mkn table.mk-movers tr { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rk nm pr" "rk nm ch"; }
  .mkn .mk-rank { grid-area: rk !important; font-size: 12px !important; font-weight: 600 !important; color: var(--m-grau); }
  .mkn .mk-movers .mk-nm { grid-area: nm !important; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  .mkn .mk-movers .mk-pill { margin: 2px 0 0; color: var(--m-grau); }
  .mkn .mk-movers .mk-pr { grid-area: pr !important; justify-self: end; font-size: 15px; }
  .mkn .mk-movers .mk-ch { grid-area: ch !important; justify-self: end; font-size: 14px; }
  .mkn .mk-movers .hint { font-size: 12px; color: var(--m-grau); }

  .mkn table.mk-signale tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "nm nm bd" "dt ms ms"; row-gap: 2px; padding: 8px 0; }
  .mkn .mk-signale .mk-nm { grid-area: nm !important; min-width: 0; }
  .mkn .mk-signale .mk-bd { grid-area: bd !important; justify-self: end; }
  .mkn .mk-signale .mk-datum { grid-area: dt !important; font-size: 12px !important; font-weight: 400 !important; white-space: nowrap; color: var(--m-grau); align-self: start; padding-top: 1px; }
  .mkn .mk-signale .mk-ms { grid-area: ms !important; font-size: 13px; line-height: 1.35; color: var(--m-grau); }
  .mkn .mk-signale .quote { margin-left: 4px; }

  .mkn table.mk-kat tr { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 52px; }
  .mkn .mk-kat .mk-pr { text-align: right; font-weight: 600; }
  .mkn .mk-kat .mk-ch { text-align: right; min-width: 78px; font-size: 14px; }

  /* Nachrichten */
  .mkn .mk-newsliste li { position: relative; padding: 10px 0; display: flex; flex-direction: column; gap: 2px; min-height: 56px; justify-content: center; }
  .mkn .mk-newsliste .news-kat { color: var(--m-grau); font-size: 11.5px; }
  .mkn .mk-newsliste a { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--m-text); }
  .mkn .mk-newsliste a::after { content: ""; position: absolute; inset: 0; }

  /* Zusatzinhalte: <details> am Seitenende (Reihenfolge per order) */
  .mkn-det > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
  .mkn-det > summary h2 { display: block; font-size: 16px; line-height: 1.3; color: var(--m-text); margin: 0; }
  .mkn-det > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--m-grau); border-bottom: 2px solid var(--m-grau); transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
  .mkn-det[open] > summary::after { transform: rotate(-135deg); }
  .mkn-det > summary:focus-visible { outline: 3px solid var(--m-akz); outline-offset: -3px; }
  .mkn-lesen { order: 11; } .mkn-faq { order: 12; } .mkn-ratgeber { order: 13; } .mkn-alle { order: 14; padding-bottom: 6px; }
  .mkn-sesja { order: 15; } .mkn-feedback { order: 16; }
  .mkn-det[open] > summary { margin-bottom: 4px; }
  .mkn .mk-prosa p { font-size: 15px; line-height: 1.5; color: var(--k-t2); }
  .mkn .mk-faq summary { min-height: 48px; font-size: 15px; padding: 8px 0; }
  .mkn .mk-faq details p { font-size: 15px; color: var(--k-t2); }
  .mkn-ratgeber ul { list-style: none; margin: 0; padding: 0; }
  .mkn-ratgeber li { padding: 0; }
  .mkn-ratgeber li a { display: flex; align-items: center; min-height: 48px; font-size: 15px; line-height: 1.35; padding: 4px 0; }
  .mkn-alle .mk-links { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .mkn-alle .mk-link { min-height: 56px; justify-content: center; border-radius: 0; border: 0; border-bottom: 1px solid var(--m-linie); padding: 8px 0; }
  .mkn-alle .mk-link strong { font-size: 15px; }
  .mkn-alle .mk-link span { font-size: 13px; color: var(--m-grau); }
  .mkn-alle .mk-quelle { padding: 0; font-size: 12.5px; color: var(--m-grau); }
  .mkn-sesja table.mk-mini th, .mkn-sesja table.mk-mini td { font-size: 14px; padding: 8px 4px; }
  .mkn-feedback textarea, .mkn-feedback input[type="email"] { font-size: 16px !important; }
  .mkn-feedback .btn { min-height: 48px; }
}
