/* Zealot Tools — 종이와 잉크를 닮은 화면. 색은 잉크 한 가지에 주황 하나만 더한다. */
:root {
  --paper: #f4efe6;
  --surface: #fffdf9;
  --sunken: #e9e3d6;
  --ink: #1b1915;
  --ink-2: #6a6459;
  --line: #d8d0c1;
  --line-2: #b6ad9c;
  --accent: #e4481c;
  --accent-ink: #b2330e;
  --mark: #ffd84a;
  --ok: #1d7a4c;
  --ok-soft: #e0f0e5;
  --danger: #b3261e;
  --danger-soft: #f8e2de;
  --warn-soft: #fbefc9;
  --warn-text: #6b4f00;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #161512;
  --surface: #201e1a;
  --sunken: #2a2721;
  --ink: #f0eadd;
  --ink-2: #a59e8f;
  --line: #38342c;
  --line-2: #5a5448;
  --accent: #ff6a3d;
  --accent-ink: #ff8f6b;
  --mark: #6a5200;
  --ok: #5fce96;
  --ok-soft: #173224;
  --danger: #ff8279;
  --danger-soft: #3b1c19;
  --warn-soft: #332a10;
  --warn-text: #eecb6e;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161512;
    --surface: #201e1a;
    --sunken: #2a2721;
    --ink: #f0eadd;
    --ink-2: #a59e8f;
    --line: #38342c;
    --line-2: #5a5448;
    --accent: #ff6a3d;
    --accent-ink: #ff8f6b;
    --mark: #6a5200;
    --ok: #5fce96;
    --ok-soft: #173224;
    --danger: #ff8279;
    --danger-soft: #3b1c19;
    --warn-soft: #332a10;
    --warn-text: #eecb6e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-ink); }

[hidden] { display: none !important; }

svg.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 24px;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── 머리말 ── */
.site-header { border-bottom: 1.5px solid var(--ink); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 6px 22px;
  flex-wrap: wrap;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  transition: background 0.15s;
}
.brand:hover .brand-mark { background: var(--accent); color: #fff; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-left: auto;
}
.site-nav a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.theme-toggle {
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }

/* ── 왼쪽 도구 메뉴 + 본문 ── */
.layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.side {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding-block: 34px 24px;
}
.side-toggle { display: none; }
.side-menu { border-top: 1.5px solid var(--ink); }
.side-all {
  display: block;
  padding: 11px 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.side-all:hover { color: var(--ink); }
.side-group { border-bottom: 1px solid var(--line); }
.side-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1;
}
.side-group[open] summary::after { content: "−"; }
.side-group summary:hover { color: var(--accent-ink); }
.side-count {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-2);
}
.side-group ul { list-style: none; margin: 0; padding: 0 0 12px; }
.side-group li a {
  display: block;
  padding: 6px 10px 6px 14px;
  border-left: 2px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.45;
}
.side-group li a:hover { color: var(--ink); border-left-color: var(--ink); }
.side-group li a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  border-left-color: var(--accent);
}

/* ── 본문 공통 ── */
main { padding-block: 34px 72px; min-width: 0; }

.breadcrumb {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

h1 {
  font-size: clamp(30px, 5.2vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}
.lead {
  color: var(--ink-2);
  font-size: 17.5px;
  line-height: 1.65;
  margin: 0 0 14px;
  max-width: 40em;
}
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 26px;
}
.privacy-note svg.icon { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }

/* ── 도구 패널 ── */
.tool {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--line);
  padding: 22px;
}

.dropzone {
  border: 1.5px dashed var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  padding: 38px 16px 34px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover,
.dropzone:focus-visible { border-color: var(--ink); outline: none; }
.dropzone.is-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--warn-soft);
}
.dropzone strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.dropzone span { color: var(--ink-2); font-size: 13.5px; }
.dropzone .dz-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.dropzone:hover .dz-icon,
.dropzone.is-over .dz-icon { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.file-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
}
.file-item.is-dragging { opacity: 0.4; }
.file-item.is-target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.file-item[draggable="true"] { cursor: grab; }
.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--sunken);
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.file-meta { min-width: 0; flex: 1; }
.file-name {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-sub { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.file-sub .ok { color: var(--ok); font-weight: 700; }
.file-sub .err { color: var(--danger); font-weight: 700; }
.file-actions { display: flex; gap: 4px; flex: none; }
.icon-btn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  border-radius: 6px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.icon-btn:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--ink); border-color: var(--line-2); }

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px 20px;
  margin-top: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label,
.field > .label { font-size: 13.5px; font-weight: 700; }
.field .hint { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.field.wide { grid-column: 1 / -1; }
.field output { font-family: var(--mono); font-weight: 700; }

input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 9px 11px;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--ink); border: 0; padding: 0; }
input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
}
textarea { resize: vertical; min-height: 230px; line-height: 1.7; }

