/* Verdienst Planer Hilfe. Nur lokale Ressourcen, Systemschrift. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #1b1f24;
  --muted: #5a6470;
  --line: #d9dee5;
  --accent: #1767a6;
  --accent-text: #ffffff;
  --accent-soft: #e3eef8;
  --chip-bg: #e7edf4;
  --chip-text: #1f3b57;
  --tipp: #1d7a46;   --tipp-bg: #e6f4ec;
  --warn: #a5460a;   --warn-bg: #fdeee2;
  --info: #1767a6;   --info-bg: #e5eff9;
  --wichtig: #8a1c1c; --wichtig-bg: #fbe9e9;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
  --radius: 12px;
  --header-h: 116px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111418;
    --surface: #1a1f25;
    --surface-2: #232a32;
    --text: #e8ecf0;
    --muted: #a3adb8;
    --line: #313a44;
    --accent: #6fb3ec;
    --accent-text: #0b1a27;
    --accent-soft: #1d3346;
    --chip-bg: #263544;
    --chip-text: #d6e6f5;
    --tipp: #6fd19a;   --tipp-bg: #15291e;
    --warn: #f2a46b;   --warn-bg: #2e2016;
    --info: #7dbcf0;   --info-bg: #16263a;
    --wichtig: #f08f8f; --wichtig-bg: #2e1818;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111418;
  --surface: #1a1f25;
  --surface-2: #232a32;
  --text: #e8ecf0;
  --muted: #a3adb8;
  --line: #313a44;
  --accent: #6fb3ec;
  --accent-text: #0b1a27;
  --accent-soft: #1d3346;
  --chip-bg: #263544;
  --chip-text: #d6e6f5;
  --tipp: #6fd19a;   --tipp-bg: #15291e;
  --warn: #f2a46b;   --warn-bg: #2e2016;
  --info: #7dbcf0;   --info-bg: #16263a;
  --wichtig: #f08f8f; --wichtig-bg: #2e1818;
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 30; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Kopf mit Suche */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 10px;
  box-shadow: var(--shadow);
}
.top-row, .search, .drawer { max-width: 720px; margin: 0 auto; }
.top-row { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.brand { font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; margin-right: auto; padding: 8px 4px; }
.icon-btn {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
}
.icon-btn:active { background: var(--surface-2); }
.pf-switch { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.pf-switch button {
  min-height: 38px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pf-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search { position: relative; margin-top: 6px; }
.search input {
  width: 100%; min-height: 48px; padding: 10px 46px 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
  font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 2px; top: 2px; }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 70vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.results a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.results a:last-child { border-bottom: 0; }
.results a[aria-selected="true"], .results a:active { background: var(--accent-soft); }
.results .r-title { font-weight: 650; display: block; }
.results .r-crumb { font-size: 14px; color: var(--muted); display: block; }
.results .r-text { font-size: 15px; color: var(--muted); display: block; margin-top: 2px; }
.results mark { background: transparent; color: var(--accent); font-weight: 700; }
.results .r-empty { padding: 14px; color: var(--muted); }
.r-pf { font-size: 12px; font-weight: 700; color: var(--accent); margin-left: 6px; text-transform: uppercase; letter-spacing: .03em; }
.drawer { display: grid; gap: 4px; padding-top: 8px; }
.drawer[hidden] { display: none; }
.drawer a {
  display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px;
  text-decoration: none; color: var(--text); background: var(--surface-2); font-weight: 600;
}
.drawer a[aria-current="page"] { background: var(--accent); color: var(--accent-text); }

.lang-note { max-width: 720px; margin: 12px auto 0; padding: 12px 16px; background: var(--info-bg); color: var(--text); border-radius: var(--radius); }
.lang-note[hidden] { display: none; }

/* Inhalt */
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 32px; }
.crumbs { font-size: 15px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; min-height: 24px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 8px; }
h2 { font-size: 23px; line-height: 1.25; margin: 34px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
h1 + .intro + h2, .intro + h2 { border-top: 0; }
h3 { font-size: 19px; line-height: 1.3; margin: 26px 0 6px; }
p, ul, ol { margin: 0 0 12px; }
ul, ol { padding-left: 24px; }
li { margin: 4px 0; }
.intro { font-size: 18px; color: var(--muted); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
strong { font-weight: 680; }

ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
ol.steps[start] { counter-reset: none; }
ol.steps > li { position: relative; padding-left: 40px; margin: 10px 0; min-height: 28px; counter-increment: step; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  font-size: 15px; font-weight: 700; display: grid; place-items: center;
}

/* Menüpfad als Chips */
.path { display: inline; line-height: 2; }
.chip {
  display: inline; padding: 2px 9px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-text); font-size: 15px; font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.sep { color: var(--muted); font-weight: 700; margin: 0 3px; }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 16px 0; }
.card {
  display: block; padding: 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); min-height: 44px;
}
.card strong { display: block; font-size: 18px; color: var(--accent); margin-bottom: 2px; }
.card span { color: var(--muted); font-size: 15px; }
.card:active { background: var(--surface-2); }

/* Klappbare Abschnitte */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; }
summary {
  list-style: none; cursor: pointer; padding: 13px 44px 13px 16px; min-height: 48px; position: relative; font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s;
}
details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
details[open] > summary { border-bottom: 1px solid var(--line); }
.details-body { padding: 12px 16px 4px; }
details.flash, h2.flash, h3.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }

