/* PocketSana – Farben und Schrift wie in der App (ui/theme/Theme.kt), Schrift selbst gehostet. */
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm_plex_sans_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm_plex_sans_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm_plex_sans_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f2f4f7;
  --surface: #ffffff;
  --ink: #141922;
  --ink-muted: #5a6675;
  --line: #d8dee6;
  --accent: #2f4ea8;
  --accent-soft: #e6ebf7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12151b;
    --surface: #1b202a;
    --ink: #e8edf3;
    --ink-muted: #9aa6b4;
    --line: #2c3542;
    --accent: #7b9bef;
    --accent-soft: #232c40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12151b; --surface: #1b202a; --ink: #e8edf3; --ink-muted: #9aa6b4;
  --line: #2c3542; --accent: #7b9bef; --accent-soft: #232c40; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  hyphens: auto;
  overflow-wrap: break-word;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

.bar { max-width: 72rem; margin: 0 auto; padding: 0 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .bar { min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.125rem; }
.brand img { border-radius: 8px; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; padding: 0.5rem 0; }
nav a { color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { padding: 2.5rem 1rem 4rem; }
article { max-width: 44rem; margin: 0 auto; }

h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; margin: 2.75rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.125rem; margin: 2rem 0 0.5rem; }
p, ul, ol, blockquote, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.25rem 0; }
li > ul, li > ol { margin: 0.25rem 0 0.5rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
blockquote { margin-left: 0; padding: 0.75rem 1rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
code { font-size: 0.9em; background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; }
.table-wrap, article table { display: block; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }

/* Rechtstexte: der «Stand» direkt unter dem Titel */
.doc article > h1 + p { color: var(--ink-muted); font-size: 0.95rem; }

/* Startseite */
.lead { font-size: 1.2rem; color: var(--ink-muted); max-width: 36rem; }
.facts { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 0.75rem; }
.facts li { margin: 0; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.facts strong { display: block; }
.facts span { color: var(--ink-muted); font-size: 0.95rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.links a { display: inline-block; padding: 0.6rem 1rem; border-radius: 999px; background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 500; }
.links a.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.note { color: var(--ink-muted); font-size: 0.95rem; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); font-size: 0.9rem; }
.site-footer .bar { padding-top: 1.25rem; padding-bottom: 1.25rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .site-header nav, .site-footer, .skip { display: none; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
}