.segmented {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  flex-wrap: wrap;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.segmented label { cursor: pointer; }
.segmented label + label { border-left: 1.5px solid var(--ink); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
}
.segmented span:hover { background: var(--sunken); }
.segmented input:checked + span { background: var(--ink); color: var(--paper); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  cursor: pointer;
}
.check input { width: 17px; height: 17px; accent-color: var(--ink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 14px; border-radius: 6px; }

.status {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--ink);
  background: var(--sunken);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.status.is-error { background: var(--danger-soft); border-left-color: var(--danger); color: var(--danger); }
.status.is-success { background: var(--ok-soft); border-left-color: var(--ok); color: var(--ok); font-weight: 600; }
.status.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 9px;
  vertical-align: -1px;
  border: 2px solid var(--line-2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .status.is-busy::before { animation: none; }
  * { transition: none !important; }
}
#panel > .status:first-child { margin-top: 14px; font-size: 13.5px; }

.results { margin-top: 22px; }
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.results-head h2 { font-size: 16px; margin: 0; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.thumb-card {
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.thumb-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--sunken);
  display: block;
}
.thumb-card .thumb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--warn-text);
  background: var(--warn-soft);
  padding: 9px 12px;
}

/* 글자수 세기 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--surface);
}
.stat {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 -1px -1px 0;
}
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; display: block; margin-top: 2px; }
.stat.is-main b {
  display: inline-block;
  background: linear-gradient(transparent 62%, var(--mark) 62%);
  padding-inline: 2px;
}
.stat.is-main span { display: block; }
.meter {
  height: 8px;
  background: var(--sunken);
  overflow: hidden;
  margin-top: 14px;
}
.meter > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.15s;
}
.meter.is-over > i { background: var(--danger); }
#meter .field { margin: 6px 0 0; }
#meter .hint { font-variant-numeric: tabular-nums; }

/* QR */
.qr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 24px;
  align-items: start;
}
.qr-preview {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
  text-align: center;
  position: sticky;
  top: 16px;
}
.qr-preview canvas {
  width: 100%;
  height: auto;
  max-width: 260px;
  image-rendering: pixelated;
  border: 1px solid var(--line);
}
.qr-preview .actions { justify-content: center; margin-top: 14px; }
@media (max-width: 680px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview { position: static; }
}

/* ── 홈 ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 28px;
  align-items: center;
  padding-block: 8px 40px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 60%, var(--mark) 60%);
  padding-inline: 3px;
  margin-inline: -3px;
}
.hero .lead { font-size: 18px; max-width: 30em; margin-bottom: 0; }

.sheets {
  position: relative;
  height: 270px;
  max-width: 320px;
  margin-inline: auto;
  width: 100%;
}
.sheet {
  position: absolute;
  width: 138px;
  height: 178px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
}
.sheet svg { width: 100%; height: auto; stroke: var(--ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sheet-a { left: 4px; top: 6px; transform: rotate(-9deg); }
.sheet-b { left: 96px; top: 0; transform: rotate(6deg); }
.sheet-c {
  right: 2px;
  bottom: 0;
  transform: rotate(-3deg);
  box-shadow: 5px 5px 0 var(--ink);
  border-top-width: 10px;
  border-top-color: var(--accent);
}
.sheet-c .lines {
  flex: 1;
  margin: 6px 0 10px;
  background: repeating-linear-gradient(var(--line-2) 0 1.5px, transparent 1.5px 11px);
}
.sheet-c b { font-size: 12px; }

.shelf {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 28px;
  padding-block: 26px 10px;
  border-top: 1.5px solid var(--ink);
  scroll-margin-top: 16px;
}
.shelf-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}

.tool-list { list-style: none; margin: 0 0 22px; padding: 0; }
.tool-list li { border-bottom: 1px solid var(--line); }
.tool-list li:first-child { border-top: 1px solid var(--line); }
.shelf .tool-list li:first-child { border-top: 0; }
.tool-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 14px;
  padding: 15px 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s, padding 0.12s;
}
.tool-row:hover { background: var(--surface); color: var(--ink); }
.tool-ico {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tool-row:hover .tool-ico { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-text b { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.tool-text span { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.tool-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tool-go { font-size: 17px; transition: transform 0.12s, color 0.12s; }
.tool-row:hover .tool-go { transform: translateX(4px); color: var(--accent); }

.explain {
  border-top: 1.5px solid var(--ink);
  padding-top: 30px;
  margin-top: 14px;
}
.explain > h2 {
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin: 0 0 22px;
  max-width: 20em;
}
.route {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 20px;
  align-items: center;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.route:last-of-type { border-bottom: 1px solid var(--line); }
.route-name { font-size: 13.5px; font-weight: 700; }
.route-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}
.route-steps li {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 12px;
  background: var(--surface);
  white-space: nowrap;
}
.route-steps li + li { position: relative; margin-left: 18px; }
.route-steps li + li::before {
  content: "→";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-2);
}
.route-steps .away { border-style: dashed; color: var(--ink-2); }
.route.is-ours .route-steps li { border: 1.5px solid var(--ink); font-weight: 700; background: var(--mark); color: #1b1915; }
:root[data-theme="dark"] .route.is-ours .route-steps li { background: var(--ink); color: var(--paper); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .route.is-ours .route-steps li { background: var(--ink); color: var(--paper); }
}

.qa {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 6px 36px;
  margin: 34px 0 0;
}
.qa dt { font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; padding-top: 16px; border-top: 1px solid var(--line); }
.qa dd { margin: 0; color: var(--ink-2); padding-top: 16px; padding-bottom: 6px; border-top: 1px solid var(--line); }

/* ── 설명 글 ── */
.article { margin-top: 56px; max-width: 720px; }
.article h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 46px 0 12px;
}
.article > h2:first-child { margin-top: 0; }
.article h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 22px 0 4px; }
.article p { margin: 0 0 14px; }
.article ol, .article ul { margin: 0 0 14px; padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article li::marker { color: var(--ink-2); }
.article ol > li::marker { font-family: var(--mono); font-size: 0.9em; }
.article code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--sunken);
  padding: 1px 6px;
  border-radius: 4px;
}
.article table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  margin: 4px 0 18px;
}
.article th, .article td {
  border-bottom: 1px solid var(--line);
  padding: 9px 14px 9px 0;
  text-align: left;
  vertical-align: top;
}
.article th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}
.article td:first-child { font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 13px 28px 13px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-2);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent-ink); }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