/* Boxen */
.box { border-radius: var(--radius); padding: 12px 16px 2px; margin: 16px 0; border-left: 5px solid; }
.box-title { font-weight: 700; margin-bottom: 4px; }
.box-tipp { background: var(--tipp-bg); border-color: var(--tipp); }
.box-tipp .box-title { color: var(--tipp); }
.box-warnung { background: var(--warn-bg); border-color: var(--warn); }
.box-warnung .box-title { color: var(--warn); }
.box-info { background: var(--info-bg); border-color: var(--info); }
.box-info .box-title { color: var(--info); }
.box-wichtig { background: var(--wichtig-bg); border-color: var(--wichtig); }
.box-wichtig .box-title { color: var(--wichtig); }
.box-support { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); padding-bottom: 14px; }
.box-support .box-title { color: var(--accent); }

/* Plattform */
.pf { border-left: 3px dashed var(--line); padding-left: 12px; margin: 14px 0; }
.pf-label { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
html[data-pf="android"] [data-platform="ios"],
html[data-pf="ios"] [data-platform="android"] { display: none; }
html[data-pf] .pf { border-left: 0; padding-left: 0; }
html[data-pf] .pf-label { display: none; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; }
tr:last-child td { border-bottom: 0; }

/* Screenshots */
.shot { margin: 16px 0; }
.shot img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 auto; }
.shot-placeholder {
  aspect-ratio: 9 / 16; max-width: 260px; margin: 0 auto; border: 2px dashed var(--line); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--muted); background: var(--surface-2); font-size: 15px;
}
.shot figcaption { text-align: center; color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Sprungleiste */
.azbar {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px;
}
.azbar a {
  min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 700;
}

/* Schaltflächen */
.action { margin: 16px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px;
  border-radius: 12px; font-weight: 700; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.ext-icon { font-size: .8em; margin-left: 2px; }
.ext-note { font-weight: 400; color: var(--muted); }

/* Seitenwechsel und Fuß */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 36px; }
.pager a {
  display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); font-weight: 650; min-height: 48px;
}
.pager small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.pager .next { grid-column: 2; text-align: right; }
.foot { max-width: 720px; margin: 0 auto; padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 80px); color: var(--muted); font-size: 15px; }
.foot p { margin: 0 0 4px; }
.to-top {
  position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 15;
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text);
  font-size: 24px; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer;
}
.to-top[hidden] { display: none; }

@media (max-width: 380px) {
  .pf-switch button { padding: 0 7px; font-size: 14px; }
  .brand { font-size: 17px; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
