.site-header { position: relative; }
.app-header-start { display: flex; align-items: center; gap: 4px; min-width: 0; }

/* Public marketing + documentation — same tokens as design.css */

.public-body {
  background:
    radial-gradient(720px 380px at 18% 0%, rgba(79, 209, 197, 0.05), transparent 58%),
    radial-gradient(560px 320px at 92% 100%, rgba(110, 168, 255, 0.035), transparent 55%),
    var(--bg);
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.hero {
  padding: 72px 0 48px;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 12px 0 16px;
  max-width: 18ch;
}
.lede { font-size: 17px; color: var(--text-dim); max-width: 640px; }
.kicker {
  color: var(--text-mute);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
}
.section { padding: 48px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 24px; letter-spacing: -0.03em; margin: 0 0 12px; }
.section h3 { margin: 0 0 8px; font-size: 16px; }
.section .card p { margin: 0; color: var(--text-dim); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.public-toggle { display: none; }
.site-header .nav { justify-content: flex-end; }

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0 64px;
}
.docs-nav {
  position: sticky;
  top: calc(var(--nav) + 12px);
  align-self: start;
  max-height: calc(100dvh - var(--nav) - 24px);
  overflow: auto;
  padding-right: 8px;
}
.docs-nav a {
  display: block;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
}
.docs-nav a:hover, .docs-nav a.active {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.docs-crumb {
  color: var(--text-mute);
  font-size: 13px;
  margin: 0 0 12px;
}
.docs-crumb a { color: var(--text-dim); }
.docs-body h1 { margin-top: 0; letter-spacing: -0.03em; }
.docs-body h2 { margin-top: 28px; font-size: 20px; }
.docs-body h3 { font-size: 16px; }
.docs-pre {
  position: relative;
  margin: 16px 0;
}
.docs-body pre,
.docs-pre pre {
  overflow: auto;
  padding: 14px 16px;
  background: #0b1016;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  margin: 0;
}
.docs-copy {
  position: absolute;
  top: 8px;
  right: 8px;
}
.docs-body table { min-width: 0; }
.docs-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 1023px) {
  .hero { padding-top: 48px; }
}

@media (max-width: 767px) {
  .public-toggle { display: inline-flex; }
  .site-header { gap: 8px; }
  .site-header .nav {
    display: none;
    position: absolute;
    top: var(--nav);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 16px;
    background: #0c1016;
    border-bottom: 1px solid var(--border);
  }
  body.public-nav-open .site-header .nav { display: flex; }
  .site-header .nav a, .site-header .nav .btn {
    width: 100%;
    justify-content: flex-start;
  }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav {
    position: static;
    max-height: none;
    display: flex;
    gap: 4px;
    overflow: auto;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .docs-nav a { white-space: nowrap; }
  .hero h1 { max-width: none; }
}

@media (max-width: 479px) {
  .wrap { width: calc(100% - 24px); }
  .hero { padding: 32px 0 28px; }
  .section { padding: 32px 0; }
}
