Skip to content

The only tool you need to know what is happening and how to fix it.

25.1 KB
Raw Blame
/* =========================================================================
   Traceway Docs: dark-only design tokens matching the dashboard's dark mode
   (frontend/src/routes/layout.css). Override Nextra's default theme colors
   and apply mono-native typography.
   ========================================================================= */

:root,
:is(html[class~="dark"]) {
  /* Ink & surfaces: pure black page ground (website style), dashboard navy
     --ink-* scale for raised surfaces */
  --ink-0: #000;
  --ink-1: #0f1220;
  --ink-2: #151a2c;
  --ink-3: #1b2138;
  --ink-4: #252c47;
  --ink-5: #313a5b;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-2: rgba(255, 255, 255, 0.12);

  /* Text (dashboard --fg-* scale) */
  --fg-0: #f4f6fc;
  --fg-1: #cbd2e4;
  --fg-2: #929bb4;
  --fg-3: #5f6780;

  /* Accent: dashboard blue family */
  --blue: oklch(0.623 0.214 259.815);
  --blue-bright: oklch(0.707 0.165 254.624);
  --blue-deep: oklch(0.546 0.245 262.881);
  --a1: var(--blue-deep);
  --a2: var(--blue-bright);
  --a3: oklch(0.656 0.241 354.308); /* pink */
  --a4: oklch(0.769 0.188 70.08); /* amber */
  --ok: #22c08a;
  --crit: #f43f5e;

  /* Nextra theme overrides: blue-deep ≈ hsl(221, 83%, 53%) */
  --nextra-primary-hue: 221deg;
  --nextra-primary-saturation: 83%;
  --nextra-bg: 0, 0, 0; /* ink-0 triplet */

  /* Radius + layout (dashboard: 0.75rem base, 8px controls) */
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1240px;

  /* Font aliases mirroring website var names
     (--font-display / --font-mono are populated by next/font in _app.jsx) */
  --f-display:
    var(--font-display, "JetBrains Mono"), "IBM Plex Mono", ui-monospace,
    monospace;
  --f-body:
    var(--font-body, "Inter"), ui-sans-serif, system-ui, -apple-system,
    sans-serif;
  --f-mono:
    var(--font-mono, "IBM Plex Mono"), "JetBrains Mono", ui-monospace, monospace;
}

/* =========================================================================
   Base / typography
   ========================================================================= */

