/* =====================================================================
   Tagesgeld Rechner v1.1 — tgr-calculator.css
   Scoped under .tgr-root — GeneratePress compatible
   ===================================================================== */

/* GeneratePress compatibility notes:
   - No @import fonts — GP provides body font; we inherit it.
   - font-family: inherit on .tgr-root and all form elements.
   - No contain: layout style — breaks GP sticky header z-index.
   - Explicit GP .entry-content cascade overrides on p/h2/h3/a/ul.
   - box-sizing reset inside .tgr-root *.
   - button box-shadow/text-transform reset for GP button styles.
*/

/* ---- Design tokens ------------------------------------------------- */
.tgr-root {
  --tgr-font-display: Georgia, 'Times New Roman', serif;
  --tgr-font-body:    inherit;

  --tgr-text:         #0f172a;
  --tgr-text-muted:   #64748b;
  --tgr-text-hint:    #94a3b8;

  --tgr-surface:      #ffffff;
  --tgr-surface-2:    #f8fafc;
  --tgr-border:       #e2e8f0;
  --tgr-border-focus: #2563eb;

  --tgr-accent:       #2563eb;
  --tgr-accent-light: #eff6ff;
  --tgr-accent-dark:  #1d4ed8;

  --tgr-blue:         #2563eb;
  --tgr-blue-light:   #eff6ff;
  --tgr-green:        #059669;
  --tgr-green-light:  #ecfdf5;
  --tgr-amber:        #d97706;
  --tgr-red:          #dc2626;

  --tgr-radius-sm:    6px;
  --tgr-radius:       10px;
  --tgr-radius-lg:    16px;
  --tgr-radius-xl:    24px;

  --tgr-shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --tgr-transition:   220ms cubic-bezier(0.4, 0, 0.2, 1);

  font-family: inherit;
  color: var(--tgr-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* No contain: layout style — breaks GP sticky header */
}

/* ---- GP: universal box-sizing reset -------------------------------- */
.tgr-root *,
.tgr-root *::before,
.tgr-root *::after {
  box-sizing: border-box;
}

/* ---- GP: neutralise .entry-content typography cascade -------------- */
.tgr-root p {
  color: var(--tgr-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}
.tgr-root p:last-child { margin-bottom: 0; }

.tgr-root h1,
.tgr-root h2,
.tgr-root h3 {
  font-family: var(--tgr-font-display);
  color: var(--tgr-text);
  line-height: 1.2;
  font-weight: 700;
}
.tgr-root h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  margin: 0 0 1rem;
}
.tgr-root h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
  font-family: inherit;
}
.tgr-root a {
  color: var(--tgr-accent);
  text-decoration: none;
}
.tgr-root a:hover {
  text-decoration: underline;
  color: var(--tgr-accent-dark);
}
.tgr-root ul,
.tgr-root ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Dark mode ----------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .tgr-root {
    --tgr-text:         #f1f5f9;
    --tgr-text-muted:   #94a3b8;
    --tgr-text-hint:    #64748b;
    --tgr-surface:      #1e293b;
    --tgr-surface-2:    #0f172a;
    --tgr-border:       #334155;
    --tgr-accent:       #60a5fa;
    --tgr-accent-light: #172554;
    --tgr-blue-light:   #172554;
    --tgr-green-light:  #052e16;
  }
}

/* ---- Focus --------------------------------------------------------- */
.tgr-root :focus-visible {
  outline: 2px solid var(--tgr-border-focus);
  outline-offset: 2px;
  border-radius: var(--tgr-radius-sm);
}

/* ================================================================
   HERO
================================================================ */
.tgr-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  max-width: 660px;
  margin: 0 auto 2rem;
}

.tgr-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tgr-accent);
  margin-bottom: 0.75rem;
  font-family: inherit;
  white-space: nowrap;
}

.tgr-hero__title {
  font-family: var(--tgr-font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  color: var(--tgr-text);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.tgr-hero__subtitle {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--tgr-accent);
  margin: 0 0 0.625rem;
  font-family: inherit;
}

.tgr-hero__lead {
  font-size: 1rem;
  color: var(--tgr-text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.65;
}

.tgr-hero__stamp {
  font-size: 0.75rem;
  color: var(--tgr-text-hint);
  font-style: italic;
  margin: 0 0 1.25rem;
}

.tgr-hero__cta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--tgr-text);
  color: var(--tgr-surface);
  border-radius: var(--tgr-radius);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  transition: opacity var(--tgr-transition);
  font-family: inherit;
}
.tgr-hero__cta:hover { opacity: .85; text-decoration: none; color: var(--tgr-surface); }

