/* tagesgeld-ueberblick.css
 * Scope: #tg-ueberblick und .tg-*-Klassen. Keine externen Schriften.
 * Designreferenz: festgeld-ueberblick.css (1:1-Farbpalette uebernommen),
 * mit Anpassung auf 2 Baender (Standard/Sonder) x 7 Anlagebetraege.
 */

#tg-ueberblick {
  --tg-blue:         #1E5BA8;
  --tg-blue-deep:    #003870;
  --tg-blue-darker:  #00264D;
  --tg-ink:          #0E1B2C;
  --tg-ink-2:        #334459;
  --tg-muted:        #6B7A90;
  --tg-line:         #D9E0EA;

  --tg-c-inland:     #00d4aa;
  --tg-c-ausland:    #ecba13;

  --tg-font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tg-font-serif: Georgia, "Times New Roman", Times, serif;
  --tg-font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  display: block;
  margin: 2em 6% 0;
  padding-bottom: 3em;
  min-width: 0;
  color: var(--tg-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hero ------------------------------------------------------------------ */
.tg-hero { margin: 0 0 1.5em; }
.tg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1em 1.5em;
  margin: 1.5em 0 0;
  font-size: 0.8em;
  color: #D9E0EA;
  font-family: var(--tg-font-mono);
  align-items: center;
}
.tg-legend .tg-legend-inland { margin-right: 1.5em; }
.tg-legend .tg-sw {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--tg-c-inland);
  vertical-align: -0.1em;
  margin-right: 0.4em;
}
.tg-legend .tg-sw--ausland { background: var(--tg-c-ausland); }

/* Frame ------------------------------------------------------------------ */
.tg-vab {
  background: var(--tg-blue);
  border-radius: 1em;
  padding: 1.5em 1.3em 1.1em;
  margin-bottom: 0.6em;
  color: #E6ECF3;
  position: relative;
  overflow: hidden;
}
.tg-vab::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,212,170,0.10), transparent 50%),
    radial-gradient(circle at 92% 100%, rgba(236,186,19,0.09), transparent 55%);
}

/* Band-Section (Standard / Sonder) -------------------------------------- */
.tg-band-section {
  position: relative;
  padding: 1.2em 1.2em 0.8em 3em;
  margin-bottom: 1em;
  border-radius: 0.75em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.tg-band-section:last-child { margin-bottom: 0; }
.tg-band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75em;
  margin-bottom: 0.8em;
  flex-wrap: wrap;
}
.tg-band-head h3 {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 500;
  font-size: 1.35em;
  margin: 0;
  letter-spacing: -0.01em;
  color: #fff;
}
.tg-band-head .tg-meta {
  font-family: var(--tg-font-mono);
  font-size: 0.72em;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.6);
}

/* Band mit Ringen -------------------------------------------------------- */
.tg-band {
  position: relative;
  height: 12em;
  margin-top: 0.4em;
  will-change: transform;
}
.tg-band .tg-gl {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255,255,255,0.10);
}
.tg-band .tg-gl span {
  position: absolute;
  left: -2.8em;
  top: -0.55em;
  font-family: var(--tg-font-mono);
  font-size: 0.65em;
  color: rgba(255,255,255,0.72);
}
.tg-xaxis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-family: var(--tg-font-mono);
  font-size: 0.7em;
  color: rgba(255,255,255,0.80);
  margin-top: 0.55em;
  text-align: center;
}
.tg-xaxis .tg-x-short { display: none; }
.tg-xaxis .tg-x-long { display: inline; }

/* X-Achsen-Umschaltung: Lang ("EUR 25.000") -> Mittel ("25.000") -> Kurz ("25k").
   Tablet-Portrait nutzt die Mittelform; Mobile die Kurzform. */
@media (max-width: 64em) {
  .tg-xaxis .tg-x-long { display: none; }
  .tg-xaxis .tg-x-short { display: inline; }
}