html,
body {
  background: var(--ink-0) !important;
  color: var(--fg-1);
  color-scheme: dark;
  font-family:
    var(--font-body, "Inter"),
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* The font variables live on the app wrapper (next/font), so re-apply the
   body font where they actually resolve. */
.docs-root {
  font-family: var(--f-body);
}

/* Dashboard's ambient radial glows (blue top-right, cyan left), fixed to the
   viewport so long pages don't shift the gradient while scrolling. */
body {
  background:
    radial-gradient(
        1100px 600px at 88% -12%,
        oklch(0.623 0.214 259.815 / 10%),
        transparent 60%
      )
      fixed,
    radial-gradient(
        800px 500px at -8% 15%,
        oklch(0.715 0.143 215.221 / 5%),
        transparent 60%
      )
      fixed,
    var(--ink-0) !important;
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
.nextra-content h1,
.nextra-content h2,
.nextra-content h3,
.nextra-content h4,
.nextra-content h5,
.nextra-content h6 {
  font-family:
    var(--font-body, "Inter"),
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif !important;
  color: var(--fg-0) !important;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

main h1,
.nextra-content h1 {
  font-size: clamp(40px, 5.6vw, 75px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.035em !important;
  font-weight: 600 !important;
}

main h2,
.nextra-content h2 {
  font-size: clamp(28px, 3.2vw, 46px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.025em !important;
  font-weight: 600 !important;
}

main h3,
.nextra-content h3 {
  font-size: clamp(20px, 1.7vw, 26px) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.015em !important;
  font-weight: 600 !important;
}

main h1:has(em),
main h2:has(em),
.nextra-content h1:has(em),
.nextra-content h2:has(em) {
  color: var(--fg-2) !important;
}

main h1 em,
main h2 em,
.nextra-content h1 em,
.nextra-content h2 em {
  font-style: normal;
  font-weight: 600;
  color: var(--fg-0) !important;
}

main p,
.nextra-content p {
  color: var(--fg-1);
}

main a,
.nextra-content a {
  color: var(--a2) !important;
  text-decoration-color: color-mix(in oklab, var(--a2) 40%, transparent);
  text-underline-offset: 3px;
}

main a:hover,
.nextra-content a:hover {
  color: color-mix(in oklab, var(--a2) 70%, white) !important;
}

/* =========================================================================
   Navbar + sidebar + content containers
   ========================================================================= */

.nextra-nav-container {
  border-bottom: 1px solid var(--hair);
}

/* Same fixed-attachment gradient as body so the opaque navbar blends into the
   page's top-right glow instead of cutting it off. */
html[class~="dark"] .nextra-nav-container-blur.nextra-nav-container-blur {
  background:
    radial-gradient(
        1100px 600px at 88% -12%,
        oklch(0.623 0.214 259.815 / 10%),
        transparent 60%
      )
      fixed,
    radial-gradient(
        800px 500px at -8% 15%,
        oklch(0.715 0.143 215.221 / 5%),
        transparent 60%
      )
      fixed,
    var(--ink-0) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.nextra-sidebar-container {
  background: transparent !important;
  border-right: 1px solid var(--hair);
}

/* Nextra masks the sidebar with a 20px top fade (scrolling items dissolve
   near the top edge). Our first item is a filled blue pill, so the fade cuts
   visibly through it and reads as a stray gradient. Drop the mask; scrolled
   items simply clip at the edge instead. */
.nextra-sidebar-container,
.nextra-sidebar-container > .nextra-scrollbar {
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

/* Sidebar links */
.nextra-sidebar-container a,
.nextra-sidebar-container button {
  color: var(--fg-2) !important;
  font-family: var(--font-mono), ui-monospace, monospace;
  border: 1px solid transparent !important;
}

.nextra-sidebar-container a:hover,
.nextra-sidebar-container button:hover {
  color: var(--fg-0) !important;
  background: var(--ink-2) !important;
}

.nextra-sidebar-container .nx-text-primary-600 {
  color: var(--fg-0) !important;
  background: transparent !important;
}

/* Active page: filled blue pill, matching the dashboard sidebar. */
.nextra-sidebar-container a.nx-bg-primary-100,
.nextra-sidebar-container a[aria-current="page"] {
  color: #fff !important;
  background: var(--blue-deep) !important;
  border-color: transparent !important;
}

/* Expanded top-level folder containing the active page: Nextra fills it with the
   primary tint (nx-bg-primary-100 / dark:nx-bg-primary-400/10). Keep it
   transparent so only the active leaf is boxed, not its parent section. */
.nextra-sidebar-container button.nx-bg-primary-100 {
  color: var(--fg-0) !important;
  background: transparent !important;
}

/* Right TOC */
nav.nextra-toc a {
  color: var(--fg-3) !important;
}
nav.nextra-toc a:hover {
  color: var(--fg-0) !important;
}
nav.nextra-toc .nx-text-primary-600 {
  color: var(--a2) !important;
}

/* Footer: Nextra 2's footer carries no .nextra-footer class. It ships as
   footer.nx-bg-gray-100 with dark:nx-bg-neutral-900 (#171717). Let the black
   page show through and dim its separator + text to our tokens. */
footer.nx-bg-gray-100 {
  background: transparent !important;
}

footer.nx-bg-gray-100 hr {
  border-color: var(--hair) !important;
}

footer.nx-bg-gray-100 .nx-text-gray-600 {
  color: var(--fg-3) !important;
}

/* =========================================================================
   Code blocks + inline code
   ========================================================================= */

.nextra-content code,
main code {
  background: color-mix(in oklab, var(--a2) 10%, transparent);
  color: var(--a2);
  border: 1px solid color-mix(in oklab, var(--a2) 20%, transparent);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.92em;
}

.nextra-code-block pre,
pre.nextra-code {
  background: var(--ink-1) !important;
  border: 1px solid var(--hair-2);
  border-radius: 10px;
}

.nextra-code-block pre code,
pre code {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--fg-1);
}

/* =========================================================================
   Tables, callouts, cards, bullet points
   ========================================================================= */

main table,
.nextra-content table {
  border: 1px solid var(--hair);
  border-radius: 8px;
  overflow: hidden;
}

main th,
.nextra-content th {
  background: var(--ink-2) !important;
  color: var(--fg-0) !important;
  border-color: var(--hair) !important;
}

main td,
.nextra-content td {
  border-color: var(--hair) !important;
  color: var(--fg-1) !important;
}

main blockquote,
.nextra-content blockquote {
  background: color-mix(in oklab, var(--a2) 8%, transparent);
  border-left: 2px solid color-mix(in oklab, var(--a2) 70%, transparent) !important;
  border-radius: 0 8px 8px 0;
  color: var(--fg-1);
  font-style: normal !important;
  padding: 12px 18px !important;
}

/* Nextra callouts */
.nextra-callout {
  border-radius: 10px !important;
}

/* Horizontal rule */
main hr,
.nextra-content hr {
  border-color: var(--hair) !important;
}

/* =========================================================================
   Search box
   ========================================================================= */

.nextra-search input {
  background: color-mix(in oklab, var(--ink-2) 80%, transparent) !important;
  border: 1px solid var(--hair-2) !important;
  color: var(--fg-0) !important;
  font-family: var(--font-mono), ui-monospace, monospace;
}

.nextra-search input:focus {
  border-color: color-mix(in oklab, var(--a1) 60%, var(--hair-2)) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--a1) 15%, transparent);
}

/* Results panel: solid surface. Nextra's default is translucent + backdrop-blur,
   which lets page content bleed through and makes the results unreadable. */
.nextra-search ul.nextra-scrollbar {
  background-color: var(--ink-2) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-color: var(--hair-2) !important;
}

/* Matched query terms: Nextra colors these with the dark indigo primary, which
   is hard to read on the panel. Lighten so the match stands out legibly. */
.nextra-search .nx-text-primary-600 {
  color: color-mix(in oklab, var(--a1) 55%, var(--fg-0)) !important;
  font-weight: 600;
}

/* Result excerpt: default gray-400 is too dim on the solid dark panel. */
.nextra-search .excerpt {
  color: var(--fg-1) !important;
}

/* =========================================================================
   Navbar alignment (pre-existing rules, preserved)
   ========================================================================= */

.nextra-nav-container nav > a:first-child {
  margin-right: 24px !important;
}

/* Top-nav menu links: match the marketing website header (JetBrains Mono,
   14px / 500, h-9 px-3 rounded-md pills). Selector scoped to the page-nav
   anchors via nx-text-sm so the logo and GitHub icon link are untouched. */
.nextra-nav-container nav a.nx-text-sm {
  font-family: var(--font-display) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 0 12px !important;
  border-radius: var(--radius) !important;
  color: var(--fg-1) !important;
}

.nextra-nav-container nav a.nx-text-sm:hover {
  color: var(--fg-0) !important;
  background: var(--ink-2) !important;
}

.nextra-nav-container nav a.nx-text-sm.nx-text-primary-600,
.nextra-nav-container nav a.nx-text-sm[aria-current="true"] {
  color: var(--fg-0) !important;
}

.nextra-nav-container .nextra-search {
  margin-left: auto;
}

@media (max-width: 767px) {
  .nextra-nav-container nav {
    justify-content: flex-start !important;
  }

  .nextra-nav-container nav > a:first-child {
    margin-right: auto !important;
  }
  .nextra-sidebar-container {
    background: var(--ink-0) !important;
  }
}

/* =========================================================================
   Utility classes, opt-in, ported from website/design guidelines/styles.css.
   Available to MDX authors via className; no !important except where a more
   specific existing rule (e.g., `main a { color: ... !important }`) would win.
   ========================================================================= */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a2);
  font-weight: 500;
  display: inline-block;
}
.eyebrow::before {
  content: "// ";
  opacity: 0.5;
}

.muted {
  color: var(--fg-2);
}
.dim {
  color: var(--fg-3);
}

.hair-rule {
  height: 1px;
  background: var(--hair);
  width: 100%;
}

.surface-card {
  background: var(--ink-1);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.gridbg {
  position: relative;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-1);
  background: var(--ink-3);
  border: 1px solid var(--hair);
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a2);
  flex-shrink: 0;
}
.chip.ok .dot {
  background: var(--ok);
}
.chip.crit .dot {
  background: var(--crit);
}

/* Buttons: !important on color values to beat `main a { color: var(--a2) !important }` */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition:
    transform 0.12s ease,
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    filter 0.2s,
    box-shadow 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--fg-0);
  color: var(--ink-0) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 0 0 1px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: #fff;
  color: var(--ink-0) !important;
}

