/* ============================================================
   Aktivrente-Rechner — Design System 2026
   ============================================================ */

:root {
  /* Light theme */
  --bg:            #F4F7FA;
  --bg-alt:        #FFFFFF;
  --surface:       #FFFFFF;
  --surface-alt:   #F8FAFC;
  --text:          #0F1E2E;
  --text-soft:     #4A5B6D;
  --text-mute:     #78889A;
  --line:          #E3E9EF;
  --line-strong:   #CBD5E0;
  --accent:        #0E5C42;
  --accent-hover:  #0A4631;
  --accent-soft:   #E6F4EE;
  --amber:         #E89A2A;
  --amber-soft:    #FDF3E1;
  --link:          #0A4F9C;
  --header-bg:     #0F1E2E;
  --header-text:   #FFFFFF;
  --warn-bg:       #FEF3D7;
  --warn-line:     #E89A2A;
  --success:       #0E5C42;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(15,30,46,.04);
  --shadow-sm: 0 1px 3px rgba(15,30,46,.06), 0 1px 2px rgba(15,30,46,.04);
  --shadow-md: 0 4px 12px rgba(15,30,46,.07), 0 2px 4px rgba(15,30,46,.04);
  --shadow-lg: 0 12px 28px rgba(15,30,46,.10), 0 4px 8px rgba(15,30,46,.04);
  --shadow-xl: 0 24px 48px rgba(15,30,46,.14);

  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --transition: .2s cubic-bezier(.4,0,.2,1);

  font-size: 18px;
}

[data-theme="dark"] {
  --bg:            #0A121C;
  --bg-alt:        #0E1926;
  --surface:       #121F30;
  --surface-alt:   #16263A;
  --text:          #EAF1F8;
  --text-soft:     #B8C5D2;
  --text-mute:     #8296AC;
  --line:          #22334A;
  --line-strong:   #33475F;
  --accent:        #5FD3A8;
  --accent-hover:  #7FE0BA;
  --accent-soft:   #122E24;
  --amber:         #F2B04F;
  --amber-soft:    #2E2412;
  --link:          #8FC6FF;
  --header-bg:     #060C15;
  --header-text:   #FFFFFF;
  --warn-bg:       #2E2412;
  --warn-line:     #F2B04F;
  --success:       #5FD3A8;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.25);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.20);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.20);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.45), 0 4px 8px rgba(0,0,0,.25);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.01em;
  margin: 1.7em 0 .55em;
  color: var(--text);
}
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.6rem); }
h3 { font-size: 1.15rem; }

p  { margin: 0 0 1em; }
ul, ol { padding-left: 1.35rem; margin: 0 0 1em; }
li { margin: .4rem 0; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: .8rem 1.2rem;
  z-index: 100;
  border-radius: var(--radius-sm);
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.txt { max-width: 72ch; }

/* ============================================================
   Header
   ============================================================ */

header.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, var(--shadow-md);
}

.bar-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .5rem 1.25rem;
}

.logo {
  font: 700 1.22rem var(--font-serif);
  color: #fff;
  text-decoration: none;
  min-height: 52px;
  display: flex;
  align-items: center;
  letter-spacing: -.01em;
}
.logo b { color: var(--amber); font-weight: 700; }

nav {
  display: flex;
  flex: 1 1 100%;
  order: 3;
  overflow-x: auto;
  scrollbar-width: none;
  gap: .1rem;
}
nav::-webkit-scrollbar { display: none; }
@media (min-width: 820px) {
  nav { flex: 1; order: 0; justify-content: center; }
}

