:root {
  --si-bg: #f4f6f9;
  --si-surface: #ffffff;
  --si-sidebar: #333c47;
  --si-sidebar-dark: #2b333d;
  --si-sidebar-text: #ffffff;
  --si-sidebar-muted: #c6d0db;
  --si-accent: #ebc808;
  --si-accent-hover: #d4b307;
  --si-link: #1cacfc;
  --si-link-hover: #0f8fd4;
  --si-text: #1f2933;
  --si-text-muted: #59677e;
  --si-border: #dce3ea;
  --si-code-bg: #eef3f7;
  --si-shadow: 0 10px 30px rgba(51, 60, 71, 0.08);
  --si-radius: 10px;
  --si-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --si-page-transition: 0.28s ease;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: ease;
}

html {
  scroll-behavior: smooth;
  background: var(--si-bg);
}

html.si-loading .wy-nav-content-wrap {
  opacity: 0;
}

html.si-ready .wy-nav-content-wrap {
  opacity: 1;
  transition: opacity var(--si-page-transition);
}

html.si-leaving .wy-nav-content-wrap {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body,
.wy-body-for-nav {
  font-family: var(--si-font);
  color: var(--si-text);
  background: var(--si-bg);
}

.wy-nav-side,
.wy-side-scroll,
.wy-menu.wy-menu-vertical,
.wy-menu-vertical ul,
.wy-menu-vertical li,
.wy-menu-vertical li ul {
  background: var(--si-sidebar) !important;
}

.wy-nav-side {
  box-shadow: var(--si-shadow);
}

.wy-side-nav-search {
  background: var(--si-sidebar-dark) !important;
  border-bottom: 3px solid var(--si-accent);
}

.wy-side-nav-search > a,
.wy-side-nav-search .icon-home {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wy-side-nav-search .wy-dropdown > a,
.wy-side-nav-search .wy-dropdown > a:hover {
  color: #fff !important;
}

.wy-side-nav-search input[type="text"] {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.55rem 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wy-side-nav-search input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.wy-side-nav-search input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--si-accent);
  box-shadow: 0 0 0 3px rgba(235, 200, 8, 0.18);
}

.wy-menu-vertical ul.current {
  background: var(--si-sidebar) !important;
}

.wy-menu-vertical ul.current > li:not(.current) > a {
  color: #fff !important;
  background: transparent !important;
}

.wy-menu-vertical ul.current > li:not(.current) > a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.wy-menu-vertical ul.current > li.current > a,
.wy-menu-vertical ul.current li.toctree-l1.current > a,
.wy-menu-vertical ul.current li.toctree-l2.current > a,
.wy-menu-vertical ul.current li.toctree-l3.current > a {
  background: #eef3f7 !important;
  color: #1f2933 !important;
  font-weight: 600;
}

/* Sidebar menu – dark default, light panels get dark text */
.wy-menu-vertical a,
.wy-menu-vertical li.toctree-l1 > a,
.wy-menu-vertical li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l3 > a,
.wy-menu-vertical li.toctree-l4 > a {
  color: #fff !important;
  background: transparent !important;
}

.wy-menu-vertical li.current,
.wy-menu-vertical li.on,
.wy-menu-vertical li.toctree-l1.current {
  background: var(--si-sidebar) !important;
  border-left: 3px solid var(--si-accent);
}

/* Rozbalená sekce – světlé pozadí, tmavý text */
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on > a,
.wy-menu-vertical li.toctree-l1.current > a {
  background: #eef3f7 !important;
  color: #1f2933 !important;
  font-weight: 600;
}

.wy-menu-vertical li.current > a:hover,
.wy-menu-vertical li.on > a:hover {
  background: #e3ecf2 !important;
  color: #000 !important;
}

/* Podpoložky v rozbalené sekci – tmavé pozadí, bílý text */
.wy-menu-vertical li.current ul,
.wy-menu-vertical li.on ul {
  background: var(--si-sidebar-dark) !important;
}

.wy-menu-vertical li.current li > a,
.wy-menu-vertical li.on li > a {
  color: #fff !important;
  background: transparent !important;
}

.wy-menu-vertical li.current li > a:hover,
.wy-menu-vertical li.on li > a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

/* Aktivní podstránka – světlé pozadí, tmavý text */
.wy-menu-vertical li.current li.current,
.wy-menu-vertical li.toctree-l2.current,
.wy-menu-vertical li.toctree-l3.current,
.wy-menu-vertical li.toctree-l4.current {
  background: transparent !important;
  border-left: none;
}

.wy-menu-vertical li.current li.current > a,
.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l3.current > a,
.wy-menu-vertical li.toctree-l4.current > a {
  background: #eef3f7 !important;
  color: #1f2933 !important;
  font-weight: 600;
}

.wy-menu-vertical li.current li.current > a:hover,
.wy-menu-vertical li.toctree-l2.current > a:hover,
.wy-menu-vertical li.toctree-l3.current > a:hover,
.wy-menu-vertical li.toctree-l4.current > a:hover {
  background: #e3ecf2 !important;
  color: #000 !important;
}

/* Hover na běžných položkách mimo rozbalenou sekci */
.wy-menu-vertical li:not(.current):not(.on) > a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.wy-menu-vertical .caption,
.wy-menu-vertical .caption-text {
  color: var(--si-accent) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wy-menu-vertical li button.toctree-expand {
  opacity: 0.85;
  filter: brightness(2);
}

.wy-menu-vertical li.current > a ~ button.toctree-expand,
.wy-menu-vertical li.on > a ~ button.toctree-expand,
.wy-menu-vertical li.current li.current > a ~ button.toctree-expand,
.wy-menu-vertical li.toctree-l2.current > a ~ button.toctree-expand {
  filter: none !important;
  opacity: 0.65;
}

.wy-nav-content-wrap {
  background: var(--si-bg);
}

html.si-ready .wy-nav-content {
  animation: si-content-in 0.38s ease both;
}

@keyframes si-content-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wy-nav-content {
  max-width: 1100px;
  background: var(--si-surface);
  border: 1px solid var(--si-border);
  border-radius: var(--si-radius);
  box-shadow: var(--si-shadow);
  margin: 1.5rem;
  padding: 2rem 2.25rem;
}

.wy-breadcrumbs {
  color: var(--si-text-muted);
  margin-bottom: 1rem;
}

.wy-breadcrumbs a {
  color: var(--si-link);
}

.wy-breadcrumbs a:hover {
  color: var(--si-link-hover);
}

.rst-content {
  line-height: 1.7;
  font-size: 1rem;
}

.rst-content p,
.rst-content li,
.document,
section[itemprop="articleBody"] {
  font-family: var(--si-font);
  color: var(--si-text);
}

.rst-content strong,
.rst-content b {
  color: var(--si-sidebar);
  font-weight: 700;
}

.rst-content img,
.rst-content .align-center,
.rst-content a img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  border-radius: var(--si-radius);
  border: 1px solid var(--si-border);
  box-shadow: var(--si-shadow);
}

.rst-content hr,
.wy-breadcrumbs + hr,
div[role="navigation"] hr {
  border: 0;
  border-top: 1px solid var(--si-border);
  margin: 1rem 0 1.5rem;
}

.wy-breadcrumbs-aside a {
  color: var(--si-text-muted);
}

.wy-breadcrumbs-aside a:hover {
  color: var(--si-link);
}

.rst-content .headerlink {
  color: var(--si-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rst-content h1:hover .headerlink,
.rst-content h2:hover .headerlink,
.rst-content h3:hover .headerlink {
  opacity: 1;
}

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
  color: var(--si-sidebar);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rst-content h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--si-accent);
  padding-bottom: 0.45rem;
  margin-bottom: 1.25rem;
}

.rst-content h2 {
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--si-border);
}

