/* KairosOne Hilfe — gemeinsames Aussehen aller Seiten.
   Farben entsprechen dem App-Theme "Refined Clinical". Keine Inline-Styles in
   den Seiten: die CSP erlaubt nur diese Datei. */

:root {
  --teal: #2a7a6e;
  --teal-deep: #1a3a3a;
  --mint: #e8f4f2;
  --paper: #f8fafa;
  --card: #ffffff;
  --ink: #1a2e2e;
  --ink-soft: #5a7a7a;
  --line: #e2ebe9;
  --gold: #d4a574;
  --gold-strong: #b9803f;
  --header-bg: #1a3a3a;
  --header-ink: #e0f0f0;
  --header-soft: #94b8b8;
  --shadow: 0 1px 2px rgba(26, 58, 58, 0.06), 0 8px 24px rgba(26, 58, 58, 0.08);
  --radius: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #5fb8aa;
    --mint: #1d3a36;
    --paper: #121e1e;
    --card: #1a2e2e;
    --ink: #e0f0f0;
    --ink-soft: #94b8b8;
    --line: #2a4444;
    --gold: #e0b485;
    --gold-strong: #e0b485;
    --header-bg: #0d1818;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--teal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ─── Kopf ─────────────────────────────────────────────────────────────── */

.kh-header {
  background: var(--header-bg);
  color: var(--header-ink);
  padding-top: env(safe-area-inset-top, 0px);
}
.kh-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: 10px;
}
.kh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  margin-right: auto;
}
.kh-brand img { width: 32px; height: 32px; border-radius: 50%; }
.kh-brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.kh-brand-sub {
  color: var(--header-soft);
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid rgba(148, 184, 184, 0.4);
}
.kh-nav { display: flex; align-items: center; gap: 6px; }
.kh-nav a {
  color: var(--header-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
}
.kh-nav a:hover { color: var(--header-ink); background: rgba(255, 255, 255, 0.06); }
.kh-nav a[aria-current='true'] { color: var(--header-ink); background: rgba(255, 255, 255, 0.1); }
.kh-nav .kh-back {
  color: var(--header-bg);
  background: var(--header-ink);
  margin-left: 6px;
}
.kh-nav .kh-back:hover { color: var(--header-bg); background: #ffffff; }

/* ─── Fuß ──────────────────────────────────────────────────────────────── */

.kh-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.kh-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  padding-block: 28px 36px;
}
.kh-footer p { margin: 0; max-width: 56ch; }
.kh-footer strong { color: var(--ink); font-weight: 600; }

/* ─── Übersicht ────────────────────────────────────────────────────────── */

.hero {
  background: var(--header-bg);
  color: var(--header-ink);
  padding-block: 28px 112px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  max-width: 18ch;
}
.hero p { margin: 0; color: var(--header-soft); max-width: 52ch; font-size: 1.05rem; }

.topics { margin-top: -80px; }
.topic-group h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 40px 0 12px;
}
.topic-group:first-child h2 { color: var(--header-soft); margin-top: 0; }
.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.topic {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.topic:hover { border-color: var(--teal); }
.topic svg { grid-row: span 2; width: 40px; height: 40px; color: var(--teal); }
.topic strong { font-size: 1.1rem; line-height: 1.3; }
.topic span { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.45; }
.topic-note { color: var(--ink-soft); margin: 24px 0 0; }

/* ─── Artikel ──────────────────────────────────────────────────────────── */

.article-head { padding-block: 40px 8px; }
.article-head h1, .article-head .lede { max-width: 22ch; }
.article-head .lede { max-width: 60ch; }
.crumbs { font-size: 0.9rem; margin: 0 0 16px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.article-head h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); margin: 0; max-width: 60ch; }

.switch-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px;
  margin-top: 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.switch-bar .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.switch-label { color: var(--ink-soft); font-size: 0.95rem; }
