/* One documentation site: a compact language toggle pinned to the top-right of
   every page, plus the labelled list in the sidebar as the no-JavaScript path. */
.fc-lang-toggle {
  position: fixed;
  top: 0.55rem;
  right: 1rem;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #d6dce1;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  font-size: 0.82rem;
  line-height: 1.4;
}
.fc-lang-toggle a {
  color: #5a6b7b;
  text-decoration: none;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
}
.fc-lang-toggle a:hover {
  color: #1f4e79;
  background: #eef4fa;
}
.fc-lang-toggle a.fc-active {
  color: #ffffff;
  background: #2980b9;
  font-weight: 600;
}
.fc-lang-toggle .fc-sep {
  color: #b6c2cc;
}

.fc-language-switch {
  margin: 0.6rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #e3e8ec;
  font-size: 0.9em;
  line-height: 1.7;
}
.fc-language-switch .fc-language-title {
  display: block;
  color: #5a6b7b;
  font-size: 0.78em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fc-language-switch a {
  display: inline-block;
  margin-right: 0.6rem;
  color: #2980b9;
  text-decoration: none;
}
.fc-language-switch a:hover {
  text-decoration: underline;
}
.fc-language-switch a.fc-active {
  color: #1f2d3d;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 768px) {
  .fc-lang-toggle {
    top: 0.35rem;
    right: 0.5rem;
    font-size: 0.78rem;
  }
}

/* Landing page: action buttons and path cards. */
.fc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 1.6rem;
}
.fc-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid #d6dce1;
  border-radius: 0.5rem;
  color: #1f4e79;
  text-decoration: none;
  font-weight: 600;
  background: #f7fafc;
}
.fc-button:hover {
  background: #eef4fa;
  border-color: #b8c9d9;
}
.fc-button.fc-primary {
  background: #2980b9;
  border-color: #2980b9;
  color: #ffffff;
}
.fc-button.fc-primary:hover {
  background: #2471a3;
  border-color: #2471a3;
}
.fc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.6rem;
}
.fc-card {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid #d6dce1;
  border-radius: 0.6rem;
  text-decoration: none;
  color: #1f2d3d;
  background: #fbfcfd;
}
.fc-card:hover {
  border-color: #b8c9d9;
  background: #f3f8fc;
}
.fc-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #1f4e79;
}
.fc-card span {
  color: #5a6b7b;
  font-size: 0.92rem;
}

/* Copy-to-clipboard control added by copy_code.js. */
.highlight {
  position: relative;
}
.fc-copy {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid #cfd8df;
  border-radius: 0.35rem;
  background: #ffffff;
  color: #5a6b7b;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}
.highlight:hover .fc-copy,
.fc-copy:focus {
  opacity: 1;
}
.fc-copy.fc-copied {
  color: #1f7a3f;
  border-color: #9fd3b0;
}
@media (max-width: 768px) {
  .fc-copy {
    opacity: 1;
  }
}

/* Keyboard access and "Edit on GitHub" affordances. */
.fc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 0.4rem 0.8rem;
  background: #ffffff;
  border: 1px solid #2980b9;
  border-radius: 0.35rem;
  color: #1f4e79;
  text-decoration: none;
}
.fc-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}
#fc-main:focus {
  outline: none;
}
.fc-version {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #8a99a6;
  letter-spacing: 0.02em;
}
a:focus-visible,
button:focus-visible,
.fc-button:focus-visible,
.fc-card:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .fc-copy {
    transition: none;
  }
}