/* ================================================================
   MARKET SNAPSHOT
================================================================ */
.tgr-snapshot {
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-top: 3px solid var(--tgr-accent);
  border-radius: var(--tgr-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.tgr-snapshot__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tgr-accent);
  margin: 0 0 1rem;
  font-family: inherit;
}

.tgr-snapshot__grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
  .tgr-snapshot__grid { grid-template-columns: 1fr 1fr; }
  .tgr-snap-stat__val { font-size: 1.125rem; }
}

.tgr-snap-stat {
  display: flex !important;
  flex-direction: column;
  gap: 3px;
  padding: 0.75rem;
  background: var(--tgr-surface-2);
  border-radius: var(--tgr-radius);
  border: 1px solid var(--tgr-border);
}

.tgr-snap-stat--muted { opacity: .85; }

.tgr-snap-stat__val {
  font-family: var(--tgr-font-display);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--tgr-text);
  letter-spacing: -.01em;
  display: block !important;
}

.tgr-snap-stat__key {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tgr-text);
  display: block !important;
  font-family: inherit;
}

.tgr-snap-stat__note {
  font-size: 0.6875rem;
  color: var(--tgr-text-hint);
  line-height: 1.4;
  display: block !important;
  font-family: inherit;
}

.tgr-snapshot__note {
  font-size: 0.6875rem;
  color: var(--tgr-text-hint);
  margin: 0;
  font-style: italic;
  font-family: inherit;
}

/* ================================================================
   LAYOUT
================================================================ */
.tgr-calculator-section {
  max-width: 1000px;
  margin: 0 auto 3rem;
}

.tgr-layout {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .tgr-layout { grid-template-columns: 1fr; }
}

/* ================================================================
   CARDS
================================================================ */
.tgr-card {
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-xl);
  padding: 1.75rem;
  box-shadow: var(--tgr-shadow);
}

.tgr-card__title {
  font-family: var(--tgr-font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--tgr-text);
}

/* ================================================================
   FORM
================================================================ */
.tgr-field-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
  margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
  .tgr-field-grid { grid-template-columns: 1fr; }
}

.tgr-field { display: flex !important; flex-direction: column; gap: 6px; }
.tgr-field--full { grid-column: 1 / -1; }

.tgr-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tgr-text-muted);
  letter-spacing: .01em;
  font-family: inherit;
}

.tgr-field-hint {
  font-size: 0.75rem;
  color: var(--tgr-text-hint);
  line-height: 1.4;
  font-family: inherit;
}

.tgr-hint-link {
  color: var(--tgr-accent);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  font-size: inherit;
}
.tgr-hint-link:hover { border-bottom-style: solid; }

.tgr-input-wrap {
  position: relative;
  display: flex !important;
  align-items: center;
}

.tgr-input-prefix,
.tgr-input-suffix {
  position: absolute;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tgr-text-muted);
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

.tgr-input-prefix { left: 12px; }
.tgr-input-suffix { right: 12px; }

.tgr-input {
  width: 100%;
  border: 1.5px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  background: var(--tgr-surface);
  color: var(--tgr-text);
  transition: border-color var(--tgr-transition);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  box-shadow: none; /* GP adds box-shadow to inputs */
}

.tgr-input--prefixed { padding-left: 36px !important; }
.tgr-input-wrap .tgr-input:not(.tgr-input--prefixed):not(.tgr-select) { padding-right: 36px; }
.tgr-input:hover { border-color: #94a3b8; }
.tgr-input:focus { border-color: var(--tgr-border-focus); outline: none; }

.tgr-input[type="number"]::-webkit-inner-spin-button,
.tgr-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tgr-input[type="number"] { -moz-appearance: textfield; }

.tgr-input-wrap--select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--tgr-text-muted);
  pointer-events: none;
}

.tgr-select { padding-right: 32px !important; cursor: pointer; }

/* ---- Advanced toggle ---------------------------------------------- */
.tgr-advanced {
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.tgr-advanced__toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: var(--tgr-surface-2);
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--tgr-text-muted);
  text-transform: none;
  letter-spacing: normal;
  transition: background var(--tgr-transition);
}

