/* Paper-Konto: hell, ruhig, Systemschrift, eine Signalfarbe (--signal). */
:root {
  --grund: #f6f5f1;
  --flaeche: #ffffff;
  --tinte: #1c2227;
  --tinte-2: #4d5861;
  --tinte-3: #6b7680;
  --linie: #dfdcd3;
  --signal: #0f6b62;
  --signal-hell: #e4f0ee;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.hinweis {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 2px 14px; justify-content: center; align-items: baseline;
  padding: 9px 16px;
  background: var(--signal); color: #fff;
  font-size: 0.9375rem; text-align: center;
}
.hinweis strong { font-weight: 650; }
.hinweis span { opacity: 0.92; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 40px; }
.kopf { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
h1 { font-size: 1.125rem; font-weight: 650; letter-spacing: 0.01em; }
h2 { font-size: 0.9375rem; font-weight: 600; color: var(--tinte-2); }
.stand { font-size: 0.875rem; color: var(--tinte-2); }
.leise { color: var(--tinte-3); }

.stoerung { margin-bottom: 18px; padding: 10px 14px; border: 1px solid var(--tinte); border-radius: 8px; background: var(--flaeche); font-size: 0.9375rem; }

.konto { margin-bottom: 26px; }
.gross { font-size: clamp(2.25rem, 9vw, 3.5rem); font-weight: 650; line-height: 1.1; letter-spacing: -0.02em; margin: 2px 0 20px; }
.einheit { font-size: 0.4em; font-weight: 500; letter-spacing: 0; color: var(--tinte-2); }
.zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.zahlen > div { padding: 14px 18px 14px 0; }
.zahlen > div + div { padding-left: 18px; border-left: 1px solid var(--linie); }
dt { font-size: 0.8125rem; color: var(--tinte-2); }
dd { font-size: 1.1875rem; font-weight: 600; }
dd.neben { font-size: 0.875rem; font-weight: 400; color: var(--tinte-2); }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 18px 20px 20px; margin-bottom: 18px; min-width: 0; }
.karte > h2, .karte-kopf { margin-bottom: 12px; }
.karte-kopf { display: flex; flex-wrap: wrap; gap: 2px 16px; justify-content: space-between; align-items: baseline; }
.ablesung { font-size: 0.875rem; color: var(--tinte-2); min-height: 1.5em; }
.anzahl { font-weight: 400; color: var(--tinte-3); }
.zwei { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.zwei > .karte { margin-bottom: 18px; }

/* Linie des Kontowerts (SVG wird in seite.js gezeichnet) */
.bild { position: relative; }
.bild svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.kurve { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.achse { stroke: var(--linie); stroke-width: 1; }
.start { stroke: var(--tinte-3); stroke-width: 1; stroke-dasharray: 3 4; }
.beschriftung { fill: var(--tinte-3); font-size: 12px; }
.lot { stroke: var(--tinte-2); stroke-width: 1; }
.punkt { fill: var(--signal); stroke: var(--flaeche); stroke-width: 2; }
.ende { fill: var(--signal); stroke: var(--flaeche); stroke-width: 2; }

table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th { font-size: 0.8125rem; font-weight: 500; color: var(--tinte-2); text-align: left; padding: 0 0 8px; border-bottom: 1px solid var(--linie); }
td { padding: 11px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th.zahl, td.zahl { text-align: right; padding-left: 12px; white-space: nowrap; }
td.symbol { font-weight: 600; }
td small, .trades small { display: block; font-size: 0.8125rem; color: var(--tinte-2); font-weight: 400; }
.leer { color: var(--tinte-2); font-size: 0.9375rem; }

.sperren li { padding: 12px 0; border-bottom: 1px solid var(--linie); }
.sperren li:first-child { padding-top: 0; }
.sperren li:last-child { border-bottom: 0; padding-bottom: 0; }
.sperre-kopf { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.sperre-kopf b { font-weight: 600; }
.marke { flex: none; font-size: 0.8125rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--linie); color: var(--tinte-2); white-space: nowrap; }
.marke.aktiv { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.sperren p { font-size: 0.875rem; color: var(--tinte-2); margin-top: 3px; }
.sperren p.lage { color: var(--tinte); }

.trades li { display: grid; grid-template-columns: 9.5rem 5.5rem minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--linie); font-size: 0.9375rem; }
.trades li:last-child { border-bottom: 0; padding-bottom: 0; }
.trades .zeit { color: var(--tinte-2); }
.trades .seite { font-weight: 600; }
.trades .betrag { text-align: right; white-space: nowrap; }

/* Kurse der gehandelten Werte: je Wert eine Karte */
.kurse { margin-bottom: 4px; }
.kurse > h2 { margin-bottom: 12px; }
.kurs-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.kurs-karten .karte { margin-bottom: 0; }
.kurs-karte h3 { font-size: 1rem; font-weight: 650; }
.kurs-preis { text-align: right; }
.kurs-wert { display: block; font-size: 1.1875rem; font-weight: 600; }
.kurs-aenderung { display: block; font-size: 0.875rem; color: var(--tinte-2); min-height: 1.5em; }
.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.umschalter button { min-height: 40px; padding: 0 14px; border: 0; border-left: 1px solid var(--linie); border-radius: 0; background: var(--flaeche); color: var(--tinte-2); font: inherit; font-size: 0.875rem; cursor: pointer; }
.umschalter button:first-child { border-left: 0; }
.umschalter button[aria-pressed="true"] { background: var(--signal-hell); color: var(--tinte); font-weight: 600; }
.kurs-karte .ablesung { margin-top: 6px; }
.griff { fill: transparent; }
.dreieck { stroke: var(--flaeche); stroke-width: 1.5; stroke-linejoin: round; }
.dreieck.kauf { fill: var(--signal); }
.dreieck.verkauf { fill: var(--tinte); }
[data-marke] { cursor: pointer; outline: none; }
[data-marke]:focus-visible .griff { stroke: var(--tinte); stroke-width: 1.5; }

/* Anmeldung, Ersteinrichtung, Abmelden */
.tor { max-width: 26rem; padding-top: 12vh; }
.tor h1 { font-size: 1.375rem; margin-bottom: 6px; }
.tor-text { color: var(--tinte-2); font-size: 0.9375rem; margin-bottom: 14px; }
.tor a { color: var(--signal); }
.meldung { margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--tinte); border-radius: 8px; font-size: 0.9375rem; }
.formular { display: grid; gap: 6px; }
.formular label { font-size: 0.875rem; color: var(--tinte-2); margin-top: 8px; }
.formular small { color: var(--tinte-3); }
.formular input { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--tinte-3); border-radius: 8px; background: var(--flaeche); color: var(--tinte); font: inherit; }
.formular button { min-height: 46px; margin-top: 18px; border: 0; border-radius: 8px; background: var(--signal); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.abmelden button { min-height: 36px; padding: 0 14px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--tinte-2); font: inherit; font-size: 0.875rem; cursor: pointer; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

footer { margin-top: 26px; font-size: 0.8125rem; color: var(--tinte-2); max-width: 46rem; }

@media (max-width: 860px) {
  .zwei { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zahlen > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .zahlen > div:nth-child(n+3) { border-top: 1px solid var(--linie); }
}
@media (max-width: 600px) {
  main { padding: 20px 14px 32px; }
  .tor { padding-top: 6vh; }
  .kurs-karten { grid-template-columns: minmax(0, 1fr); }
  .karte { padding: 16px 14px 16px; }
  .breit { display: none; }
  table { font-size: 0.875rem; }
  th.zahl, td.zahl { padding-left: 8px; }
  dd { font-size: 1.0625rem; }
  .zahlen > div { padding-right: 10px; }
  .zahlen > div + div { padding-left: 12px; }
  .zahlen > div:nth-child(3) { padding-left: 0; }
  .trades li { grid-template-columns: 4.25rem minmax(0, 1fr) auto; gap: 2px 10px; }
  .trades .zeit { grid-column: 1 / -1; font-size: 0.8125rem; }
}

/* Crawler & Lernen */
.lernen h3 { margin: 1.4rem 0 .4rem; font-size: 1rem; }
.lernen .champion { margin: .6rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.lernen .lern-hinweis, .lernen .lern-klein { margin: .3rem 0; font-size: .9rem; opacity: .8; }
.lern-liste { margin: 0; padding: 0; list-style: none; }
.lern-liste li { display: flex; flex-wrap: wrap; gap: .15rem .9rem; padding: .55rem 0; border-top: 1px solid rgba(128, 128, 128, .25); min-width: 0; }
.lern-liste li strong { flex: 0 0 100%; overflow-wrap: anywhere; }
.lern-liste li span { font-size: .92rem; overflow-wrap: anywhere; min-width: 0; }
.lern-liste li.leer { opacity: .7; }

/* Bereitschaft: grün = läuft bzw. Quelle ok, rot = steht bzw. Fehler; der Text sagt es immer mit. */
.bot-zeile { display: flex; align-items: center; gap: .55rem; margin: .6rem 0 0; font-weight: 600; }
.ampel { display: inline-block; flex: none; width: .7rem; height: .7rem; margin-right: .45rem; border-radius: 50%; background: var(--tinte-3); vertical-align: baseline; }
.bot-zeile .ampel { margin-right: 0; }
.ampel.gruen { background: #1d8a3a; }
.ampel.rot { background: #c0362c; }
.bereitschaft { scroll-margin-top: 84px; }  /* die feste Kopfleiste verdeckt sonst die Überschrift */

/* Meme-Coins: die Warnung steht immer oben und ist nicht zu übersehen. */
.meme { scroll-margin-top: 84px; }
.meme h3 { margin: 1.4rem 0 .4rem; font-size: 1rem; }
.meme .lern-klein { margin: .3rem 0; font-size: .9rem; opacity: .8; overflow-wrap: anywhere; }
.meme-warnung { margin: .6rem 0; padding: .6rem .8rem; border-left: 4px solid #c0362c; background: rgba(192, 54, 44, .1); font-weight: 600; overflow-wrap: anywhere; }

/* Claude-Analyse: Fremdtext und lange Links dürfen die Seite nicht verbreitern. */
.analyse li { overflow-wrap: anywhere; }
.analyse .quelle-link { display: block; overflow-wrap: anywhere; word-break: break-all; }
