
:root {
  --guide-bg: #071014;
  --guide-panel: rgba(14, 25, 31, 0.82);
  --guide-panel-strong: rgba(18, 35, 43, 0.94);
  --guide-line: rgba(255,255,255,0.14);
  --guide-text: #eef7f5;
  --guide-muted: rgba(238,247,245,0.74);
  --guide-dim: rgba(238,247,245,0.56);
  --guide-blue: #67d6ff;
  --guide-teal: #38e3c6;
  --guide-orange: #ff9f3c;
  --guide-red: #cf1f22;
}

body.guide-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 227, 198, 0.10), transparent 36%),
    radial-gradient(circle at 82% 10%, rgba(207, 31, 34, 0.12), transparent 33%),
    linear-gradient(135deg, #071014, #101c22 52%, #091115);
  color: var(--guide-text);
  overflow-x: hidden;
}

.guide-topbar .guide-header-nav a.nav-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.guide-menu-button {
  display: none;
  border: 1px solid var(--guide-line);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: white;
  width: 42px;
  height: 38px;
  cursor: pointer;
  font-size: 1.25rem;
}

.guide-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  width: min(1600px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.4rem) 0 3rem;
}

.guide-sidebar {
  position: sticky;
  top: calc(var(--topbar-h, 76px) + 1rem);
  align-self: start;
  max-height: calc(100dvh - var(--topbar-h, 76px) - 2rem);
  overflow: auto;
  border: 1px solid var(--guide-line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15,24,29,.92), rgba(8,13,16,.88));
  box-shadow: 0 28px 70px rgba(0,0,0,.35);
  padding: 1rem;
  backdrop-filter: blur(18px);
}

.guide-search-wrap {
  border-bottom: 1px solid var(--guide-line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.guide-search-wrap label {
  display: block;
  font-weight: 850;
  font-size: .88rem;
  margin-bottom: .55rem;
}

.guide-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  color: var(--guide-text);
  padding: .85rem .9rem;
  font-size: .96rem;
  outline: none;
}

.guide-search:focus {
  border-color: rgba(103,214,255,.72);
  box-shadow: 0 0 0 4px rgba(103,214,255,.12);
}

.search-hint {
  color: var(--guide-dim);
  font-size: .78rem;
  line-height: 1.35;
  margin-top: .55rem;
}

.search-results {
  display: none;
  border-bottom: 1px solid var(--guide-line);
  margin-bottom: .85rem;
  padding-bottom: .85rem;
}

.search-results.active {
  display: block;
}

.search-result {
  display: block;
  text-decoration: none;
  color: var(--guide-text);
  padding: .7rem .75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  margin-bottom: .4rem;
  background: rgba(255,255,255,.04);
}

.search-result:hover,
.search-result:focus {
  border-color: rgba(103,214,255,.4);
  background: rgba(103,214,255,.08);
}

.search-result strong {
  display: block;
  font-size: .9rem;
}

.search-result span {
  display: block;
  color: var(--guide-muted);
  font-size: .78rem;
  margin-top: .2rem;
}

.guide-nav-group {
  margin-bottom: .35rem;
}

.guide-nav-group summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: .55rem;
  align-items: center;
  font-weight: 850;
  color: var(--guide-text);
  padding: .7rem .65rem;
  border-radius: 14px;
}

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

.guide-nav-group summary span {
  font-size: .68rem;
  text-transform: uppercase;
  color: var(--guide-teal);
  background: rgba(56,227,198,.10);
  border: 1px solid rgba(56,227,198,.18);
  border-radius: 999px;
  padding: .18rem .38rem;
}

.guide-nav-link {
  display: block;
  padding: .52rem .75rem .52rem 1.3rem;
  color: var(--guide-muted);
  text-decoration: none;
  border-left: 2px solid rgba(255,255,255,.08);
  margin-left: .85rem;
  border-radius: 0 12px 12px 0;
  font-size: .9rem;
  line-height: 1.25;
}

.guide-nav-link:hover,
.guide-nav-link.active {
  color: white;
  background: rgba(103,214,255,.08);
  border-left-color: var(--guide-blue);
}

.guide-content {
  min-width: 0;
}