.tgr-advanced__toggle:hover { background: var(--tgr-border); }
.tgr-advanced__toggle[aria-expanded="true"] { color: var(--tgr-text); }

.tgr-advanced__icon {
  transition: transform var(--tgr-transition);
  display: flex;
  align-items: center;
}
.tgr-advanced__toggle[aria-expanded="true"] .tgr-advanced__icon { transform: rotate(180deg); }

.tgr-advanced__body {
  padding: 16px;
  display: flex !important;
  flex-direction: column;
  gap: 14px;
}

/* ---- Toggles ------------------------------------------------------- */
.tgr-tax-toggle-row,
.tgr-inflation-toggle-row { padding: 4px 0; }

.tgr-toggle-wrap {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.tgr-toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }

.tgr-toggle__track {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
  background: var(--tgr-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--tgr-transition);
  flex-shrink: 0;
}

.tgr-toggle__input:checked + .tgr-toggle__track { background: var(--tgr-accent); }

.tgr-toggle__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--tgr-transition);
}

.tgr-toggle__input:checked + .tgr-toggle__track .tgr-toggle__thumb {
  transform: translateX(18px);
}

.tgr-toggle__label { font-size: 0.875rem; font-weight: 500; color: var(--tgr-text); font-family: inherit; }

.tgr-tax-details,
.tgr-inflation-details { padding: 4px 0 0; }

/* ---- Warn ---------------------------------------------------------- */
.tgr-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--tgr-radius);
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-family: inherit;
}
@media (prefers-color-scheme: dark) {
  .tgr-warn { background: #1c1107; border-color: #78350f; color: #fde68a; }
}

/* ---- Submit button ------------------------------------------------- */
.tgr-btn-calc {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--tgr-text);
  color: var(--tgr-surface);
  border: none;
  border-radius: var(--tgr-radius);
  box-shadow: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  letter-spacing: .01em;
  text-transform: none;
  transition: opacity var(--tgr-transition), transform var(--tgr-transition);
}
.tgr-btn-calc:hover { opacity: .88; }
.tgr-btn-calc:active { transform: scale(0.99); }

/* ---- Trust strip -------------------------------------------------- */
.tgr-trust-strip {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tgr-border);
}

.tgr-trust-strip__item {
  display: flex !important;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--tgr-text-muted);
  white-space: nowrap;
  font-family: inherit;
}
.tgr-trust-strip__item svg { opacity: 0.55; flex-shrink: 0; }

/* ================================================================
   RESULTS CARD
================================================================ */
.tgr-results-card { min-height: 0; } /* removed fixed min-height — caused blank space on load */

.tgr-sep {
  height: 1px;
  background: var(--tgr-border);
  margin: 1.125rem 0;
}

/* ---- Primary KPI -------------------------------------------------- */
.tgr-result-primary { padding: 4px 0 .5rem; }

.tgr-result-primary__header {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.4rem;
}

.tgr-result-layer__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tgr-dot--blue  { background: var(--tgr-blue); }
.tgr-dot--green { background: var(--tgr-green); }

.tgr-result-layer__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tgr-text);
  font-family: inherit;
}

.tgr-result-primary__value {
  font-family: var(--tgr-font-display);
  font-size: 2.25rem;
  line-height: 1.1;
  color: var(--tgr-blue);
  letter-spacing: -0.02em;
  transition: color var(--tgr-transition);
}

.tgr-result-primary__sub {
  font-size: 0.75rem;
  color: var(--tgr-text-hint);
  margin: 0.3rem 0 0;
  font-family: inherit;
}

/* ================================================================
   NOMINAL VS REAL BARS
================================================================ */
.tgr-nominal-real { padding: 2px 0; }

.tgr-viz__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tgr-text-muted);
  margin: 0 0 .875rem;
  font-family: inherit;
}

.tgr-nvr-bars {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
}

.tgr-nvr-row {
  display: grid !important;
  grid-template-columns: 110px minmax(0,1fr) 100px;
  gap: 8px;
  align-items: center;
}

@media (max-width: 420px) {
  .tgr-nvr-row { grid-template-columns: 1fr; gap: 3px; }
  .tgr-nvr-val { text-align: left !important; }
  .tgr-nvr-label { font-weight: 600; }
}

