/* sendcheck.eu – Stylesheet. Keine externen Ressourcen: Schriften liegen selbst gehostet im
 * selben Ordner (Fraunces, Public Sans, SIL Open Font License 1.1, auf Latein + Latein-Erweitert
 * zugeschnitten). Kein Abruf bei Google Fonts, damit keine IP-Adressen an Dritte gehen. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("public-sans.woff2") format("woff2");
}

:root {
  --paper: #efece2;
  --paper-deep: #e2ddc9;
  --surface: #fbfaf4;
  --ink: #17231c;
  --ink-2: #4c5a4f;
  --line: #c6bfa6;
  --ledger: #1e4b3a;
  --ledger-deep: #123128;
  --gold: #8a6a22;
  --gold-soft: #f1e6c6;
  --stamp: #a23a2b;
  --bad-bg: #fbeee9;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-ar: "Noto Sans Arabic", "Segoe UI", "Geeza Pro", "Arabic UI Text", Tahoma, system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.28rem;
  --step-2: 1.6rem;
  --step-3: 2rem;
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.1rem);
  --space: clamp(1rem, .7rem + 1.2vw, 1.6rem);
  --measure: 65ch;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ledger); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ledger); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(72rem, 100% - 2 * var(--space)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: .5rem; top: -4rem; background: var(--gold-soft); color: var(--ink); padding: .6rem 1rem; z-index: 10; font-weight: 700; border-radius: var(--r); }
.skip:focus { top: .5rem; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Kopfzeile ---------- */
.site-head { background: var(--ledger); color: #fff; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; min-height: 3.75rem; padding-block: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand-mark { width: 2.15rem; height: 2.15rem; background: var(--gold-soft); border-radius: 50%; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 1.3rem; height: 1.3rem; }
.brand-tld { color: #b9c9bf; font-weight: 400; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-inline-start: auto; }
.site-nav a { color: #dde7e1; text-decoration: none; font-size: var(--step--1); padding-block: .35rem; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--gold-soft); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-size: var(--step--1); font-weight: 600; padding: .45rem .7rem; border: 1px solid #3f6656; border-radius: var(--r); min-height: 2.4rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 1.05rem; height: 1.05rem; flex: none; }
.lang summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-inline-start: .15rem; }
.lang details[open] summary { background: var(--ledger-deep); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: .35rem; min-width: 12rem; background: #fff; border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 0 10px 24px rgba(23, 35, 28, .22); }
.lang li a { display: block; color: var(--ink); text-decoration: none; padding: .5rem .7rem; border-radius: 4px; font-size: .97rem; }
.lang li a:hover { background: var(--gold-soft); }
.lang li a[aria-current="true"] { font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); background: var(--paper); }
[dir="rtl"] .lang li a[aria-current="true"] { box-shadow: inset -3px 0 0 var(--gold); }
@media (max-width: 760px) {
  .site-head .wrap { gap: 0 1rem; padding-block: .45rem 0; }
  .lang { margin-inline-start: auto; }
  .site-nav { order: 3; width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem; padding-block: .15rem .1rem; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; padding-block: .55rem; }
}

/* ---------- Einstieg ---------- */
.intro { padding-block: clamp(1.75rem, 1rem + 3vw, 3rem) 1.1rem; }
.intro h1 { font-family: var(--font-display); font-size: var(--step-4); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .7rem; max-width: 18ch; font-weight: 600; color: var(--ledger-deep); }
html[lang="ar"] .intro h1 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.35; font-weight: 800; }
.intro p { margin: 0; max-width: 56ch; color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }

/* ---------- Rechner: "Kontoblatt" ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; padding-block-end: 3rem; }
@media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }
.ledger-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); position: relative; }
.ledger-sheet::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 2.6rem; width: 1px; background: rgba(162, 58, 43, .15); display: none; }
@media (min-width: 560px) { .ledger-sheet::before { display: block; } }
.ledger-sheet-in { padding: clamp(1rem, .6rem + 1.4vw, 1.75rem); }
.step + .step { margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step > legend { display: flex; align-items: center; gap: .65rem; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; padding: 0; margin-bottom: 1rem; color: var(--ledger-deep); width: 100%; }
.step-no { width: 1.8rem; height: 1.8rem; flex: none; display: grid; place-items: center; background: var(--ledger); color: #fff; font-family: var(--font); font-weight: 800; font-size: .95rem; border-radius: 50%; }
.step > legend + * { clear: both; }
.field { margin-bottom: 1.05rem; position: relative; }
.step > .field:last-child, .step > div:last-child > .field:last-child { margin-bottom: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0 1rem; }
label, .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.hint { display: block; font-size: var(--step--1); color: var(--ink-2); margin-top: .3rem; line-height: 1.45; }
input[type="text"], input[type="number"], select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #8f8768; border-radius: var(--r); padding: .6rem .75rem; min-height: 2.85rem;
  font-variant-numeric: tabular-nums;
}
input:hover, select:hover { border-color: var(--ink); }
[dir="rtl"] input[inputmode="decimal"] { direction: ltr; text-align: right; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--stamp); box-shadow: 0 0 0 1px var(--stamp); }
.field-error { color: var(--stamp); font-weight: 600; font-size: var(--step--1); margin-top: .3rem; display: block; }
.error-summary { border: 2px solid var(--stamp); border-radius: var(--r); padding: .8rem 1rem; margin-bottom: 1.2rem; background: var(--bad-bg); }
.error-summary h2 { font-size: var(--step-0); margin: 0 0 .35rem; color: var(--stamp); }
.error-summary ul { margin: 0; padding-inline-start: 1.2rem; }
.suffix-field { position: relative; }
.suffix-field .unit { position: absolute; inset-inline-end: .8rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: var(--step--1); pointer-events: none; }
.suffix-field input { padding-inline-end: 3.4rem; }

.rate-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; }
.rate-row .field { flex: 1 1 11rem; margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; border-radius: var(--r); padding: .7rem 1.2rem; min-height: 2.85rem; cursor: pointer; text-decoration: none; border: 2px solid var(--ledger); white-space: nowrap; }
.btn-primary { background: var(--ledger); color: #fff; }
.btn-primary:hover { background: var(--ledger-deep); border-color: var(--ledger-deep); }
.btn-secondary { background: #fff; color: var(--ledger); }
.btn-secondary:hover { background: var(--gold-soft); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; padding: .55rem .9rem; min-height: 2.5rem; font-size: var(--step--1); font-weight: 600; }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: progress; }
.rate-status { font-size: var(--step--1); color: var(--ink-2); margin-top: .4rem; min-height: 1.3em; }
.rate-status.is-ok { color: var(--ledger-deep); font-weight: 600; }
.rate-status.is-err { color: var(--stamp); }

.actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.actions .hint { margin: 0; }

/* ---------- Ergebnis: "Beleg" mit Stempel ---------- */
.result { position: sticky; top: 1rem; }
@media (max-width: 900px) { .result { position: static; } }
.receipt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem 1.3rem; position: relative; overflow: hidden; }
.receipt.is-empty { border: 2px dashed var(--line); background: transparent; }
.receipt-empty-icon { width: 2.4rem; height: 2.4rem; margin-bottom: .8rem; opacity: .55; }
.receipt h2 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; margin: 0 0 .3rem; color: var(--ledger-deep); }
html[lang="ar"] .receipt h2 { font-family: var(--font-ar); font-weight: 800; }
.receipt > p.lead { margin: 0 0 1.1rem; color: var(--ink-2); }
.stamp {
  position: absolute; top: 1.1rem; inset-inline-end: 1.1rem; width: 5.2rem; height: 5.2rem; border-radius: 50%;
  border: 3px solid var(--stamp); color: var(--stamp); display: grid; place-items: center; text-align: center;
  transform: rotate(-8deg); font-weight: 800; font-size: .78rem; line-height: 1.15; letter-spacing: .01em;
  background: rgba(162, 58, 43, .04);
}
[dir="rtl"] .stamp { transform: rotate(8deg); }
.stamp.is-good { border-color: var(--ledger); color: var(--ledger-deep); background: rgba(30, 75, 58, .05); }
.line-item { display: flex; align-items: baseline; gap: .5rem; padding-block: .4rem; }
.line-item .li-label { color: var(--ink-2); white-space: nowrap; }
.line-item .li-fill { flex: 1; border-bottom: 1px dotted var(--line); min-width: 1rem; margin-bottom: .3rem; }
.line-item .li-value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-item.is-total { border-top: 1px solid var(--ink); margin-top: .3rem; padding-top: .6rem; }
.line-item.is-total .li-value { color: var(--gold); font-size: 1.15em; }
.receipt .amount-big { font-family: var(--font-display); font-size: clamp(2.1rem, 1.7rem + 1.6vw, 2.8rem); font-weight: 600; color: var(--gold); margin: .3rem 0 0; line-height: 1.1; }
.receipt .amount-sub { margin: .2rem 0 1rem; color: var(--ink-2); font-size: var(--step--1); }
.receipt-rule { border: 0; border-top: 1px dashed var(--line); margin: 1rem 0; }
.receipt .fineprint { font-size: var(--step--1); color: var(--ink-2); margin: 1rem 0 0; }
.receipt-actions { margin-top: 1rem; }

