:root {
  --bg: #f7f3ea;
  --card: #ffffff;
  --ink: #17262a;
  --muted: #5b6a6e;
  --line: #e3ddcf;
  --brand: #0e5a5f;
  --brand-soft: #e3f1ef;
  --accent: #f0962b;
  --accent-ink: #2a1803;
  --good: #1f9d6b;
  --bad: #c9503c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 38, 42, .06), 0 6px 20px rgba(23, 38, 42, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1719;
    --card: #182224;
    --ink: #e9efee;
    --muted: #9db0b2;
    --line: #2a393c;
    --brand: #4fc3c1;
    --brand-soft: #1c3335;
    --accent: #f5a94a;
    --good: #45c08c;
    --bad: #e37662;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; position: relative; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; }

/* Ladebalken */
.loader { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 20; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0; }
body.busy .loader { opacity: 1; animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { transform: scaleX(0); } 60% { transform: scaleX(.8); } 100% { transform: scaleX(1); opacity: 0; } }

/* Kopf */
.hero { position: relative; overflow: hidden; color: #fff; padding: 22px 0 70px;
  background: radial-gradient(900px 420px at 88% -10%, rgba(240, 150, 43, .55), transparent 60%), linear-gradient(155deg, #083f44 0%, #0e5a5f 50%, #1a8377 100%); }
.hero .sun { position: absolute; right: -90px; top: -130px; width: 420px; pointer-events: none; }
.hero .sun circle { fill: rgba(255, 214, 140, .22); }
.hero .sun .ring { fill: none; stroke: rgba(255, 214, 140, .18); stroke-width: 1.5; }
.hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 44px; display: block; }
.hero .wave path { fill: var(--bg); }
.eyebrow { margin: 18px 0 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 800; max-width: 18ch; }
.hero h1 .sub { display: block; font-size: .5em; font-weight: 600; opacity: .85; margin-top: 4px; }
.lead { margin: 0 0 22px; opacity: .92; max-width: 56ch; font-size: 1.05rem; }

.status { display: flex; flex-wrap: wrap; gap: 8px; min-height: 26px; }
.chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(4px); }
.chip.warn { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.search { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); background: var(--card); color: var(--ink); padding: 18px; border-radius: 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); }
.search label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.search .check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 11px; text-transform: none; font-weight: 400; font-size: .9rem; letter-spacing: 0; }
.search .primary { grid-column: 1 / -1; padding: 12px 20px; font-size: 1rem; }
@media (min-width: 860px) {
  .search { grid-template-columns: 96px 96px 1fr 1fr auto auto; align-items: end; }
  .search .primary { grid-column: auto; }
}