.tgr-nvr-label {
  display: block !important;
  font-size: 0.75rem;
  color: var(--tgr-text-muted);
  white-space: nowrap;
  font-family: inherit;
}

.tgr-nvr-track {
  display: block !important;
  height: 12px;
  background: var(--tgr-surface-2);
  border: 1px solid var(--tgr-border);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}

.tgr-nvr-fill {
  display: block !important;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 380ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: .88;
}

.tgr-nvr-fill--principal { background: #94a3b8; }
.tgr-nvr-fill--end       { background: var(--tgr-blue); }
.tgr-nvr-fill--real      { background: var(--tgr-green); }

.tgr-nvr-val {
  display: block !important;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tgr-text-muted);
  text-align: right;
  white-space: nowrap;
  font-family: inherit;
}
.tgr-nvr-val--blue  { color: var(--tgr-blue); }
.tgr-nvr-val--green { color: var(--tgr-green); }

/* ================================================================
   PHASE SPLIT CARDS
================================================================ */
.tgr-phase-split { display: block !important; padding: 6px 0 2px; }

.tgr-phase-cards {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tgr-phase-card {
  display: flex !important;
  padding: .875rem 1rem;
  border-radius: var(--tgr-radius-lg);
  border: 1px solid var(--tgr-border);
  flex-direction: column;
  gap: 4px;
}

.tgr-phase-card--promo {
  background: var(--tgr-blue-light);
  border-color: #bfdbfe;
}

.tgr-phase-card--std {
  background: var(--tgr-surface-2);
}

.tgr-phase-card__label {
  display: block !important;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tgr-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family: inherit;
}

.tgr-phase-card__val {
  display: block !important;
  font-family: var(--tgr-font-display);
  font-size: 1.1875rem;
  line-height: 1.15;
  color: var(--tgr-text);
  letter-spacing: -.01em;
  word-break: break-word;
}

.tgr-phase-card--promo .tgr-phase-card__val { color: var(--tgr-blue); }

/* ================================================================
   KV ROWS
================================================================ */
.tgr-kv { display: grid; gap: 0; margin: 0; }

.tgr-kv__row {
  display: flex !important;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8125rem;
  padding: 5px 0;
  border-bottom: 1px dashed var(--tgr-border);
  font-family: inherit;
}
.tgr-kv__row:last-child { border-bottom: none; }
.tgr-kv__row dt { color: var(--tgr-text-muted); font-weight: 400; }
.tgr-kv__row dd { font-weight: 600; color: var(--tgr-text); }
.tgr-kv__positive { color: var(--tgr-green) !important; }
.tgr-kv__negative { color: var(--tgr-red) !important; }

/* ================================================================
   INTERPRETATION
================================================================ */
.tgr-interpretation { padding: 2px 0; }

.tgr-interpretation__title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tgr-text-muted);
  margin: 0 0 .75rem;
  font-family: inherit;
}

.tgr-interpretation__placeholder {
  font-size: .8125rem;
  color: var(--tgr-text-hint);
  font-style: italic;
  margin: 0;
  font-family: inherit;
}

.tgr-interp__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex !important;
  flex-direction: column;
  gap: 6px;
}

.tgr-interp__item {
  font-size: .8125rem;
  line-height: 1.55;
  padding: 8px 10px 8px 28px;
  border-radius: var(--tgr-radius-sm);
  position: relative;
  font-family: inherit;
}
.tgr-interp__item::before {
  content: '';
  position: absolute;
  left: 10px; top: 13px;
  width: 7px; height: 7px;
  border-radius: 50%;
}

