/*
 * Oculy help in the look of the new app (css/ui.css tokens), decision 2026-11-20 (docs/help-versions.md).
 * Everything in one centred column; the side menu of the Read-the-Docs theme is hidden (users with a
 * missing left half of the visual field did not see it). Top bar and menu «Alle Themen»: _templates/layout.html.
 */
:root {
  --h-primary: #03a9f4;
  --h-primary-dark: #027ab0;
  --h-primary-soft: rgba(3, 169, 244, 0.12);
  --h-ink: #2b3440;
  --h-muted: #5f6b7a;
  --h-line: #e5e9f0;
  --h-bg: #f6f8fb;
  --h-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------------------------------------------------------------- page */
html, body { background: var(--h-bg) !important; }
body, .rst-content, .wy-body-for-nav, h1, h2, h3, h4, h5, h6, legend, .rst-content .toctree-wrapper > p.caption {
  font-family: var(--h-font) !important;
}
body { color: var(--h-ink); font-size: 17px; }
html.hm-open { overflow: hidden; }

/* the theme's side menu and its phone bar: gone; the content centred */
.wy-nav-side, .wy-nav-top, .rst-versions { display: none !important; }
.wy-grid-for-nav { position: static; }
.wy-nav-content-wrap { margin-left: 0 !important; background: transparent !important; left: 0 !important; }
.wy-nav-content { max-width: 54rem !important; margin: 0 auto !important; padding: 2rem 1rem 3rem !important; background: transparent !important; }
.wy-breadcrumbs, div[role="navigation"][aria-label] > ul.wy-breadcrumbs, .rst-content > div[role="navigation"] > hr { display: none !important; }

/* the content: one white card */
.rst-content > div[role="main"], .rst-content .document {
  background: #fff; border: 2px solid var(--h-line); border-radius: 1.25rem; padding: 2.25rem 2.5rem;
}
.rst-content .document > div[itemprop="articleBody"], .rst-content [itemprop="articleBody"] { max-width: none; }

/* ---------------------------------------------------------------- text */
.rst-content h1 { font-size: 2.1rem; font-weight: 900; line-height: 1.2; color: var(--h-ink); margin: 0 0 1rem; text-align: center; }
.rst-content h2 { font-size: 1.3rem; font-weight: 900; color: var(--h-ink); margin: 2.25rem 0 0.75rem; padding-top: 1.5rem; border-top: 2px solid var(--h-line); line-height: 1.3; }
.rst-content h3 { font-size: 1.1rem; font-weight: 800; color: var(--h-ink); }
.rst-content p, .rst-content li { font-size: 1.06rem; line-height: 1.65; font-weight: 600; color: var(--h-ink); }
.rst-content strong { font-weight: 900; }
.rst-content a, .rst-content a:visited { color: var(--h-primary-dark); font-weight: 800; text-underline-offset: 3px; }
.rst-content a:hover { color: var(--h-primary); }
.rst-content ul.simple li, .rst-content .section ul li { margin-bottom: 0.35rem; }
.rst-content section > h1 + p, .rst-content .section > h1 + p { text-align: center; color: var(--h-muted); font-size: 1.15rem; }
.rst-content code, .rst-content tt { border-radius: 0.4rem; }
.rst-content table.docutils { border-radius: 0.9rem; overflow: hidden; border: 2px solid var(--h-line) !important; }
.rst-content table.docutils td, .rst-content table.docutils th { border-color: var(--h-line) !important; padding: 0.6rem 0.9rem !important; font-size: 1rem; }
.rst-content table.docutils thead th { background: var(--h-bg); font-weight: 900; }

/* pictures: centred, framed, never wider than the column */
.rst-content img {
  display: block; margin: 1.25rem auto; max-width: 100% !important; height: auto !important;
  border-radius: 1rem; border: 2px solid var(--h-line); box-shadow: 0 0.6rem 1.6rem rgba(33, 40, 50, 0.08); background: #fff;
}
.rst-content a.image-reference img, .rst-content a img { cursor: zoom-in; }

/* notes */
.rst-content .admonition, .rst-content .note, .rst-content .warning {
  border-radius: 1rem; background: var(--h-primary-soft) !important; border: 0; padding: 1rem 1.25rem;
}
.rst-content .admonition-title { background: transparent !important; color: var(--h-primary-dark) !important; font-weight: 900; padding: 0; margin-bottom: 0.4rem; }

/* ---------------------------------------------------------------- start page: the groups as cards */
.rst-content .toctree-wrapper { margin: 0 0 1.25rem; padding: 1.25rem 1.5rem; border: 2px solid var(--h-line); border-radius: 1.1rem; background: #fff; }
.rst-content .toctree-wrapper > p.caption { margin: 0 0 0.75rem; font-size: 0.85rem !important; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--h-muted); }
.rst-content .toctree-wrapper > p.caption .caption-text { color: inherit; }
.rst-content .toctree-wrapper ul { margin: 0 !important; padding: 0; list-style: none !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.5rem; }
.rst-content .toctree-wrapper ul li { margin: 0 !important; list-style: none !important; }
.rst-content .toctree-wrapper ul li a {
  display: flex; align-items: center; min-height: 3rem; padding: 0.6rem 1rem; border-radius: 0.9rem; background: var(--h-bg);
  color: var(--h-ink) !important; text-decoration: none; font-weight: 800; border: 2px solid transparent;
}
.rst-content .toctree-wrapper ul li a:hover, .rst-content .toctree-wrapper ul li a:focus-visible { border-color: var(--h-primary); background: #fff; color: var(--h-primary-dark) !important; }
.rst-content .toctree-wrapper ul ul { display: none; }

/* ---------------------------------------------------------------- previous / next, «Alle Themen» at the end */
.rst-footer-buttons { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin: 2rem 0 0.5rem; }
.rst-footer-buttons::before, .rst-footer-buttons::after { display: none; }
.rst-footer-buttons .btn { float: none !important; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 3rem; padding: 0.6rem 1.3rem;
  border-radius: 999px; background: #fff !important; border: 2px solid var(--h-line) !important; color: var(--h-ink) !important; font-family: var(--h-font);
  font-weight: 800; font-size: 1rem; box-shadow: 0 3px 0 var(--h-line); }
.rst-footer-buttons .btn:hover { border-color: var(--h-primary) !important; color: var(--h-primary-dark) !important; }
footer hr { display: none; }
footer[role="contentinfo"], .rst-content footer div[role="contentinfo"] { text-align: center; color: var(--h-muted); font-size: 0.9rem; }
.hf-topics { display: flex; justify-content: center; margin: -1.5rem 0 2.5rem; }

/* ---------------------------------------------------------------- top bar (like the app's navbar) */
.hb { position: sticky; top: 0; z-index: 300; background: var(--h-primary); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.hb-inner { max-width: 72rem; margin: 0 auto; padding: 0.7rem 1rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.hb-brand { display: inline-flex; align-items: center; gap: 0.55rem; color: #fff !important; text-decoration: none !important; justify-self: start; }
.hb-logo { width: 2.5rem; height: 2.5rem; border-radius: 0.8rem; background: rgba(255, 255, 255, 0.2); display: inline-flex; align-items: center; justify-content: center; }
.hb-logo img { width: 1.6rem; height: 1.6rem; border-radius: 0.3rem; }
.hb-name { font-weight: 900; font-size: 1.6rem; letter-spacing: -0.01em; line-height: 1; }
.hb-help { font-weight: 800; font-size: 0.85rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.hb-topics { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.9rem; padding: 0.5rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: var(--h-primary-dark); font-family: var(--h-font); font-weight: 900; font-size: 1.05rem; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12); }
.hb-topics svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.hb-topics:focus-visible, .hm-close:focus-visible, .hb-lang a:focus-visible, .hb-back:focus-visible { outline: 3px solid #ffd400; outline-offset: 2px; }
.hb-topics-light { background: #fff; border: 2px solid var(--h-line); box-shadow: 0 3px 0 var(--h-line); }
.hb-right { display: flex; align-items: center; gap: 0.75rem; justify-self: end; }
.hb-lang { display: inline-flex; gap: 0.15rem; padding: 0.2rem; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
.hb-lang a { min-width: 2.4rem; min-height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #fff !important; font-weight: 800; font-size: 0.9rem; text-decoration: none !important; }
.hb-lang a[aria-current] { background: #fff; color: var(--h-primary-dark) !important; }
.hb-back { color: #fff !important; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------------------------------------------------------------- menu «Alle Themen» (centred dialog) */
.hm { position: fixed; inset: 0; z-index: 400; background: rgba(20, 28, 38, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem 1rem; overflow-y: auto; }
.hm[hidden] { display: none; }
.hm-panel { width: 100%; max-width: 62rem; background: #fff; border-radius: 1.25rem; padding: 1.5rem 1.75rem 2rem; box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.3); }
.hm-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hm-head h2 { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--h-ink); }
.hm-close { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--h-bg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hm-close svg { width: 1.3rem; height: 1.3rem; stroke: var(--h-ink); stroke-width: 2.6; stroke-linecap: round; }
.hm-search { position: relative; margin-bottom: 1.25rem; }
.hm-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; fill: none; stroke: var(--h-muted); stroke-width: 2.4; stroke-linecap: round; }
.hm-search input { width: 100%; min-height: 3.1rem; padding: 0.6rem 1rem 0.6rem 2.9rem !important; border: 2px solid var(--h-line) !important; border-radius: 0.9rem !important;
  font-family: var(--h-font); font-size: 1.05rem !important; font-weight: 700; box-shadow: none !important; }
.hm-search input:focus { border-color: var(--h-primary) !important; outline: 0; box-shadow: 0 0 0 3px var(--h-primary-soft) !important; }
.hm-topics { column-width: 17rem; column-gap: 1.5rem; }
.hm-topics p.caption { break-after: avoid; margin: 0.75rem 0 0.4rem; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--h-muted); }
.hm-topics ul { list-style: none; margin: 0 0 0.75rem; padding: 0; break-inside: avoid-column; }
.hm-topics li { margin: 0; }
.hm-topics a { display: block; padding: 0.45rem 0.75rem; border-radius: 0.7rem; color: var(--h-ink); font-weight: 800; text-decoration: none; }
.hm-topics a:hover, .hm-topics a:focus-visible { background: var(--h-primary-soft); color: var(--h-primary-dark); }
.hm-topics a[aria-current] { background: var(--h-primary); color: #fff; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .hb-inner { grid-template-columns: 1fr auto; row-gap: 0.6rem; }
  .hb-topics { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; }
  .hb-help { display: none; }
  .hb-back { display: none; }
  .wy-nav-content { padding: 1rem 0.75rem 2rem !important; }
  .rst-content > div[role="main"], .rst-content .document { padding: 1.4rem 1.1rem; border-radius: 1rem; }
  .rst-content h1 { font-size: 1.7rem; }
  .hm { padding: 0; }
  .hm-panel { border-radius: 0; min-height: 100%; padding: 1.25rem 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
