/* 사용자 가이드 — 콘솔(.dsh-shell)과 같은 폭·여백·모서리를 쓴다.
   크기는 rem 기준이라 큰 모니터에서 html.rb-app 배율을 따라 함께 커진다. */
.guide-page {
  color: #0a0a0a;
  background: #f5f5f5;
}

.guide-shell {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
}

@media (min-width: 1920px) { .guide-shell { max-width: 96rem; padding-inline: 2rem; } }
@media (min-width: 2400px) { .guide-shell { max-width: 112rem; } }

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: #737373;
  font-size: 0.8125rem;
}

.guide-breadcrumb a,
.guide-article-toolbar a,
.guide-download-note a {
  color: #1e3a8a;
  text-decoration: none;
}

.guide-breadcrumb a:hover,
.guide-article-toolbar a:hover,
.guide-download-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-header {
  padding: 0.5rem 0 1.75rem;
  border-bottom: 1px solid #e5e5e5;
}

.guide-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.guide-header > p {
  max-width: 44rem;
  margin: 0.625rem 0 0;
  color: #525252;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.guide-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  color: #737373;
  font-size: 0.8125rem;
}

.guide-primary-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0 1rem;
  border-radius: 0.5rem;
  background: #0a0a0a;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.guide-primary-link:hover { background: #262626; }

/* ---- 목차 (index) ---- */
.guide-index { padding-top: 1.75rem; }

.guide-index-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.guide-index-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.guide-index-heading p {
  margin: 0.25rem 0 0;
  color: #737373;
  font-size: 0.875rem;
}

.guide-search {
  display: flex;
  width: min(100%, 18rem);
  min-height: 2.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  background: white;
}

