/* festgeld-ueberblick.css
 * Scope: #fg-ueberblick und .fg-*-Klassen. Keine externen Schriften.
 * Designreferenz: Coden\Screenshots\Zieldesign.png (lift-subtle-Variante).
 */

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

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

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

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

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

/* Frame ------------------------------------------------------------------ */
.fg-vab {
  background: var(--fg-blue);
  border-radius: 1em;
  padding: 1.5em 1.3em 1.1em;
  margin-bottom: 0.6em;
  color: #E6ECF3;
  position: relative;
  overflow: hidden;
}
.fg-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%);
}

/* Tier-Karte ------------------------------------------------------------- */
.fg-tier {
  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);
}
.fg-tier:last-child { margin-bottom: 0; }
.fg-tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75em;
  margin-bottom: 0.8em;
  flex-wrap: wrap;
}
.fg-tier-head h3 {
  font-family: var(--fg-font-serif);
  font-weight: 500;
  font-size: 1.35em;
  margin: 0;
  letter-spacing: -0.01em;
  color: #fff;
}
.fg-tier-head .fg-meta {
  font-family: var(--fg-font-mono);
  font-size: 0.72em;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.6);
}

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

/* X-Achse: Frueher auf Kurzform umschalten (ab <= 64em / ca. 1024 px), weil
   die Langform-Labels schon knapp unter Desktop-Breite in zwei Zeilen
   brechen. Der uebrige Mobile-Block bleibt unveraendert bei max-width: 54em. */
@media (max-width: 64em) {
  .fg-xaxis .fg-x-long { display: none; }
  .fg-xaxis .fg-x-short { display: inline; }
}

/* Ring ------------------------------------------------------------------- */
.fg-ring {
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  border: 2px solid var(--fg-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;
}
/* Unsichtbare Touch-Klickflaeche (44 px-Ziel) -- global, damit auch Touch-
   Tablets im Desktop-Branch eine ausreichend grosse Hit-Area haben. Im
   Mobile-Block weiter unten auf -0.7em vergroessert. */
.fg-ring::before {
  content: "";
  position: absolute;
  inset: -0.55em;
  border-radius: 50%;
}
.fg-ring--ausland { border-color: var(--fg-c-ausland); }
/* Overlap: Inland-Ring (gruen) vor Ausland-Ring (gelb) stapeln, wenn beide
   an derselben Laufzeit sehr nahe beieinander liegen. */
.fg-ring--overlap-back { z-index: 1; }
.fg-ring--overlap-front { z-index: 2; }
.fg-ring--overlap-back.fg-ring--top { z-index: 2; }
.fg-ring--overlap-front.fg-ring--top { z-index: 3; }
.fg-ring:hover,
.fg-ring:focus-visible,
.fg-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);
}
.fg-ring--ausland:hover,
.fg-ring--ausland:focus-visible,
.fg-ring--ausland.is-active {
  box-shadow: 0 0 0 0.4em rgba(236,186,19,0.22);
  background: rgba(236,186,19,0.14);
}
.fg-ring.is-active { transform: translate(-50%, 50%) scale(1.25); }