/* Ring ------------------------------------------------------------------- */
.tg-ring {
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  border: 2px solid var(--tg-c-inland);
  background: transparent;
  position: absolute;
  transform: translate(-50%, 50%);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s, background 0.2s;
}
.tg-ring::before {
  content: "";
  position: absolute;
  inset: -0.55em;
  border-radius: 50%;
}
.tg-ring--ausland { border-color: var(--tg-c-ausland); }
.tg-ring--overlap-back { z-index: 1; }
.tg-ring--overlap-front { z-index: 2; }
.tg-ring--overlap-back.tg-ring--top { z-index: 2; }
.tg-ring--overlap-front.tg-ring--top { z-index: 3; }
.tg-ring:hover,
.tg-ring:focus-visible,
.tg-ring.is-active {
  transform: translate(-50%, 50%) scale(1.2);
  z-index: 5;
  outline: none;
  box-shadow: 0 0 0 0.4em rgba(0,212,170,0.22);
  background: rgba(0,212,170,0.12);
}
.tg-ring--ausland:hover,
.tg-ring--ausland:focus-visible,
.tg-ring--ausland.is-active {
  box-shadow: 0 0 0 0.4em rgba(236,186,19,0.22);
  background: rgba(236,186,19,0.14);
}
.tg-ring.is-active { transform: translate(-50%, 50%) scale(1.25); }

