/* Stenowise Hilfe, Richtung HA (Entwürfe HilfeHA-Einstieg und HilfeHA-Artikel,
   dazu die dunkle Fassung). Farben und Schriften wie App und Website. Eine
   Spalte in Lesebreite, eine ruhige Seitenleiste, weiße Karten mit Zeilen. */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --soft: #f5f2ec;
  --line: #e7e2da;
  --hair: #f0ebe2;
  --ink: #201e1b;
  --body: #3e3b35;
  --muted: #6e6759;
  --faint: #8a8375;
  --kbd-line: #dcd6ca;
  --accent: #305a96;
  --select: #d6e0ee;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191816;
    --surface: #201f1c;
    --soft: #262421;
    --line: #2e2c28;
    --hair: #292724;
    --ink: #eae6de;
    --body: #cfc9be;
    --muted: #9a9488;
    --faint: #857f73;
    --kbd-line: #3a3730;
    --accent: #8fafdf;
    --select: #3a4a63;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--select);
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nur-leser {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ueberspringen {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 0 0 8px 0;
}

.ueberspringen:focus {
  left: 0;
}

/* ---- Kopf, wie die Website ---------------------------------------------- */

.kopf {
  border-bottom: 1px solid var(--line);
}

.kopf-innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1100px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 64px;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.marke svg {
  color: var(--accent);
}

.marke span {
  font-family: var(--serif);
  font-size: 20px;
}

.kopf-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.kopf-nav a {
  color: var(--body);
  text-decoration: none;
}

.kopf-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.kopf-nav a.hier {
  color: var(--ink);
  font-weight: 600;
}

.kopf-nav a.sprache {
  color: var(--muted);
}

/* ---- Suchfeld ------------------------------------------------------------ */

.suche {
  margin: 0;
}

.suchfeld {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: text;
}

.suchfeld:focus-within {
  border-color: var(--accent);
}

.suchfeld svg {
  flex-shrink: 0;
}

.suchfeld input {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.suchfeld input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.suchfeld input::-webkit-search-cancel-button {
  cursor: pointer;
}

.zahl {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- Einstiegsseite ------------------------------------------------------ */

.einstieg {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

.einstieg h1 {
  margin: 0 0 -8px;
}

.gruppe {
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-margin-top: 1.5rem;
}

#uebersicht {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gruppe-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.gruppe h2 {
  margin: 0;
}

.gruppe-satz {
  margin: -6px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.karte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.zeile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  color: var(--muted);
  text-decoration: none;
}

.zeile + .zeile {
  border-top: 1px solid var(--hair);
}

.zeile:hover {
  background: var(--soft);
}

.zeile:focus-visible {
  outline-offset: -2px;
}

.zeile svg {
  flex-shrink: 0;
}

.zeile-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zeile-titel {
  font-size: 16px;
  line-height: 22px;
  color: var(--ink);
}

.zeile-satz,
.zeile-gruppe {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.zeile-gruppe {
  color: var(--faint);
}

.zeile mark {
  background: var(--select);
  color: inherit;
  border-radius: 2px;
}

.treffer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.treffer[hidden],
#uebersicht[hidden] {
  display: none;
}

.leer {
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.leer p {
  margin: 0;
}

.leer p + p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.ende {
  margin: 4px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.ende strong {
  color: var(--ink);
}

/* ---- Artikelseite -------------------------------------------------------- */

.huelle {
  display: grid;
  grid-template-columns: 220px minmax(0, 620px);
  justify-content: center;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 64px 56px;
}

.huelle main {
  grid-column: 2;
  grid-row: 1;
}

.leiste {
  grid-column: 1;
  grid-row: 1;
  /* Bleibt beim Scrollen im Blick; ist die Liste höher als das Fenster, scrollt sie in sich. */
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-right: 8px;
  font-size: 14px;
  line-height: 20px;
}

.leiste > ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.leiste-gruppe > a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
}

.leiste-gruppe + .leiste-gruppe {
  margin-top: 6px;
}

.leiste-gruppe > a:hover {
  color: var(--ink);
}

.leiste-gruppe.offen > a {
  color: var(--ink);
  font-weight: 600;
}

.leiste-gruppe ul {
  list-style: none;
  margin: 4px 0 10px;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}

.leiste-gruppe li a {
  display: block;
  padding: 4px 0;
  color: var(--body);
  text-decoration: none;
}

.leiste-gruppe li a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.leiste-gruppe li a.hier {
  color: var(--ink);
  font-weight: 600;
}

.suche.klein .suchfeld {
  height: 36px;
  padding: 0 12px;
}

.suche.klein input {
  font-size: 14px;
}

article {
  max-width: 620px;
}

.pfad {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.pfad a {
  color: var(--muted);
  text-decoration: none;
}

.pfad a:hover {
  color: var(--ink);
  text-decoration: underline;
}

h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  margin: 32px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.gilt {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

article p,
article li {
  font-size: 16px;
  line-height: 26px;
}

article p {
  margin: 0 0 12px;
}

article ul,
article ol {
  margin: 0 0 12px;
  padding-left: 1.4rem;
}

article li {
  margin-bottom: 6px;
}

article li::marker {
  color: var(--muted);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

kbd {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  line-height: 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--kbd-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0 6px;
  vertical-align: 1px;
  white-space: nowrap;
}

p .kombi,
li .kombi {
  white-space: nowrap;
}

td .kombi kbd {
  margin-bottom: 3px;
}

table kbd {
  font-size: 13px;
  padding: 0 5px;
}

code {
  font-family: "Cascadia Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.875em;
  background: var(--soft);
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  color: var(--ink);
}

.merk {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  line-height: 24px;
  color: var(--body);
}

.tabelle {
  margin: 0 0 16px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 22px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

thead th {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

tbody tr + tr th,
tbody tr + tr td {
  border-top: 1px solid var(--hair);
}

tbody th {
  font-weight: 400;
  color: var(--ink);
}

.verwandt {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.verwandt h2 {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.verwandt ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.verwandt li {
  margin: 0;
  font-size: 15px;
  line-height: 28px;
}

.stand {
  margin: 20px 0 0;
  font-size: 14px !important;
  line-height: 20px !important;
  color: var(--faint);
}

/* ---- Fuß ----------------------------------------------------------------- */

.fuss {
  border-top: 1px solid var(--line);
}

.fuss-innen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 64px 32px;
  font-size: 14px;
  color: var(--faint);
}

.fuss a {
  color: var(--faint);
  text-decoration: none;
}

.fuss a:hover {
  color: var(--muted);
  text-decoration: underline;
}

/* ---- Schmale Fenster ------------------------------------------------------
   Der Artikel kommt zuerst, die Seitenleiste folgt darunter. Auf einem Telefon
   ist die Antwort das, weswegen jemand die Seite öffnet. */
@media (max-width: 960px) {
  .kopf-innen,
  .fuss-innen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .huelle {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 28px 16px 48px;
  }

  .huelle main,
  .leiste {
    grid-column: 1;
    grid-row: auto;
  }

  .leiste {
    padding-top: 24px;
    position: static;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--line);
  }

  article {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .kopf-nav {
    gap: 16px;
  }

  .kopf-nav a.aussen {
    display: none;
  }

  .einstieg {
    padding-top: 28px;
    gap: 24px;
  }

  h1 {
    font-size: 30px;
  }

  th,
  td {
    padding: 8px 10px;
  }
}
