
    /* Same base styles from homepage */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
      color: #333;
      /* Guard against any stray wide child triggering a horizontal scrollbar
         and the "jumpy" resize behavior. */
      overflow-x: hidden;
    }

    /* Header styles same as homepage */
    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.5rem 2rem;
      background: linear-gradient(135deg, #f5f7ff 0%, #e9f0ff 100%);
      position: fixed;
      width: 100%;
      top: 0;
      z-index: 1000;
    }

    .logo-text {
      font-size: 1.8rem;
      font-weight: 800;
      background: linear-gradient(90deg, #4361ee, #3a0ca3);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      letter-spacing: -0.5px;
    }

    .hamburger {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 30px;
      height: 20px;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      z-index: 10;
    }

    .hamburger .line {
      width: 100%;
      height: 2px;
      background-color: #333;
      transition: all 0.3s ease;
    }

    .hamburger.active .line:nth-child(1) {
      transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .line:nth-child(2) {
      opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
      transform: translateY(-9px) rotate(-45deg);
    }

    /* Navigation menu styles */
    .nav-menu {
      position: fixed;
      top: 74px;
      right: -320px;
      width: 320px;
      height: calc(100vh - 74px);
      background-color: #ffffff;
      box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
      transition: right 0.3s ease;
      z-index: 999;
      padding: 2rem;
      overflow-y: auto;
    }

    .nav-menu.active {
      right: 0;
    }

    .nav-menu h3 {
      font-size: 1.2rem;
      font-weight: 600;
      margin-bottom: 0.75rem;
      color: #333;
    }

    .nav-menu h3:not(:first-child) {
      margin-top: 2rem;
    }

    .nav-menu ul {
      list-style: none;
      margin-bottom: 0.5rem;
    }

    .nav-menu li {
      margin-bottom: 0.25rem;
    }

    .nav-menu a {
      color: #555;
      text-decoration: none;
      font-size: 0.95rem;
      font-weight: 500;
      transition: color 0.2s ease;
      display: block;
      padding: 0.4rem 0;
    }

    .nav-menu a:hover {
      color: #4361ee;
    }

    .nav-menu a.active {
      color: #4361ee;
      font-weight: 600;
    }

    /* Documentation specific styles */
    .docs-container {
      display: flex;
      width: 100%;
      max-width: 1000px;
      margin: 0 auto;
      /* Clears the fixed header. */
      padding-top: 74px;
    }

    .docs-content {
      flex: 1 1 auto;
      /* min-width:0 lets the flex item shrink below the intrinsic width of
         wide children (code blocks / tables) instead of forcing horizontal
         overflow — this is what caused the jumpy, uneven side gaps. */
      min-width: 0;
      width: 100%;
      padding: 1rem 2rem;
    }

    .docs-section {
      margin-bottom: 3rem;
      max-width: 100%;
    }

    .docs-section h2 {
      font-size: 2.2rem;
      font-weight: 700;
      margin-bottom: 1rem;
      color: #333;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid #eee;
    }

    .docs-section h3 {
      font-size: 1.6rem;
      font-weight: 600;
      margin: 2rem 0 1rem;
      color: #333;
    }

    .docs-section h4 {
      font-size: 1.2rem;
      font-weight: 600;
      margin: 1.5rem 0 0.8rem;
      color: #333;
    }

    .docs-section p {
      font-size: 1rem;
      line-height: 1.6;
      margin-bottom: 1rem;
      color: #555;
    }

    .docs-section ul,
    .docs-section ol {
      margin-bottom: 1rem;
      padding-left: 1.5rem;
    }

    .docs-section li {
      margin-bottom: 0.5rem;
      line-height: 1.6;
    }

    /* Code container styles */
    .code-container {
      background: #282c34;
      border-radius: 8px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      position: relative;
      margin: 1.5rem 0;
    }

    .code-header {
      background: #21252b;
      padding: 0.5rem 1rem;
      display: flex;
      align-items: center;
    }

    .window-buttons {
      display: flex;
      gap: 8px;
      margin-right: 12px;
    }

    .window-button {
      width: 12px;
      height: 12px;
      border-radius: 50%;
    }

    .close-btn {
      background: #ff5f56;
    }

    .minimize-btn {
      background: #ffbd2e;
    }

    .maximize-btn {
      background: #27c93f;
    }

    .code-title {
      color: rgba(255, 255, 255, 0.8);
      font-size: 0.9rem;
    }

    .code-content {
      padding: 1rem;
      max-height: 500px;
      overflow-y: auto;
    }

    /* Tabs styling */
    .tabs {
      margin-top: 2rem;
    }

    .tab-header {
      display: flex;
      overflow-x: auto;
      border-bottom: 2px solid #eee;
      margin-bottom: 1.5rem;
    }

    .tab-btn {
      padding: 12px 24px;
      background: none;
      border: none;
      font-size: 1rem;
      font-weight: 600;
      color: #666;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
    }

    .tab-btn.active {
      color: #4361ee;
    }

    .tab-btn.active::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, #4361ee, #3a0ca3);
    }

    .tab-content {
      position: relative;
    }

    .tab-pane {
      display: none;
    }

    .tab-pane.active {
      display: block;
    }

    /* Table styles */
    .docs-table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5rem 0;
      font-size: 0.95rem;
      /* Let wide tables scroll horizontally inside their own box rather than
         pushing the whole page wider. */
      display: block;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .docs-table th {
      background-color: #f5f7ff;
      text-align: left;
      padding: 0.8rem 1rem;
      font-weight: 600;
      border: 1px solid #eee;
    }

    .docs-table td {
      padding: 0.8rem 1rem;
      border: 1px solid #eee;
    }

    .docs-table tr:hover {
      background-color: #f8f9fe;
    }

    /* Alert boxes */
    .alert {
      padding: 1rem 1.5rem;
      margin: 1.5rem 0;
      border-radius: 4px;
      border-left: 4px solid;
    }

    .alert-info {
      background-color: #f0f7ff;
      border-color: #4361ee;
    }

    .alert-warning {
      background-color: #fff8f0;
      border-color: #ff9800;
    }

    .alert-tip {
      background-color: #f0fff7;
      border-color: #00c853;
    }

    /* Footer styles */
    .footer {
      padding: 60px 2rem 40px;
      background-color: #282c34;
      color: #eee;
    }

    .footer-container {
      max-width: 1200px;
      margin: 0 auto;
    }

    .footer-bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 30px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-bottom p {
      font-size: 0.9rem;
      opacity: 0.7;
    }

    .footer-links {
      display: flex;
      gap: 20px;
    }

    .footer-links a {
      color: #ddd;
      text-decoration: none;
      font-size: 0.9rem;
      transition: color 0.2s ease;
    }

    .footer-links a:hover {
      color: white;
    }

    /* Back to top button */
    .back-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      opacity: 0;
      transition: opacity 0.3s ease;
      z-index: 999;
    }

    .back-to-top.visible {
      opacity: 1;
    }

    /* Responsive design */
    @media (max-width: 768px) {
      .docs-container {
        flex-direction: column;
      }

      .docs-content {
        padding: 1rem .5rem;
      }

      .nav-menu {
        width: 85%;
        right: -100%;
      }

      .docs-section h2 {
        font-size: 1.8rem;
      }

      .docs-section h3 {
        font-size: 1.4rem;
      }
    }

    pre[class*="language-"] {
      margin: 0;
      background: transparent;
      white-space: pre-wrap !important;
      word-wrap: break-word !important;
    }

    code[class*="language-"] {
      white-space: pre-wrap !important;
      word-wrap: break-word !important;
    }
  
    /* --- added by docs split: normalized heading scale (h1 > h2 > h3 > h4) --- */
    /* These come after the original rules so they win the cascade. After the
       split each page has exactly one h1 (the title) and a contiguous outline. */
    .docs-section h1 {
      font-size: 2.1rem;
      font-weight: 700;
      margin: 0 0 1rem;
      color: #222;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid #eee;
      line-height: 1.2;
    }
    .docs-section h2 {
      font-size: 1.55rem;
      font-weight: 700;
      margin: 2.5rem 0 1rem;
      color: #222;
      border-bottom: none;
      padding-bottom: 0;
    }
    .docs-section h3 {
      font-size: 1.25rem;
      font-weight: 600;
      margin: 1.8rem 0 0.8rem;
      color: #333;
    }
    .docs-section h4 {
      font-size: 1.08rem;
      font-weight: 600;
      margin: 1.4rem 0 0.6rem;
      color: #333;
    }
    .docs-section h5 {
      font-size: 1rem;
      font-weight: 600;
      margin: 1.2rem 0 0.5rem;
      color: #444;
    }
    /* Skip-to-content link: visually hidden until focused (keyboard a11y) */
    .skip-link {
      position: absolute;
      left: -9999px;
      top: 0;
      background: #4361ee;
      color: #fff;
      padding: 0.6rem 1rem;
      border-radius: 0 0 6px 0;
      z-index: 2000;
      text-decoration: none;
    }
    .skip-link:focus { left: 0; }
    .docs-breadcrumb {
      font-size: 0.9rem;
      color: #888;
      margin-bottom: 1rem;
    }
    .docs-breadcrumb a { color: #4361ee; text-decoration: none; }
    .docs-breadcrumb a:hover { text-decoration: underline; }
    .docs-prevnext {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      margin: 3rem 0 1rem;
      padding-top: 1.5rem;
      border-top: 1px solid #eee;
    }
    .docs-prevnext a {
      flex: 1;
      text-decoration: none;
      color: #4361ee;
      font-weight: 600;
      padding: 1rem;
      border: 1px solid #eee;
      border-radius: 8px;
      transition: background 0.2s ease;
    }
    .docs-prevnext a:hover { background: #f5f7ff; }
    .docs-prevnext .next { text-align: right; }
    .docs-prevnext span { display: block; font-size: 0.8rem; color: #888; font-weight: 400; }

    /* --- docs hub: card grid ---------------------------------------------- */
    /* Replaces the wall of blue links with calmer "mini container" cards:
       dark title, muted description, accent only on hover. */
    .docs-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 1rem;
      margin: 1.2rem 0 2.75rem;
    }
    .docs-card {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      padding: 1.1rem 1.2rem;
      border: 1px solid #e6e8f0;
      border-radius: 10px;
      background: #fff;
      text-decoration: none;
      transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    }
    .docs-card:hover {
      border-color: #c7d0f5;
      box-shadow: 0 6px 20px rgba(67, 97, 238, 0.10);
      transform: translateY(-2px);
    }
    .docs-card:focus-visible {
      outline: 2px solid #4361ee;
      outline-offset: 2px;
    }
    .docs-card-title {
      font-size: 1.02rem;
      font-weight: 600;
      color: #1f2430;
      transition: color 0.18s ease;
    }
    .docs-card:hover .docs-card-title { color: #4361ee; }
    .docs-card-desc {
      font-size: 0.88rem;
      line-height: 1.5;
      color: #6b7280;
    }

    /* --- sticky footer ---------------------------------------------------- */
    /* Footer sits at the bottom of the viewport on short pages, but scrolls
       normally when content is taller than the viewport. */
    body {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    .docs-container { flex: 1 0 auto; }
    .footer { flex-shrink: 0; }