/* Top-Hervorhebung (lift-subtle) ---------------------------------------- */
.tg-ring--top {
  width: 2.1em;
  height: 2.1em;
  z-index: 3;
  will-change: transform;
  background: rgba(0,212,170,0.16);
  box-shadow:
    0 10px 18px -6px rgba(0,0,0,0.40),
    0 4px 8px -2px rgba(0,0,0,0.28),
    inset 0 2px 0 rgba(255,255,255,0.30);
}
.tg-ring--top.tg-ring--ausland {
  background: rgba(236,186,19,0.18);
}
.tg-ring--top::after {
  content: attr(data-zins);
  position: absolute;
  left: 50%;
  top: -1.8em;
  transform: translateX(-50%);
  font-family: var(--tg-font-serif);
  font-weight: 500;
  font-size: 0.78em;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  background: rgba(0,0,0,0.35);
  padding: 0.15em 0.55em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.tg-tip .tg-tip-zins,
.tg-band-head .tg-meta,
.tg-band .tg-gl span {
  font-variant-numeric: tabular-nums;
}
.tg-ring--top:not(.tg-ring--ausland)::after {
  transform: translateX(calc(-50% - 1.6em));
}
.tg-ring--top.tg-ring--ausland::after {
  transform: translateX(calc(-50% + 1.6em));
}
.tg-ring--top[data-edge="left"]:not(.tg-ring--ausland)::after { transform: translateX(-10%); }
.tg-ring--top[data-edge="left"].tg-ring--ausland::after { transform: translateX(calc(-50% + 2.2em)); }
.tg-ring--top[data-edge="right"]:not(.tg-ring--ausland)::after { transform: translateX(calc(-100% + 1em)); }
.tg-ring--top[data-edge="right"].tg-ring--ausland::after { transform: translateX(-90%); }

/* Tooltip --------------------------------------------------------------- */
.tg-tip {
  position: fixed;
  pointer-events: auto;
  cursor: pointer;
  z-index: 50;
  background: #0A1422;
  color: #fff;
  text-decoration: none;
  display: block;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.6em;
  padding: 0.7em 0.8em;
  font-size: 0.8em;
  line-height: 1.45;
  min-width: 14em;
  max-width: 18em;
  box-shadow: 0 0.75em 1.9em rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(0.25em);
  transition: opacity 0.12s, transform 0.12s;
  font-family: var(--tg-font-sans);
}
.tg-tip:hover { border-color: rgba(255,255,255,0.28); }
.tg-tip.is-show { opacity: 1; transform: translateY(0); }

.tg-tip .tg-tip-lauf {
  text-align: center;
  padding-bottom: 0.45em;
  margin-bottom: 0.45em;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-size: 0.95em;
  font-weight: 600;
  color: #fff;
}
.tg-tip .tg-tip-lauf .tg-sw {
  width: 0.6em; height: 0.6em; border-radius: 50%;
  background: var(--tg-c-inland);
  display: inline-block;
  margin-right: 0.5em;
  vertical-align: 0.05em;
}
.tg-tip.is-ausland .tg-tip-lauf .tg-sw { background: var(--tg-c-ausland); }

.tg-tip .tg-tip-zins {
  font-family: var(--tg-font-serif); font-weight: 500;
  font-size: 1.4em; letter-spacing: -0.01em;
  margin: 0.15em 0 0.05em;
  text-align: center;
  color: #fff;
}

.tg-tip .tg-tip-bank {
  text-align: center;
  font-size: 0.92em;
  color: #fff;
  line-height: 1.35;
}

.tg-tip .tg-tip-betrag {
  text-align: center;
  margin-top: 0.45em;
  padding-top: 0.45em;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-family: var(--tg-font-mono);
  font-size: 0.82em;
  color: #B8C7DB;
}

/* Optionale 5. Zeile bei Sonder-Modus: Aktionsbeschreibung. */
.tg-tip .tg-tip-aktion {
  text-align: center;
  margin-top: 0.4em;
  padding-top: 0.4em;
  border-top: 1px dashed rgba(255,255,255,0.10);
  font-family: var(--tg-font-mono);
  font-size: 0.78em;
  color: #ECBA13;
  line-height: 1.4;
}

/* Mini-Karten (nur DE) -------------------------------------------------- */
.tg-related {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
  margin: 1.6em 0 0.6em;
}
.tg-related[hidden] { display: none; }
.tg-related-card {
  background: var(--tg-blue);
  color: #E6ECF3;
  border-radius: 0.85em;
  padding: 1em 1.2em;
  border: 1px solid rgba(255,255,255,0.10);
  position: relative;
  text-decoration: none;
  display: block;
  transition: transform 0.18s, box-shadow 0.18s;
}
.tg-related-card:hover,
.tg-related-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.6em 1.4em rgba(0,0,0,0.25);
  outline: none;
}
.tg-related-card .tg-related-titel {
  font-family: var(--tg-font-mono);
  font-size: 0.8em;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.70);
  margin: 0 0 0.4em;
  text-transform: uppercase;
}
.tg-related-card .tg-related-zins {
  font-family: var(--tg-font-serif);
  font-weight: 500;
  font-size: 1.7em;
  color: #fff;
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tg-related-card .tg-related-anbieter {
  margin: 0.1em 0 0.4em;
  color: #fff;
  font-size: 0.95em;
}
.tg-related-card .tg-related-link {
  font-family: var(--tg-font-mono);
  font-size: 0.78em;
  color: var(--tg-c-inland);
  letter-spacing: 0.02em;
  /* Globalen p-Default (margin: 2em 0 0) neutralisieren; margin-left/right kommen
     weiterhin aus #vergleich p (5%) und sorgen fuer die buendige X-Achse. */
  margin: 0.4em 0 0;
}

/* noscript A11y-Tabellen -- sichtbar nur ohne JS ------------------------ */
.tg-data-table {
  margin: 1em 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
.tg-data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  padding: 0.5em 0;
}
.tg-data-table th,
.tg-data-table td {
  padding: 0.4em 0.6em;
  border-bottom: 1px solid var(--tg-line);
  text-align: left;
}
.tg-data-table thead th { background: #f2f5fa; }
.tg-data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1em 0;
}
.tg-data-table-wrap .tg-data-table {
  min-width: 30em;
  margin: 0;
}

/* Stand-Zeile (rechtsbuendig unter dem Vergleich) ----------------------- */
#vergleich > span.tg-meta {
  display: block;
  text-align: right;
  font-family: var(--tg-font-mono);
  font-size: 0.8em;
  margin: 0 5% 3em 0;
}

/* 1,5em Abstand nach dem letzten Erlaeuterungs-Absatz ------------------- */
#vergleich > p.gering:last-of-type {
  margin-bottom: 1.5em;
}

/* Tooltip-Flagge -------------------------------------------------------- */
.tg-tip-flag {
  display: inline-block;
  margin-left: 0.35em;
  font-size: 1.05em;
  line-height: 1;
  vertical-align: -0.05em;
}