/* Top-Hervorhebung (lift-subtle) ---------------------------------------- */
.fg-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);
}
.fg-ring--top.fg-ring--ausland {
  background: rgba(236,186,19,0.18);
}
.fg-ring--top::after {
  content: attr(data-zins);
  position: absolute;
  left: 50%;
  top: -1.8em;
  transform: translateX(-50%);
  font-family: var(--fg-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;
}
.fg-tip .fg-tip-zins,
.fg-tier-head .fg-meta,
.fg-band .fg-gl span {
  font-variant-numeric: tabular-nums;
}
/* Versetzt die Pille bei Top-Ring-Overlap (Inland- und Ausland-Top
   an derselben Laufzeit) horizontal gegeneinander, damit beide Werte
   lesbar bleiben. */
.fg-ring--top:not(.fg-ring--ausland)::after {
  transform: translateX(calc(-50% - 1.6em));
}
.fg-ring--top.fg-ring--ausland::after {
  transform: translateX(calc(-50% + 1.6em));
}
/* Randzellen: Top-Pille nach innen statt nach aussen versetzen, damit sie
   nicht ueber die .fg-tier- oder .fg-vab-Kante laeuft. */
.fg-ring--top[data-edge="left"]:not(.fg-ring--ausland)::after { transform: translateX(-10%); }
.fg-ring--top[data-edge="left"].fg-ring--ausland::after { transform: translateX(calc(-50% + 2.2em)); }
.fg-ring--top[data-edge="right"]:not(.fg-ring--ausland)::after { transform: translateX(calc(-100% + 1em)); }
.fg-ring--top[data-edge="right"].fg-ring--ausland::after { transform: translateX(-90%); }

/* Tooltip --------------------------------------------------------------- */
.fg-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: 17em;
  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(--fg-font-sans);
}
.fg-tip:hover { border-color: rgba(255,255,255,0.28); }
.fg-tip.is-show { opacity: 1; transform: translateY(0); }

/* 1. Laufzeit-Zeile: zentriert, Markt-Swatch links daneben, Trennlinie unten. */
.fg-tip .fg-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;
}
.fg-tip .fg-tip-lauf .fg-sw {
  width: 0.6em; height: 0.6em; border-radius: 50%;
  background: var(--fg-c-inland);
  display: inline-block;
  margin-right: 0.5em;
  vertical-align: 0.05em;
}
.fg-tip.is-ausland .fg-tip-lauf .fg-sw { background: var(--fg-c-ausland); }

/* 2. Zinssatz: prominent, zentriert. */
.fg-tip .fg-tip-zins {
  font-family: var(--fg-font-serif); font-weight: 500;
  font-size: 1.4em; letter-spacing: -0.01em;
  margin: 0.15em 0 0.05em;
  text-align: center;
  color: #fff;
}

/* 3. Anbieter: Name + optionales Laender-Emoji, zentriert. */
.fg-tip .fg-tip-bank {
  text-align: center;
  font-size: 0.92em;
  color: #fff;
  line-height: 1.35;
}

/* 4. Anlagebetrag: zentriert, Trennlinie oben. */
.fg-tip .fg-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(--fg-font-mono);
  font-size: 0.82em;
  color: #B8C7DB;
}

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

/* Footnote --------------------------------------------------------------- */
.fg-footnote-stand {
  margin-top: 1.5em;
  font-family: var(--fg-font-mono);
  font-size: 0.75em;
  color: var(--fg-muted);
}

/* Stand-Zeile (rechtsbuendig unter dem Vergleich) ----------------------- */
#vergleich > span.fg-meta {
  display: block;
  text-align: right;
  font-family: var(--fg-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 -------------------------------------------------------- */
.fg-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 (Finger verdeckt sonst). Global
   definiert, damit auch Touch-Tablets ab 865 px einen korrekt platzierten
   Tooltip bekommen. env(safe-area-inset-bottom) haelt den Tooltip auf iPhones
   mit Home-Indicator ueber der Safe-Area. */
.fg-tip.fg-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;
}
.fg-tip.fg-tip--bottom .fg-tip-zins {
  font-size: 1.2em; margin: 0.1em 0 0.1em;
}
.fg-tip.fg-tip--bottom.is-show { transform: translateX(-50%); }
/* Beide Tooltips nutzen den gleichen CSS-bottom-Ausdruck. Der Haupt-Tip
   bekommt seine Stapel-Position oberhalb des Partners vom JS als
   calc()-Ausdruck mit env(), damit dynamische Safe-Area-Aenderungen
   (URL-Leiste ein-/ausblenden) beide Tooltips synchron verschieben. */