nav a {
  color: #D5E0EB;
  text-decoration: none;
  padding: 0 .9rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 500;
  font-size: .98rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
nav a:hover { color: #fff; border-bottom-color: var(--amber); }

.ctl { display: flex; gap: .5rem; }
.ctl button {
  min-width: 52px;
  min-height: 52px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: #fff;
  font: 700 .95rem var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
}
.ctl button:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.5);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0A1D33 0%, #0F3A62 45%, #0B5A48 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 2.6rem 2rem 2.2rem;
  margin: 1.4rem 0 1.6rem;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(255,255,255,.09), transparent 60%),
    radial-gradient(800px 300px at 10% 110%, rgba(242,165,65,.13), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { color: #fff; margin-bottom: .5rem; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.hero p { color: #DBE7F2; font-size: 1.12rem; max-width: 62ch; }
.hero .btn { background: var(--amber); border-color: var(--amber); color: #10263A; }
.hero .btn:hover { background: #F4B451; border-color: #F4B451; }
.hero .btn.sec {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.hero .btn.sec:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.hero .btn + .btn { margin-left: .5rem; }
@media (max-width: 520px) {
  .hero { padding: 1.8rem 1.25rem 1.6rem; border-radius: var(--radius-lg); }
  .hero .btn { width: 100%; margin: .35rem 0 !important; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
}
.chips li {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .92rem;
  margin: 0;
  color: #EAF2FA;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: 700 1rem var(--font-sans);
  text-decoration: none;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }
[data-theme="dark"] .btn { color: #06251A; }

.btn.sec {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn.sec:hover {
  background: var(--surface-alt);
  border-color: var(--text-mute);
  color: var(--text);
}

.btn.wa { background: #0E8B4D; border-color: #0E8B4D; color: #fff; }
.btn.wa:hover { background: #0B7440; border-color: #0B7440; }

/* ============================================================
   Cards, Grid, Stats
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
  margin: 1.2rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card h2 { margin-top: 0; font-size: 1.22rem; }
.card h3 { margin-top: 0; }

a.lk {
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  padding-top: 1.7rem;
  display: block;
}
a.lk::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber) 100%);
  transition: height var(--transition);
}
a.lk:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
a.lk:hover::before { height: 5px; }
a.lk h2 { color: var(--accent); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.3rem 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.stat b {
  display: block;
  font: 700 1.95rem/1.15 var(--font-serif);
  color: var(--accent);
  letter-spacing: -.02em;
  margin-bottom: .25rem;
}
.stat span { color: var(--text-soft); font-size: .95rem; }

/* ============================================================
   Forms
   ============================================================ */

label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 .35rem;
  font-size: .98rem;
  color: var(--text);
}

small, .hint {
  color: var(--text-mute);
  font-size: .88rem;
  font-weight: 400;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  min-height: 50px;
  font: inherit;
  padding: .65rem .85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  font-variant-numeric: tabular-nums;
}
input[type="number"]:hover,
input[type="text"]:hover,
select:hover { border-color: var(--text-mute); }
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.chk {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-weight: 600;
  margin-top: 1.1rem;
  cursor: pointer;
  min-height: 52px;
  padding: .6rem .8rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.chk:hover { background: var(--surface-alt); }
.chk input {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: .15rem;
  accent-color: var(--accent);
  cursor: pointer;
}

details.adv {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: .4rem;
}
details.adv summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 52px;
  display: flex;
  align-items: center;
  color: var(--link);
  list-style: none;
  gap: .4rem;
}
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::before {
  content: "▸";
  display: inline-block;
  transition: transform var(--transition);
  color: var(--text-mute);
  font-size: 1.1rem;
}
details.adv[open] summary::before { transform: rotate(90deg); }

/* ============================================================
   Calculator result
   ============================================================ */

.big {
  font: 700 clamp(2.4rem, 8vw, 3.4rem)/1.05 var(--font-serif);
  color: var(--accent);
  margin: .35rem 0 .5rem;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 28px;
  border-radius: 14px;
  background: var(--line);
  overflow: hidden;
  display: flex;
  margin: 1rem 0 .5rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.bar i { display: block; height: 100%; transition: width .45s cubic-bezier(.4,0,.2,1); }
.bar .f { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%); }
.bar .t { background: linear-gradient(180deg, var(--amber) 0%, #D6841A 100%); }

.leg {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .9rem;
  color: var(--text-soft);
  flex-wrap: wrap;
}

.warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-line);
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: .95rem;
}

.note {
  font-size: .88rem;
  color: var(--text-mute);
  margin-top: .9rem;
  line-height: 1.55;
}

/* ============================================================
   Tables
   ============================================================ */

.scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  background: var(--surface);
}
th, td {
  text-align: left;
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text);
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
td.n, th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tbody tr:nth-child(even) td { background: var(--surface-alt); }
tbody tr:last-child td { border-bottom: none; }
tr.s td {
  font-weight: 700;
  background: var(--accent-soft) !important;
  color: var(--text);
}

/* ============================================================
   FAQ
   ============================================================ */

details.faq {
  border-bottom: 1px solid var(--line);
  padding: .3rem 0;
}
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary {
  min-height: 52px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: var(--text);
  list-style: none;
  gap: .6rem;
  transition: color var(--transition);
}
details.faq summary:hover { color: var(--accent); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  flex: none;
  transition: transform var(--transition);
}
details.faq[open] summary::before {
  content: "−";
  transform: rotate(180deg);
}
details.faq p {
  color: var(--text-soft);
  padding-left: 2.4rem;
  margin-bottom: .8rem;
}

/* ============================================================
   Meta / breadcrumbs
   ============================================================ */

.crumb { font-size: .9rem; color: var(--text-mute); margin: 1rem 0 0; }
.crumb a { color: var(--text-mute); }
.crumb a:hover { color: var(--link); }

.meta {
  font-size: .92rem;
  color: var(--text-soft);
  border-left: 4px solid var(--accent);
  padding: .15rem 0 .15rem .9rem;
  margin: 1.1rem 0;
  line-height: 1.6;
}
.meta strong { color: var(--text); }

/* ============================================================
   Contact
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

/* ============================================================
   Ads
   ============================================================ */

.ad {
  min-height: 0;
  margin: 1.2rem auto;
  max-width: 1120px;
  text-align: center;
  padding: 0 1.25rem;
}
body.ads-on .ad-hero    { min-height: 130px; }
body.ads-on .ad-article { min-height: 280px; }
body.ads-on .ad-footer  { min-height: 130px; }
body.ads-on .ad {
  background: var(--surface-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  margin-top: 3.5rem;
  background: var(--header-bg);
  color: #B9C7D5;
  padding: 2rem 0 1.2rem;
  font-size: .93rem;
}
footer a,
footer .lnk {
  color: #fff;
  margin-right: 1.1rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  transition: color var(--transition);
}
footer a:hover { color: var(--amber); text-decoration: underline; }

.lnk {
  background: none;
  border: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  color: inherit;
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.6rem;
  padding-bottom: 1rem;
}
.fgrid h3 {
  font: 600 .82rem var(--font-sans);
  color: #fff;
  margin: 0 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
}
.fb {
  font: 700 1.25rem var(--font-serif);
  color: #fff;
  margin: 0 0 .4rem;
}
.fb b { color: var(--amber); }
.fine {
  border-top: 1px solid #2F4359;
  padding-top: 1rem;
  margin-top: 1rem;
  color: #94A6B9;
  font-size: .88rem;
}

/* ============================================================
   Consent modal
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6,14,22,.78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn .25s ease;
}
.modal[hidden] { display: none; }
.modal .card {
  max-width: 580px;
  width: 100%;
  margin: 0;
  box-shadow: var(--shadow-xl);
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.1rem;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   Misc
   ============================================================ */

main { padding-bottom: 1.5rem; }
article.txt h2 { scroll-margin-top: 100px; }

@media (max-width: 560px) {
  :root { font-size: 17.5px; }
  .card { padding: 1.2rem; }
  .stat { padding: 1.1rem 1.2rem; }
  .stat b { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
html[lang="de"] .t-en { display: none !important; }
html[lang="en"] .t-de { display: none !important; }
/* Print */
@media print {
  header.top, footer, .ad, .modal, .ctl { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { background: #fff; color: #000; box-shadow: none; border: 1px solid #ccc; }
  .hero h1, .hero p { color: #000; }
  a { color: #000; }
}
/* Author box: added for E-E-A-T (byline + short credibility signal on articles) */
.author-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 28px;
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-box img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}
.author-box .a-name { font-weight: 700; color: var(--text); }
.author-box .a-role { font-size: .92rem; color: var(--text-mute); }
.author-box a { color: var(--link); }