.tgr-interp--good    { background: var(--tgr-green-light); color: #065f46; }
.tgr-interp--good::before  { background: var(--tgr-green); }
.tgr-interp--ok      { background: var(--tgr-blue-light);  color: #1e3a8a; }
.tgr-interp--ok::before    { background: var(--tgr-blue); }
.tgr-interp--warn    { background: #fffbeb; color: #78350f; }
.tgr-interp--warn::before  { background: var(--tgr-amber); }
.tgr-interp--neutral { background: var(--tgr-surface-2); color: var(--tgr-text-muted); }
.tgr-interp--neutral::before { background: var(--tgr-text-hint); }

@media (prefers-color-scheme: dark) {
  .tgr-interp--good  { background: #052e16; color: #86efac; }
  .tgr-interp--ok    { background: #172554; color: #93c5fd; }
  .tgr-interp--warn  { background: #1c1107; color: #fde68a; }
}

/* ================================================================
   ECOSYSTEM NAV
================================================================ */
.tgr-ecosystem-block {
  max-width: 1000px;
  margin: 0 auto 2.5rem;
  padding: 1.75rem;
  background: var(--tgr-surface-2);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-xl);
}

.tgr-ecosystem-block__title {
  font-family: var(--tgr-font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--tgr-text);
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.tgr-ecosystem-block__lead {
  font-size: 0.875rem;
  color: var(--tgr-text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
  font-family: inherit;
}

.tgr-ecosystem-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 700px) { .tgr-ecosystem-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tgr-ecosystem-grid { grid-template-columns: 1fr; } }

.tgr-ecosystem-card {
  display: flex !important;
  flex-direction: column;
  gap: 5px;
  padding: 1rem 1.1rem;
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-lg);
  text-decoration: none;
  transition: border-color var(--tgr-transition), box-shadow var(--tgr-transition), transform 0.15s;
}

.tgr-ecosystem-card:hover {
  border-color: var(--tgr-accent);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.10);
  transform: translateY(-2px);
  text-decoration: none;
}

.tgr-ecosystem-card__label {
  display: block !important;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tgr-text);
  transition: color var(--tgr-transition);
  font-family: inherit;
}
.tgr-ecosystem-card:hover .tgr-ecosystem-card__label { color: var(--tgr-accent); }

.tgr-ecosystem-card__desc {
  display: block !important;
  font-size: 0.8125rem;
  color: var(--tgr-text-muted);
  line-height: 1.45;
  font-family: inherit;
}

/* ================================================================
   CONTENT BLOCKS
================================================================ */
.tgr-content-blocks {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

.tgr-block { margin-bottom: 3rem; }

.tgr-short-answer {
  background: var(--tgr-accent-light);
  border-left: 3px solid var(--tgr-accent);
  border-radius: 0 var(--tgr-radius) var(--tgr-radius) 0;
  padding: .875rem 1.1rem;
  margin: 1rem 0;
}

.tgr-short-answer h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tgr-accent);
  margin: 0 0 .4rem;
  font-family: inherit;
}

.tgr-short-answer p {
  font-size: .9rem;
  color: var(--tgr-text);
  margin: 0;
}

.tgr-two-col {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 1rem 0;
}
@media (max-width: 560px) { .tgr-two-col { grid-template-columns: 1fr; } }

.tgr-info-card {
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-lg);
  padding: 1.25rem;
}

.tgr-info-card--accent {
  border-color: var(--tgr-accent);
  background: var(--tgr-accent-light);
}

.tgr-info-card__icon {
  font-family: var(--tgr-font-display);
  font-size: 1.5rem;
  color: var(--tgr-accent);
  margin-bottom: 0.5rem;
}

.tgr-example-box {
  background: var(--tgr-surface);
  border-left: 3px solid var(--tgr-accent);
  padding: .75rem 1rem;
  border-radius: 0 var(--tgr-radius) var(--tgr-radius) 0;
  font-size: 0.9375rem;
  color: var(--tgr-text-muted);
  margin: 1rem 0;
  font-family: inherit;
}

.tgr-formula-box {
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.tgr-formula {
  font-family: Georgia, serif;
  font-size: 1.0625rem;
  color: var(--tgr-text);
  margin: 0 0 0.75rem;
}

.tgr-formula-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 5px 18px;
}

.tgr-formula-list li {
  font-size: 0.875rem;
  color: var(--tgr-text-muted);
  font-family: inherit;
}

.tgr-quotable-block {
  background: var(--tgr-surface-2);
  border-left: 3px solid var(--tgr-green);
  border-radius: 0 var(--tgr-radius) var(--tgr-radius) 0;
  padding: .875rem 1.1rem;
  margin: 1rem 0;
  font-size: .9375rem;
  color: var(--tgr-text-muted);
  line-height: 1.6;
  font-family: inherit;
}
.tgr-quotable-block p { margin: 0; color: var(--tgr-text-muted); }

/* ---- Table -------------------------------------------------------- */
.tgr-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 10px;
  border: 1px solid var(--tgr-border);
}