/* ---------- Abschnitte ---------- */
.band { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem); border-top: 1px solid var(--line); }
.band.light { background: var(--surface); }
.band h2 { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; line-height: 1.18; margin: 0 0 .6rem; max-width: 24ch; color: var(--ledger-deep); }
html[lang="ar"] .band h2 { font-family: var(--font-ar); font-weight: 800; letter-spacing: 0; line-height: 1.35; }
.band > .wrap > p.sub { margin: 0 0 2rem; color: var(--ink-2); max-width: 58ch; font-size: var(--step-1); line-height: 1.45; }

/* Vergleichsliste im Kontobuch-Stil */
.ledger-table { border-top: 1px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: 1.4fr auto; gap: .2rem 1rem; padding: 1rem 0; border-bottom: 1px dashed var(--line); align-items: start; }
.ledger-row.is-best { background: linear-gradient(var(--gold-soft), var(--gold-soft)) padding-box; margin-inline: -1rem; padding-inline: 1rem; border-radius: var(--r); border-bottom-color: transparent; }
.ledger-row h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.badge-best { font-size: .72rem; font-weight: 800; background: var(--ledger); color: #fff; padding: .15rem .5rem; border-radius: 3px; }
.badge-cash { font-size: .72rem; font-weight: 700; border: 1px solid var(--ink-2); color: var(--ink-2); padding: .1rem .45rem; border-radius: 3px; }
.ledger-row p { margin: .3rem 0 0; color: var(--ink-2); font-size: .95rem; max-width: 46ch; }
.ledger-row .cost-col { text-align: end; }
.ledger-row .cost-amount { font-weight: 800; font-size: 1.25rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.ledger-row .cost-pct { display: block; color: var(--ink-2); font-size: var(--step--1); }
.ledger-row .cost-col a { display: inline-block; margin-top: .4rem; font-size: var(--step--1); font-weight: 700; }
.ad-label { font-size: .78rem; color: var(--ink-2); }
.example-note { margin: 1.4rem 0 0; font-size: var(--step--1); color: var(--ink-2); }
.neutral { margin-top: 1.4rem; font-size: .95rem; color: var(--ink-2); max-width: 70ch; }

/* Drei-Wege / Grundsätze */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } }
.way { padding: 0 1.5rem 0 0; }
.way + .way { border-inline-start: 1px solid var(--line); padding-inline-start: 1.5rem; }
@media (max-width: 860px) { .way + .way { border-inline-start: 0; padding-inline-start: 0; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); } }
.way .eyebrow { display: inline-block; font-weight: 700; color: var(--ledger-deep); border-bottom: 2px solid var(--gold); padding-bottom: .15rem; margin-bottom: .7rem; }
.way h3 { font-size: var(--step-1); margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 600; }
html[lang="ar"] .way h3 { font-family: var(--font-ar); font-weight: 800; }
.way p { margin: 0 0 .8rem; }
.way ul { margin: 0 0 .3rem; padding-inline-start: 1.1rem; }

