/* Same look as the search page (colors and Inter from polias.eu). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); }

:root {
  --bg: #faf8f3;
  --bg-2: #f2eee4;
  --fg: #1b1d21;
  --muted: #646a74;
  --line: #e6e0d4;
  --card: #ffffff;
  --accent: #e8a317;
  --accent-soft: #fbefd2;
  --accent-ink: #8a5c00;
  --olive: #5f7d3a;
  --olive-soft: #e8eedd;
  --red: #b3372c;
  --red-soft: #f8e4e1;
  --link: #1f4fbf;
  --shadow: 0 1px 2px rgb(30 25 10 / 5%), 0 6px 24px rgb(30 25 10 / 7%);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --bg-2: #181b20;
    --fg: #ebe8e1;
    --muted: #9aa1ab;
    --line: #2a2f37;
    --card: #1b1f25;
    --accent: #f2b53a;
    --accent-soft: #3a2f17;
    --accent-ink: #f2b53a;
    --olive: #9cbf6a;
    --olive-soft: #26301c;
    --red: #f08a7e;
    --red-soft: #3a1f1c;
    --link: #8ab4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 16px/1.55 Inter, system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 24px 0 8px; }
h2 { font-size: 19px; margin: 34px 0 8px; }
code { background: var(--bg-2); border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.muted { color: var(--muted); }
.small, small { font-size: 13px; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Frame ────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.045em; color: var(--fg); text-decoration: none; line-height: 1; }
.logo span { color: var(--accent); }
.logo em { font-style: normal; font-weight: 600; font-size: 0.55em; letter-spacing: 0; color: var(--muted); margin-left: 8px; }
.nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--fg); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav form { margin: 0; }
.pill { font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-left: 4px; }
.page { width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 16px 48px; }
.page.wide { max-width: 980px; }
.foot { margin-top: auto; padding: 28px 16px; display: flex; gap: 8px 22px; flex-wrap: wrap; justify-content: center; font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }

/* ── Buttons and forms ────────────────────────────────── */
.btn { display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: #1b1d21; font: inherit; font-weight: 650; text-decoration: none; border-radius: 999px; padding: 10px 22px; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.small { padding: 5px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.nav .linkbtn { color: var(--muted); text-decoration: none; }
.form { display: grid; gap: 16px; margin: 16px 0; }
.form > .btn { justify-self: start; }
.field { display: grid; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 5px; }
.field > span { margin: 0; }
.field small { color: var(--muted); line-height: 1.45; }
input:not([type=checkbox]):not([type=radio]), textarea, select { width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.check { display: flex; gap: 9px; align-items: baseline; font-size: 15px; }
.check input { flex: none; accent-color: var(--accent); }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 14px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.countries.off { opacity: .4; pointer-events: none; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline input { width: auto; padding: 5px 8px; font-size: 14px; }
.actions { display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: center; }
.actions form { display: flex; gap: 10px; align-items: center; margin: 0; }
.actions input:not([type=checkbox]) { width: 260px; max-width: 100%; }
.errors { margin: 12px 0; padding: 12px 14px 12px 32px; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.flash, .notice { margin: 12px 0; padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.flash.ok { background: var(--olive-soft); color: var(--olive); }
.flash.bad { background: var(--red-soft); color: var(--red); }
.notice { background: var(--accent-soft); color: var(--fg); }
.notice form { display: inline; }
.bad-text { color: var(--red); }

/* ── Tables and numbers ───────────────────────────────── */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th.n, td.n { text-align: right; }
td a { text-decoration: none; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.badge.on { background: var(--olive-soft); color: var(--olive); }
.badge.wait { background: var(--accent-soft); color: var(--accent-ink); }
.badge.off { background: var(--bg-2); color: var(--muted); }
.badge.bad { background: var(--red-soft); color: var(--red); }
.empty { text-align: center; padding: 40px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.balance { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0; }
.amounts { display: flex; gap: 10px; flex-wrap: wrap; }
.custom { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.custom .field { flex: 1; min-width: 180px; max-width: 260px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.tiles div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.tiles span { display: block; font-size: 13px; color: var(--muted); }
.tiles b { font-size: 24px; letter-spacing: -0.02em; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 12px 0; }
.review p { margin: 8px 0; overflow-wrap: anywhere; }

/* ── The ad, as on the results page ───────────────────── */
.adbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); max-width: 640px; }
.ad-site { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ad-label { font-weight: 700; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.ad-host { color: var(--fg); }
.ad-title { font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--link); margin: 4px 0; overflow-wrap: anywhere; }
.ad-text { margin: 0; font-size: 15px; opacity: .86; overflow-wrap: anywhere; }

/* ── Sponsor of the day, as on the start page ─────────── */
.sponsorbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; box-shadow: var(--shadow); max-width: 640px; text-align: center; overflow-wrap: anywhere; }
.sponsorbox span { display: block; font-size: 14px; color: var(--muted); }
td .inline input { width: 96px; }

/* ── Landing page ─────────────────────────────────────── */
.hero h1 { font-size: clamp(30px, 6vw, 44px); margin-top: 40px; }
.lead { font-size: 19px; color: var(--muted); }
.hero .btn { margin: 4px 8px 4px 0; }
.example { margin: 36px 0 8px; }
.fake-search { max-width: 640px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 11px 22px; margin-bottom: 14px; color: var(--fg); box-shadow: var(--shadow); }
.steps { padding-left: 22px; display: grid; gap: 10px; }

/* ── Unterstützer-Topf ────────────────────────────────── */
.meter { display: block; width: 100%; height: 14px; border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.meter .track { fill: var(--bg-2); }
.meter .ads, .dot.ads { fill: var(--olive); background: var(--olive); }
.meter .gifts, .dot.gifts { fill: var(--accent); background: var(--accent); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 20px; font-weight: 650; cursor: pointer; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.firm { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 12px; }
.firm summary { font-weight: 600; cursor: pointer; }
.firm[open] summary { margin-bottom: 4px; }
.names { line-height: 1.9; overflow-wrap: anywhere; }
.small-tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
code.key { display: inline-block; font-size: 18px; padding: 10px 14px; word-break: break-all; user-select: all; }
.balance small { font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--muted, inherit); }

/* One balance for web and KI search (api.ki): price box and usage board. */
.pricebox, .board { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 18px 0 22px; }
.pricebox-big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.pricebox-big small { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.pricebox-sub { font-size: 18px; font-weight: 600; margin: 2px 0 14px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 10px; }
.kind { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; align-items: center; background: var(--bg-2); border-radius: 10px; padding: 12px 14px; }
.kind span:last-child { grid-column: 2; color: var(--muted); font-size: 14px; line-height: 1.45; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.web { background: var(--accent); }
.dot.ki { background: var(--olive); }
.dot.news { background: var(--link); }
.dot.legal { background: var(--red); }
.dot.amt { background: var(--muted); }
.board-label, .tile-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.board-big { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 10px; line-height: 1.05; }
.splitbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.splitbar .web { background: var(--accent); }
.splitbar .ki { background: var(--olive); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--fg); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 10px; }
.tile { background: var(--bg-2); border-radius: 10px; padding: 12px 14px; }
.tile-big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0; }
.tile-sub { margin: 0; font-size: 13px; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 4px 0 6px; }
.meter span { display: block; height: 100%; background: var(--olive); }

/* "DE | EN" in the API area (same look as on polias.eu). */
.lang-switch { margin-left: auto; margin-right: 14px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--fg); text-decoration: underline; }
.lang-switch b { color: var(--fg); }

/* "Own amount" next to the API packages. */
.own-amount { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.own-amount h3 { margin: 0 0 8px; font-size: 16px; }
.own-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.own-row label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.own-row input { width: 150px; max-width: 100%; }
.own-row span { padding-bottom: 10px; color: var(--muted); }
.own-out { margin: 10px 0 0; font-weight: 600; }

/* API area in the frame of api.polias.eu (header, side tree, buttons as in the docs; technik 19.11.).
   Source of the docs side: Desktop\Webbrowser\api-seite\api.css; change both together. */
.docs-body { min-height: 100vh; display: flex; flex-direction: column; }
.docs-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.docs-head .logo { font-size: 26px; }
.logo .beta { font-size: 0.32em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 0.25em 0.6em; vertical-align: super; margin-left: 0.35em; }
.docs-head-right { display: flex; align-items: center; gap: 14px; }
.docs-head-right .lang-switch { margin: 0; }
.docs-head-right .nav { gap: 8px; }
.docs-head-right .nav .btn { text-decoration: none; }
.docs { flex: 1; width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.docs-side { position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 62px); overflow-y: auto; padding: 24px 0 32px; }
.docs-side > summary { display: none; }
.docs-tree ul { list-style: none; margin: 0 0 18px; padding: 0; }
.docs-group { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.docs-tree a, .docs-tree .docs-link { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--fg); text-decoration: none; font: inherit; font-size: 15px; line-height: 1.35; cursor: pointer; }
.docs-tree a:hover, .docs-tree .docs-link:hover { background: var(--card); }
.docs-tree a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.docs-tree form { margin: 0; }
.docs-tree .docs-extra { border-top: 1px solid var(--line); padding-top: 12px; }
.docs-tree .docs-extra a { color: var(--muted); font-size: 14px; }
.docs-main.page { max-width: 780px; margin: 0; padding: 24px 0 64px; }
.docs-main.page.wide { max-width: none; }
.docs-body .foot { margin-top: 0; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .docs-head { padding: 10px 16px; }
  .docs-head-right { gap: 8px; }
  .docs-side { position: static; max-height: none; padding: 12px 0 0; border-bottom: 1px solid var(--line); }
  .docs-side > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; margin: 0 0 12px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); list-style: none; }
  .docs-side > summary::-webkit-details-marker { display: none; }
  .docs-side > summary::before { content: "\2630"; }
  .docs-side[open] > summary::before { content: "\2715"; }
}
@media (max-width: 520px) {
  .docs-head .logo { font-size: 22px; }
  .docs-head-right .nav .btn.ghost { display: none; }
}
/* DE/EN as pills like on api.polias.eu (the " | " between them is hidden). */
.docs-head-right .lang-switch { display: flex; gap: 6px; font-size: 0; }
.docs-head-right .lang-switch a, .docs-head-right .lang-switch b { font-size: 14px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); text-decoration: none; font-weight: 400; }
.docs-head-right .lang-switch b { background: var(--accent); border-color: var(--accent); color: #1b1d21; }
.docs-head-right .lang-switch a:hover { border-color: var(--accent); text-decoration: none; }
/* Moritz 20.11.: nothing may jump between technik's static pages (/style.css + /api.css) and ours. Same type features,
   same button height, heading size and spacing as there; scrollbar space always kept, so short pages don't shift. */
html:has(.docs-body) { scrollbar-gutter: stable; }
.docs-body { font-feature-settings: "cv11", "ss01"; }
.docs-head-right, .docs-head-right .nav { display: flex; align-items: center; gap: 10px; }
.docs-body .btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
.docs-main.page { padding: 8px 0 64px; }
.docs-main.page h1 { font-size: 32px; line-height: 1.55; letter-spacing: -0.02em; margin: 28px 0 8px; }
.docs-main.page h2 { font-size: 19px; margin: 30px 0 6px; }
.docs-main.page .lead { font-size: 18px; }
@media (max-width: 900px) { .docs-head-right, .docs-head-right .nav { gap: 8px; } }
/* The hidden " | " between DE and EN is a flex item too: no gap, a margin instead, so the pills stand 6px apart. */
.docs-head-right .lang-switch { gap: 0; }
.docs-head-right .lang-switch > * + * { margin-left: 6px; }
@media (min-width: 901px) { .docs-side { top: 57px; max-height: calc(100vh - 57px); } }
/* .docs fills the screen height (footer at the bottom); its rows must not share out the spare height (phone: gap). */
.docs { align-content: start; }
@media (max-width: 520px) { .docs-head-right { gap: 6px; } }

/* "Where Polias is already used" (same as api.polias.eu, api.css). */
.used-by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 22px 0 6px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.used-by-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.used-by-logo { display: block; line-height: 0; }
.used-by-text { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
