:root {
  color-scheme: light;
  --text: #25302d;
  --text-soft: #53615a;
  --surface: #ffffff;
  --surface-muted: #f3f6f4;
  --canvas: #f8fafb;
  --border: #dfe5e2;
  --accent: #236b58;
  --accent-soft: #eaf4ef;
  --tip: #fbf3e2;
  --tip-border: #e8cf9a;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text: #e3e9e6;
    --text-soft: #b6c2bc;
    --surface: #1d2422;
    --surface-muted: #26302d;
    --canvas: #141a18;
    --border: #33403b;
    --accent: #6cc7a5;
    --accent-soft: #1d3730;
    --tip: #2d281b;
    --tip-border: #6b5a2e;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font:
    15px/1.7 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
  font-size: 0.9em;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}
.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.brand small {
  margin-left: 4px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}
.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.top-links a:not(.open-editor) {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
}
.top-links a:not(.open-editor):hover {
  color: var(--accent);
}
.open-editor {
  padding: 7px 14px;
  border-radius: 7px;
  background: #236b58;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.toc-title {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}
.toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
}
.toc li {
  margin: 4px 0;
}
.toc a {
  color: var(--text);
  text-decoration: none;
}
.toc a:hover {
  color: var(--accent);
}
main {
  min-width: 0;
}
h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.3;
}
h2 {
  margin: 0 0 16px;
  padding-top: 8px;
  font-size: 22px;
  line-height: 1.4;
}
section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.intro {
  padding-top: 0;
}
.lead {
  font-size: 17px;
}
.note,
.tip {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
}
.note {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
}
.tip {
  border: 1px solid var(--tip-border);
  background: var(--tip);
}
figure {
  margin: 0 0 20px;
}
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #1f2d2614;
}
figure.small img {
  width: auto;
}
figcaption {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
}
.split,
.pair {
  display: grid;
  gap: 24px;
  align-items: start;
  margin-bottom: 8px;
}
.split {
  grid-template-columns: auto minmax(0, 1fr);
}
.split.reverse {
  grid-template-columns: minmax(0, 1fr) auto;
}
.pair {
  grid-template-columns: repeat(auto-fit, minmax(260px, max-content));
}
.steps {
  margin-top: 0;
}
.steps li,
ul li,
ol li {
  margin-bottom: 6px;
}
.parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.parts div {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.parts dt {
  margin-bottom: 4px;
  font-weight: 700;
}
.parts dd {
  margin: 0;
  font-size: 14px;
}
table {
  width: 100%;
  margin-bottom: 16px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}
th,
td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--surface-muted);
}
details {
  margin-bottom: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
details p {
  margin: 8px 0 0;
}
.bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  color: var(--text-soft);
  font-size: 13px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 16px 48px;
  }
  .toc {
    position: static;
    max-height: none;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
  }
  .split,
  .split.reverse {
    grid-template-columns: minmax(0, 1fr);
  }
  .top {
    padding: 10px 16px;
  }
  h1 {
    font-size: 25px;
  }
}
