/* Layout: a step-by-step field guide — sticky step rail on wide screens, one reading column, screenshots framed like device windows. */
:root {
  --bg: #f5f6f9;
  --paper: #ffffff;
  --ink: #18203a;
  --muted: #5b6480;
  --line: #dfe3ec;
  --accent: #2f4fd8;
  --accent-soft: #e8ecfd;
  --tip: #0f7a5c;
  --tip-soft: #e3f4ee;
  --warn: #9a5a00;
  --warn-soft: #fdf1dc;
  --code-bg: #121826;
  --code-fg: #e6e9f2;
  --code-dim: #8a93ad;
  --shadow: 0 1px 2px rgba(24,32,58,.06), 0 8px 24px rgba(24,32,58,.08);
  --font-body: "IBM Plex Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-code: "JetBrains Mono", Consolas, "D2Coding", monospace;
  --step: 1.0625rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1320; --paper: #171c2c; --ink: #e7eaf3; --muted: #9aa3bd; --line: #2a3148;
    --accent: #8ea2ff; --accent-soft: #232c52; --tip: #5fd0a8; --tip-soft: #15302a;
    --warn: #f2b65a; --warn-soft: #33270f; --code-bg: #0a0d16; --code-fg: #e6e9f2; --code-dim: #7f88a3;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1320; --paper: #171c2c; --ink: #e7eaf3; --muted: #9aa3bd; --line: #2a3148;
  --accent: #8ea2ff; --accent-soft: #232c52; --tip: #5fd0a8; --tip-soft: #15302a;
  --warn: #f2b65a; --warn-soft: #33270f; --code-bg: #0a0d16; --code-fg: #e6e9f2; --code-dim: #7f88a3;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--step); line-height: 1.75; margin: 0; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 0 72px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
header.top { grid-column: 1 / -1; padding-block: 56px 28px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: .8rem; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.toplinks { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: baseline; }
.back { font-size: .9rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.back:hover, .back:focus-visible { text-decoration: underline; }
.toplinks-end { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.lang-switch { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: 600 .82rem var(--font-body); min-height: 32px; padding: 5px 11px; cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.3; margin: 8px 0 12px; text-wrap: balance; letter-spacing: -0.02em; }
.lead { color: var(--muted); max-width: 62ch; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding: 0; list-style: none; }
.facts li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: .9rem; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }

nav.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 24px); align-self: start; padding-top: 32px; }
nav.rail p { font-size: .78rem; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
nav.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
nav.rail a { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .93rem; line-height: 1.45; }
nav.rail a:hover, nav.rail a:focus-visible { background: var(--accent-soft); color: var(--ink); outline: none; }
nav.rail a span:not([data-l]) { font-family: var(--font-code); font-size: .78rem; color: var(--accent); min-width: 1.4em; }

main { min-width: 0; padding-top: 32px; }
section.step { padding-block: 8px 40px; border-bottom: 1px solid var(--line); margin-bottom: 40px; scroll-margin-top: 20px; }
section.step:last-of-type { border-bottom: 0; }
.step-head { display: flex; gap: 16px; align-items: flex-start; }
.num { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; font-family: var(--font-code); }
:root[data-theme="dark"] .num { color: #0f1320; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num { color: #0f1320; } }
h2 { font-size: 1.55rem; line-height: 1.35; margin: 2px 0 2px; text-wrap: balance; letter-spacing: -0.01em; }
.time { font-size: .85rem; color: var(--muted); }
h3 { font-size: 1.12rem; margin: 30px 0 8px; }
h3.first { margin-top: 0; }
p { margin: 12px 0; max-width: 68ch; }
ol.do { padding-left: 0; list-style: none; counter-reset: d; margin: 14px 0; display: grid; gap: 10px; max-width: 68ch; }
ol.do > li { counter-increment: d; position: relative; padding-left: 38px; }
ol.do > li::before { content: counter(d); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-size: .82rem; font-weight: 700; display: grid; place-items: center; font-family: var(--font-code); }
ul { max-width: 68ch; }
.btn { display: inline-block; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 6px; padding: 0 7px; font-weight: 600; font-size: .95em; white-space: nowrap; }
kbd { font-family: var(--font-code); font-size: .85em; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
code { font-family: var(--font-code); font-size: .88em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

figure { margin: 22px 0; max-width: 100%; }
figure .frame { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
figure .bar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
figure .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
figure .bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
figure img { display: block; width: 100%; height: auto; }
figure.narrow { max-width: 380px; }
figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; max-width: 68ch; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.pair figure { margin: 0; }

.note { border-radius: 10px; padding: 14px 18px; margin: 18px 0; max-width: 68ch; font-size: .98rem; }
.note b.k { display: block; font-size: .82rem; letter-spacing: .06em; margin-bottom: 2px; }
.note.tip { background: var(--tip-soft); }
.note.tip b.k { color: var(--tip); }
.note.warn { background: var(--warn-soft); }
.note.warn b.k { color: var(--warn); }
.note p { margin: 4px 0; }

.cmd { background: var(--code-bg); color: var(--code-fg); border-radius: 10px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; margin: 14px 0; max-width: 100%; }
.cmd code { background: none; color: inherit; padding: 0; font-size: .9rem; overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.cmd button { flex: none; font: 600 .85rem var(--font-body); background: #2f4fd8; color: #fff; border: 0; border-radius: 7px; padding: 7px 12px; cursor: pointer; }
.cmd button:focus-visible { outline: 2px solid #8ea2ff; outline-offset: 2px; }
.term { background: var(--code-bg); color: var(--code-fg); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin: 18px 0; }
.term .bar { color: var(--code-dim); border-bottom: 1px solid #262d40; padding: 8px 14px; font-size: .78rem; font-family: var(--font-body); }
.term pre { margin: 0; padding: 14px 16px 18px; font-family: var(--font-code); font-size: .84rem; line-height: 1.75; overflow-x: auto; white-space: pre; }
.term .p { color: var(--code-dim); }
.term .hl { color: #ffd479; }
.term .ok { color: #7ee0b0; }
.copybtn { font: 600 .9rem var(--font-body); background: var(--accent); color: var(--paper); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.copybtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.term pre#aiprompt { white-space: pre-wrap; }

table.faq { border-collapse: collapse; width: 100%; font-size: .97rem; }
.tablebox { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
table.faq th, table.faq td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.faq tr:last-child td { border-bottom: 0; }
table.faq th { font-size: .82rem; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--bg) 60%, var(--paper)); }
table.faq td:first-child { font-weight: 600; width: 34%; }

.map { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 20px 0; padding: 0; list-style: none; }
.map li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .92rem; line-height: 1.5; }
.map li b { display: block; font-family: var(--font-code); color: var(--accent); font-size: .8rem; margin-bottom: 4px; }
footer { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); padding-top: 22px; }

@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-inline: 16px; }
  nav.rail { position: static; padding-top: 24px; }
  nav.rail ol { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  header.top { padding-block: 36px 22px; }
  .num { width: 38px; height: 38px; font-size: 1rem; }
  .btn { white-space: normal; }   /* a long button name (English) wraps instead of widening the page */
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
