/* ── Guide page layout ────────────────────────────────────────── */

.guide-body {
  background: #f7f9fc;
}

.guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 1300px;
  margin: 0 auto;
  min-height: 100svh;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────── */

.guide-sidebar {
  position: sticky;
  top: var(--header-height);
  max-height: calc(100svh - var(--header-height));
  overflow-y: auto;
  padding: 40px 0 40px 20px;
  scrollbar-width: thin;
}

.guide-sidebar::-webkit-scrollbar {
  width: 4px;
}

.guide-sidebar::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--line);
}

.guide-sidebar-inner {
  padding-right: 12px;
}

.guide-sidebar-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-nav {
  display: grid;
  gap: 3px;
}

.guide-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.guide-nav-link .material-symbols-rounded {
  font-size: 1.15rem;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 140ms ease;
}

.guide-nav-link:hover,
.guide-nav-link:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
}

.guide-nav-link:hover .material-symbols-rounded,
.guide-nav-link:focus-visible .material-symbols-rounded {
  color: var(--ink-soft);
}

.guide-nav-link.is-active {
  color: var(--cyan-ink);
  background: #e0f5ff;
  font-weight: 700;
}

.guide-nav-link.is-active .material-symbols-rounded {
  color: var(--cyan-ink);
}

/* ── Main content ────────────────────────────────────────────── */

.guide-main {
  padding: 48px clamp(20px, 4vw, 56px) 96px;
  border-left: 1px solid rgb(17 18 23 / 8%);
  min-height: calc(100svh - var(--header-height));
}

.guide-page-header {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.guide-page-header .eyebrow {
  margin-bottom: 10px;
}

.guide-page-header h1 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  font-weight: 750;
  margin-bottom: 16px;
}

.guide-intro {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.62;
  margin: 0;
}

/* ── Sections ────────────────────────────────────────────────── */

.guide-section {
  margin-bottom: 72px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.guide-section + .guide-section {
  padding-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 56px;
}

.guide-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.guide-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cyan);
  color: var(--cyan-ink);
  flex-shrink: 0;
}

.guide-section-icon .material-symbols-rounded {
  font-size: 1.45rem;
}

/* Rotate icon colors per section for visual variety */
.guide-section:nth-child(2) .guide-section-icon { background: var(--purple); color: var(--purple-ink); }
.guide-section:nth-child(3) .guide-section-icon { background: var(--pink); color: var(--pink-ink); }
.guide-section:nth-child(4) .guide-section-icon { background: var(--yellow); color: var(--yellow-ink); }
.guide-section:nth-child(5) .guide-section-icon { background: var(--green); color: var(--green-ink); }
.guide-section:nth-child(6) .guide-section-icon { background: var(--blue); color: var(--blue-ink); }
.guide-section:nth-child(7) .guide-section-icon { background: var(--cyan); color: var(--cyan-ink); }
.guide-section:nth-child(8) .guide-section-icon { background: var(--pink); color: var(--pink-ink); }
.guide-section:nth-child(9) .guide-section-icon { background: var(--purple); color: var(--purple-ink); }
.guide-section:nth-child(10) .guide-section-icon { background: var(--yellow); color: var(--yellow-ink); }
.guide-section:nth-child(11) .guide-section-icon { background: var(--green); color: var(--green-ink); }
.guide-section:nth-child(12) .guide-section-icon { background: var(--blue); color: var(--blue-ink); }
.guide-section:nth-child(13) .guide-section-icon { background: var(--cyan); color: var(--cyan-ink); }

.guide-section h2 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 750;
  margin: 0;
  line-height: 1.1;
}

/* ── Content blocks ──────────────────────────────────────────── */

.guide-block {
  margin-bottom: 36px;
  padding: 28px;
  border: 1px solid rgb(17 18 23 / 9%);
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 16px rgb(17 18 23 / 5%);
}

.guide-block:last-of-type {
  margin-bottom: 0;
}

.guide-block h3 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

.guide-block p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 0.97rem;
}

.guide-block p:last-child {
  margin-bottom: 0;
}

/* ── Steps list ──────────────────────────────────────────────── */

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.guide-steps:last-child {
  margin-bottom: 0;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--cyan-ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 1px;
}

.guide-steps li div {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.97rem;
  padding-top: 3px;
}

.guide-steps li div strong {
  color: var(--ink);
}

/* ── Bullet list ─────────────────────────────────────────────── */

.guide-list {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.guide-list:last-child {
  margin-bottom: 0;
}

.guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.97rem;
}

.guide-list li::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 9px;
}

.guide-list li strong {
  color: var(--ink);
}

/* ── Callouts ────────────────────────────────────────────────── */

.guide-note,
.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  border-radius: 8px;
  padding: 14px 16px;
}

.guide-note {
  background: #e8f4fd;
  border: 1px solid rgb(100 210 255 / 30%);
}

.guide-tip {
  background: #fffbe6;
  border: 1px solid rgb(255 200 0 / 30%);
}

.guide-note .material-symbols-rounded {
  font-size: 1.15rem;
  color: var(--cyan-ink);
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-tip .material-symbols-rounded {
  font-size: 1.15rem;
  color: var(--yellow-ink);
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-note p,
.guide-tip p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.guide-note p {
  color: var(--cyan-ink);
}

.guide-tip p {
  color: var(--yellow-ink);
}

/* ── Inline links ────────────────────────────────────────────── */

.guide-link {
  color: var(--cyan-ink);
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgb(0 56 75 / 35%);
  transition: text-decoration-color 140ms ease;
}

.guide-link:hover {
  text-decoration-color: var(--cyan-ink);
}

/* ── Inline code ─────────────────────────────────────────────── */

.guide-block code {
  display: inline;
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--cyan-ink);
  background: #e5f7ff;
  font-family: "Space Grotesk", ui-monospace, Consolas, monospace;
  font-size: 0.88em;
}

/* ── Bottom actions ──────────────────────────────────────────── */

.guide-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ── Active nav tracking ─────────────────────────────────────── */

/* Handled by guide.js via IntersectionObserver */

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .guide-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

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

  .guide-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 24px 20px 0;
    border-bottom: 1px solid var(--line);
    background: white;
  }

  .guide-sidebar-inner {
    padding-right: 0;
  }

  .guide-sidebar-label {
    display: none;
  }

  .guide-nav {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }

  .guide-nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    background: white;
  }

  .guide-nav-link .material-symbols-rounded {
    font-size: 1rem;
  }

  .guide-main {
    border-left: none;
    padding: 36px 20px 80px;
  }

  .guide-page-header {
    margin-bottom: 40px;
    padding-bottom: 28px;
  }

  .guide-section + .guide-section {
    padding-top: 40px;
  }

  .guide-section {
    margin-bottom: 52px;
  }

  .guide-block {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .guide-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-section-header {
    gap: 10px;
  }

  .guide-section-icon {
    width: 38px;
    height: 38px;
  }

  .guide-section h2 {
    font-size: 1.45rem;
  }

  .guide-block {
    padding: 18px 16px;
  }

  .guide-bottom-actions .button {
    flex: 1 1 calc(50% - 6px);
  }
}