/* Printing: keep the article, drop the furniture, and show where links point. */
@media print {
  .wy-nav-side,
  .wy-nav-top,
  .wy-side-nav-search,
  .fc-lang-toggle,
  .fc-language-switch,
  .fc-skip,
  .fc-copy,
  .rst-versions,
  .wy-breadcrumbs-aside,
  .rst-footer-buttons {
    display: none !important;
  }
  .wy-nav-content-wrap {
    margin-left: 0 !important;
  }
  .wy-nav-content {
    max-width: none !important;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
  pre, table, img {
    page-break-inside: avoid;
  }
  h2, h3 {
    page-break-after: avoid;
  }
}

/* Top-right cluster: language pill and theme switch. */
.fc-topbar {
  position: fixed;
  top: 0.55rem;
  right: 1rem;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.fc-topbar .fc-lang-toggle {
  position: static;
}
.fc-theme-toggle {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 1px solid #d6dce1;
  border-radius: 999px;
  background: #ffffff;
  color: #5a6b7b;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.fc-theme-toggle:hover {
  background: #eef4fa;
  color: #1f4e79;
}

/* Dark theme, applied as .fc-dark on <html> by theme.js. */
.fc-dark {
  color-scheme: dark;
}
.fc-dark body,
.fc-dark .wy-body-for-nav,
.fc-dark .wy-nav-content-wrap {
  background: #12181d;
  color: #d6dee5;
}
.fc-dark .rst-content h1,
.fc-dark .rst-content h2,
.fc-dark .rst-content h3,
.fc-dark .rst-content h4,
.fc-dark .rst-content h5,
.fc-dark .rst-content h6,
.fc-dark .rst-content .toctree-wrapper p.caption {
  color: #e6edf3;
}
.fc-dark a {
  color: #6cb6ff;
}
.fc-dark a:visited {
  color: #9ecbff;
}
.fc-dark code,
.fc-dark .rst-content tt,
.fc-dark .rst-content code {
  background: rgba(255, 255, 255, 0.07);
  color: #f0a8a0;
  border-color: rgba(255, 255, 255, 0.12);
}
.fc-dark .wy-nav-side {
  background: #1b232b;
}
.fc-dark .wy-side-nav-search {
  background: #235a82;
}
.fc-dark .wy-side-nav-search input[type="text"] {
  background: #12181d;
  color: #d6dee5;
  border-color: #33414d;
}
.fc-dark .wy-menu-vertical li.current {
  background: #24303a;
}
.fc-dark .wy-menu-vertical li.current > a,
.fc-dark .wy-menu-vertical li.on a {
  color: #e6edf3;
  background: #24303a;
  border-color: #3a4a58;
}
.fc-dark .wy-menu-vertical a:hover {
  background: #2b3945;
}
.fc-dark .wy-breadcrumbs li,
.fc-dark .wy-breadcrumbs li a {
  color: #9fb0be;
}
.fc-dark .rst-content table.docutils,
.fc-dark .rst-content table.field-list {
  border-color: #33414d;
}
.fc-dark .rst-content table.docutils thead th,
.fc-dark .rst-content table.docutils td,
.fc-dark .rst-content table.docutils th {
  background: #1b232b;
  border-color: #33414d;
  color: #d6dee5;
}
.fc-dark .rst-content table.docutils td p {
  color: #d6dee5;
}
.fc-dark .rst-content .admonition,
.fc-dark .rst-content .note,
.fc-dark .rst-content .warning,
.fc-dark .rst-content .seealso {
  background: #1b2733;
  border-color: #2d4b66;
}
.fc-dark .rst-content .admonition-title {
  background: #223142;
  color: #cfe3ff;
}
.fc-dark .rst-content pre,
.fc-dark .rst-content .highlight {
  background: #202020;
}
.fc-dark .rst-content .highlight pre {
  color: #d0d0d0;
}
.fc-dark hr {
  border-color: #33414d;
}
.fc-dark .rst-content dl dt {
  color: #e6edf3;
}
.fc-dark .rst-content .headerlink {
  color: #55636f;
}
.fc-dark footer,
.fc-dark .rst-footer-buttons a {
  color: #9fb0be;
}
.fc-dark .fc-lang-toggle,
.fc-dark .fc-theme-toggle {
  background: #1b232b;
  border-color: #33414d;
  box-shadow: none;
}
.fc-dark .fc-lang-toggle a {
  color: #9fb0be;
}
.fc-dark .fc-lang-toggle a.fc-active {
  background: #2f6f9f;
  color: #ffffff;
}
.fc-dark .fc-theme-toggle {
  color: #cfe3ff;
}
.fc-dark .fc-skip {
  background: #1b232b;
  border-color: #6cb6ff;
  color: #cfe3ff;
}
.fc-dark .fc-copy {
  background: #24303a;
  border-color: #3a4a58;
  color: #c6d3dd;
}
.fc-dark .fc-version {
  color: #7d8b97;
}
.fc-dark .fc-button {
  background: #1b232b;
  border-color: #33414d;
  color: #9ecbff;
}
.fc-dark .fc-button.fc-primary {
  background: #2f6f9f;
  border-color: #2f6f9f;
  color: #ffffff;
}
.fc-dark .fc-card {
  background: #171f26;
  border-color: #33414d;
  color: #d6dee5;
}
.fc-dark .fc-card strong {
  color: #9ecbff;
}
.fc-dark .fc-card span {
  color: #a8b7c3;
}
.fc-dark .rst-content .section > .section > h2 {
  border-color: #33414d;
}
@media (max-width: 768px) {
  .fc-topbar {
    top: 0.35rem;
    right: 0.5rem;
    gap: 0.25rem;
  }
}
.fc-dark .rst-content table.docutils tbody td,
.fc-dark .rst-content .wy-table-odd td,
.fc-dark .rst-content .wy-table-striped tr:nth-child(2n-1) td {
  background: #1b232b;
  color: #d6dee5;
}
.fc-dark .rst-content .wy-table-striped tr:nth-child(2n) td {
  background: #171f26;
  color: #d6dee5;
}
/* The theme's zebra rule is more specific than a plain table selector. */
.fc-dark .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,
.fc-dark .rst-content table.docutils:not(.field-list) tr:nth-child(2n) td {
  background-color: #1b232b;
  color: #d6dee5;
}
.fc-dark .rst-content table.docutils:not(.field-list) tr:nth-child(2n) td {
  background-color: #171f26;
}
.fc-dark .rst-content a.reference,
.fc-dark .rst-content a.reference.internal,
.fc-dark .rst-content a.reference.external {
  color: #6cb6ff;
}
.fc-dark .rst-content .btn,
.fc-dark .rst-content .btn-neutral,
.fc-dark .rst-content .btn-neutral:visited {
  background: #1b232b;
  border-color: #33414d;
  color: #cfe3ff;
}
.fc-dark .rst-content .btn:hover {
  background: #24303a;
}
/* Footer navigation keeps a light button from the theme; darken it explicitly. */
.fc-dark .rst-content .btn,
.fc-dark .rst-content .btn-neutral,
.fc-dark .rst-content .btn-neutral:visited,
.fc-dark .rst-footer-buttons .btn {
  background: #1b232b !important;
  border-color: #33414d !important;
  color: #cfe3ff !important;
}
/* Primary call-to-action must keep white text in dark mode. */
.fc-dark a.fc-button.fc-primary,
.fc-dark a.fc-button.fc-primary:visited,
.fc-dark a.fc-button.fc-primary:hover {
  color: #ffffff !important;
  background: #2f6f9f !important;
  border-color: #2f6f9f !important;
}
.fc-doc-links {
  margin: 0.4rem 0 1rem;
  padding: 0 0.75rem;
  font-size: 0.9em;
  color: #9fb0be;
}
.fc-doc-links a {
  color: #cfe3ff;
  text-decoration: none;
}
.fc-doc-links a:hover {
  text-decoration: underline;
}