/* Korridore */
.corridors { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.corridor { border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; background: var(--surface); }
.corridor h3 { margin: 0 0 .4rem; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ledger-deep); }
html[lang="ar"] .corridor h3 { font-family: var(--font-ar); font-weight: 800; }
.corridor p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2.2rem 1rem 0; font-weight: 700; position: relative; }
[dir="rtl"] .faq summary { padding: 1rem 0 1rem 2.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: .2rem; top: .75rem; font-size: 1.5rem; line-height: 1; font-weight: 400; color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: 1rem; }
.faq details p { margin: 0 0 .7rem; }

/* ---------- Textseiten ---------- */
.prose { max-width: var(--measure); padding-block: clamp(1.75rem, 1rem + 3vw, 3rem) 4rem; }
.prose.wide { max-width: none; }
.prose.wide > .lead { max-width: var(--measure); }
.prose h1 { font-family: var(--font-display); font-size: var(--step-4); font-weight: 600; line-height: 1.12; margin: 0 0 1rem; color: var(--ledger-deep); }
html[lang="ar"] .prose h1 { font-family: var(--font-ar); font-weight: 800; letter-spacing: 0; line-height: 1.35; }
.prose h2 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.22; margin: 2.4rem 0 .6rem; color: var(--ledger-deep); }
html[lang="ar"] .prose h2 { font-family: var(--font-ar); font-weight: 800; }
.prose h3 { font-size: var(--step-1); margin: 1.7rem 0 .4rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose .lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.45; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; background: var(--surface); }
.prose th, .prose td { text-align: start; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--ledger); color: #fff; font-weight: 600; }
.callout { background: var(--gold-soft); border-inline-start: 5px solid var(--gold); padding: .9rem 1.1rem; margin: 1.5rem 0; border-radius: 0 var(--r) var(--r) 0; }
[dir="rtl"] .callout { border-inline-start: 0; border-inline-end: 5px solid var(--gold); border-radius: var(--r) 0 0 var(--r); }
.callout p:last-child { margin-bottom: 0; }
.placeholder { background: var(--bad-bg); outline: 2px dashed var(--stamp); padding: 0 .2rem; }
.meta-line { color: var(--ink-2); font-size: var(--step--1); }

/* ---------- Fußzeile ---------- */
.site-foot { background: var(--ledger-deep); color: #cfe0d6; padding-block: 2.5rem; font-size: var(--step--1); }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem 3rem; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot p { margin: 0 0 .6rem; max-width: 70ch; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }

.hint.privacy-note { margin-top: .8rem; }
.fix-rate { margin-top: .45rem; }