.tgr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--tgr-surface);
  font-family: inherit;
}

.tgr-table caption {
  font-size: .75rem;
  color: var(--tgr-text-hint);
  padding: .5rem .875rem;
  text-align: left;
  background: var(--tgr-surface-2);
  border-bottom: 1px solid var(--tgr-border);
  font-family: inherit;
}

.tgr-table thead tr { background: var(--tgr-surface-2); }

.tgr-table th {
  padding: .625rem .875rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tgr-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--tgr-border);
  white-space: nowrap;
  font-family: inherit;
  border: none;
  border-bottom: 1px solid var(--tgr-border);
}

.tgr-table td {
  padding: .625rem .875rem;
  border: none;
  border-bottom: 1px solid var(--tgr-border);
  color: var(--tgr-text);
  line-height: 1.4;
  font-family: inherit;
}

.tgr-table tr:last-child td { border-bottom: none; }
.tgr-table tr:hover td { background: var(--tgr-surface-2); }
.tgr-table__highlight td { background: var(--tgr-blue-light); font-weight: 600; }

/* ---- Trust block -------------------------------------------------- */
.tgr-block--trust {
  background: var(--tgr-surface-2);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-xl);
  padding: 1.75rem;
}

.tgr-trust-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) { .tgr-trust-grid { grid-template-columns: 1fr; } }

.tgr-trust-item {
  background: var(--tgr-surface);
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  padding: 1rem;
}

/* ---- Section divider ---------------------------------------------- */
.tgr-section-divider {
  height: 0;
  border: none;
  border-top: 1px solid var(--tgr-border);
  margin: 2.5rem 0;
  opacity: 0.5;
}

/* ---- CTA block ---------------------------------------------------- */
.tgr-cta-grid {
  display: flex !important;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.tgr-cta-anchor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--tgr-radius);
  text-decoration: none;
  font-family: inherit;
  transition: background var(--tgr-transition), transform 0.1s;
}

.tgr-cta-anchor--subtle {
  background: transparent;
  color: var(--tgr-accent);
  border: 1.5px solid var(--tgr-accent);
}

.tgr-cta-anchor--subtle:hover {
  background: var(--tgr-accent-light);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--tgr-accent);
}

/* ---- FAQ ---------------------------------------------------------- */
.tgr-faq {
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius-lg);
  overflow: hidden;
}

.tgr-faq__item { border-bottom: 1px solid var(--tgr-border); }
.tgr-faq__item:last-child { border-bottom: none; }

.tgr-faq__q {
  list-style: none;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tgr-text);
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: var(--tgr-surface);
  transition: background var(--tgr-transition);
  font-family: inherit;
}
.tgr-faq__q::-webkit-details-marker { display: none; }
.tgr-faq__q::after { content: "+"; font-size: 1.25rem; font-weight: 300; color: var(--tgr-text-muted); flex-shrink: 0; }
.tgr-faq__item[open] .tgr-faq__q { background: var(--tgr-surface-2); }
.tgr-faq__item[open] .tgr-faq__q::after { content: "–"; }

.tgr-faq__a { padding: .75rem 1.25rem 1rem; background: var(--tgr-surface-2); }
.tgr-faq__a p { font-size: 0.9rem; margin: 0; }

/* ---- Block note --------------------------------------------------- */
.tgr-block-note {
  font-size: .8125rem;
  color: var(--tgr-text-hint);
  margin: 1rem 0 0;
  font-style: italic;
  font-family: inherit;
}

/* ---- Disclaimer --------------------------------------------------- */
.tgr-disclaimer {
  border-top: 1px solid var(--tgr-border);
  padding-top: 1.5rem;
}
.tgr-disclaimer p {
  font-size: .8125rem;
  color: var(--tgr-text-hint);
  line-height: 1.65;
}

