:root {
  --it-red: #b3202a;
  --it-green: #2e6b3a;
  --it-cream: #faf9f6;
  --it-ink: #1f2933;
  --it-muted: #52606d;
  --it-line: #d6d9d6;
  --it-white: #ffffff;
  --it-active-title: #ffd166;
  --it-subtitle-bg: #2f5f3a;
  --it-subtitle-bg-hover: #3d7649;
  --it-subtitle-bg-active: #275232;
  --it-subtitle-text: rgba(255, 255, 255, 0.96);
  --it-shadow: 0 20px 50px rgba(31, 41, 51, 0.12);
  --it-soft-red: rgba(179, 32, 42, 0.08);
  --it-soft-green: rgba(46, 107, 58, 0.10);
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(179, 32, 42, 0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(46, 107, 58, 0.12), transparent 28%),
    linear-gradient(140deg, #fdfcf9 0%, #f5f7f4 100%);
}

body,
.wy-body-for-nav,
.wy-grid-for-nav {
  color: var(--it-ink);
}

.wy-nav-side {
  background: linear-gradient(180deg, #234a2d 0%, #17351f 100%);
  box-shadow: 8px 0 24px rgba(31, 41, 51, 0.12);
}

.wy-side-scroll {
  background: transparent;
}

@media screen and (min-width: 769px) {
  .wy-nav-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
  }

  .wy-side-scroll {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scroll-behavior: auto;
  }
}

.wy-nav-top {
  background: linear-gradient(135deg, #234a2d, var(--it-green));
  color: var(--it-white);
}

.wy-nav-top a,
.wy-nav-top i {
  color: var(--it-white);
}

.wy-side-nav-search {
  background: linear-gradient(135deg, var(--it-red), var(--it-green));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
  color: var(--it-white);
  font-weight: 800;
}

.wy-side-nav-search input[type="text"] {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: var(--it-white);
}

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

.wy-menu-vertical p.caption {
  margin: 1.1rem 0.5rem 0.45rem;
  padding: 0;
  position: static;
}

.wy-menu-vertical p.caption span.caption-text {
  display: block;
  width: 100%;
  padding: 0.62rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.wy-menu-vertical a {
  color: rgba(255, 255, 255, 0.90);
  border-radius: 12px;
  margin: 2px 8px;
}

.wy-menu-vertical a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--it-white);
}

.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 {
  position: relative;
}

.wy-menu-vertical li button.toctree-expand,
.wy-menu-vertical li.current > a button.toctree-expand,
.wy-menu-vertical li.on a button.toctree-expand {
  position: absolute !important;
  top: 50%;
  right: 0.72rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.12rem;
  height: 1.12rem;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(214, 233, 210, 0.30) !important;
  border-radius: 999px;
  background: rgba(13, 52, 24, 0.38) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.wy-menu-vertical li button.toctree-expand::before {
  content: "\f107" !important;
  display: block;
  font-family: FontAwesome;
  font-size: 0.74rem;
  line-height: 1;
}

.wy-menu-vertical li.current > a button.toctree-expand,
.wy-menu-vertical li.on > a button.toctree-expand,
.wy-menu-vertical li > a:hover button.toctree-expand {
  border-color: rgba(255, 209, 102, 0.58) !important;
  background: rgba(255, 209, 102, 0.14) !important;
  color: var(--it-active-title) !important;
}

.wy-menu-vertical li.current > a button.toctree-expand::before,
.wy-menu-vertical li.on > a button.toctree-expand::before {
  content: "\f106" !important;
}

.wy-menu-vertical li > a:hover button.toctree-expand {
  transform: translateY(-50%) scale(1.06);
}

.wy-menu-vertical li button.toctree-expand:focus-visible {
  outline: 2px solid rgba(255, 209, 102, 0.72);
  outline-offset: 2px;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.current > a:hover,
.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l3.current > a {
  background: rgba(46, 107, 58, 0.94);
  color: var(--it-white);
  border: 0;
}

.wy-menu-vertical li.current {
  background: transparent;
}

.wy-menu-vertical li.current > ul {
  margin: 0.35rem 8px 0.95rem;
  padding: 0.68rem;
  background: rgba(17, 55, 28, 0.82);
  border: 1px solid rgba(143, 188, 143, 0.24);
  border-radius: 18px;
}

.wy-menu-vertical li.current > ul > li + li {
  margin-top: 0.42rem;
}

.wy-menu-vertical li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l3 > a {
  display: block;
  width: 100%;
  margin: 0;
  position: relative;
  color: var(--it-subtitle-text);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: none;
  white-space: normal;
  word-break: normal;
}

.wy-menu-vertical li.toctree-l2 > a::before,
.wy-menu-vertical li.toctree-l3 > a::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(74, 221, 45, 0.86);
  box-shadow: 0 0 0 2px rgba(214, 233, 210, 0.10);
}

.wy-menu-vertical li.toctree-l2 > a {
  font-size: 0.98rem;
  padding: 0.78rem 2.65rem 0.78rem 1.58rem;
  background: var(--it-subtitle-bg);
  border-left: 3px solid rgba(46, 107, 58, 0.34);
}

.wy-menu-vertical li.toctree-l3 > a {
  font-size: 0.92rem;
  padding: 0.62rem 2.65rem 0.62rem 1.72rem;
  background: var(--it-subtitle-bg);
  border-left: 3px solid rgba(46, 107, 58, 0.26);
}

.wy-menu-vertical li.toctree-l3 > a::before {
  width: 0.34rem;
  height: 0.34rem;
  left: 0.94rem;
  background: rgba(46, 107, 58, 0.34);
}

.wy-menu-vertical li.toctree-l2 > a:hover,
.wy-menu-vertical li.toctree-l3 > a:hover {
  color: var(--it-subtitle-text);
  background: var(--it-subtitle-bg-hover);
  border-left-color: rgba(46, 107, 58, 0.70);
}

.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l3.current > a,
.wy-menu-vertical li.toctree-l2.current > a:hover,
.wy-menu-vertical li.toctree-l3.current > a:hover {
  color: var(--it-active-title);
  background: var(--it-subtitle-bg-active);
  border-left-color: var(--it-active-title);
  font-weight: 800;
}

.wy-menu-vertical li.toctree-l2.current > a::before,
.wy-menu-vertical li.toctree-l3.current > a::before {
  background: var(--it-active-title);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.16);
}

/* Keep ReadTheDocs' dynamic current states green instead of gray. */
.wy-menu-vertical li.on > a,
.wy-menu-vertical li.on > a:hover,
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.current > a:hover,
.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.toctree-l1.current > a:hover {
  background: rgba(46, 107, 58, 0.94) !important;
  color: var(--it-white) !important;
  box-shadow: none !important;
}

.wy-menu-vertical li.current,
.wy-menu-vertical li.on {
  background: transparent !important;
}

.wy-menu-vertical li.current li:not(.current) > a:not(.current),
.wy-menu-vertical li.current li.toctree-l2:not(.current) > a:not(.current),
.wy-menu-vertical li.current li.toctree-l3:not(.current) > a:not(.current),
.wy-menu-vertical li.current li.toctree-l4:not(.current) > a:not(.current) {
  background: var(--it-subtitle-bg) !important;
  color: var(--it-subtitle-text) !important;
  border-left-color: rgba(46, 107, 58, 0.34) !important;
  box-shadow: none !important;
}

.wy-menu-vertical li.current li:not(.current) > a:not(.current):hover,
.wy-menu-vertical li.current li.toctree-l2:not(.current) > a:not(.current):hover,
.wy-menu-vertical li.current li.toctree-l3:not(.current) > a:not(.current):hover,
.wy-menu-vertical li.current li.toctree-l4:not(.current) > a:not(.current):hover {
  background: var(--it-subtitle-bg-hover) !important;
  color: var(--it-subtitle-text) !important;
}

.wy-menu-vertical a.current,
.wy-menu-vertical a.current:hover,
.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l2.current > a:hover,
.wy-menu-vertical li.toctree-l3.current > a,
.wy-menu-vertical li.toctree-l3.current > a:hover,
.wy-menu-vertical li.toctree-l2 > a.current,
.wy-menu-vertical li.toctree-l2 > a.current:hover,
.wy-menu-vertical li.toctree-l3 > a.current,
.wy-menu-vertical li.toctree-l3 > a.current:hover {
  background: var(--it-subtitle-bg-active) !important;
  color: var(--it-active-title) !important;
  border-left-color: var(--it-active-title) !important;
  box-shadow: none !important;
}

.wy-menu-vertical a.current::before,
.wy-menu-vertical li.toctree-l2.current > a::before,
.wy-menu-vertical li.toctree-l3.current > a::before,
.wy-menu-vertical li.toctree-l2 > a.current::before,
.wy-menu-vertical li.toctree-l3 > a.current::before {
  background: var(--it-active-title) !important;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.16) !important;
}