.segmented {
  display: inline-flex;
  background: var(--mint);
  border-radius: 999px;
  padding: 4px;
}
.segmented button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.segmented button svg { width: 18px; height: 18px; }
.segmented button[aria-selected='true'] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26, 58, 58, 0.15);
}
.detected { font-size: 0.85rem; color: var(--ink-soft); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px 64px;
  align-items: center;
  padding-block: 48px;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.step-text { max-width: 34rem; }
.step-text::before {
  content: counter(step);
  display: block;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--teal);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.step h2 { font-size: 1.45rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 8px; }
.step p { margin: 0 0 10px; }
.step p:last-child { margin-bottom: 0; }
.hint {
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

.ui {
  font-weight: 600;
  white-space: nowrap;
  background: var(--mint);
  border-radius: 4px;
  padding: 1px 6px;
}

.notes {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  max-width: 760px;
}
.notes h2 { margin: 0 0 12px; font-size: 1.2rem; }
.notes ul { margin: 0; padding-left: 1.2em; }
.notes li + li { margin-top: 8px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .step { grid-template-columns: 1fr; padding-block: 36px; gap: 20px; }
  .step-text::before { font-size: 2.75rem; }
  .step .phone { justify-self: center; }
  .kh-brand-sub { display: none; }
}

/* ─── Handy-Illustrationen ─────────────────────────────────────────────
   Gerendert von help.js. Die Bildschirme sind bewusst vereinfacht und
   nutzen eine neutrale Adresse — nie eine echte Praxis-Domain. */

.phone {
  --scr-bg: #f2f2f7;
  width: 260px;
  max-width: 100%;
  aspect-ratio: 9 / 19;
  margin: 0;
  background: #242a2a;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 0 0 1px #3a4242, 0 20px 40px rgba(26, 58, 58, 0.22);
  position: relative;
  font-size: 11px;
  line-height: 1.3;
  color: #1c1c1e;
  user-select: none;
}
.phone.android { border-radius: 30px; --scr-bg: #ffffff; }
.screen {
  position: relative;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--scr-bg);
  display: flex;
  flex-direction: column;
}
.android .screen { border-radius: 22px; }

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px 4px;
  font-weight: 600;
  font-size: 11px;
  flex: none;
  position: relative;
  z-index: 2;
}
.android .status { padding: 8px 16px 4px; font-weight: 500; }
.status i { display: inline-block; width: 22px; height: 9px; border: 1.5px solid currentColor; border-radius: 3px; }
.island {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 70px;
  height: 20px;
  margin-left: -35px;
  background: #000;
  border-radius: 12px;
  z-index: 3;
}
.android .island { width: 10px; height: 10px; margin-left: -5px; top: 9px; }

/* Web-Inhalt: die Login-Seite von KairosOne, stark vereinfacht */
.web {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f0faf8, #f7f9f9 55%, #f0f4fa);
  padding: 14px;
  min-height: 0;
}
.web.dim { filter: brightness(0.62); }
.login {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 16px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}
.login b { display: block; color: #2a7a6e; font-size: 18px; letter-spacing: -0.02em; }
.login small { display: block; color: #5a7a7a; margin: 2px 0 10px; }
.login span {
  display: block;
  height: 26px;
  border: 1px solid #cfd8d6;
  border-radius: 5px;
  margin-bottom: 7px;
  text-align: left;
  padding: 5px 8px;
  color: #8a9a9a;
}
.login em { display: block; height: 26px; background: #2a7a6e; border-radius: 5px; margin-top: 10px; }

/* Safari (iOS 26): Adressleiste unten */
.safari-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 22px;
  background: var(--scr-bg);
}
.pill {
  flex: 1;
  height: 34px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #3a3a3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
  min-width: 0;
}
.round {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
}
.round svg { width: 16px; height: 16px; }

/* Chrome (Android): Adressleiste oben */
.chrome-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 8px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.chrome-bar .pill span { overflow: hidden; text-overflow: ellipsis; }
.chrome-bar .pill { box-shadow: none; background: #eef1f0; justify-content: flex-start; padding-left: 10px; gap: 6px; height: 30px; }
.chrome-bar .pill svg { width: 11px; height: 11px; flex: none; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; flex: none; position: relative; border-radius: 50%; }
.icon-btn svg { width: 16px; height: 16px; }
.tabs-count { width: 15px; height: 15px; border: 1.6px solid #444; border-radius: 3px; font-size: 8.5px; font-weight: 700; display: grid; place-items: center; }
.gesture { flex: none; height: 18px; display: grid; place-items: center; }
.gesture::after { content: ''; width: 90px; height: 4px; border-radius: 2px; background: #1c1c1e; opacity: 0.8; }

/* Menüs und Blätter */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 1;
}
.popmenu {
  position: absolute;
  right: 12px;
  bottom: 70px;
  width: 170px;
  background: rgba(246, 246, 248, 0.97);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 6px 0;
  z-index: 2;
}
.popmenu .row { padding: 8px 14px; gap: 10px; }
.popmenu hr { border: 0; border-top: 1px solid #d8d8dc; margin: 4px 14px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  position: relative;
}
.row svg { width: 15px; height: 15px; flex: none; }

.sheet {
  position: relative;
  background: #2c2c2e;
  color: #f2f2f7;
  border-radius: 26px 26px 0 0;
  padding: 14px 10px 18px;
  z-index: 2;
}
.sheet.tall { position: absolute; inset: 34px 0 0; border-radius: 26px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 12px; border-bottom: 1px solid #3a3a3c; }
.sheet-head img { width: 40px; height: 40px; border-radius: 10px; background: #fff; }
.sheet-head b { display: block; font-size: 12px; }
.sheet-head small { color: #98989d; font-size: 10px; }
.sheet-apps, .sheet-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 12px 0 4px;
  text-align: center;
  font-size: 8.5px;
  color: #d1d1d6;
}
.sheet-apps { border-bottom: 1px solid #3a3a3c; padding-bottom: 12px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.app-tile i { width: 38px; height: 38px; border-radius: 10px; display: block; }
.app-tile i.a1 { background: #1b3a5c; }
.app-tile i.a2 { background: #34c759; }
.app-tile i.a3 { background: #1f7cf2; }
.app-tile i.a4 { background: #8e8e93; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.act i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #3a3a3c;
  display: grid;
  place-items: center;
  font-style: normal;
}
.act i svg { width: 16px; height: 16px; }
.sheet-list {
  background: #3a3a3c;
  border-radius: 14px;
  margin-top: 10px;
  overflow: hidden;
}
.sheet-list .row { border-bottom: 1px solid #48484a; padding: 9px 12px; font-size: 10.5px; }
.sheet-list .row:last-child { border-bottom: 0; }

/* iOS-Dialog "Zum Home-Bildschirm" */
.addsheet {
  position: absolute;
  inset: 34px 0 0;
  background: #f2f2f7;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
  padding: 12px 12px;
}
.addsheet-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 10px; margin-bottom: 16px; white-space: nowrap; }
.addsheet-top b { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.addsheet-top span { position: relative; padding: 4px 8px; border-radius: 12px; }
.addsheet-top .cancel { color: #3a3a3c; background: #e5e5ea; }
.addsheet-top .confirm { color: #fff; background: #0a84ff; font-weight: 600; }
.addcard { background: #fff; border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: center; }
.addcard img { width: 46px; height: 46px; border-radius: 11px; box-shadow: 0 0 0 1px #e5e5ea; }
.addcard div { flex: 1; min-width: 0; }
.addcard b { display: block; font-weight: 500; border-bottom: 1px solid #e5e5ea; padding-bottom: 5px; margin-bottom: 5px; }
.addcard small { color: #8e8e93; }
.toggle-row { background: #fff; border-radius: 12px; padding: 10px; margin-top: 12px; display: flex; justify-content: space-between; align-items: center; position: relative; }
.switch { width: 34px; height: 20px; border-radius: 10px; background: #34c759; position: relative; flex: none; }
.switch::after { content: ''; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.addsheet p { color: #8e8e93; font-size: 9.5px; margin: 6px 10px 0; }

/* Chrome-Menü */
.cmenu {
  position: absolute;
  top: 38px;
  right: 6px;
  width: 188px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  padding: 4px 0;
  z-index: 2;
  font-size: 10.5px;
}
.cmenu-icons { display: flex; justify-content: space-around; padding: 6px 4px 8px; border-bottom: 1px solid #eee; }
.cmenu-icons svg { width: 14px; height: 14px; }
.cmenu .row { padding: 7px 14px; gap: 12px; }
.cmenu .row svg { width: 13px; height: 13px; color: #555; }

/* Android-Dialog */
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 1; }
.dialog {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 32%;
  background: #f4f7f6;
  border-radius: 22px;
  padding: 18px 16px 12px;
  z-index: 2;
}
.dialog b { display: block; font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.dialog .app-line { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dialog .app-line img { width: 36px; height: 36px; border-radius: 50%; }
.dialog .app-line small { display: block; color: #666; }
.choice { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; position: relative; }
.choice.on { background: #d7ece8; }
.radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #777; flex: none; }
.choice.on .radio { border-color: #2a7a6e; box-shadow: inset 0 0 0 3px #d7ece8, inset 0 0 0 7px #2a7a6e; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.dialog-actions span { padding: 6px 12px; border-radius: 16px; color: #2a6a60; font-weight: 500; position: relative; }

/* Home-Bildschirm */
.home {
  flex: 1;
  background: linear-gradient(170deg, #9ec9c1, #4f8f86 55%, #2c5d57);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  gap: 16px 8px;
  padding: 26px 14px;
  color: #fff;
  font-size: 9px;
  text-align: center;
}
.android .home { background: linear-gradient(170deg, #c9d8e6, #7b95b3 60%, #4c6280); }
.hi { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.hi i { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.35); display: block; }
.android .hi i { border-radius: 50%; }
.hi img { width: 44px; height: 44px; border-radius: 12px; background: #fff; }
.android .hi img { border-radius: 50%; }
.dock { margin-top: auto; }

/* Der Tipp-Punkt: die einzige Animation der Seite */
.tap::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 14px;
  border: 2.5px solid var(--gold-strong);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.35);
  pointer-events: none;
  animation: tap 1.8s ease-out infinite;
}
.round.tap::after, .icon-btn.tap::after { border-radius: 50%; }
.act.tap::after { inset: -5px auto auto 50%; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; }
.row.tap::after { inset: 1px 4px; border-radius: 10px; }
@keyframes tap {
  0% { box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(212, 165, 116, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 165, 116, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tap::after { animation: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lang-pick { padding-block: 80px; text-align: center; }
.lang-pick a { display: inline-block; margin: 8px; font-weight: 600; }