/* ---- Screen reader only ------------------------------------------ */
.tgr-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   GENERATEPRESS COMPATIBILITY — scoped GP overrides
================================================================ */
.tgr-root table { border-collapse: collapse; width: 100%; margin: 0; }
.tgr-root table th,
.tgr-root table td { text-align: left; vertical-align: top; border: none; }
.tgr-root li p { margin-bottom: 0; }
.tgr-root .tgr-formula-list,
.tgr-root .tgr-interp__list,
.tgr-root .tgr-faq { padding-left: 0; list-style: none; }
.tgr-root svg { display: inline-block; vertical-align: middle; overflow: visible; }
.tgr-root .tgr-card,
.tgr-root .tgr-advanced { position: relative; z-index: auto; }
.tgr-root .tgr-ecosystem-card,
.tgr-root .tgr-ecosystem-card:visited,
.tgr-root .tgr-cta-anchor,
.tgr-root .tgr-cta-anchor:visited { color: inherit; text-decoration: none; }


/* ================================================================
   TRANSPARENCY STACK — Result Card v1.4
   Accounting-like. Restrained. Euro outcome is the hero.
   Stack: Summary → Waterfall → Zins-Realität → Zinsaufteilung → Einschätzung
================================================================ */

/* ── Section label (replaces viz__title for new sections) ─── */
.tgr-section-label {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
  color: var(--tgr-text-hint) !important;
  margin: 0 0 0.75rem !important;
  font-family: inherit !important;
  display: block !important;
}

/* ── 1. SUMMARY ──────────────────────────────────────────── */
.tgr-summary {
  padding: 0.25rem 0 0.5rem;
}

.tgr-summary__endbetrag-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--tgr-text-hint);
  display: block !important;
  margin-bottom: 0.25rem;
  font-family: inherit;
}

.tgr-summary__endbetrag-val {
  font-family: var(--tgr-font-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--tgr-text);
  letter-spacing: -0.025em;
  display: block !important;
  margin-bottom: 0.875rem;
}

.tgr-summary__rows {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--tgr-border);
}

.tgr-summary__row {
  display: flex !important;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.3125rem 0;
  border-bottom: 1px dashed var(--tgr-border);
  font-size: 0.875rem;
  font-family: inherit;
}

.tgr-summary__row:last-child {
  border-bottom: none;
}

.tgr-summary__row dt {
  color: var(--tgr-text-muted);
  font-weight: 400;
}

.tgr-summary__row dd {
  font-weight: 600;
  color: var(--tgr-text);
  font-variant-numeric: tabular-nums;
}

.tgr-summary__row--real dd {
  color: var(--tgr-green);
}

.tgr-summary__row--rate dt,
.tgr-summary__row--rate dd {
  color: var(--tgr-text-muted);
  font-size: 0.8125rem;
}

/* ── 2. WATERFALL ────────────────────────────────────────── */
.tgr-waterfall {
  display: block !important;
}

.tgr-wf-rows {
  display: flex !important;
  flex-direction: column;
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  overflow: hidden;
}

.tgr-wf-row {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border-bottom: 1px solid var(--tgr-border);
  background: var(--tgr-surface);
}

.tgr-wf-row:last-child {
  border-bottom: none;
}

.tgr-wf-row--start {
  background: var(--tgr-surface-2);
}

.tgr-wf-row--add {
  background: var(--tgr-surface);
}

.tgr-wf-row--tax {
  background: var(--tgr-surface);
}

.tgr-wf-row--infl {
  background: var(--tgr-surface);
}

.tgr-wf-row--result {
  background: #f0f4ff;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .tgr-wf-row--result { background: #1a2040; }
}

.tgr-wf-label {
  color: var(--tgr-text-muted);
  font-size: 0.8125rem;
  font-family: inherit;
  display: block !important;
}

.tgr-wf-row--result .tgr-wf-label {
  color: var(--tgr-text);
  font-weight: 600;
  font-size: 0.875rem;
}

.tgr-wf-val {
  font-weight: 500;
  color: var(--tgr-text);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  display: block !important;
}

.tgr-wf-val--add   { color: var(--tgr-green); font-weight: 600; }
.tgr-wf-val--sub   { color: var(--tgr-red);   font-weight: 500; }
.tgr-wf-val--result {
  color: var(--tgr-blue);
  font-weight: 700;
  font-size: 1rem;
}

/* ── 3. ZINS-REALITÄT — row layout, not card grid ────────── */
.tgr-rate-rows {
  display: flex !important;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  overflow: hidden;
}

.tgr-rate-row {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border-bottom: 1px solid var(--tgr-border);
  background: var(--tgr-surface);
}

.tgr-rate-row:last-child { border-bottom: none; }

