/* delaycheck.eu – Stylesheet. Keine externen Ressourcen. Logische Eigenschaften für RTL. */
:root {
  --ink: #1f2a33;
  --ink-2: #4a5963;
  --paper: #f1f4f5;
  --surface: #ffffff;
  --line: #c7d0d6;
  --sign: #ffc400;
  --sign-soft: #fff3c2;
  --grey-sign: #dde3e7;
  --gate: #0a58a8;
  --ok: #17663f;
  --warn: #7f4d00;
  --no: #a32219;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, "Noto Sans", Arial, sans-serif;
  --font-ar: "Noto Sans Arabic", "Segoe UI", "Geeza Pro", "Arabic UI Text", Tahoma, system-ui, sans-serif;
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.1rem, 1.4rem + 3vw, 3.15rem);
  --space: clamp(1rem, .7rem + 1.2vw, 1.6rem);
  --measure: 66ch;
}

*, *::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(--gate); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gate); 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(--sign); color: var(--ink); padding: .6rem 1rem; z-index: 10; font-weight: 700; }
.skip:focus { top: .5rem; }

/* ---------- Kopfzeile als Wegweiser-Leiste ---------- */
.site-head { background: var(--ink); 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; letter-spacing: -.01em; }
.brand-mark { width: 2.25rem; height: 2.25rem; background: var(--sign); border-radius: var(--r-sign, 3px); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 1.45rem; height: 1.45rem; }
.brand-tld { color: #a9b8c2; font-weight: 400; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-inline-start: auto; }
.site-nav a, .lang a { color: #dfe7ec; text-decoration: none; font-size: var(--step--1); padding-block: .35rem; }
.site-nav a:hover, .lang a:hover { color: #fff; text-decoration: underline; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--sign); }
.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 #4b5b66; border-radius: 4px; 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: #2d3d49; }
.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: 6px; box-shadow: 0 10px 24px rgba(31, 42, 51, .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(--sign-soft); }
.lang li a[aria-current="true"] { font-weight: 700; box-shadow: inset 3px 0 0 var(--sign); background: var(--paper); }
[dir="rtl"] .lang li a[aria-current="true"] { box-shadow: inset -3px 0 0 var(--sign); }
@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, 3.25rem) 1.25rem; }
.intro h1 { font-size: var(--step-4); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .75rem; max-width: 24ch; font-weight: 750; }
html[lang="ar"] .intro h1 { letter-spacing: 0; line-height: 1.3; }
.intro p { margin: 0; max-width: 58ch; color: var(--ink-2); font-size: var(--step-1); line-height: 1.45; }

/* ---------- Rechner ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; padding-block-end: 3rem; }
@media (max-width: 860px) { .tool { grid-template-columns: 1fr; } }
.check { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1rem, .6rem + 1.5vw, 1.75rem); }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step + .step { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.step > legend { float: inline-start; width: 100%; display: flex; align-items: center; gap: .7rem; font-size: var(--step-1); font-weight: 700; padding: 0; margin-bottom: 1rem; }
.step-no { width: 1.9rem; height: 1.9rem; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--sign); font-weight: 800; font-size: 1rem; border-radius: 3px; }
.step > legend + * { clear: both; }
.field { margin-bottom: 1.1rem; position: relative; }
.step > .field:last-child, .step > div:last-child > .field:last-child { margin-bottom: 0; }
fieldset.field { border: 0; padding: 0; min-width: 0; margin-inline: 0; margin-top: 0; }
legend.label { padding: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 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="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #8796a0; border-radius: 6px; padding: .62rem .75rem; min-height: 2.9rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"], .choices[aria-invalid="true"] { border-color: var(--no); box-shadow: 0 0 0 1px var(--no); }
.dur { display: flex; gap: .6rem; align-items: center; }
.dur input { width: 6.5rem; }
.dur span { color: var(--ink-2); }

/* Auswahl-Kacheln */
.choices { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); border: 0; padding: 0; margin: 0; border-radius: 6px; }
@media (max-width: 340px) { .choices { grid-template-columns: 1fr; } }
.choices.compact { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: block; border: 1.5px solid #8796a0; border-radius: 6px; padding: .65rem .8rem; background: #fff; font-weight: 600; line-height: 1.3; height: 100%; }
.choice small { display: block; font-weight: 400; color: var(--ink-2); margin-top: .2rem; font-size: var(--step--1); }
.choice input:hover + span { border-color: var(--ink); }
.choice input:checked + span { border: 2px solid var(--ink); background: var(--sign-soft); padding: calc(.65rem - .5px) calc(.8rem - .5px); }
.choice input:focus-visible + span { outline: 3px solid var(--gate); outline-offset: 2px; }

/* Flughafen-Suche (Combobox) */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; max-height: 19rem; overflow-y: auto; box-shadow: 0 10px 24px rgba(31, 42, 51, .18); }
.combo-list li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .6rem; align-items: center; padding: .5rem .5rem; border-radius: 4px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--sign-soft); }
.combo-list .code { background: var(--ink); color: #fff; font-weight: 700; text-align: center; border-radius: 3px; padding: .15rem 0; letter-spacing: .04em; direction: ltr; }
.combo-list .place { line-height: 1.3; }
.combo-list .place small { display: block; color: var(--ink-2); font-size: var(--step--1); }
.combo-list .empty { display: block; color: var(--ink-2); cursor: default; }
.combo-list .empty:hover { background: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; border-radius: 6px; padding: .8rem 1.35rem; min-height: 3rem; cursor: pointer; text-decoration: none; border: 2px solid var(--ink); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2d3d49; }
.btn-secondary { background: #fff; color: var(--ink); }
.btn-secondary:hover { background: var(--sign-soft); }
.actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.actions .hint { margin: 0; }

.error-summary { border: 2px solid var(--no); border-radius: 6px; padding: .8rem 1rem; margin-bottom: 1.25rem; background: #fff5f4; }
.error-summary h2 { font-size: var(--step-0); margin: 0 0 .35rem; color: var(--no); }
.error-summary ul { margin: 0; padding-inline-start: 1.2rem; }
.field-error { color: var(--no); font-weight: 600; font-size: var(--step--1); margin-top: .3rem; display: block; }

/* ---------- Ergebnis als Wegweisertafel ---------- */
.result { position: sticky; top: 1rem; }
@media (max-width: 860px) { .result { position: static; } }
.sign { background: var(--sign); color: var(--ink); border-radius: 3px; padding: 1.1rem 1.25rem 1.25rem; transform-origin: top center; }
.sign.is-grey { background: var(--grey-sign); }
.sign.is-empty { background: transparent; border: 2px dashed #8796a0; }
.sign-top { display: flex; align-items: center; gap: .75rem; }
.pict { width: 2.6rem; height: 2.6rem; flex: none; background: var(--ink); border-radius: 3px; display: grid; place-items: center; }
.pict svg { width: 1.6rem; height: 1.6rem; }
.sign h2 { margin: 0; font-size: var(--step-1); line-height: 1.2; }
.sign .lead { margin: .6rem 0 0; }
.amount { margin: 1rem 0 0; font-size: clamp(2.6rem, 2rem + 2.5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
html[lang="ar"] .amount { letter-spacing: 0; }
.amount-sub { margin: .35rem 0 0; font-weight: 600; }
.sign-rule { border: 0; border-top: 3px solid var(--ink); margin: 1rem 0 .8rem; }
.sign .meta { margin: 0; font-size: var(--step--1); }
@media (prefers-reduced-motion: no-preference) {
  .sign.is-updated { animation: flap .42s cubic-bezier(.2, .8, .25, 1); }
  @keyframes flap { from { transform: perspective(700px) rotateX(-78deg); opacity: .35; } to { transform: none; opacity: 1; } }
}
.result-body { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: 1rem 1.25rem 1.25rem; }
.result-body h3 { font-size: var(--step-0); margin: 0 0 .5rem; }
.checks { list-style: none; margin: 0 0 1rem; padding: 0; }
.checks li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .55rem; padding-block: .45rem; border-bottom: 1px solid #e3e8eb; font-size: .97rem; line-height: 1.45; }
.checks li:last-child { border-bottom: 0; }
.checks .ico { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; margin-top: .1rem; }
.checks .ico svg { width: .85rem; height: .85rem; }
.ico-ok { background: var(--ok); } .ico-no { background: var(--no); } .ico-unclear { background: var(--warn); } .ico-info, .ico-out { background: var(--ink-2); }
.notes { margin: 0 0 1rem; padding: .75rem .9rem; background: var(--paper); border-inline-start: 4px solid var(--ink); font-size: .95rem; }
.notes p { margin: 0 0 .45rem; } .notes p:last-child { margin: 0; }
.result-actions { display: grid; gap: .6rem; }
.fineprint { font-size: var(--step--1); color: var(--ink-2); margin: .9rem 0 0; }

/* ---------- 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-size: var(--step-3); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6rem; max-width: 26ch; }
html[lang="ar"] .band h2 { letter-spacing: 0; line-height: 1.35; }
.band > .wrap > p.sub { margin: 0 0 2rem; color: var(--ink-2); max-width: 60ch; font-size: var(--step-1); line-height: 1.45; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } }
.way { padding: 1.25rem 1.5rem 1.5rem; border-top: 5px solid var(--ink); }
.way + .way { border-inline-start: 1px solid var(--line); }
@media (max-width: 860px) { .way + .way { border-inline-start: 0; margin-top: 1.5rem; } }
.way.paid { border-top-color: #8796a0; }
.cost { display: inline-block; font-size: var(--step--1); font-weight: 700; padding: .15rem .55rem; border-radius: 3px; background: var(--sign); margin-bottom: .6rem; }
.way.paid .cost { background: var(--grey-sign); }
.way h3 { font-size: var(--step-1); margin: 0 0 .5rem; line-height: 1.25; }
.way p { margin: 0 0 .8rem; }
.way ul { margin: 0 0 1rem; padding-inline-start: 1.1rem; }
.provider { border: 1px solid var(--line); border-radius: 6px; padding: .8rem .9rem; margin-bottom: .7rem; background: var(--surface); }
.provider h4 { margin: 0 0 .25rem; font-size: 1.02rem; }
.provider p { margin: 0 0 .45rem; font-size: .95rem; }
.ad-label { font-size: .8rem; color: var(--ink-2); }
.neutral { margin-top: 1.5rem; font-size: .95rem; color: var(--ink-2); max-width: 70ch; }

.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; }
.faq details[open] summary::after { content: "−"; }
.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 h1 { font-size: var(--step-4); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; }
html[lang="ar"] .prose h1 { letter-spacing: 0; line-height: 1.35; }
.prose h2 { font-size: var(--step-2); line-height: 1.2; margin: 2.5rem 0 .6rem; }
.prose h3 { font-size: var(--step-1); margin: 1.75rem 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(--ink); color: #fff; font-weight: 600; }
.prose td strong { white-space: nowrap; }
.callout { background: var(--sign-soft); border-inline-start: 5px solid var(--sign); padding: .9rem 1.1rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }
.placeholder { background: #ffe2de; outline: 2px dashed var(--no); padding: 0 .2rem; }
.meta-line { color: var(--ink-2); font-size: var(--step--1); }

/* Musterbrief */
.prose.wide { max-width: none; }
.prose.wide > .lead { max-width: var(--measure); }
.letter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .letter-grid { grid-template-columns: 1fr; } }
.letter-out textarea { min-height: 34rem; font-size: .95rem; line-height: 1.5; direction: ltr; text-align: left; }
.status-msg { font-weight: 600; color: var(--ok); min-height: 1.5em; margin: .5rem 0 0; }

/* ---------- Fußzeile ---------- */
.site-foot { background: var(--ink); color: #cfd9df; 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; }

/* ---------- Cookie-Einwilligung (nur aktiv, wenn Dienste konfiguriert sind) ----------
   Gestaltet wie ein Hinweisschild am Gate: dunkle Tafel, gelbe Kante. Akzeptieren und Ablehnen gleich gewichtet. */
.site-foot .foot-links .linkbtn { font: inherit; color: #fff; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; text-align: start; }
.site-foot .foot-links .linkbtn:hover { text-decoration-thickness: 2px; }
.consent { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--ink); color: #eef3f6; border-top: 6px solid var(--sign); box-shadow: 0 -2px 0 rgba(0, 0, 0, .25); max-height: 85vh; overflow-y: auto; }
.consent-inner { width: min(72rem, 100% - 2 * var(--space)); margin-inline: auto; padding-block: 1rem 1.1rem; display: grid; gap: .6rem; }
.consent h2 { margin: 0; font-size: var(--step-1); color: #fff; line-height: 1.25; }
.consent h2:focus { outline: 3px solid var(--sign); outline-offset: 3px; }
.consent-text { margin: 0; max-width: 78ch; font-size: var(--step--1); }
.consent a { color: #fff; }
.consent :focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .2rem; }
.consent .consent-btn { background: var(--sign); color: var(--ink); border-color: var(--sign); min-width: 11rem; min-height: 2.8rem; padding-block: .6rem; }
.consent .consent-btn:hover { background: #ffd54d; border-color: #ffd54d; }
.consent-link { font: inherit; font-size: var(--step--1); font-weight: 600; color: #fff; background: none; border: 0; padding: .5rem .2rem; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; min-height: 2.8rem; }
.consent-cats { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .5rem; }
.consent-cats li { border: 1px solid #4b5b66; border-radius: 6px; padding: .55rem .75rem; display: grid; gap: .15rem; }
.consent-check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.consent-check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--sign); flex: none; }
.consent-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.consent-always { color: #a9b8c2; font-size: var(--step--1); }
.consent-names { color: #fff; font-size: var(--step--1); font-weight: 600; }
.consent-desc { color: #cfd9df; font-size: var(--step--1); }
@media (max-width: 560px) { .consent .consent-btn { flex: 1 1 100%; } }
.prose .consent-services th { width: 34%; }
.prose .consent-services td { overflow-wrap: anywhere; }

@media print {
  .site-head, .site-foot, .check, .result-actions, .skip, .consent { display: none !important; }
  body { background: #fff; }
}