/* Touch-Tooltip am unteren Viewport-Rand ------------------------------- */
.tg-tip.tg-tip--bottom {
  left: 50% !important;
  right: auto;
  top: auto !important;
  bottom: calc(1.6em + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: min(24em, 94vw);
  font-size: 0.85em;
  padding: 0.55em 0.7em;
  background: #0A1422;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 1em 2.5em rgba(0,0,0,0.40);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tg-tip.tg-tip--bottom .tg-tip-zins {
  font-size: 1.2em; margin: 0.1em 0 0.1em;
}
.tg-tip.tg-tip--bottom.is-show { transform: translateX(-50%); }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 54em) {
  #tg-ueberblick { margin: 1.5em 2.5% 3em; }
  .tg-legend .tg-legend-inland { margin-right: 0; }
  .tg-vab { padding: 1em 0.8em 0.8em; }
  .tg-band-section { padding: 1em 0.8em 0.7em 2.4em; }
  .tg-band-head h3 { font-size: 1.05em; }
  .tg-band { height: 14em; }
  .tg-ring { width: 1.35em; height: 1.35em; border-width: 0.1em; }
  .tg-ring--top { width: 1.7em; height: 1.7em; }
  .tg-ring--top::after { font-size: 0.65em; top: -1.3em; padding: 0.1em 0.4em; }
  .tg-ring--top:not(.tg-ring--ausland)::after {
    transform: translateX(calc(-50% - 1.0em));
  }
  .tg-ring--top.tg-ring--ausland::after {
    transform: translateX(calc(-50% + 1.0em));
  }
  .tg-ring::before { inset: -0.7em; }
  .tg-xaxis { font-size: 0.7em; }
  .tg-xaxis .tg-x-long { display: none; }
  .tg-xaxis .tg-x-short { display: inline; }
  /* Mini-Karten gestapelt 1-spaltig auf Mobile. */
  .tg-related { grid-template-columns: 1fr; }
  /* Stand-Zeile auf Mobile linksbuendig. */
  #vergleich > span.tg-meta {
    text-align: left;
    margin: 0 5% 2em 5%;
    font-size: 0.72em;
  }
  #vergleich > span.tg-meta > span { display: block; }
  #vergleich > span.tg-meta .tg-meta-info {
    opacity: 0.85;
    margin-top: 0.3em;
  }
}

/* Tablet-Portrait: Bandhoehe 16em, X-Achse Mittelform via .tg-x-short.
   (Eine echte Mittelform-Klasse ist optional; die Kurzform .tg-x-short
   greift hier ebenfalls und passt visuell.) */
@media (min-width: 38em) and (max-width: 54em) {
  #tg-ueberblick { margin: 1.8em 4% 0; }
  .tg-band { height: 16em; }
  .tg-xaxis { font-size: 0.75em; }
}

/* Touch-Tablets >= 865 px: Ringe leicht vergroessern. */
@media (hover: none) and (min-width: 54.01em) {
  .tg-ring { width: 1.55em; height: 1.55em; }
  .tg-ring--top { width: 1.9em; height: 1.9em; }
  .tg-ring::before { inset: -0.55em; }
}

@media (max-width: 30em) {
  .tg-band-section { padding-left: 2.4em; padding-right: 0.4em; }
  .tg-band .tg-gl span { font-size: 0.6em; left: -2.4em; }
  .tg-xaxis {
    font-size: 0.62em;
    white-space: nowrap;
    overflow: hidden;
  }
  .tg-xaxis span { overflow: hidden; text-overflow: clip; }
  .tg-related-card { padding: 0.85em 1em; }
  .tg-related-card .tg-related-zins { font-size: 1.5em; }
}

@media (prefers-reduced-motion: reduce) {
  .tg-ring, .tg-tip, .tg-related-card { transition: none !important; }
  .tg-ring:hover, .tg-ring:focus-visible, .tg-ring.is-active {
    transform: translate(-50%, 50%);
  }
}

#vergleich p {margin-left:5%;margin-right:5%}

/* Erklaertext unter dem Diagramm: zusaetzlicher Abstand zur Stand-Meta-Zeile. */
.tg-erklaer { margin-top: 7em; }