.tgr-rate-row__label {
  color: var(--tgr-text-muted);
  font-weight: 400;
  font-size: 0.8125rem;
  font-family: inherit;
  display: block !important;
}

.tgr-rate-row__val {
  font-weight: 600;
  color: var(--tgr-text);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  display: block !important;
}

/* Emphasis row — Mischzins row gets slightly stronger weight */
.tgr-rate-row--emphasis {
  background: var(--tgr-surface-2);
}

.tgr-rate-row--emphasis .tgr-rate-row__label {
  color: var(--tgr-text);
  font-weight: 500;
}

.tgr-rate-row--emphasis .tgr-rate-row__val {
  color: var(--tgr-blue);
}

/* Real rate row — muted when present */
.tgr-rate-row--real .tgr-rate-row__val {
  color: var(--tgr-text-muted);
  font-weight: 500;
}

/* ── 4. ZINSAUFTEILUNG — clean rows ──────────────────────── */
.tgr-phase-rows {
  display: flex !important;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--tgr-border);
  border-radius: var(--tgr-radius);
  overflow: hidden;
}

.tgr-phase-row {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border-bottom: 1px solid var(--tgr-border);
  background: var(--tgr-surface);
}

.tgr-phase-row:last-child { border-bottom: none; }

.tgr-phase-row dt {
  color: var(--tgr-text-muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.tgr-phase-row dd {
  font-weight: 600;
  color: var(--tgr-text);
  font-variant-numeric: tabular-nums;
}

/* Phase insight sentence */
.tgr-phase-insight {
  font-size: 0.8125rem !important;
  color: var(--tgr-text-muted) !important;
  margin: 0.5rem 0 0 !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  display: block !important;
  border-left: 2px solid var(--tgr-border);
  padding-left: 0.625rem;
}

/* ================================================================
   INFLATION TOGGLE — hidden attribute safety net
   Ensures [hidden] elements are always display:none inside the
   plugin regardless of GeneratePress or page-builder overrides.
   Without this, GP's .entry-content can un-hide [hidden] elements.
================================================================ */
.tgr-root [hidden] {
  display: none !important;
}
/* Specificity fix: .tgr-field uses display:flex !important —
   a class selector beats an attribute selector when both carry
   !important, so we need a class+attribute rule to guarantee
   hidden wins for any tgr-field set to hidden at runtime. */
.tgr-root .tgr-field[hidden] {
  display: none !important;
}

/* ================================================================
   PRIMARY/SECONDARY CTA PILL BUTTONS — .zsr-tool-cta
   Shared class used across the calculator ecosystem.
   Scoped under .tgr-root to avoid global pollution.
================================================================ */
.tgr-root a.zsr-tool-cta,
.tgr-root a.zsr-tool-cta:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: fit-content;
  padding: 0.75rem 1.375rem;
  border: 1.5px solid #6366f1;
  border-radius: 999px;
  background: transparent;
  color: #6366f1;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tgr-root a.zsr-tool-cta:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #4f46e5;
  text-decoration: none;
}
.tgr-root a.zsr-tool-cta:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

/* CTA row wrapper — controls vertical spacing */
.tgr-root .tgr-cta-row {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* CTA block container */
.tgr-root .tgr-block--cta {
  padding-top: 0;
  padding-bottom: 0;
}

/* Mobile: full-width buttons under 480px */
@media (max-width: 480px) {
  .tgr-root a.zsr-tool-cta {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}

/* ================================================================
   OFFICIAL SOURCES — 3-card grid
================================================================ */
.tgr-root .tgr-quellen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (max-width: 700px) {
  .tgr-root .tgr-quellen-grid {
    grid-template-columns: 1fr;
  }
}
.tgr-root .tgr-quellen-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--tgr-border, #e2e8f0);
  border-radius: var(--tgr-radius, 10px);
  background: var(--tgr-surface-2, #f8fafc);
}
.tgr-root .tgr-quellen-card__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--tgr-text, #0f172a);
}
.tgr-root .tgr-quellen-card__desc {
  font-size: 0.8125rem;
  color: var(--tgr-text-muted, #64748b);
  flex: 1;
}
.tgr-root .tgr-quellen-card__link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tgr-accent, #6366f1);
  text-decoration: none;
  margin-top: 0.25rem;
}
.tgr-root .tgr-quellen-card__link:hover {
  text-decoration: underline;
}
