/* docs — minimal additions on top of husk's own sidebar component */

/* Main content constraint */
[data-sidebar] > main > * {
  max-width: 52rem;
}

[data-sidebar] > main {
  padding: 2rem 2.5rem 4rem;
}

[data-sidebar] > main section {
  padding-top: 2.5rem;
}

[data-sidebar] > main section:first-child {
  padding-top: 0;
}

/* Logo link in sidebar */
[data-sidebar] > aside .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--husk-fg);
  text-decoration: none;
  margin-bottom: 1.25rem;
}

[data-sidebar] > aside .logo img {
  border-radius: var(--husk-radius-sm);
}

/* Demo blocks — live preview + code */
.demo {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.demo-preview {
  padding: 1.25rem;
  border: 1px solid var(--husk-border);
  border-radius: var(--husk-radius) var(--husk-radius) 0 0;
  background: var(--husk-bg);
}

.demo-code {
  margin: 0;
  border-radius: 0 0 var(--husk-radius) var(--husk-radius);
  border: 1px solid var(--husk-border);
  border-top: none;
  font-size: 0.8125rem;
}

.demo-code code {
  color: inherit;
  background: none;
}

/* Helpers */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.gap-md {
  gap: 12px;
}

/* Token table */
.token-table td:first-child {
  font-family: var(--husk-font-mono);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.token-table td:nth-child(2) {
  font-family: var(--husk-font-mono);
  font-size: 0.8125rem;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid var(--husk-border);
}

/* Footer */
.docs-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--husk-border);
  font-size: 0.8125rem;
  color: var(--husk-muted);
}

/* Mobile menu toggle */
.mobile-menu {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 49;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--husk-fg);
  color: var(--husk-bg);
  border: none;
  border-radius: var(--husk-radius-full);
  box-shadow: var(--husk-shadow-md);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

@media (min-width: 48.01rem) {
  .mobile-menu {
    display: none;
  }
}