.related { margin-top: 60px; }
.related h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--ink-2); }

.page.article { margin-top: 0; }
.page .updated { color: var(--ink-2); font-size: 13.5px; }

/* ── 가이드 ── */
.guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 14px;
  padding: 14px 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s;
}
.guide-row:hover { background: var(--surface); color: var(--ink); }
.guide-row:hover .tool-go { transform: translateX(4px); color: var(--accent); }
.shelf-more { margin: -10px 0 22px; font-size: 14px; font-weight: 600; }
.shelf-more a { text-decoration: none; }
.shelf-more a:hover { text-decoration: underline; }
.guide-meta { color: var(--ink-2); font-size: 13.5px; margin: 0 0 30px; }
.guide .lead { margin-bottom: 26px; }
/* 측정 조건처럼 본문을 받치는 설명: 왼쪽 선 하나로만 구분한다 */
.article .method {
  border-left: 3px solid var(--line-2);
  padding: 2px 0 2px 14px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.article blockquote {
  margin: 4px 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--ink);
  background: var(--surface);
}
.article blockquote p { margin: 0; }
.article td.num, .article th.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 8px 0 22px;
}
.compare figure { margin: 0; }
/* 비교 그림은 원래 크기(1:1)로 보여 준다. 화면이 좁을 때만 줄인다 */
.compare img { display: block; width: auto; max-width: 100%; height: auto; border: 1px solid var(--line); background: var(--sunken); }
.compare figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.compare figcaption b { color: var(--ink); }

.ad-slot { margin: 44px 0 0; min-height: 100px; text-align: center; }
.ad-slot::before {
  content: "광고";
  display: block;
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ── 꼬리말 ── */
.site-footer {
  border-top: 1.5px solid var(--ink);
  padding-block: 30px 40px;
  font-size: 14px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 22px;
}
.footer-cols h2 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 8px;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 4px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
  margin-top: 26px;
}
.footer-note { margin: 0; color: var(--ink-2); font-size: 13px; }
/* 방문자 수: 눈에 띄지 않게 오른쪽 끝에 작게 */
.visit-count {
  margin: 0 0 0 auto;
  color: var(--ink-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.75;
}

@media (max-width: 1020px) {
  .sheets { display: none; }
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side {
    position: static;
    max-height: none;
    overflow: visible;
    padding-block: 14px 0;
  }
  .side-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
  }
  .side-toggle::after { content: "+"; font-family: var(--mono); font-size: 17px; font-weight: 400; }
  .side.is-open .side-toggle::after { content: "−"; }
  .side-menu { margin-top: 10px; }
  .js .side:not(.is-open) .side-menu { display: none; }
  html:not(.js) .side-toggle { display: none; }
  .hero { padding-bottom: 30px; }
  .shelf { grid-template-columns: 1fr; padding-top: 20px; }
  .shelf-head { margin-bottom: 8px; }
  .shelf .tool-list li:first-child { border-top: 1px solid var(--line); }
  .route { grid-template-columns: 1fr; }
  .qa { grid-template-columns: 1fr; }
  .qa dd { border-top: 0; padding-top: 0; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  main { padding-top: 24px; }
  .tool { padding: 14px; box-shadow: 4px 4px 0 var(--line); }
  .site-nav { margin-left: 0; width: 100%; order: 3; gap: 4px 16px; }
  .site-header .wrap { justify-content: space-between; }
  .file-item { flex-wrap: wrap; }
  .file-actions { margin-left: auto; }
  .tool-row { grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; padding-inline: 4px; }
  .tool-tag { display: none; }
  .guide-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 12px; padding-inline: 4px; }
  .article td:first-child { white-space: normal; }
}