.guide-hero,
.guide-section {
  border: 1px solid var(--guide-line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 26, 32, 0.88), rgba(9, 15, 18, 0.78));
  box-shadow: 0 28px 70px rgba(0,0,0,.30);
  backdrop-filter: blur(14px);
}

.guide-hero {
  padding: clamp(1.5rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.guide-hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  margin: .4rem 0 1rem;
  max-width: 970px;
}

.guide-hero p {
  color: var(--guide-muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  max-width: 980px;
  line-height: 1.6;
}

.guide-hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.1rem;
}

.guide-hero-notes span,
.capture-code,
.placeholder-badge {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  padding: .45rem .65rem;
  color: rgba(255,255,255,.88);
  font-size: .82rem;
  font-weight: 850;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .75rem;
  margin: 1.2rem 0;
}

.guide-card-link {
  min-height: 118px;
  text-decoration: none;
  color: var(--guide-text);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255,255,255,.055);
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.guide-card-link:hover {
  border-color: rgba(103,214,255,.45);
  background: rgba(103,214,255,.08);
}

.guide-card-link span {
  color: var(--guide-muted);
  line-height: 1.38;
  font-size: .92rem;
}

.guide-section {
  padding: clamp(1.25rem, 2.6vw, 2.15rem);
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--topbar-h, 76px) + 1rem);
}

.section-kicker {
  display: inline-block;
  color: var(--guide-teal);
  background: rgba(56,227,198,.09);
  border: 1px solid rgba(56,227,198,.20);
  border-radius: 999px;
  padding: .35rem .6rem;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}

.guide-section h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 1.1;
  margin: 0 0 .6rem;
}

.guide-section h3 {
  margin-top: 1.25rem;
  color: white;
}

.section-summary {
  color: var(--guide-blue);
  font-weight: 750;
  font-size: 1.05rem;
}

.guide-section p,
.guide-section li,
.glossary-list dd {
  color: var(--guide-muted);
  line-height: 1.65;
}

.guide-steps {
  padding-left: 1.25rem;
}

.glossary-list {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 0.66fr);
  gap: .7rem 1rem;
}

.glossary-list dt {
  font-weight: 900;
  color: white;
  border-top: 1px solid rgba(255,255,255,.09);
  padding-top: .75rem;
}

.glossary-list dd {
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.09);
  padding-top: .75rem;
}

.screenshot-placeholder {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  border: 1px dashed rgba(103,214,255,.42);
  background: linear-gradient(135deg, rgba(103,214,255,.08), rgba(255,255,255,.03));
  border-radius: 18px;
  padding: 1rem;
  margin-top: 1.2rem;
}

.screenshot-placeholder strong {
  display: block;
}

.screenshot-placeholder span {
  display: block;
  color: var(--guide-muted);
  margin-top: .25rem;
  line-height: 1.45;
}

.placeholder-badge {
  color: white;
  background: rgba(207,31,34,.22);
  border-color: rgba(207,31,34,.38);
  flex: 0 0 auto;
}

.capture-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.capture-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .9rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}

.capture-item p {
  margin: .2rem 0 0;
  font-size: .9rem;
}

.capture-code {
  flex: 0 0 auto;
  color: white;
  background: rgba(255,159,60,.16);
  border-color: rgba(255,159,60,.32);
}

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

  .guide-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .guide-sidebar {
    position: fixed;
    z-index: 1100;
    top: var(--topbar-h, 76px);
    left: 0;
    bottom: 0;
    width: min(360px, calc(100vw - 1.5rem));
    max-height: none;
    border-radius: 0 24px 24px 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .guide-sidebar.open {
    transform: translateX(0);
  }

  .guide-card-grid,
  .capture-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .guide-shell {
    width: min(100vw - 1rem, 760px);
    padding-top: .6rem;
  }

  .guide-hero,
  .guide-section {
    border-radius: 22px;
  }

  .glossary-list {
    grid-template-columns: 1fr;
  }

  .glossary-list dd {
    border-top: 0;
    padding-top: 0;
  }

  .guide-header-nav {
    display: none !important;
  }
}


/* v19 Guide cleanup: remove cyan text, improve readability, and de-emphasize image placeholders */
:root {
  --guide-blue: #f6c56b;
  --guide-teal: #ffb14d;
  --guide-orange: #ffb14d;
  --guide-text: #f7f3ea;
  --guide-muted: rgba(247,243,234,0.76);
  --guide-dim: rgba(247,243,234,0.58);
}