input, select, button { font: inherit; }
input[type="date"], input[type="month"], input[type="number"], input:not([type]) {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
input[name="origin"], input[name="destination"] { text-transform: uppercase; font-weight: 700; letter-spacing: .08em; font-size: 1.05rem; }

button { cursor: pointer; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 500;
  transition: transform .08s, border-color .15s, background .15s, box-shadow .15s; }
button:hover:not(:disabled) { border-color: var(--brand); box-shadow: var(--shadow); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: progress; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
button.primary:hover:not(:disabled) { border-color: var(--accent); filter: brightness(1.05); }
button.small { padding: 5px 12px; font-size: .85rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips button { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .9rem; }
.chips button:hover:not(:disabled) { background: rgba(255, 255, 255, .24); border-color: #fff; box-shadow: none; }
.chips button[aria-pressed="true"] { background: #fff; color: #083f44; border-color: #fff; font-weight: 600; }

/* Reiter */
.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; margin: 0 auto; max-width: 1080px; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 1px solid transparent; border-radius: 999px; background: none; white-space: nowrap; color: var(--muted); padding: 7px 14px; }
.tabs button:hover:not(:disabled) { background: var(--brand-soft); color: var(--ink); border-color: transparent; box-shadow: none; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .tabs button[aria-selected="true"] { color: #06282a; } }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .72rem; text-align: center; }

/* Inhalt */
.panel { padding: 18px 0 8px; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.panel h2 { margin: 0 0 8px; font-size: 1.45rem; }
.panel h3 { margin: 26px 0 10px; font-size: 1.08rem; }
.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 12px; max-width: 75ch; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.message { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 14%, var(--card)); border: 1px solid var(--bad); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }

.steps { display: grid; gap: 12px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 18px; }
.step .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.step h3 { margin: 10px 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }

.offers { display: grid; gap: 10px; }
.offer { display: grid; grid-template-columns: 44px 1fr auto; gap: 6px 14px; align-items: center; transition: border-color .15s, transform .15s; }
.offer:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); transform: translateY(-1px); }
.offer.best { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.offer .air { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; letter-spacing: .04em; }
.offer .info strong { margin-right: 8px; }
.offer .price { font-size: 1.45rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.1; }
.offer .price small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); }
.offer .meta, .meta { color: var(--muted); font-size: .88rem; }
.offer .actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.offer .actions:empty { display: none; }
@media (max-width: 520px) { .offer .actions { grid-column: 1 / -1; } }

.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); margin-right: 6px; vertical-align: 1px; }
.tag.live { border-color: var(--good); color: var(--good); }
.tag.best { background: var(--good); border-color: var(--good); color: #fff; }
.links a { display: inline-block; margin: 0 8px 8px 0; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.links a:hover { border-color: var(--brand); }
td.links a { margin-bottom: 0; padding: 2px 10px; font-size: .82rem; }

/* Tabellen */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
th { color: var(--muted); font-weight: 600; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; background: color-mix(in srgb, var(--bg) 60%, var(--card)); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.good { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); }

.markets { display: flex; flex-wrap: wrap; gap: 8px; }
.markets label { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .9rem; cursor: pointer; }
.markets label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; max-width: 760px; }
.cal .head { text-align: center; font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.cal button { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border: 0; border-radius: 10px; color: #0d1f1b; box-shadow: none;
  background: color-mix(in oklab, #f0a08e calc(var(--t) * 100%), #7fd6ae); }
.cal button:hover:not(:disabled) { box-shadow: 0 0 0 2px var(--ink); }
.cal button b { font-size: .76rem; font-weight: 500; opacity: .75; }
.cal button span { font-size: .84rem; font-weight: 700; }
.cal .empty { background: color-mix(in srgb, var(--line) 50%, transparent); color: var(--muted); opacity: .6; }
.legend { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .82rem; color: var(--muted); max-width: 360px; }
.legend i { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #7fd6ae, #f0a08e); }

.bars { display: grid; gap: 8px; max-width: 560px; }
.bar { display: grid; grid-template-columns: 30px 1fr 84px; gap: 10px; align-items: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.bar i { display: block; height: 16px; border-radius: 5px; background: color-mix(in srgb, var(--brand) 55%, var(--brand-soft)); }
.bar.best i { background: var(--good); }
.bar.best span { font-weight: 700; }

svg.chart { width: 100%; max-width: 760px; height: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
svg.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .band { fill: var(--good); opacity: .14; }
svg.chart text { fill: var(--muted); font-size: 11px; }

form.inline { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
form.inline label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--muted); }
@media (min-width: 860px) { form.inline { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* Ratgeber */
details { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0 16px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
details[open] { padding-bottom: 14px; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }
article.guide { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.guide h4 { margin: 16px 0 4px; font-size: .95rem; color: var(--brand); }
.guide ul { margin: 4px 0; padding-left: 20px; }
.guide li { margin-bottom: 5px; }
.guide li::marker { color: var(--accent); }
.guide p { margin: 4px 0; max-width: 75ch; }

.foot { color: var(--muted); font-size: .82rem; padding-top: 28px; padding-bottom: 36px; border-top: 1px solid var(--line); margin-top: 32px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
