body {
  background: #f6f8fb;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wy-nav-content-wrap {
  background: #f6f8fb;
}

.wy-nav-content {
  max-width: none;
  min-height: 100vh;
  padding: 44px clamp(32px, 5vw, 72px);
  background: #fff;
}

.rst-content {
  max-width: 980px;
}

.rst-content p,
.rst-content li {
  font-size: 16px;
  line-height: 1.85;
}

.rst-content h1,
.rst-content h2,
.rst-content h3 {
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.rst-content h1 {
  margin-top: 0;
  font-size: 36px;
}

.rst-content h2 {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #dbe3ee;
  font-size: 26px;
}

.rst-content h3 {
  font-size: 20px;
}

.rst-content .section-card {
  margin: 24px 0;
  padding: 22px 24px 24px;
  border: 1px solid #dbe3ee;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rst-content .section-card > h3:first-child {
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.rst-content .section-card > :last-child {
  margin-bottom: 0;
}

.rst-content a {
  color: #2563eb;
}

.rst-content code,
.rst-content tt {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f8fafc;
  color: #be123c;
}

.rst-content div[class^="highlight"],
.rst-content pre.literal-block {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8fafc;
}

.rst-content pre.has-copy-button {
  position: relative;
}

.copy-code-button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #374151;
  background: #ffffffd9;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease;
}

.rst-content pre.has-copy-button:hover .copy-code-button,
.rst-content pre.has-copy-button:focus-within .copy-code-button,
.copy-code-button:focus {
  opacity: 1;
}

.copy-code-button:hover {
  background: #ffffff;
  color: #111827;
}

.copy-code-button.copied {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
  opacity: 1;
}

.python-runner {
  margin: 18px 0 22px;
}

.python-runner .highlight,
.python-runner > pre {
  margin: 0;
}

.python-runner-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f9fafb;
}

.python-runner-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.python-runner-button:hover {
  background: #1d4ed8;
}

.python-runner-button:disabled {
  border-color: #9ca3af;
  background: #9ca3af;
  cursor: wait;
}

.python-runner-play {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.python-runner-status {
  color: #4b5563;
  font-size: 13px;
}

.python-runner-output {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #111827;
  color: #f9fafb;
}

.python-runner-output-text {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  white-space: pre-wrap;
}

.python-runner-output[hidden] {
  display: none;
}

.python-runner-output code {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
}

.python-runner-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
  gap: 12px;
  margin-top: 12px;
}

.python-runner-image {
  margin: 0;
}

.python-runner-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #374151;
  border-radius: 4px;
  background: #fff;
}

.python-runner-image figcaption {
  margin-top: 6px;
  color: #d1d5db;
  font-size: 13px;
}

.wy-side-nav-search,
.wy-nav-top {
  background: #2563eb;
}

.wy-side-nav-search input[type="text"] {
  border-color: #dbeafe;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on a {
  border-right: 3px solid #10b981;
}

@media screen and (min-width: 1100px) {
  .wy-nav-content {
    width: calc(100vw - 300px);
  }
}

@media screen and (max-width: 768px) {
  .wy-nav-content {
    padding: 28px 20px;
  }

  .rst-content {
    max-width: none;
  }

  .rst-content h1 {
    font-size: 30px;
  }

  .rst-content .section-card {
    padding: 18px 16px 20px;
  }
}
