/* Zeflow Help Center — Vercel Docs visual language */

:root {
  --bg: #ffffff;
  --bg-sidebar: #fafafa;
  --bg-elevated: #fafafa;
  --bg-code: #fafafa;
  --bg-code-header: #fafafa;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --text: #171717;
  --text-secondary: #666666;
  --text-tertiary: #8f8f8f;
  --link: #0070f3;
  --focus: #0070f3;
  --hover-bg: rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 64px;
  --sidebar-w: 280px;
  --content-max: 720px;
  --page-max: 1200px;
  --font: "Geist Variable", "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-sidebar: #000000;
    --bg-elevated: #111111;
    --bg-code: #0a0a0a;
    --bg-code-header: #111111;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #ededed;
    --text-secondary: #a1a1a1;
    --text-tertiary: #696969;
    --link: #52a8ff;
    --focus: #52a8ff;
    --hover-bg: rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

/* —— Header —— */
.hc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}
.hc-header.is-scrolled,
.hc-header {
  border-bottom-color: var(--border);
}
.hc-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.hc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.hc-brand img {
  width: 20px;
  height: 20px;
}
@media (prefers-color-scheme: light) {
  .hc-brand img { filter: invert(1); }
}
.hc-brand-sep {
  width: 1px;
  height: 16px;
  background: var(--border-strong);
  margin: 0 2px;
}
.hc-brand-docs {
  color: var(--text-secondary);
  font-weight: 500;
}
.hc-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.hc-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.hc-nav a:hover {
  color: var(--text);
  background: var(--hover-bg);
}
.hc-nav a.is-active {
  color: var(--text);
  font-weight: 500;
}
.hc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.hc-search-header {
  position: relative;
  width: min(240px, 28vw);
}
.hc-search-header input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.hc-search-header input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 25%, transparent);
}
.hc-search-header .hc-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 13px;
  pointer-events: none;
}
.hc-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg) !important;
  font-size: 13px;
  font-weight: 560;
}
.hc-cta:hover { opacity: 0.88; color: var(--bg) !important; }
.hc-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-secondary);
}

/* —— Shell: sidebar + content —— */
.hc-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100dvh - var(--header-h));
}
.hc-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 24px 16px 48px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
}
.hc-sidebar-group {
  margin-bottom: 24px;
}
.hc-sidebar-label {
  margin: 0 0 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}
.hc-sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.hc-sidebar a:hover {
  color: var(--text);
  background: var(--hover-bg);
}
.hc-sidebar a.is-active {
  color: var(--text);
  background: var(--hover-bg);
  font-weight: 560;
}

.hc-main {
  min-width: 0;
  padding: 40px 40px 96px;
}
.hc-main-inner {
  max-width: 860px;
}

/* —— Docs home —— */
.hc-hero {
  margin-bottom: 40px;
}
.hc-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.hc-hero > p {
  margin: 0;
  max-width: 54ch;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* Getting-started tabs + code */
.hc-tabs {
  margin: 28px 0 0;
}
.hc-tablist {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.hc-tab {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.hc-tab:hover { color: var(--text); }
.hc-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.hc-tabpanel { display: none; padding-top: 4px; }
.hc-tabpanel.is-active { display: block; }

.hc-code {
  margin: 16px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-code);
}
.hc-code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-code-header);
  font-size: 13px;
  color: var(--text-secondary);
}
.hc-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.hc-code code {
  font-family: inherit;
  background: none;
  padding: 0;
}
.hc-code .cm { color: var(--text-tertiary); }

/* Section blocks */
.hc-section {
  margin-top: 56px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.hc-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.hc-section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.hc-section-head a.hc-anchor {
  color: var(--text-tertiary);
  opacity: 0;
  transition: opacity 0.15s;
}
.hc-section-head:hover a.hc-anchor { opacity: 1; }
.hc-section-lead {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 62ch;
}

/* Feature / doc link cards — Vercel docs grid */
.hc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hc-cards a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 18px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.12s ease;
  color: inherit;
}
.hc-cards a:nth-child(2n) { border-right: 0; }
.hc-cards a:nth-last-child(-n+2) { border-bottom: 0; }
.hc-cards.hc-cards-odd a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
}
.hc-cards a:hover { background: var(--hover-bg); }
.hc-card-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--text);
  flex-shrink: 0;
}
.hc-card-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.hc-cards h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.hc-cards p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hc-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.hc-cards a:hover .hc-more { color: var(--text); }