/* Responsive ------------------------------------------------------------- */
@media (max-width: 54em) {
  #fg-ueberblick { margin: 1.5em 2.5% 3em; }
  .fg-legend .fg-legend-inland { margin-right: 0; }
  .fg-vab { padding: 1em 0.8em 0.8em; }
  .fg-tier { padding: 1em 0.8em 0.7em 2.4em; }
  .fg-tier-head h3 { font-size: 1.05em; }
  .fg-band { height: 14em; }
  .fg-ring { width: 1.35em; height: 1.35em; border-width: 0.1em; }
  .fg-ring--top { width: 1.7em; height: 1.7em; }
  .fg-ring--top::after { font-size: 0.65em; top: -1.3em; padding: 0.1em 0.4em; }
  /* Top-Pillen-Versatz auf Mobile reduziert (sonst Kollision mit
     benachbarten Top-Pillen bei engem Spaltenraster). */
  .fg-ring--top:not(.fg-ring--ausland)::after {
    transform: translateX(calc(-50% - 1.0em));
  }
  .fg-ring--top.fg-ring--ausland::after {
    transform: translateX(calc(-50% + 1.0em));
  }
  /* Unsichtbare Touch-Klickflaeche auf Mobile vergroessern (>=44 px). */
  .fg-ring::before { inset: -0.7em; }
  .fg-xaxis { font-size: 0.7em; }
  .fg-xaxis .fg-x-long { display: none; }
  .fg-xaxis .fg-x-short { display: inline; }
  /* Stand-Zeile auf Mobile linksbuendig und strukturell getrennt. */
  #vergleich > span.fg-meta {
    text-align: left;
    margin: 0 5% 2em 5%;
    font-size: 0.72em;
  }
  #vergleich > span.fg-meta > span { display: block; }
  #vergleich > span.fg-meta .fg-meta-info {
    opacity: 0.85;
    margin-top: 0.3em;
  }
}

/* Tablet-Zwischenstufe (iPad Portrait 768-834 px, Nexus 7 Landscape u.ae.):
   Mehr Bandhoehe und entspannte Raender. Die X-Achse bleibt Kurzform
   (3M/.../10J) -- 14 Langlabels passen in diesem Range nicht kollisions-
   frei (auch nicht bei reduzierter font-size), daher uebernimmt die
   Kurzform aus dem Mobile-Block. */
@media (min-width: 38em) and (max-width: 54em) {
  #fg-ueberblick { margin: 1.8em 4% 0; }
  .fg-band { height: 16em; }
  .fg-xaxis { font-size: 0.75em; }
}

/* Touch-Tablets >= 865 px (iPad Pro 12.9" Portrait, Surface, iPad Landscape):
   Ringe leicht vergroessern und Touch-Klickflaeche behalten -- die Desktop-
   Ring-Groesse (1.75em) ist auf Touch zu klein, der Mobile-Override greift
   hier nicht mehr. */
@media (hover: none) and (min-width: 54.01em) {
  .fg-ring { width: 1.55em; height: 1.55em; }
  .fg-ring--top { width: 1.9em; height: 1.9em; }
  .fg-ring::before { inset: -0.55em; }
}

@media (max-width: 30em) {
  .fg-tier { padding-left: 2.4em; padding-right: 0.4em; }
  .fg-band .fg-gl span { font-size: 0.6em; left: -2.4em; }
  .fg-xaxis {
    font-size: 0.62em;
    white-space: nowrap;
    overflow: hidden;
  }
  .fg-xaxis span { overflow: hidden; text-overflow: clip; }
}

/* Reduzierte Animation bei System-Einstellung "Bewegung reduzieren" ----- */
@media (prefers-reduced-motion: reduce) {
  .fg-ring, .fg-tip { transition: none !important; }
  .fg-ring:hover, .fg-ring:focus-visible, .fg-ring.is-active {
    transform: translate(-50%, 50%);
  }
}

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