/* Nucurate Docs — calm, readable, friendlier than typical dev-doc chrome */
:root {
  --docs-bg: #fbfbf9;
  --docs-surface: #ffffff;
  --docs-text: #1c1917;
  --docs-muted: #57534e;
  --docs-faint: #a8a29e;
  --docs-line: #e7e5e4;
  --docs-brand: #2f6b45;
  --docs-brand-soft: rgba(47, 107, 69, 0.12);
  --docs-accent: #0f766e;
  --docs-sidebar-w: 16.5rem;
  --docs-top: 3.35rem;
  --docs-radius: 0.85rem;
  --docs-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --docs-prose: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.docs-body {
  margin: 0;
  font-family: var(--docs-font);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--docs-text);
  background: var(--docs-bg);
  -webkit-font-smoothing: antialiased;
}

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

@media (min-width: 900px) {
  .docs-layout {
    flex-direction: row;
  }
}

/* —— Top bar (mobile + slim desktop strip) —— */
.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--docs-top);
  padding: 0.35rem 0.85rem;
  background: rgba(251, 251, 249, 0.92);
  border-bottom: 1px solid var(--docs-line);
  backdrop-filter: blur(10px);
}

@media (min-width: 900px) {
  .docs-topbar {
    display: none;
  }
}

.docs-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  border: 1px solid var(--docs-line);
  background: var(--docs-surface);
  cursor: pointer;
  color: var(--docs-text);
  flex-shrink: 0;
}

.docs-menu-btn:hover {
  border-color: #d6d3d1;
  background: #fafaf9;
}

.docs-menu-btn span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.docs-topbar__title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--docs-text);
}

.docs-topbar__title a {
  color: inherit;
  text-decoration: none;
}

.docs-topbar__spacer {
  flex: 1;
}

.docs-topbar__link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--docs-brand);
  text-decoration: none;
  white-space: nowrap;
}

.docs-topbar__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Sidebar —— */
.docs-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(28, 25, 23, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.docs-layout--nav-open .docs-nav-overlay {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 900px) {
  .docs-nav-overlay {
    display: none !important;
  }
}

.docs-sidebar {
  position: fixed;
  z-index: 36;
  top: 0;
  left: 0;
  width: min(100vw - 3rem, var(--docs-sidebar-w));
  max-width: 19rem;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 1rem 1rem 1.25rem;
  background: var(--docs-surface);
  border-right: 1px solid var(--docs-line);
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.docs-layout--nav-open .docs-sidebar {
  transform: translate3d(0, 0, 0);
}

@media (min-width: 900px) {
  .docs-sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 var(--docs-sidebar-w);
    width: var(--docs-sidebar-w);
    max-width: none;
    transform: none !important;
    transition: none;
    align-self: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

.docs-sidebar__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--docs-line);
}

.docs-sidebar__brand > a:first-child {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--docs-text);
  text-decoration: none;
}

.docs-sidebar__brand > a:first-child:hover {
  color: var(--docs-brand);
}

.docs-sidebar__tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--docs-brand);
  background: var(--docs-brand-soft);
  border: 1px solid rgba(47, 107, 69, 0.22);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.docs-nav__heading {
  margin: 1rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--docs-faint);
}

.docs-nav__heading:first-child {
  margin-top: 0;
}

a.docs-nav__link {
  display: block;
  padding: 0.38rem 0.55rem;
  margin: 0.1rem 0;
  border-radius: 0.45rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #44403c;
  text-decoration: none;
  border: 1px solid transparent;
}

a.docs-nav__link:hover {
  background: #fafaf9;
  color: var(--docs-text);
}

a.docs-nav__link[aria-current="page"] {
  background: var(--docs-brand-soft);
  color: var(--docs-brand);
  border-color: rgba(47, 107, 69, 0.2);
}

.docs-sidebar__foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--docs-line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

a.docs-nav__muted {
  font-size: 0.82rem;
  color: var(--docs-muted);
  text-decoration: none;
}

a.docs-nav__muted:hover {
  color: var(--docs-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Main column —— */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2.25rem) clamp(1rem, 4vw, 2.75rem) 3rem;
  max-width: calc(100vw - 0px);
}

@media (min-width: 900px) {
  .docs-main {
    max-width: 52rem;
  }
}

.docs-crumb {
  font-size: 0.82rem;
  color: var(--docs-muted);
  margin-bottom: 0.65rem;
}

.docs-crumb a {
  color: var(--docs-brand);
  text-decoration: none;
  font-weight: 500;
}

.docs-crumb a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--docs-text);
}

.docs-lead {
  margin: 0 0 1.5rem;
  font-size: 1.08rem;
  color: var(--docs-muted);
  max-width: var(--docs-prose);
}

.docs-card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .docs-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .docs-card-grid.docs-card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

a.docs-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-line);
  background: var(--docs-surface);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.docs-card:hover {
  border-color: rgba(47, 107, 69, 0.35);
  box-shadow: 0 8px 28px rgba(28, 25, 23, 0.06);
  transform: translateY(-2px);
}

.docs-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--docs-brand);
  margin-bottom: 0.35rem;
}

.docs-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.docs-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--docs-muted);
  line-height: 1.5;
}

/* —— Article / prose —— */
.docs-article h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.docs-meta {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--docs-faint);
}

.docs-article h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-top: 0.5rem;
  border-top: 1px solid var(--docs-line);
}

.docs-article h2:first-of-type {
  margin-top: 1.25rem;
  border-top: none;
  padding-top: 0;
}

.docs-article h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.docs-article p,
.docs-article li {
  color: #44403c;
  max-width: var(--docs-prose);
}

.docs-article p {
  margin: 0 0 0.85rem;
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.docs-article li {
  margin-bottom: 0.35rem;
}

.docs-article a {
  color: var(--docs-brand);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-article a:hover {
  color: #25603a;
}

.docs-tip {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--docs-radius);
  border-left: 4px solid var(--docs-accent);
  background: rgba(15, 118, 110, 0.06);
  font-size: 0.95rem;
  color: #3f3f46;
  max-width: var(--docs-prose);
}

.docs-tip strong {
  color: var(--docs-text);
}

pre.docs-code {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--docs-radius);
  background: #1c1917;
  color: #e7e5e4;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  max-width: min(var(--docs-prose), 100%);
  border: 1px solid #292524;
}

code.docs-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #f5f5f4;
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  border: 1px solid var(--docs-line);
  color: #44403c;
}

/* Topic list + search */
.docs-tools {
  margin-bottom: 1rem;
  max-width: 28rem;
}

.docs-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid var(--docs-line);
  font: inherit;
  font-size: 0.92rem;
  background: var(--docs-surface);
}

.docs-search:focus {
  outline: 2px solid rgba(47, 107, 69, 0.35);
  outline-offset: 2px;
  border-color: rgba(47, 107, 69, 0.4);
}

.docs-search::placeholder {
  color: var(--docs-faint);
}

.docs-topic-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border: 1px solid var(--docs-line);
  border-radius: var(--docs-radius);
  background: var(--docs-surface);
  max-width: 28rem;
}

.docs-topic-list li {
  border-bottom: 1px solid var(--docs-line);
  margin: 0;
  max-width: none;
}

.docs-topic-list li:last-child {
  border-bottom: 0;
}

.docs-topic-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--docs-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.docs-topic-list a:hover {
  background: #fafaf9;
}

.docs-topic-list a span:last-child {
  color: var(--docs-faint);
  font-size: 1.1rem;
  font-weight: 400;
}

.docs-topic-list li[hidden] {
  display: none !important;
}

.docs-section-title {
  margin: 2rem 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--docs-faint);
}

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