body.guide-page {
  font-family: Aptos, "Segoe UI", "Segoe UI Variable", Arial, sans-serif;
}

.guide-hero h1,
.guide-section h2,
.guide-section h3,
.guide-card-link strong,
.capture-item strong,
.search-result strong,
.guide-nav-group summary,
.guide-search-wrap label,
.glossary-list dt {
  font-family: Aptos, "Segoe UI", "Segoe UI Variable", Arial, sans-serif;
  font-weight: 720;
  letter-spacing: -0.012em;
}

.guide-hero h1 {
  font-weight: 720;
  letter-spacing: -0.018em;
}

.guide-section h2 {
  font-weight: 710;
  letter-spacing: -0.012em;
}

.section-summary {
  color: #f7d58a;
}

.section-kicker,
.guide-nav-group summary span {
  color: #fff1cf;
  background: rgba(255, 177, 77, .15);
  border-color: rgba(255, 177, 77, .35);
}

.guide-search:focus {
  border-color: rgba(255,177,77,.74);
  box-shadow: 0 0 0 4px rgba(255,177,77,.14);
}

.search-result:hover,
.search-result:focus,
.guide-card-link:hover {
  border-color: rgba(255,177,77,.48);
  background: rgba(255,177,77,.09);
}

.guide-nav-link:hover,
.guide-nav-link.active {
  background: rgba(255,177,77,.09);
  border-left-color: #ffb14d;
}

.guide-hero-notes span {
  color: #fff2d0;
}

.screenshot-placeholder,
.capture-list,
.capture-item {
  display: none !important;
}


/* v24 guide navigation refinement: keep the guide table of contents visible on tablet/desktop widths,
   aligned with the first guide content card. The off-canvas drawer is reserved for narrow phones only. */
.guide-sidebar {
  top: calc(var(--topbar-h, 76px) + clamp(1rem, 2vw, 1.4rem));
  max-height: calc(100dvh - var(--topbar-h, 76px) - clamp(1rem, 2vw, 1.4rem) - clamp(1rem, 2vw, 1.4rem));
}

@media (max-width: 840px) {
  .guide-sidebar {
    top: var(--topbar-h, 76px);
    max-height: none;
  }
}

/* v26 guide sidebar fix: on desktop/tablet keep the guide search/table-of-contents
   fixed in the viewport, aligned with the top of the first guide content card, and
   below the fixed title bar so it never scrolls over the navigation. */
@media (min-width: 841px) {
  .guide-shell {
    align-items: start;
  }

  .guide-content {
    grid-column: 2;
  }

  .guide-sidebar {
    position: fixed !important;
    top: calc(var(--topbar-h, 76px) + clamp(1rem, 2vw, 1.4rem)) !important;
    left: max(1rem, calc((100vw - 1600px) / 2)) !important;
    bottom: clamp(1rem, 2vw, 1.4rem) !important;
    width: min(340px, calc(100vw - 2rem)) !important;
    max-height: none !important;
    overflow-y: auto !important;
    z-index: 1200 !important;
  }
}

/* Keep the fixed title bar above guide navigation and mobile drawers. */
.topbar {
  z-index: 3000 !important;
}

@media (max-width: 840px) {
  .guide-sidebar {
    z-index: 1800 !important;
  }
}

/* v27 guide sidebar clamp: keep the desktop/tablet guide search/table-of-contents
   below the fixed website header, aligned with the first guide card, and clamped
   to the visible viewport with its own internal scrollbar. */
@media (min-width: 841px) {
  body.guide-page {
    --guide-page-gap: clamp(1.25rem, 2.2vw, 2rem);
    --guide-sidebar-top: calc(var(--topbar-h, 76px) + var(--guide-page-gap));
    --guide-sidebar-bottom: clamp(0.75rem, 1.6vw, 1.25rem);
  }

  .guide-shell {
    padding-top: var(--guide-page-gap) !important;
  }

  .guide-sidebar {
    position: fixed !important;
    top: var(--guide-sidebar-top) !important;
    bottom: auto !important;
    height: calc(100dvh - var(--guide-sidebar-top) - var(--guide-sidebar-bottom)) !important;
    max-height: calc(100dvh - var(--guide-sidebar-top) - var(--guide-sidebar-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}
