:root {
  --bg: #f5efe6;
  --panel: rgba(255, 252, 246, 0.92);
  --ink: #18243d;
  --muted: #5d6a84;
  --line: rgba(24, 36, 61, 0.1);
  --accent: #0f6fff;
  --accent-soft: rgba(15, 111, 255, 0.12);
  --accent-warm: #ff9344;
  --shadow: 0 22px 44px rgba(17, 27, 47, 0.1);
  --code-bg: #18243d;
  --code-ink: #f7f4ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 95, 0.42), transparent 22%),
    linear-gradient(180deg, #f8f4ec 0%, #f0e7db 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

code,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.docs-frame {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.docs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 24px 24px;
  border-right: 1px solid var(--line);
  background: rgba(250, 246, 239, 0.82);
  backdrop-filter: blur(12px);
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}

.docs-brand-wordmark {
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -0.075em;
  padding-right: 0.08em;
  padding-bottom: 0.04em;
  background: linear-gradient(90deg, #fc8d4d 0%, #ffcf5a 30%, #3d7bff 68%, #132b7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-rendering: geometricPrecision;
}

.docs-brand span:last-child {
  display: inline-block;
  font-size: 1.18rem;
  line-height: 1;
  transform: translateY(0.04em);
}

.docs-sidebar p {
  color: var(--muted);
  line-height: 1.65;
}

.docs-search {
  width: 100%;
  margin: 18px 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.92rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
}

.docs-nav {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 6px;
}

.docs-nav a {
  display: block;
  padding: 0.78rem 0.88rem;
  border-radius: 16px;
  color: #35507f;
  font-weight: 600;
}

.docs-nav a.active,
.docs-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.docs-nav small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.docs-main {
  padding: 28px;
}

.docs-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.docs-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.64);
  color: var(--ink);
  font-weight: 700;
}

.docs-hero,
.docs-article {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.docs-hero {
  padding: 28px;
  margin-bottom: 18px;
}

.docs-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.docs-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
  line-height: 1.75;
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.docs-meta span {
  display: inline-flex;
  padding: 0.5rem 0.78rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  color: #415476;
  font-weight: 700;
  font-size: 0.88rem;
}

.docs-article {
  padding: 30px;
}

.docs-article h1,
.docs-article h2,
.docs-article h3 {
  letter-spacing: -0.03em;
  scroll-margin-top: 28px;
}

.docs-article h1 {
  margin-top: 0;
  font-size: 2.6rem;
}

.docs-article h2 {
  margin-top: 2.2rem;
  font-size: 1.8rem;
}

.docs-article h3 {
  margin-top: 1.5rem;
  font-size: 1.22rem;
}

.docs-article p,
.docs-article li,
.docs-article td,
.docs-article th,
.docs-article blockquote {
  color: #344866;
  line-height: 1.8;
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.4rem;
}

.docs-article pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 20px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.docs-article :not(pre) > code {
  padding: 0.18rem 0.38rem;
  border-radius: 8px;
  background: rgba(15, 111, 255, 0.08);
  color: #113f93;
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: rgba(255,255,255,0.68);
  border-radius: 18px;
  overflow: hidden;
}

.docs-article th,
.docs-article td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.docs-article th {
  background: rgba(15, 111, 255, 0.08);
  color: #163e93;
}

.docs-article blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent-warm);
  background: rgba(255, 243, 231, 0.85);
  border-radius: 0 18px 18px 0;
}

.docs-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.docs-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.66);
}

.docs-card h3 {
  margin: 0 0 10px;
}

.docs-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .docs-frame {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-nav {
    max-height: none;
  }

  .docs-home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .docs-main {
    padding: 16px;
  }

  .docs-hero,
  .docs-article {
    padding: 22px;
    border-radius: 24px;
  }

  .docs-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
