:root {
  --ink: #111111;
  --muted: #3a3a3a;
  --rule: #d9d9d9;
  --accent: #00274c;
  --code-bg: #f4f4f2;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
header.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
header.site a.home { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 16px; }
header.site nav a:first-child { margin-left: 0; }
header.site nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }

main { padding: 40px 0 64px; }

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

h1 {
  font-weight: 800;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
h2 {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 44px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
h3 { font-weight: 700; font-size: 18px; margin: 24px 0 6px; }

p, li { color: var(--ink); }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 8px; }
a { color: var(--accent); text-underline-offset: 3px; }

ul, ol { padding-left: 1.3em; }
li { margin: 6px 0; }

.code {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  margin: 10px 0 16px;
}
.code pre {
  margin: 0;
  padding: 14px 84px 14px 14px;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.code button {
  position: absolute;
  top: 8px;
  right: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--accent);
  padding: 3px 10px;
  cursor: pointer;
}
.code .os {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 14px 0;
}

code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; background: var(--code-bg); padding: 1px 4px; }

table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 16px; }
th, td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
th { font-weight: 700; }

.note { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin: 16px 0; }

.next { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.next a {
  display: inline-block;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
}

footer.site { border-top: 1px solid var(--rule); padding: 20px 0 40px; font-size: 15px; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  h1 { font-size: 34px; }
  header.site nav a { margin-left: 0; margin-right: 14px; }
}

.checklist { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--rule); }
.checklist li { margin: 0; border-bottom: 1px solid var(--rule); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.progress { font-weight: 700; color: var(--accent); }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 36px; margin: 10px 0; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 14px; text-align: center; line-height: 22px; }

.done { border: 1px solid var(--accent); padding: 10px 14px; margin: 14px 0; }
.done strong { color: var(--accent); }

dl.glossary dt { font-weight: 700; margin-top: 14px; }
dl.glossary dd { margin: 2px 0 0; }

.form-q { margin: 22px 0; }
.form-q label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-q .hint { color: var(--muted); font-size: 16px; margin: 0 0 6px; }
.form-q textarea { width: 100%; min-height: 110px; font: inherit; font-size: 17px; padding: 10px; border: 1px solid #9a9a9a; border-radius: 0; }
.form-q textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.actions button, .actions a.btn { font: inherit; font-weight: 700; padding: 10px 16px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); cursor: pointer; text-decoration: none; }
.actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.saved { color: var(--muted); font-size: 15px; }

@media print {
  header.site, footer.site, .actions, .noprint, .next { display: none !important; }
  .form-q textarea { border: none; min-height: 0; height: auto; padding: 0; }
  body { font-size: 12pt; }
}
.nowrap { white-space: nowrap; }

.video { margin: 18px 0 22px; }
.video .frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--rule); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 12px 0; }
.video-grid .video { margin: 0; }
main > .wrap > .video { max-width: 760px; }
h2 i, h3 i { color: var(--accent); width: 1.15em; }
td i, .icon-list i, .done i, a i, .os i { color: var(--accent); margin-right: 2px; }
.icon-list { list-style: none; padding-left: 0; }
.icon-list i { width: 1.4em; text-align: center; }
.actions button i { margin-right: 4px; }
.actions button.primary i { color: #fff; }

details.faq { border-bottom: 1px solid var(--rule); }
details.faq:first-of-type { border-top: 1px solid var(--rule); }
details.faq summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; font-weight: 400; color: var(--accent); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 14px; }
h2 + details.faq { border-top: 1px solid var(--rule); }
