@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg-0: #f3f5fb;
  --bg-1: #f6f9ff;
  --surface: #fff;
  --surface-muted: rgba(255, 255, 255, 0.72);
  --text: #152235;
  --text-subtle: #3e536f;
  --accent: #13c2c2;
  --accent-2: #ff8a3d;
  --ink: #0d1117;
  --line: rgba(15, 23, 42, 0.1);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  font-family: 'Open Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, #d0efff 0%, transparent 34%),
    radial-gradient(circle at 85% 8%, #ffd7be 0%, transparent 30%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
  font-family: 'Open Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.01em;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 18%, rgba(19, 194, 194, 0.18), transparent 25%),
    radial-gradient(circle at 16% 84%, rgba(255, 138, 61, 0.12), transparent 23%);
  filter: blur(10px);
  z-index: -1;
}

.site-shell {
  width: min(1024px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.1rem 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(11px);
}

.site-header .site-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(19, 34, 58, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.brand {
  font-family: 'Open Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.site-header nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header a {
  color: var(--text-subtle);
  font-weight: 600;
  text-decoration: none;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.github-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.hero {
  margin: 2rem 0 1.5rem;
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.96));
  animation: lift 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
}

.hero p {
  margin: 0.7rem 0 0;
  color: var(--text-subtle);
  max-width: 62ch;
  line-height: 1.5;
}

.guide-page {
  position: relative;
  margin-bottom: 2rem;
}

.guide-wrap {
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
  padding: 2rem clamp(1rem, 3vw, 2rem);
  line-height: 1.55;
  animation: reveal 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-toc {
  position: sticky;
  top: 0.1rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
  padding: 1rem;
}

.guide-toc summary {
  list-style: none;
  display: none;
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.guide-toc summary::-webkit-details-marker {
  display: none;
}

.guide-toc-top {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--accent-2);
  display: inline-block;
  margin-bottom: 0.8rem;
}

.guide-toc-top:hover {
  color: var(--ink);
}

.jump-to-examples {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 0.9rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(120deg, #0891b2, #2563eb);
  border: 1px solid #0c4ac0;
  box-shadow: 0 10px 20px -14px #0c4ac0;
}

.jump-to-examples:hover {
  color: #e7effd;
  border-color: #082f99;
  box-shadow: 0 14px 26px -16px #0c4ac0;
}

.guide-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.guide-toc-item a {
  text-decoration: none;
  color: var(--text-subtle);
  line-height: 1.3;
}

.guide-toc-item a:hover {
  color: var(--ink);
}

.guide-toc-item a.is-active {
  position: relative;
  color: var(--ink);
  font-weight: 700;
  background: #ecf3ff;
  border-radius: 6px;
  padding: 0.08rem 0.42rem;
}

.guide-toc-item a.is-active::before {
  content: "";
  position: absolute;
  left: -0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.26rem;
  height: 0.76rem;
  border-radius: 999px;
  background: var(--accent);
}

.guide-toc-level-1 a {
  color: var(--ink);
  font-weight: 700;
}

.guide-toc-level-2 {
  margin-left: 0.6rem;
}

.guide-toc-level-3 {
  margin-left: 1.2rem;
  font-size: 0.88rem;
}

.guide-toc-level-4 {
  margin-left: 1.8rem;
  font-size: 0.84rem;
}

.guide-wrap h1,
.guide-wrap h2,
.guide-wrap h3,
.guide-wrap h4 {
  letter-spacing: -0.015em;
  color: #06142f;
}

.guide-wrap h1,
.guide-wrap h2 {
  scroll-margin-top: 5rem;
}

.guide-wrap h3,
.guide-wrap h4 {
  scroll-margin-top: 5.3rem;
}

.guide-wrap h1 {
  margin-top: 1.4rem;
  margin-bottom: 0.75rem;
}

.guide-wrap h2 {
  margin-top: 2rem;
}

.guide-wrap h3,
.guide-wrap h4 {
  margin-top: 1.45rem;
}

.guide-wrap p,
.guide-wrap ul,
.guide-wrap ol,
.guide-wrap table {
  color: #16253e;
}

.guide-wrap pre {
  margin: 1.25rem 0;
}

.guide-wrap pre,
.guide-wrap code {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.guide-wrap p code {
  background: #f0f4fb;
  padding: 0.08rem 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.guide-wrap table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.guide-wrap th,
.guide-wrap td {
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.55rem;
  text-align: left;
}

.guide-wrap th {
  background: #eff4ff;
}

.guide-wrap blockquote {
  margin: 1.25rem 0;
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #edf8ff;
}

.guide-wrap .shiki {
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 1rem;
  overflow-x: auto;
  box-shadow: 0 16px 36px -28px #0b1220;
}

.guide-wrap .shiki code {
  font-size: 0.95rem;
  color: inherit;
}

.site-footer {
  margin: 0 auto;
  width: min(1024px, calc(100% - 2rem));
  color: var(--text-subtle);
  padding: 0 1rem 2.2rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.4px;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--accent);
}

@keyframes lift {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@media (max-width: 760px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
    top: auto;
    max-height: none;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
  }

  .guide-toc summary {
    display: list-item;
  }

  .guide-toc-list {
    max-height: 45vh;
    overflow: auto;
  }

  .site-header nav {
    justify-content: center;
  }

  .site-header .site-shell {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    padding-bottom: 1rem;
  }

  .hero {
    margin-top: 1rem;
    padding: 1.1rem;
  }

  .guide-wrap {
    padding: 1.2rem;
  }
}