.wy-nav-content-wrap {
  background: transparent;
}

.wy-nav-content {
  max-width: 1080px;
  margin: 24px auto;
  background: transparent;
}

.rst-content {
  background: transparent;
}

.document,
.rst-content > div[role="main"],
.rst-content .document {
  background: var(--it-white);
  border: 1px solid rgba(62, 209, 62, 0.95);
  border-radius: 24px;
  box-shadow: var(--it-shadow);
  padding: 28px 32px;
}

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
  color: var(--it-ink);
  letter-spacing: -0.02em;
}

.rst-content h1 {
  margin-top: 0;
}

.rst-content a,
a {
  color: var(--it-green);
}

.rst-content a:hover,
a:hover {
  color: var(--it-red);
}

.rst-content code.literal,
.rst-content tt.literal,
code,
tt {
  color: var(--it-red);
}

.rst-content table.docutils,
.rst-content table.docutils td,
.rst-content table.docutils th,
.wy-table-responsive table td,
.wy-table-responsive table th {
  border-color: var(--it-line);
}

.rst-content table.docutils thead th,
.wy-table-responsive table thead th {
  background: rgba(46, 107, 58, 0.08);
  color: var(--it-ink);
}

.rst-content blockquote,
.rst-content .admonition,
.rst-content .note,
.rst-content .warning,
.rst-content .important,
.rst-content .seealso {
  position: relative;
  overflow: hidden;
  background: var(--it-white);
  border: 1px solid rgba(214, 217, 214, 0.95);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.rst-content .admonition::before,
.rst-content .note::before,
.rst-content .warning::before,
.rst-content .important::before,
.rst-content .seealso::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--it-red), var(--it-green));
}