.rst-content a {
  color: var(--si-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.rst-content a:hover {
  color: var(--si-link-hover);
  text-decoration: underline;
}

.rst-content .toctree-wrapper p.caption,
.rst-content p.caption {
  color: var(--si-sidebar);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rst-content .toctree-l1 > li > a {
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  transition: background 0.2s ease;
}

.rst-content .toctree-l1 > li > a:hover {
  background: var(--si-code-bg);
}

.rst-content blockquote {
  border-left: 4px solid var(--si-accent);
  background: var(--si-code-bg);
  border-radius: 0 var(--si-radius) var(--si-radius) 0;
  padding: 0.85rem 1rem;
}

.rst-content pre,
.rst-content code,
.rst-content tt {
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
}

.rst-content code.literal,
.rst-content tt.literal {
  background: var(--si-code-bg);
  border: 1px solid var(--si-border);
  border-radius: 6px;
  padding: 0.12rem 0.35rem;
}

.rst-content pre {
  background: #1f2933;
  color: #eef3f7;
  border-radius: var(--si-radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

.rst-content table.docutils,
.wy-table-responsive table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid var(--si-border);
  border-radius: var(--si-radius);
  overflow: hidden;
}

.rst-content table.docutils thead,
.wy-table-responsive table thead {
  color: #fff;
}

.rst-content table.docutils thead th,
.rst-content table.docutils th.head,
.wy-table-responsive table thead th,
.wy-table-responsive table th.head {
  background: var(--si-sidebar) !important;
  color: #fff !important;
  font-weight: 600;
}

.rst-content table.docutils thead th p,
.rst-content table.docutils th.head p,
.rst-content table.docutils thead th strong,
.rst-content table.docutils th.head strong,
.rst-content table.docutils thead th b,
.rst-content table.docutils th.head b,
.wy-table-responsive table thead th p,
.wy-table-responsive table th.head p,
.wy-table-responsive table thead th strong,
.wy-table-responsive table th.head strong,
.wy-table-responsive table thead th b,
.wy-table-responsive table th.head b,
html.writer-html5 .rst-content table.docutils thead th > p,
html.writer-html5 .rst-content table.docutils th.head > p {
  color: #fff !important;
}

.rst-content table.docutils thead tr.row-odd th,
.rst-content table.docutils thead tr.row-even th,
.wy-table-responsive table thead tr.row-odd th,
.wy-table-responsive table thead tr.row-even th {
  background: var(--si-sidebar) !important;
  color: #fff !important;
}

.rst-content table.docutils tbody tr:nth-child(even) td,
.wy-table-responsive table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.rst-content table.docutils tbody td,
.rst-content table.docutils tbody td p,
.wy-table-responsive table tbody td,
.wy-table-responsive table tbody td p {
  color: var(--si-text);
}

.rst-content table.docutils td,
.rst-content table.docutils th,
.wy-table-responsive table td,
.wy-table-responsive table th {
  border-color: var(--si-border);
  padding: 0.65rem 0.85rem;
}

.rst-content .admonition,
.rst-content .note,
.rst-content .warning,
.rst-content .important,
.rst-content .tip {
  border-radius: var(--si-radius);
  border: 1px solid var(--si-border);
  box-shadow: none;
}

.rst-content .admonition-title {
  background: var(--si-sidebar);
  color: #fff;
  border-radius: calc(var(--si-radius) - 2px) calc(var(--si-radius) - 2px) 0 0;
}

.rst-content .admonition-title,
.rst-content .admonition-title p,
.rst-content .admonition-title strong {
  color: #fff !important;
}

.rst-content .note .admonition-title {
  background: var(--si-link);
}

.rst-content .warning .admonition-title,
.rst-content .important .admonition-title {
  background: #c7254e;
}

.btn,
.rst-content .btn,
.wy-btn,
.wy-btn-neutral {
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wy-nav-top {
  background: var(--si-sidebar) !important;
}

.wy-nav-top a {
  color: #fff !important;
}

footer,
.rst-footer-buttons {
  color: var(--si-text-muted);
}

footer .rst-footer-buttons .btn,
.rst-footer-buttons .btn {
  background: var(--si-accent);
  border-color: var(--si-accent);
  color: #1f2933;
  font-weight: 600;
}

footer .rst-footer-buttons .btn:hover,
.rst-footer-buttons .btn:hover {
  background: var(--si-accent-hover);
  border-color: var(--si-accent-hover);
  color: #000;
}

@media screen and (min-width: 767px) {
  .wy-table-responsive table td {
    white-space: normal !important;
  }

  .wy-table-responsive {
    overflow: visible !important;
  }
}

@media screen and (max-width: 768px) {
  .wy-nav-content {
    margin: 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: 8px;
  }

  .rst-content h1 {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.si-ready .wy-nav-content-wrap,
  html.si-leaving .wy-nav-content-wrap,
  html.si-ready .wy-nav-content {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
