.guide-root {
  --guide-readable: 880px;
  width: 100%;
  min-width: 0;
}

.guide-intro {
  max-width: var(--guide-readable);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.guide-intro h1 {
  margin: 6px 0 12px;
  font-size: clamp(2.25rem, 6vw, 3.65rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.guide-lead {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.guide-search {
  max-width: 620px;
  margin-top: 25px;
}

.guide-search > label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.guide-search-field {
  position: relative;
}

.guide-search-field .guide-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.guide-search-field input {
  width: 100%;
  padding-left: 44px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, var(--guide-readable));
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  margin-top: 34px;
}

.guide-toc-desktop {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.guide-toc-desktop > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-toc-desktop ol,
.guide-toc-mobile ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.guide-toc-desktop a,
.guide-toc-mobile a {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  text-decoration: none;
}

.guide-toc-desktop a {
  padding: 6px 9px;
  border-left: 2px solid transparent;
}

.guide-toc-desktop a:hover,
.guide-toc-mobile a:hover {
  color: var(--text);
}

.guide-toc-desktop a[aria-current='location'] {
  color: var(--text);
  font-weight: 800;
  background: rgb(241 100 54 / 8%);
  border-left-color: var(--orange);
}

.guide-toc-mobile {
  display: none;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guide-toc-mobile summary {
  padding: 13px 15px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.guide-toc-mobile nav {
  padding: 0 15px 13px;
}

.guide-toc-mobile a {
  padding: 7px 0;
}

.guide-toc-mobile a[aria-current='location'] {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
}

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

.guide-section {
  padding: 18px 0 44px;
  scroll-margin-top: 100px;
  border-bottom: 1px solid var(--border);
}

.guide-section:first-of-type {
  padding-top: 0;
}

.guide-section-number {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.guide-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.guide-section-summary {
  max-width: 720px;
  margin: 8px 0 23px;
  color: var(--muted);
  font-size: 1rem;
}

.guide-paragraph,
.guide-block,
.guide-mini-card p,
.guide-callout p,
.guide-command-row p,
.guide-faq-item p,
.guide-support-card p {
  color: #c7cad1;
}

.guide-paragraph {
  max-width: 760px;
  margin: 16px 0;
}

.guide-block h3,
.guide-file-card h3,
.guide-mini-card h3,
.guide-trouble-card h3,
.guide-support-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.96rem;
}

.guide-list {
  padding-left: 21px;
  margin: 12px 0 18px;
  color: #c7cad1;
}

.guide-list li + li {
  margin-top: 8px;
}

.guide-steps {
  display: grid;
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: steps;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  counter-increment: steps;
}

.guide-steps li::before {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffd4c5;
  font-size: 0.8rem;
  font-weight: 900;
  content: counter(steps);
  background: rgb(241 100 54 / 14%);
  border: 1px solid rgb(241 100 54 / 32%);
  border-radius: 10px;
}

.guide-steps strong,
.guide-steps span {
  display: block;
}

.guide-steps strong {
  color: var(--text);
}

.guide-steps span {
  margin-top: 2px;
  color: var(--muted);
}

.guide-callout,
.guide-file-card,
.guide-trouble-card,
.guide-support-card {
  padding: 17px 18px;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.guide-callout {
  border-left: 3px solid var(--orange);
}

.guide-callout strong {
  color: var(--text);
}

.guide-callout p,
.guide-mini-card p,
.guide-support-card p {
  margin: 4px 0 0;
}

.guide-pair-grid,
.guide-trouble-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.guide-mini-card {
  min-width: 0;
  padding: 15px;
  background: rgb(36 38 44 / 72%);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.guide-badges .guide-mini-card h3 {
  display: inline-flex;
  padding: 3px 8px;
  color: #ffd4c5;
  font-size: 0.77rem;
  background: rgb(241 100 54 / 13%);
  border: 1px solid rgb(241 100 54 / 30%);
  border-radius: 999px;
}

.guide-file-card {
  max-width: 620px;
  background: #15161a;
}

.guide-file-card ul {
  padding: 0;
  margin: 12px 0 0;
  color: #d9dbe0;
  list-style: none;
}

.guide-file-card li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.guide-file-card li::before {
  margin-right: 10px;
  color: var(--orange);
  content: '•';
}

.guide-command-list {
  display: grid;
  gap: 9px;
}

.guide-command-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 13px 15px;
  background: rgb(36 38 44 / 66%);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.guide-command-heading {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.guide-command-heading code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #ffd3c3;
  font-size: 0.83rem;
}

.guide-command-heading span {
  flex: none;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  background: #191a1f;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.guide-command-row p {
  margin: 0;
  font-size: 0.88rem;
}

.guide-flow {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  margin: 16px 0 22px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.guide-flow li {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
  padding: 8px 10px;
  color: #d6d8dd;
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.guide-flow li:not(:last-child)::after {
  margin-right: -20px;
  color: var(--orange);
  content: '→';
  transform: translateX(14px);
}

.guide-faq-list {
  display: grid;
  gap: 9px;
}

.guide-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.guide-faq-item summary {
  padding: 14px 16px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.guide-faq-item p {
  padding: 0 16px 16px;
  margin: 0;
}

.guide-trouble-card {
  margin: 0;
}

.guide-trouble-card .guide-list {
  margin-bottom: 0;
}

.guide-support-card {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(120deg, rgb(241 100 54 / 12%), var(--surface) 68%);
}

.guide-support-card .button {
  flex: none;
}

.guide-support-card .guide-icon {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-empty {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guide-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  max-width: calc(190px + var(--guide-readable) + 68px);
  padding: 25px 0 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.guide-footer nav {
  display: flex;
  gap: 15px;
}

.guide-footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.guide-footer a:hover {
  color: var(--text);
}

.context-help {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.context-help:hover {
  color: var(--text);
}

.context-help svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12rem, rgb(241 100 54 / 13%), transparent 38rem), var(--bg);
}

.guide-public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(17 18 21 / 92%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.guide-public-header-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), 1180px);
  min-height: 76px;
  margin: 0 auto;
}

.guide-public-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.guide-public-brand img {
  border-radius: 11px;
}

.guide-public-brand strong,
.guide-public-brand span {
  display: block;
}

.guide-public-brand span span {
  color: var(--muted);
  font-size: 0.73rem;
}

.guide-public-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.guide-public-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-public-nav a:hover,
.guide-public-nav a[aria-current='page'] {
  color: var(--text);
}

.guide-public-main {
  width: min(calc(100% - 32px), 1180px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 72px) 0 58px;
}

@media (max-width: 900px) {
  .guide-layout {
    display: block;
  }

  .guide-toc-desktop {
    display: none;
  }

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

@media (max-width: 640px) {
  .guide-public-header {
    position: static;
  }

  .guide-public-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 14px 0;
  }

  .guide-public-nav {
    gap: 14px;
    flex-wrap: wrap;
  }

  .guide-pair-grid,
  .guide-trouble-grid {
    grid-template-columns: 1fr;
  }

  .guide-command-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .guide-support-card,
  .guide-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-support-card .button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .guide-public-main {
    width: min(calc(100% - 24px), 1180px);
  }

  .guide-intro h1 {
    font-size: 2.15rem;
  }

  .guide-section {
    padding-bottom: 36px;
  }

  .guide-command-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-flow {
    padding-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-section {
    scroll-behavior: auto;
  }
}