.btn-accent {
  background: var(--a1);
  color: #fff !important;
}
.btn-accent:hover {
  background: color-mix(in oklab, var(--a1) 85%, white);
  color: #fff !important;
}

.btn-ghost {
  border-color: var(--hair-2);
  color: var(--fg-0) !important;
  background: transparent;
}
.btn-ghost:hover {
  background: var(--ink-3);
  border-color: var(--hair-2);
  color: var(--fg-0) !important;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

/* =========================================================================
   SDK Selector, injected into sidebar via separator
   ========================================================================= */

li:has(> .sdk-selector) {
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
  border: none !important;
  list-style: none !important;
}

li:has(> .sdk-selector) > span:first-child {
  display: none !important;
}

.sdk-selector {
  position: relative;
  width: 100%;
  padding: 0px;
}

.sdk-selector-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-display), ui-monospace, monospace;
  border: 1px solid var(--hair-2);
  border-radius: 8px;
  background: var(--ink-2);
  color: var(--fg-0);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.sdk-selector-trigger:hover {
  border-color: color-mix(in oklab, var(--a1) 50%, var(--hair-2));
  background: var(--ink-3);
}

.sdk-selector-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 8px;
  right: 8px;
  background: var(--ink-2);
  border: 1px solid var(--hair-2);
  border-radius: 8px;
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.7);
  z-index: 100;
}