.guide-search svg { width: 1rem; height: 1rem; flex: none; color: #737373; }
.guide-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #0a0a0a; font-size: 0.875rem; }
.guide-search:focus-within { outline: 2px solid #1e3a8a; outline-offset: 2px; }

/* 넓은 화면: 그룹을 두 열로 놓아 긴 한 줄 목록이 화면 폭만큼 늘어지지 않게 */
.guide-index-groups { display: grid; gap: 0 2.5rem; }
@media (min-width: 1100px) { .guide-index-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.guide-index-group { margin-top: 1.75rem; }
.guide-index-group h3 { margin: 0 0 0.5rem; color: #525252; font-size: 0.8125rem; font-weight: 600; }
.guide-index-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #e5e5e5; }
.guide-index-list li { border-bottom: 1px solid #e5e5e5; }
.guide-index-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.5rem; color: inherit; text-decoration: none; }
.guide-index-list a:hover { background: #fafafa; }
.guide-index-list strong { display: block; font-size: 0.9375rem; font-weight: 600; }
.guide-index-list small { display: block; margin-top: 0.125rem; color: #737373; font-size: 0.8125rem; line-height: 1.5; }
.guide-index-list svg { width: 1rem; height: 1rem; flex: none; color: #a3a3a3; }
.guide-empty { margin-top: 2rem; color: #737373; font-size: 0.875rem; }
.guide-index-group[hidden], .guide-index-list li[hidden] { display: none; }

.guide-download-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #e5e5e5; color: #737373; font-size: 0.8125rem; line-height: 1.6; }
.guide-download-note p { margin: 0; }
.guide-download-note a { font-weight: 600; }

/* ---- 본문 (show) ---- */
.guide-reading-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: start; gap: 3rem; }
.guide-desktop-nav { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
.guide-chapter-nav { display: flex; flex-direction: column; }
.guide-nav-home { padding: 0.5rem 0.625rem; color: #0a0a0a; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.guide-nav-group { margin-top: 1rem; }
.guide-nav-group p { margin: 0 0 0.25rem; padding: 0 0.625rem; color: #737373; font-size: 0.75rem; font-weight: 600; }
.guide-nav-group a { display: block; padding: 0.375rem 0.625rem; border-radius: 0.375rem; color: #525252; font-size: 0.8125rem; line-height: 1.45; text-decoration: none; }
.guide-nav-group a:hover { background: #ebebeb; color: #0a0a0a; }
.guide-nav-group a.is-current { background: #e5e5e5; color: #0a0a0a; font-weight: 600; }
.guide-mobile-nav { display: none; }

/* 본문은 카드로 감싸지 않는다 — 읽는 폭(72ch)만 제한 */
.guide-article { min-width: 0; max-width: 48rem; }
.guide-article-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.625rem; color: #737373; font-size: 0.8125rem; }
.guide-article-toolbar span { display: none; }
.guide-article h1 { margin: 0.25rem 0 0.75rem; font-size: 1.875rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.03em; }
.guide-on-this-page { display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; margin: 1rem 0 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid #e5e5e5; font-size: 0.8125rem; }
.guide-on-this-page strong { flex: none; color: #737373; font-weight: 500; }
.guide-on-this-page div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.guide-on-this-page a { color: #1e3a8a; text-decoration: none; }
.guide-on-this-page a:hover { text-decoration: underline; text-underline-offset: 3px; }

.guide-prose { max-width: 72ch; color: #303030; font-size: 0.9375rem; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.guide-prose h2 { scroll-margin-top: 1.5rem; margin: 2.25rem 0 0.75rem; color: #0a0a0a; font-size: 1.3125rem; line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; }
.guide-prose h3 { scroll-margin-top: 1.5rem; margin: 1.75rem 0 0.5rem; color: #0a0a0a; font-size: 1.0625rem; line-height: 1.45; font-weight: 700; }
.guide-prose p { margin: 0 0 1rem; }
.guide-prose strong { color: #0a0a0a; font-weight: 700; }
.guide-prose a { color: #1e3a8a; text-decoration: underline; text-underline-offset: 3px; }
.guide-prose ol, .guide-prose ul { margin: 0.5rem 0 1.25rem; padding-left: 1.5rem; }
.guide-prose li { padding-left: 0.25rem; margin: 0.25rem 0; }
.guide-prose li p { margin: 0; }
.guide-prose blockquote { margin: 1.25rem 0 1.5rem; padding: 0.875rem 1rem; border: 1px solid #e5e5e5; border-radius: 0.5rem; background: #fafafa; }
.guide-prose blockquote p { margin: 0; }
.guide-prose table { display: block; width: 100%; max-width: 100%; margin: 1rem 0 1.75rem; overflow-x: auto; border-collapse: collapse; font-size: 0.8125rem; line-height: 1.55; }
.guide-prose th, .guide-prose td { min-width: 7rem; padding: 0.625rem 0.75rem; border-bottom: 1px solid #e5e5e5; text-align: left; vertical-align: top; }
.guide-prose th { background: #fafafa; color: #0a0a0a; font-weight: 700; }
.guide-prose pre { overflow-x: auto; margin: 1rem 0 1.5rem; padding: 1rem; border-radius: 0.5rem; background: #ebebeb; font-size: 0.8125rem; line-height: 1.65; }
.guide-prose code { font-size: .92em; }

.guide-pagination { display: flex; gap: 0.75rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e5e5; }
.guide-pagination > a, .guide-pagination > span { flex: 1; min-width: 0; }
.guide-pagination a { display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; padding: 0.75rem 1rem; border: 1px solid #e5e5e5; border-radius: 0.5rem; background: white; color: #0a0a0a; text-decoration: none; transition: border-color .16s ease; }
.guide-pagination a:last-child { text-align: right; }
.guide-pagination a:hover { border-color: #a3a3a3; }
.guide-pagination a:focus-visible { outline: 2px solid #1e3a8a; outline-offset: 3px; }
.guide-pagination small { color: #737373; font-size: 0.75rem; font-weight: 500; }
.guide-pagination strong { font-size: 0.875rem; line-height: 1.4; }

@media (max-width: 1023px) {
  .guide-reading-layout { display: block; }
  .guide-desktop-nav { display: none; }
  .guide-mobile-nav { display: block; margin-bottom: 1.25rem; border: 1px solid #e5e5e5; border-radius: 0.5rem; background: white; }
  .guide-mobile-nav summary { display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between; padding: 0 1rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
  .guide-mobile-nav summary svg { width: 1rem; height: 1rem; }
  .guide-mobile-nav[open] summary svg { transform: rotate(180deg); }
  .guide-mobile-nav .guide-chapter-nav { max-height: 50vh; overflow-y: auto; padding: 0 0.5rem 0.875rem; border-top: 1px solid #e5e5e5; }
  .guide-article { max-width: none; }
}

@media (max-width: 640px) {
  .guide-shell { padding: 1.25rem 1rem 3rem; }
  .guide-header h1 { font-size: 1.625rem; }
  .guide-index-heading { align-items: stretch; }
  .guide-search { width: 100%; }
  .guide-prose { font-size: 0.875rem; }
  .guide-prose h2 { font-size: 1.1875rem; }
  .guide-prose table th, .guide-prose table td { white-space: nowrap; }
}