.rst-content .admonition-title,
.rst-content .note .admonition-title,
.rst-content .warning .admonition-title,
.rst-content .important .admonition-title,
.rst-content .seealso .admonition-title {
  background: transparent;
  color: var(--it-ink);
  font-weight: 800;
}

.featured-guides {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 1.8rem;
}

.guide-card {
  position: relative;
  overflow: hidden;
  background: var(--it-white);
  border: 1px solid rgba(119, 233, 119, 0.95);
  border-radius: 24px;
  box-shadow: var(--it-shadow);
  padding: 1.3rem 1.2rem 1.1rem;
}

.guide-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--it-red), var(--it-green));
}

.guide-card p:first-child {
  color: var(--it-ink);
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
}

.guide-card p {
  color: var(--it-muted);
}

.guide-card ul {
  margin-top: 0.7rem;
  margin-bottom: 0;
}

.guide-card li {
  margin-bottom: 0.28rem;
}

.guide-card a {
  color: var(--it-green);
  font-weight: 700;
}

.rst-content .toctree-wrapper > p.caption span.caption-text {
  color: var(--it-ink);
}

.auth-logout-item {
  display: flex;
  align-items: center;
  margin-left: 0.75rem;
}

.auth-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.4rem, 4vw, 2.8rem);
  height: clamp(2.4rem, 4vw, 2.8rem);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--it-red);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-logout-btn:hover,
.auth-logout-btn:focus-visible {
  transform: translateY(-1px) scale(1.03);
  opacity: 0.9;
  outline: none;
}

.auth-logout-icon {
  display: inline-flex;
  width: clamp(1.45rem, 2.8vw, 1.72rem);
  height: clamp(1.45rem, 2.8vw, 1.72rem);
  line-height: 0;
}

.auth-logout-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(31, 41, 51, 0.08));
}

.btn,
.btn-neutral {
  border-radius: 14px;
}

@media screen and (max-width: 768px) {
  .wy-menu-vertical li.current > ul {
    padding: 0.58rem;
    border-radius: 16px;
  }

  .wy-menu-vertical li.toctree-l2 > a {
    padding: 0.72rem 0.88rem 0.72rem 1.5rem;
  }

  .wy-menu-vertical li.toctree-l3 > a {
    padding: 0.58rem 0.88rem 0.58rem 1.62rem;
  }

  .wy-nav-content {
    margin: 12px auto;
  }

  .document,
  .rst-content > div[role="main"],
  .rst-content .document {
    padding: 22px 20px;
    border-radius: 20px;
  }

  .auth-logout-item {
    margin-left: 0.45rem;
  }

  .auth-logout-btn {
    width: 2.35rem;
    height: 2.35rem;
  }

  .auth-logout-icon {
    width: 1.35rem;
    height: 1.35rem;
  }
}

@media screen and (max-width: 480px) {
  .wy-menu-vertical p.caption span.caption-text {
    padding: 0.56rem 0.72rem;
    letter-spacing: 0.04em;
  }

  .wy-menu-vertical li.current > ul {
    padding: 0.52rem;
  }

  .wy-menu-vertical li.toctree-l2 > a {
    font-size: 0.94rem;
    padding: 0.68rem 0.82rem 0.68rem 1.42rem;
  }

  .wy-menu-vertical li.toctree-l3 > a {
    font-size: 0.89rem;
    padding: 0.55rem 0.82rem 0.55rem 1.52rem;
  }

  .auth-logout-btn {
    width: 2.15rem;
    height: 2.15rem;
  }

  .auth-logout-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}