.sdk-selector-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-mono), ui-monospace, monospace;
  border: none;
  border-bottom: 1px solid var(--hair);
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--fg-0);
}

.sdk-selector-search:focus {
  outline: none;
  box-shadow: none;
}

.sdk-selector-search::placeholder {
  color: var(--fg-3);
}

.sdk-selector-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 4px !important;
  max-height: 240px;
  overflow-y: auto;
}

.sdk-selector-list li {
  margin: 0 !important;
  padding: 0 !important;
}

.sdk-selector-option {
  display: block;
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-family: var(--font-mono), ui-monospace, monospace;
  text-align: left;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}

.sdk-selector-option:hover {
  background: var(--ink-3);
  color: var(--fg-0);
}

.sdk-selector-option.active {
  background: color-mix(in oklab, var(--a1) 18%, transparent);
  color: var(--a2);
  font-weight: 500;
}

.sdk-selector-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fg-3);
  font-family: var(--font-mono), ui-monospace, monospace;
}

/* =========================================================================
   Agent skills strip (/client)
   ========================================================================= */

.agent-skills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--ink-1);
}

.agent-skills-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-2) !important;
  min-width: 0;
}

.agent-skills-cmd {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--fg-0);
  background: var(--ink-0);
  border: 1px solid var(--hair-2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.agent-skills-cmd:hover {
  border-color: color-mix(in oklab, var(--a2) 40%, var(--hair-2));
}

.agent-skills-cmd:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--a2) 60%, transparent);
  outline-offset: 2px;
}

.agent-skills-prompt {
  color: var(--a2);
  user-select: none;
}

.agent-skills-cmd-icon {
  color: var(--fg-3);
  transition: color 0.15s;
}

.agent-skills-cmd:hover .agent-skills-cmd-icon {
  color: var(--fg-1);
}

.agent-skills-cmd-icon--ok {
  color: var(--ok);
}

.agent-skills-cmd:hover .agent-skills-cmd-icon--ok {
  color: var(--ok);
}

@media (max-width: 860px) {
  .agent-skills {
    flex-direction: column;
    align-items: flex-start;
  }

  .agent-skills-cmd {
    max-width: 100%;
  }

  .agent-skills-cmd-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =========================================================================
   Framework Picker (card grid on /client)
   ========================================================================= */

.framework-picker {
  margin-top: 40px;
}

/* Doubled class specificity so this beats the global
   `.nextra-content h2 { !important }` heading sizes. */
.framework-picker-heading.framework-picker-heading {
  font-size: 28px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--fg-0);
}

.framework-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .framework-picker-grid {
    grid-template-columns: 1fr;
  }
}