/* Changelog / popular list */
.hc-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hc-feed li { border-bottom: 1px solid var(--border); }
.hc-feed li:last-child { border-bottom: 0; }
.hc-feed a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  color: inherit;
}
.hc-feed time {
  font-size: 13px;
  color: var(--text-secondary);
  padding-top: 2px;
}
.hc-feed strong {
  display: block;
  font-size: 15px;
  font-weight: 560;
  margin-bottom: 4px;
}
.hc-feed a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.hc-feed span {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Collection / article pages */
.hc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
}
.hc-breadcrumb a { color: var(--text-secondary); }
.hc-breadcrumb a:hover { color: var(--text); }

.hc-page-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.hc-page-lead {
  margin: 0 0 28px;
  color: var(--text-secondary);
  max-width: 58ch;
  font-size: 16px;
}
.hc-updated {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: -12px 0 28px;
}

.hc-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hc-article-list li + li { border-top: 1px solid var(--border); }
.hc-article-list a {
  display: block;
  padding: 16px 18px;
  transition: background 0.12s;
}
.hc-article-list a:hover { background: var(--hover-bg); }
.hc-article-list strong {
  display: block;
  font-size: 15px;
  font-weight: 560;
  margin-bottom: 4px;
}
.hc-article-list span {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

/* Prose */
.hc-article { max-width: var(--content-max); }
.hc-prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.025em;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.hc-prose h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.hc-prose p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.7;
}
.hc-prose ul, .hc-prose ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
  color: var(--text);
  font-size: 15.5px;
}
.hc-prose li { margin-bottom: 6px; line-height: 1.6; }
.hc-prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
}
.hc-prose pre {
  background: var(--bg-code);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow: auto;
  margin: 0 0 18px;
}
.hc-prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.65;
}
.hc-prose a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hc-callout {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.hc-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hc-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.hc-btn:hover {
  background: var(--hover-bg);
  color: var(--text);
}
.hc-btn-primary {
  background: var(--text);
  color: var(--bg) !important;
  border-color: var(--text);
}
.hc-btn-primary:hover {
  opacity: 0.9;
  color: var(--bg) !important;
}

/* Search results dropdown */
.hc-search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-height: 320px;
  overflow: auto;
  z-index: 60;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  .hc-search-results { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
}
.hc-search-results.is-open { display: block; }
.hc-search-results a {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.hc-search-results a:last-child { border-bottom: 0; }
.hc-search-results a:hover { background: var(--hover-bg); }
.hc-search-results a span {
  display: block;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 2px;
}

/* Footer */
.hc-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.hc-footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
}
.hc-footer a { color: var(--text-secondary); }
.hc-footer a:hover { color: var(--text); }
.hc-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

.hc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}
.hc-backdrop.is-open { display: block; }

@media (max-width: 960px) {
  .hc-shell { grid-template-columns: 1fr; }
  .hc-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    bottom: 0;
    width: min(300px, 86vw);
    z-index: 45;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--border-strong);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }
  .hc-sidebar.is-open { transform: translateX(0); }
  .hc-menu-btn { display: inline-flex; }
  .hc-nav { display: none; }
  .hc-main { padding: 28px 20px 72px; }
  .hc-cards { grid-template-columns: 1fr; }
  .hc-cards a {
    border-right: 0 !important;
    grid-column: auto !important;
  }
  .hc-cards a:last-child { border-bottom: 0; }
  .hc-cards a:not(:last-child) { border-bottom: 1px solid var(--border); }
  .hc-feed a { grid-template-columns: 1fr; gap: 4px; }
  .hc-search-header { width: min(160px, 36vw); }
}

@media (max-width: 560px) {
  .hc-header-inner { padding: 0 14px; gap: 10px; }
  .hc-search-header { display: none; }
  .hc-brand span:not(.hc-brand-docs) { display: none; }
}
