:root {
  --page-bg: radial-gradient(circle at 28% 18%, #f3c6dc 0%, #94bbe9 100%);
  --docs-topnav-h: 4.25rem;
}

html.theme-dark {
  --page-bg: radial-gradient(circle at 28% 18%, #3a2a48 0%, #1c2438 100%);
}

html,
body {
  background: var(--page-bg);
}

body {
  background-attachment: fixed;
}

@media (max-width: 767px) {
  body {
    background-attachment: scroll;
  }
}

.class-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--clr-dark);
}

.catalog-nav,
.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sz-2);
}

.docs-prose h2 {
  margin-top: var(--sz-8);
  margin-bottom: var(--sz-3);
}

.docs-prose h3 {
  margin-top: var(--sz-6);
  margin-bottom: var(--sz-2);
}

.docs-prose p,
.docs-prose li,
.docs-prose .text-sm {
  line-height: 1.75;
}

.docs-prose p + p {
  margin-top: var(--sz-3);
}

/* Keep inline code chips from colliding when lines wrap */
.docs-prose :not(pre) > code {
  line-height: 1.35;
  vertical-align: baseline;
}

/* Only unclassed lists — never paint bullets on component lists */
.docs-prose ul:not([class]),
.docs-prose ol:not([class]) {
  display: flex;
  flex-direction: column;
  gap: var(--sz-2);
  margin: var(--sz-3) 0;
  padding: 0;
  list-style: none;
}

.docs-prose ul:not([class]) > li,
.docs-prose ol:not([class]) > li {
  padding-left: var(--sz-4);
  position: relative;
}

.docs-prose ul:not([class]) > li::before,
.docs-prose ol:not([class]) > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--clr-primary);
}

.token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.token-table th,
.token-table td {
  text-align: left;
  padding: var(--sz-3) var(--sz-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.token-table th {
  font-size: var(--fs-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--clr-slate);
}

.token-table code {
  overflow-wrap: anywhere;
}

.swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: var(--sz-2);
  box-shadow: var(--neu-shadow-inset);
}

.container-demo {
  display: flex;
  flex-direction: column;
  gap: var(--sz-3);
  padding-block: var(--sz-4);
}

.container-demo .demo-band {
  text-align: center;
  padding: var(--sz-4);
}

/* —— Docs shell: locked sidebar + scrolling main —— */

.docs-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: var(--sz-4) var(--sz-3);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .docs-body {
    padding: var(--sz-5) var(--sz-6);
  }
}

.docs-nav-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tg-nav.docs-topnav.docs-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sz-3);
  flex-shrink: 0;
  margin-bottom: var(--sz-3);
  width: 100%;
}

.tg-nav.docs-topnav.docs-topbar > .docs-drawer-toggle {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  order: 1;
}

.tg-nav.docs-topnav.docs-topbar > .nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sz-3);
  max-width: calc(100% - 11rem);
  color: var(--clr-dark);
  text-decoration: none;
  order: 2;
}

.tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-mark {
  display: block;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
}

.tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-title {
  display: none;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  min-width: 0;
}

.tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--fs-lg);
  letter-spacing: var(--letter-spacing-tight);
  white-space: nowrap;
}

.tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-sub {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--fs-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  opacity: 0.6;
}

.tg-nav.docs-topnav.docs-topbar > .nav-end {
  position: relative;
  z-index: 1;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sz-2);
  flex-shrink: 0;
  order: 3;
}

@media (min-width: 768px) {
  .tg-nav.docs-topnav.docs-topbar > .nav-brand {
    position: static;
    left: auto;
    transform: none;
    max-width: none;
    margin-right: auto;
  }

  .tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-mark {
    height: 2.75rem;
    width: 2.75rem;
  }

  .tg-nav.docs-topnav.docs-topbar > .nav-brand .docs-logo-title {
    display: flex;
  }

  .tg-nav.docs-topnav.docs-topbar > .nav-end {
    margin-left: 0;
  }
}

.tg-nav.docs-topnav.docs-topbar > .nav-links {
  display: none;
}

.docs-icon-btn {
  /* deprecated — use tg-btn tg-hybrid btn-icon */
  display: none;
}

.docs-drawer-toggle {
  cursor: pointer;
}

/* When drawer toggle is a plain label without tg-btn, keep hit target */
label.docs-drawer-toggle:not(.tg-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  color: var(--clr-dark);
}

.docs-drawer-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.docs-drawer-toggle .sidebar-toggle-bars {
  position: relative;
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.docs-drawer-toggle .sidebar-toggle-bars::before,
.docs-drawer-toggle .sidebar-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.docs-drawer-toggle .sidebar-toggle-bars::before {
  top: -6px;
}

.docs-drawer-toggle .sidebar-toggle-bars::after {
  top: 6px;
}

.docs-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sticky, 1020) + 5);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
}

.docs-shell {
  display: grid;
  gap: 1.5rem;
  flex: 1 1 auto;
  min-height: 0;
  /* visible so neu drop-shadows are not sheared into a flat “bottom bar” */
  overflow: visible;
  align-items: stretch;
  width: 100%;
  max-width: none;
  padding: 0;
  box-sizing: border-box;
}

.docs-sidebar {
  min-height: 0;
}

.docs-main {
  min-width: 0;
  min-height: 0;
}

@media (min-width: 768px) {
  .docs-drawer-toggle {
    display: none;
  }

  .docs-backdrop {
    display: none !important;
  }

  .docs-shell {
    grid-template-columns: var(--tg-sidebar-width, 16rem) minmax(0, 1fr);
  }

  .docs-sidebar {
    position: relative;
    height: 100%;
    max-height: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  .docs-sidebar .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    /* ≥ neu blur (13px) + offset so drop/inset shadows are not sheared */
    padding: var(--sz-5);
    box-sizing: border-box;
  }

  .docs-sidebar.tg-neu .sidebar-nav {
    min-height: 100%;
  }

  .docs-main {
    height: 100%;
    overflow-y: auto;
    padding: var(--sz-5);
    box-sizing: border-box;
  }
}

@media (max-width: 767px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  /* Aside out of flow on mobile — main is the only grid cell content */
  .docs-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--tg-sidebar-width, 16rem), 85vw);
    max-width: 85vw;
    height: 100dvh;
    z-index: calc(var(--z-sticky, 1020) + 10);
    transform: translateX(-105%);
    transition: transform 0.2s var(--ease, ease);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .docs-sidebar .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: var(--sz-5);
    box-sizing: border-box;
  }

  .docs-main {
    height: 100%;
    overflow-y: auto;
    padding: var(--sz-5);
    box-sizing: border-box;
  }

  .docs-nav-checkbox:checked ~ .docs-backdrop {
    display: block;
  }

  .docs-nav-checkbox:checked ~ .docs-shell .docs-sidebar {
    transform: translateX(0) !important;
  }
}