.framework-picker-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--ink-1);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  text-align: left;
  font-family: inherit;
}

.framework-picker-card:hover {
  border-color: color-mix(in oklab, var(--a2) 30%, transparent);
  background: var(--ink-2);
}

.framework-picker-card:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--a2) 60%, transparent);
  outline-offset: 2px;
}

.framework-picker-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.framework-picker-icon--adaptive {
  filter: invert(1);
}

:is(html[class~="dark"]) .framework-picker-icon--adaptive {
  filter: none;
}

.framework-picker-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-0);
  font-family: var(--font-display), ui-monospace, monospace;
  letter-spacing: -0.01em;
}

.framework-picker-desc {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
}

/* =========================================================================
   Deployment Cards (learn / self-host pages)
   ========================================================================= */

.deployment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .deployment-grid {
    grid-template-columns: 1fr;
  }
}

.deployment-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--ink-1);
  text-decoration: none !important;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.deployment-card:hover {
  border-color: var(--hair-2);
  background: var(--ink-2);
}

.deployment-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deployment-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-0);
  font-family: var(--font-display), ui-monospace, monospace;
  letter-spacing: -0.01em;
}

.deployment-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--a2) 18%, transparent);
  color: var(--a2);
  border: 1px solid color-mix(in oklab, var(--a2) 40%, transparent);
  letter-spacing: 0.02em;
  line-height: 1.5;
  font-family: var(--font-mono), ui-monospace, monospace;
  text-transform: uppercase;
}

.deployment-card-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-1);
  font-family: var(--font-mono), ui-monospace, monospace;
}

.deployment-card-desc {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
}

/* =========================================================================
   Per-page layout tweaks (preserved from original)
   ========================================================================= */

/* Protocol page - hide sidebar placeholder to expand content */
body[data-page="protocol"] .nx-mx-auto.nx-flex > div.nx-w-64.nx-shrink-0,
body[data-page^="protocol"] .nx-mx-auto.nx-flex > div.nx-w-64.nx-shrink-0 {
  display: none !important;
}

/* Client index page - full width content on large screens */
@media (min-width: 1280px) {
  body[data-page="client"] .nx-mx-auto.nx-flex > div.nx-w-64.nx-shrink-0 {
    display: none !important;
  }
  body[data-page="client"] nav.nextra-toc {
    display: none !important;
  }
  body[data-page="client"] main.nx-max-w-6xl {
    max-width: none !important;
  }
}

/* Hide mobile menu backdrop on desktop when resizing with menu open */
@media (min-width: 768px) {
  div:has(+ .nextra-sidebar-container)[class*="nx-fixed"] {
    display: none !important;
  }
}

.nextra-sidebar-container > :nth-child(2) {
  display: flex;
  flex-direction: column;
}

/* Nextra wraps the nav list in a transition wrapper that is `overflow: hidden`.
   Sizing it with a plain `flex: 1` pins it to the scroll container's height, so
   a nav list taller than the viewport gets clipped instead of scrolled: the
   scroll container sees a child that exactly fits and never grows a scrollbar,
   and the wheel scrolls the page instead. `1 0 auto` still fills the container
   when the list is short, but lets the wrapper grow past it when the list is
   long, and `overflow: visible` hands the overflow to the scroll container. */
.nextra-sidebar-container > :nth-child(2) > :nth-child(1) {
  flex: 1 0 auto;
  min-height: 0;
  overflow: visible;
}

/* Nextra's sticky-bottom panels (Edit-on-GitHub at the bottom of the TOC,
   collapse toggle at the bottom of the sidebar) ship with an opaque #111
   background and a 16px white-ish drop shadow meant to fade scrolling content
   beneath them. On Traceway's darker palette that reads as a misaligned box
   with a glow. Drop the shadow and keep a hairline border-top so the region is
   still subtly delineated. The background stays opaque, just the page colour
   rather than #111: these panels sit on top of a scrolling list, and a
   transparent one lets nav items slide visibly underneath them. */
nav.nextra-toc .nx-sticky.nx-bottom-0,
.nextra-sidebar-container .nx-sticky.nx-bottom-0 {
  background: var(--ink-0) !important;
  box-shadow: none !important;
  border-top: 1px solid var(--hair) !important;
}