
      :root {
        /* default to light until data-theme is applied */
        --bg: #f9fafb;
        --surface: #ffffff;
        --border-subtle: #e5e7eb;
        --text: #111827;
        --muted: #6b7280;
        --accent: #2563eb;
        --code-bg: rgba(15, 23, 42, 0.06); /* soft gray for light mode code blocks */
      }

      :root[data-theme="light"] {
        --bg: #f9fafb;
        --surface: #ffffff;
        --border-subtle: #e5e7eb;
        --text: #111827;
        --muted: #6b7280;
        --accent: #2563eb;
        --code-bg: rgba(15, 23, 42, 0.06);
      }

      :root[data-theme="dark"] {
        --bg: #020617;
        --surface: #020617;
        --border-subtle: #1f2937;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --accent: #38bdf8;
        --code-bg: #020617;
      }

      @media (prefers-color-scheme: dark) {
        :root:not([data-theme]) {
          --bg: #020617;
          --surface: #020617;
          --border-subtle: #1f2937;
          --text: #e5e7eb;
          --muted: #9ca3af;
          --accent: #38bdf8;
          --code-bg: #020617;
        }
      }

      * { box-sizing: border-box; }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        background: var(--bg);
        color: var(--text);
      }

      a { color: var(--accent); }
      a:hover { color: var(--accent-strong); }

      .docs-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
      }

      .header {
        position: sticky;
        top: 0;
        z-index: 20;
        border-bottom: 1px solid var(--border-subtle);
        background: var(--surface);
      }

      .header-inner {
     
        margin: 0 auto;
        padding: 0.75rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
      }

      .theme-toggle {
        border: 1px solid var(--border-subtle);
        background: transparent;
        color: var(--muted);
        padding: 0.25rem 0.6rem;
        font-size: 0.8rem;
        cursor: pointer;
        border-radius: 0;
      }

      .theme-toggle:hover {
        color: var(--text);
        background: rgba(148, 163, 184, 0.15);
      }

      .logo {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        text-decoration: none;
        color: inherit;
      }

      .logo-icon {
        width: 32px;
        height: 32px;
        border-radius: 0;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .logo-text {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
      }

      .logo-title {
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.04em;
      }

      .logo-subtitle {
        font-size: 0.75rem;
        color: var(--muted);
      }

      .header-nav {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.85rem;
      }

      .nav-link {
        color: var(--muted);
        text-decoration: none;
        padding: 0.25rem 0.6rem;
        border-radius: 0;
        transition: background 0.15s ease, color 0.15s ease;
      }

      .nav-link:hover {
        color: var(--text);
        background: rgba(15, 23, 42, 0.8);
      }

      .nav-link.active {
        color: var(--accent-strong);
        background: rgba(56, 189, 248, 0.12);
      }

      .docs-layout {
        flex: 1;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
        /* max-width: 1200px; */
        /* margin: 0 auto; */
        padding: 1.5rem 1.25rem 2.5rem;
      }

      @media (min-width: 1024px) {
        .docs-layout {
          grid-template-columns: 260px minmax(0, 1fr) 230px;
        }
      }

      .sidebar,
      .toc-sidebar {
        display: none;
      }

      @media (min-width: 1024px) {
        .sidebar,
        .toc-sidebar {
          display: block;
        }
      }

      .sidebar {
        position: sticky;
        top: 4.25rem;
        align-self: flex-start;
      }

      .toc-sidebar {
        position: sticky;
        top: 4.25rem;
        align-self: flex-start;
      }

      .sidebar-inner,
      .toc-inner {
        background: var(--surface);
        border-radius: 0;
        border: 1px solid var(--border-subtle);
        padding: 1rem 1rem 1.1rem;
        box-shadow: none;
        font-size: 0.8rem;
      }

      .sidebar-title,
      .toc-title {
        margin: 0 0 0.75rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.18em;
        color: var(--muted);
      }

      .docs-nav {
        margin: 0 0 0.75rem;
      }

      .docs-nav ul {
        list-style: none;
        padding-left: 0;
        margin: 0;
      }

      .docs-nav li {
        margin: 0.05rem 0;
      }

      .docs-nav a {
        display: block;
        padding: 0.25rem 0.35rem;
        border-radius: 0;
        color: var(--muted);
        text-decoration: none;
        transition: background 0.15s ease, color 0.15s ease;
      }

      .docs-nav a:hover {
        color: var(--text);
        background: rgba(15, 23, 42, 0.9);
      }

      .docs-nav li.active > a {
        color: var(--accent-strong);
        background: rgba(56, 189, 248, 0.16);
      }

      .main-card {
        position: relative;
        padding: 1.6rem 1.9rem 2.2rem;
        background: var(--surface);
        border: 1px solid var(--border-subtle);
        border-radius: 0;
        box-shadow: none;
      }

      .content-header {
        margin-bottom: 1.25rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
        padding-bottom: 0.9rem;
      }

      .content-title {
        margin: 0 0 0.35rem;
        font-size: 1.75rem;
        letter-spacing: 0.02em;
      }

      .content-description {
        margin: 0;
        font-size: 0.9rem;
        color: var(--muted);
      }

      .content-body {
        font-size: 0.95rem;
        line-height: 1.8;
      }

      .content-body h1,
      .content-body h2,
      .content-body h3 {
        margin-top: 1.8rem;
      }

      .content-body pre {
        background: var(--code-bg);
        color: var(--text);
        border-radius: 0;
        padding: 0.9rem 1.1rem;
        overflow-x: auto;
        font-size: 0.85rem;
        border: 1px solid var(--border-subtle);
      }

      .content-body code {
        font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        color: var(--text);
        font-size: 0.85em;
      }

      .content-body a {
        text-decoration: none;
        border-bottom: 1px solid rgba(56, 189, 248, 0.5);
      }

      .content-body a:hover {
        border-bottom-color: rgba(56, 189, 248, 1);
      }

      .toc-list {
        list-style: none;
        padding-left: 0;
        margin: 0;
      }

      .toc-list li {
        margin: 0.1rem 0;
      }

      .toc-list a {
        color: var(--muted);
        text-decoration: none;
        font-size: 0.78rem;
      }

      .footer {
        border-top: 1px solid var(--border-subtle);
        background: var(--surface);
        padding: 0.75rem 1.5rem 1.1rem;
        font-size: 0.8rem;
        color: var(--muted);
      }

      .footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
      }

      .footer-links {
        display: flex;
        gap: 0.75rem;
      }

      .footer-link {
        color: var(--muted);
        text-decoration: none;
      }

      .footer-link:hover {
        color: var(--accent-strong);
      }

      /* Header search input – big and prominent */
      .search input#markspresso-search-input {
        width: 260px;
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
        border-radius: 999px;
        border: 1px solid var(--border-subtle);
        background: var(--surface);
        color: var(--text);
      }

      .search input#markspresso-search-input::placeholder {
        color: var(--muted);
      }

      .search input#markspresso-search-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
      }

      /* Results panel – modal-style sheet under the header */
      #markspresso-search-results {
        position: fixed;
        top: 64px;
        left: 50%;
        transform: translateX(-50%);
        width: min(960px, 100% - 2rem);
        max-height: 60vh;
        overflow-y: auto;
        background: var(--surface);
        border-radius: 0;
        border: 1px solid var(--border-subtle);
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.45);
        padding: 1rem 1.25rem;
        z-index: 50;
      }

      #markspresso-search-results:empty {
        display: none;
      }

      .markspresso-search-result {
        padding: 0.45rem 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.3);
      }

      .markspresso-search-result:last-child {
        border-bottom: none;
      }

      .markspresso-search-result a {
        display: block;
        color: var(--text);
        text-decoration: none;
      }

      .markspresso-search-result a:hover {
        color: var(--accent);
      }
