/* 메뉴얼. 좌측 목차 / 본문 / 우측 "이 페이지에서" 3단 구성 (Writerside 형태) */
:root {
  --ink: #0b1233;
  --muted: #4b5274;
  --faint: #8b909b;
  --paper: #fff;
  --side: #f5f7ff;
  --rule: #dfe3f5;
  --accent: #2340f5; /* 랜딩과 같은 브랜드 파랑, 흰 바탕 대비 7:1 */
  --accent-soft: #e9edff;
  --note: #2563eb;
  --note-soft: #eff5ff;
  --tip: #15803d;
  --tip-soft: #effaf2;
  --warn: #c2410c;
  --warn-soft: #fff5ed;
  --text: 'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Malgun Gothic', sans-serif;
  --mono: ui-monospace, 'SF Mono', Consolas, monospace;
  --bar: 60px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--bar) + 16px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.75 var(--text);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
article a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 상단 바 */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--bar);
  padding: 0 24px;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 500;
}
.bar-cta {
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.bar-cta:hover {
  background: #1a30c4;
}
.menu {
  display: none;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.search {
  position: relative;
  flex: 1;
  max-width: 440px;
  margin-left: auto;
}
.search input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--side);
  font: inherit;
  font-size: 14px;
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.results {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  max-height: 70vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(29 31 39 / 0.14);
}
.results a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
}
.results a:hover,
.results a:focus {
  background: var(--accent-soft);
  outline: none;
}
.results strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.results span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.results mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.results .empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

/* 3단 */
.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 240px;
}
.sidebar,
.onpage {
  position: sticky;
  top: var(--bar);
  align-self: start;
  max-height: calc(100vh - var(--bar));
  overflow-y: auto;
  padding: 24px 16px;
}
.sidebar {
  min-height: calc(100vh - var(--bar));
  background: var(--side);
  border-right: 1px solid var(--rule);
}
.sidebar ul,
.onpage ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar a {
  display: block;
  margin-bottom: 2px;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 15px;
}
.sidebar a:hover {
  background: #e9edff;
}
.sidebar a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.onpage {
  padding-left: 8px;
}
.onpage p {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
}
.onpage a {
  display: block;
  padding: 4px 0 4px 14px;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.onpage a:hover {
  color: var(--ink);
}
.onpage a[aria-current] {
  margin-left: -1px;
  border-left: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* 본문 */
main {
  min-width: 0;
  padding: 28px clamp(20px, 4vw, 64px) 96px;
  container-type: inline-size;
}
.crumb {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 14px;
}
.crumb a {
  color: inherit;
}
.crumb a:hover {
  color: var(--accent);
}
article h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
article h2 {
  margin: 56px 0 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
article h3 {
  margin: 36px 0 10px;
  font-size: 19px;
  font-weight: 700;
}
article h4 {
  margin: 28px 0 8px;
  font-size: 16px;
  font-weight: 700;
}
article p,
article li {
  color: #2f323b;
}
article strong {
  color: var(--ink);
  font-weight: 650;
}
/* 글만 있는 구간은 읽기 좋은 폭으로 제한하고, 사진 묶음과 표는 넓게 쓴다 */
article > :is(p, ul, ol, blockquote, h2, h3, h4) {
  max-width: 46rem;
}
article hr {
  display: none;
}
article li {
  margin: 4px 0;
}
article code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--side);
  border: 1px solid var(--rule);
  font: 0.88em var(--mono);
}
article pre {
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--side);
  border: 1px solid var(--rule);
}
article pre code {
  padding: 0;
  border: 0;
  background: none;
}
article table {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 15px;
}
article th,
article td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
article tr:last-child td {
  border-bottom: 0;
}
article th {
  background: var(--side);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
article th,
article td:first-child {
  white-space: nowrap;
}

/* 참고·팁·주의 */
article blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid #d6e4ff;
  background: var(--note-soft);
}
article blockquote.tip {
  border-color: #cdebd6;
  background: var(--tip-soft);
}
article blockquote.warn {
  border-color: #fbd9c2;
  background: var(--warn-soft);
}
article blockquote p {
  margin: 0;
}
article blockquote strong:first-child {
  color: var(--note);
}
article blockquote.tip strong:first-child {
  color: var(--tip);
}
article blockquote.warn strong:first-child {
  color: var(--warn);
}

article img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: 0 6px 20px rgb(29 31 39 / 0.08);
  cursor: zoom-in;
}
article figure {
  margin: 20px 0;
}
article figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 14px;
}

/* 사진 + 설명 묶음: 한 카드 안에 사진과 그 설명을 함께 둔다 */
.pair {
  max-width: 56rem;
  margin: 24px 0 40px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--side);
}
.pair-shot {
  margin: 0;
  padding: 16px 16px 0;
}
.pair-shot img {
  border-radius: 8px;
  /* 사진 + 설명(--text-h)이 한 화면에 들어오게. 너무 작아지지는 않게 360px까지만 */
  max-height: max(360px, calc(100vh - var(--bar) - var(--text-h, 0px) - 96px));
}
.pair-text {
  padding: 16px 24px 20px;
}
.pair-text > :first-child {
  margin-top: 0;
}
.pair-text > :last-child {
  margin-bottom: 0;
}
/* 세로로 긴 사진은 설명 옆에 */
@container (min-width: 720px) {
  .pair.side {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .pair.side .pair-shot {
    padding: 16px;
  }
  .pair.side .pair-shot img {
    max-height: calc(100vh - var(--bar) - 64px);
  }
  .pair.side .pair-text {
    padding: 20px 24px 20px 8px;
  }
}

/* 개요 페이지의 장 목록 */
.tagline {
  max-width: 40rem;
  color: var(--muted);
  font-size: 18px;
}
.topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-width: 60rem;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.topics li {
  position: relative;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.topics li:hover {
  border-color: var(--accent);
}
.topics a {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.topics a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.topics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* 이전·다음 */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 46rem;
  margin-top: 80px;
}
.pager a {
  flex: 0 1 48%;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
}
.pager a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pager small {
  display: block;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}
.pager .next {
  margin-left: auto;
  text-align: right;
}

.zoom {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-out;
}
.zoom::backdrop {
  background: rgb(15 16 22 / 0.82);
}
.zoom img {
  display: block;
  max-width: 96vw;
  max-height: 96vh;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .onpage {
    display: none;
  }
}
@media (max-width: 800px) {
  .layout {
    display: block;
  }
  .menu {
    display: block;
  }
  .bar {
    gap: 12px;
    padding: 0 16px;
  }
  .wordmark,
  .bar-cta {
    display: none;
  }
  .sidebar {
    display: none;
    position: fixed;
    inset: var(--bar) 0 0;
    z-index: 9;
    max-height: none;
  }
  .nav-open .sidebar {
    display: block;
  }
}

/* 시스템 요구 사항 "내 PC 확인하기" */
.check-button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.check-button:hover {
  background: #1a30c4;
}
.check-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}
article td.check[data-state='ok'] {
  color: var(--tip);
}
article td.check[data-state='bad'] {
  color: var(--warn);
  font-weight: 600;
}
article td.check[data-state='unknown'] {
  color: var(--faint);
}
article td.check[data-state='ok']::before {
  content: '✓ ';
}
article td.check[data-state='bad']::before {
  content: '✕ ';
}
