:root {
  --zm-bg: #0a0e14;
  --zm-bg-raised: #0d1117;
  --zm-border: #1e2733;
  --zm-teal: #2dd4bf;
  --zm-teal-dim: #164e4a;
  --zm-text: #dbe4ee;
  --zm-text-dim: #8592a3;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--zm-bg);
  color: var(--zm-text);
}

::selection {
  background: var(--zm-teal);
  color: #06231f;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--zm-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--zm-border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--zm-teal-dim);
}

.zm-noise {
  background-image: radial-gradient(circle at 1px 1px, rgba(45, 212, 191, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
}

.zm-registry {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .zm-registry {
    grid-template-columns: repeat(2, 1fr);
  }
  .zm-registry > * {
    border-right: 1px solid var(--zm-border);
  }
  .zm-registry > *:nth-child(2n) {
    border-right: none;
  }
}

@media (min-width: 1024px) {
  .zm-registry {
    grid-template-columns: repeat(3, 1fr);
  }
  .zm-registry > * {
    border-right: 1px solid var(--zm-border);
  }
  .zm-registry > *:nth-child(3n) {
    border-right: none;
  }
  .zm-registry > *:nth-child(2n) {
    border-right: 1px solid var(--zm-border);
  }
}

.zm-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--zm-teal);
  color: var(--zm-teal);
  background: transparent;
  border-radius: 0.375rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.zm-btn-outline:hover {
  background: var(--zm-teal);
  color: #06231f;
}

.zm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--zm-border);
  color: var(--zm-text);
  background: transparent;
  border-radius: 0.375rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.zm-btn-ghost:hover {
  border-color: var(--zm-teal);
  color: var(--zm-teal);
}

.zm-tab-btn {
  border: 1px solid var(--zm-border);
  color: var(--zm-text-dim);
  background: transparent;
  border-radius: 0.375rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.zm-tab-btn.is-active {
  border-color: var(--zm-teal);
  color: var(--zm-teal);
  background: rgba(45, 212, 191, 0.08);
}

.zm-card {
  background: var(--zm-bg-raised);
  border: 1px solid var(--zm-border);
  border-radius: 0.5rem;
}

.zm-card:hover {
  border-color: var(--zm-teal-dim);
}

.zm-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--zm-teal);
  border: 1px solid var(--zm-teal-dim);
  border-radius: 0.25rem;
  padding: 0.1rem 0.5rem;
  text-transform: uppercase;
}

.zm-hairline {
  border-color: var(--zm-border);
}

.zm-glyph {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--zm-teal);
  opacity: 0.85;
}

.zm-code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #060a10;
  border: 1px solid var(--zm-border);
  border-radius: 0.375rem;
}

.zm-fade-in {
  animation: zmFadeIn 0.4s ease both;
}

@keyframes zmFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zm-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--zm-bg-raised);
  border-top: 1px solid var(--zm-border);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.zm-cookie-banner.is-visible {
  transform: translateY(0);
}

.zm-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.zm-accordion-item.is-open .zm-accordion-panel {
  max-height: 640px;
}

.zm-accordion-item.is-open .zm-accordion-icon {
  transform: rotate(45deg);
}

.zm-accordion-icon {
  transition: transform 0.2s ease;
}

article.zm-article p {
  line-height: 1.75;
}

article.zm-article h2 {
  scroll-margin-top: 6rem;
}

.zm-prose-registry {
  column-count: 1;
}

@media (min-width: 900px) {
  .zm-prose-registry {
    column-count: 2;
    column-gap: 2.5rem;
    column-rule: 1px solid var(--zm-border);
  }
}

.zm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--zm-teal);
  color: #06231f;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.zm-skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}
