:root {
  --guide-bg: #fdfbf7;
  --guide-ink: #292524;
  --guide-muted: #78716c;
  --guide-line: rgba(120, 113, 108, 0.18);
  --guide-card: #fffaf0;
  --guide-primary: #f59e0b;
  --guide-primary-dark: #b45309;
}

body {
  background: var(--guide-bg);
  color: var(--guide-ink);
  overflow-x: hidden;
}

.guide-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #fffaf0 0%, var(--guide-bg) 22rem);
}

.guide-nav {
  background: rgba(253, 251, 247, 0.88);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 2rem;
}

.guide-sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 7rem);
  overflow: auto;
}

.guide-sidebar-card,
.guide-article,
.guide-info-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--guide-line);
  box-shadow: 0 18px 50px rgba(41, 37, 36, 0.06);
}

.guide-sidebar-card {
  border-radius: 1.25rem;
  padding: 1rem;
}

.guide-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--guide-primary-dark);
}

.guide-section-title:first-child {
  margin-top: 0;
}

.guide-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.guide-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid rgba(120, 113, 108, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #57534e;
  padding: 0.6rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.guide-tab span:last-child {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
}

.guide-tab:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: #292524;
}

.guide-tab.is-active {
  border-color: #292524;
  background: #292524;
  color: #fff7ed;
}

.guide-tab.is-active span:last-child {
  background: rgba(255, 255, 255, 0.16);
  color: #fbbf24;
}

.guide-category {
  border-bottom: 1px solid rgba(120, 113, 108, 0.14);
  padding-bottom: 0.35rem;
}

.guide-category-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.875rem;
  color: #57534e;
  padding: 0.75rem 0.85rem;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  transition: background 0.18s ease, color 0.18s ease;
}

.guide-category-button:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #292524;
}

.guide-category-button .material-symbols-outlined {
  font-size: 1.1rem;
  transition: transform 0.18s ease;
}

.guide-category.is-open .guide-category-button {
  color: #b45309;
}

.guide-category.is-open .guide-category-button .material-symbols-outlined {
  transform: rotate(90deg);
}

.guide-category-items {
  padding: 0.25rem 0 0.5rem;
}

.guide-toc-link {
  display: block;
  width: 100%;
  border-radius: 0.875rem;
  padding: 0.75rem 0.85rem;
  color: #57534e;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.guide-toc-link:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #292524;
}

.guide-toc-link.is-active {
  background: #292524;
  color: #fff7ed;
  box-shadow: 0 10px 24px rgba(41, 37, 36, 0.14);
}

.guide-article {
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.guide-prose {
  max-width: 820px;
  margin: 0 auto;
  color: #44403c;
  font-size: 1.03rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guide-prose h1,
.guide-prose h2,
.guide-prose h3,
.guide-prose h4 {
  color: #292524;
  line-height: 1.28;
  letter-spacing: 0;
  scroll-margin-top: 6rem;
}

.guide-prose h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
}

.guide-prose h2 {
  margin: 3rem 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(120, 113, 108, 0.16);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
}

.guide-prose h3 {
  margin: 2.2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.guide-prose p,
.guide-prose ul,
.guide-prose ol,
.guide-prose blockquote,
.guide-prose table,
.guide-prose pre {
  margin: 1rem 0;
}

.guide-prose a {
  color: #b45309;
  text-decoration: underline;
  text-decoration-color: rgba(180, 83, 9, 0.28);
  text-underline-offset: 0.18em;
}

.guide-prose strong {
  color: #292524;
  font-weight: 800;
}

.guide-prose ul,
.guide-prose ol {
  padding-left: 1.4rem;
}

.guide-prose li {
  margin: 0.45rem 0;
}

.guide-prose blockquote {
  border-left: 4px solid var(--guide-primary);
  border-radius: 0 0.875rem 0.875rem 0;
  background: rgba(245, 158, 11, 0.08);
  color: #57534e;
  padding: 0.9rem 1rem;
}

.guide-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 1rem;
  border: 1px solid rgba(120, 113, 108, 0.16);
  box-shadow: 0 14px 40px rgba(41, 37, 36, 0.08);
}

.guide-prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.guide-prose th,
.guide-prose td {
  border: 1px solid rgba(120, 113, 108, 0.2);
  padding: 0.75rem;
}

.guide-prose th {
  background: #fff7ed;
  color: #292524;
}

.guide-prose :not(pre) > code {
  border-radius: 0.35rem;
  background: #fff7ed;
  color: #9a3412;
  padding: 0.12rem 0.35rem;
  font-size: 0.9em;
}

.guide-prose pre {
  position: relative;
  overflow-x: auto;
  border-radius: 1rem;
  background: #1c1917;
  color: #fafaf9;
  padding: 1.15rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.guide-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.guide-copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
}

.guide-copy:hover {
  color: #fff;
}

.guide-mobile-select {
  display: none;
}

.guide-info-card {
  border-radius: 1.25rem;
  padding: 1.25rem;
  max-width: 100%;
  overflow: hidden;
}

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

  .guide-sidebar {
    display: none;
  }

  .guide-mobile-select {
    display: block;
  }
}

@media (max-width: 640px) {
  .guide-shell {
    overflow-x: hidden;
  }

  .guide-info-card .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-info-card .grid > div {
    min-width: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .guide-article {
    border-radius: 1rem;
    padding: 1rem;
  }

  .guide-prose h1 {
    font-size: 2rem;
  }

  .guide-prose {
    font-size: 0.98rem;
    line-height: 1.78;
  }
}
