/* =========================================================
   PX to VW v3 — 사이트 공통 디자인
   새 페이지(.site-*, .vt-*, .doc-*)와 기존 도구 페이지 셸에 적용
   ========================================================= */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #eef3ff;
  --ok: #059669;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 1px 3px rgb(16 24 40 / 0.06);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / 0.12);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.site-main {
  min-height: 60vh;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.sh-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.sh-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.sh-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.sh-primary {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.sh-link {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}
.sh-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sh-link.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 700;
}
.sh-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.sh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
}
.sh-btn::-webkit-details-marker {
  display: none;
}
.sh-btn:hover,
.sh-btn.is-active {
  border-color: var(--line-strong);
  color: var(--text);
}
.sh-lang {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sh-all {
  position: relative;
}
.sh-all[open] > .sh-btn {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.sh-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(760px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.sh-group-title {
  margin: 0 0 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sh-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sh-group a {
  display: block;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
}
.sh-group a:hover {
  background: var(--surface-2);
}
.sh-group a.is-active {
  background: var(--accent-soft);
}
.sh-group strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.sh-group span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 1080px) {
  .sh-inner {
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    gap: 8px 16px;
  }
  .sh-primary {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 8px;
  }
  .sh-primary::-webkit-scrollbar {
    display: none;
  }
}
@media (max-width: 640px) {
  .sh-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 104px;
    width: auto;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    grid-template-columns: 1fr;
  }
  .sh-hide-sm {
    display: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
}
.sf-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 16px 24px;
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 32px;
}
.sf-brand p {
  margin: 12px 0 0;
  line-height: 1.6;
}
.sf-muted {
  color: var(--muted);
  font-size: 13px;
}
.sf-title {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--text);
}
.sf-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sf-col li + li {
  margin-top: 6px;
}
.sf-col a,
.sf-bottom a {
  color: var(--text-2);
  text-decoration: none;
}
.sf-col a:hover,
.sf-bottom a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}
.sf-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .sf-inner {
    grid-template-columns: 1fr 1fr;
  }
  .sf-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- 공통 요소 ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}
.page-hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 0 18px;
}
.page-hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.page-hero .eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}
.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.chip:hover {
  border-color: var(--line-strong);
}
.chip.is-on,
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.field {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.field:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(37 99 235 / 0.15) !important;
  outline-offset: 0;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.section-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
}
/* 복사 알림: 하단 광고(앵커 광고)에 가리지 않도록 화면 정중앙에 표시 */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: rgb(17 24 39 / 0.92);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- PX ↔ VW 도구 ---------- */
.vt {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.vt-settings {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.vt-base {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vt-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.vt-base .field {
  width: 96px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vt-opts {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.vt-opts select.field {
  height: 34px;
  padding: 0 8px;
}
.vt-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.vt-card {
  padding: 20px;
}
.vt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.vt-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.vt-input {
  position: relative;
}
.vt-input input {
  width: 100%;
  height: 56px;
  padding: 0 52px 0 16px;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vt-input .unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}
.vt-result {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.vt-result:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.vt-result-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-ink);
  word-break: break-all;
}
.vt-result-value.is-empty {
  color: var(--line-strong);
}
.vt-result-copy {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.vt-formula {
  margin: 8px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}
.vt-section {
  padding: 20px;
}
.vt-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.vt-quick button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  color: var(--text-2);
}
.vt-quick button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.vt-quick b {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-ink);
}
.vt-bulk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.vt-bulk-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 4px 0 12px;
}
.vt-bulk-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.vt-bulk-io textarea {
  width: 100%;
  min-height: 280px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  tab-size: 2;
}
.vt-bulk-io textarea[readonly] {
  background: var(--surface-2);
}
.vt-bulk-io textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(37 99 235 / 0.15) !important;
  outline-offset: 0;
}
.vt-io-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.vt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.code {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}
.vt-snippets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.vt-snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.vt-snippet-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .vt-pair,
  .vt-bulk-io,
  .vt-snippets {
    grid-template-columns: 1fr;
  }
  .vt-opts {
    margin-left: 0;
  }
  .vt-bulk-io textarea {
    min-height: 200px;
  }
}

/* ---------- 콘텐츠·문서 ---------- */
.doc {
  max-width: var(--wrap);
  margin: 40px auto 0;
  display: grid;
  gap: 16px;
}
.doc-block {
  padding: 28px;
}
.doc-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.doc-block h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.doc-block p,
.doc-block li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.75;
}
.doc-block p {
  margin: 0 0 12px;
}
.doc-block ul,
.doc-block ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.doc-block ul {
  list-style: disc;
}
.doc-block ol {
  list-style: decimal;
}
.doc-block a {
  color: var(--accent-ink);
}
.doc-block code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9em;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: 10px 0 0;
}
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.link-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.link-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.link-card strong {
  display: block;
  font-size: 15px;
}
.link-card span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent-ink);
}

/* 변환표 */
.cv-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}
.cv-table th,
.cv-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.cv-table th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
  background: var(--surface-2);
}
.cv-table td:nth-child(2) {
  font-family: var(--mono);
  color: var(--accent-ink);
  font-weight: 600;
}
.cv-tables {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}
@media (max-width: 860px) {
  .cv-tables {
    grid-template-columns: 1fr 1fr;
  }
  .doc-block {
    padding: 20px;
  }
}
@media (max-width: 520px) {
  .cv-tables {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   기존 도구 페이지 셸 정리 (style.css 위에 덧입힘)
   ========================================================= */
.is-legacy .container {
  max-width: var(--wrap);
  min-width: 0;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.is-legacy .container > .main-box,
.is-legacy .container > div:first-child {
  border-radius: var(--radius);
}
.is-legacy .tool-info-section {
  line-height: 1.75;
}
.is-legacy .mobile-toggle-btn {
  display: none !important;
}
body.is-legacy,
.is-legacy input,
.is-legacy textarea,
.is-legacy select,
.is-legacy button {
  font-family: var(--font);
}
.is-legacy .page-hero h1 {
  line-height: 1.25;
}
/* reset.css가 line-height: 1로 만든 것을 새 영역에서는 되돌림 */
.site-header,
.site-footer,
.page-hero {
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 숫자 입력 스핀 버튼 숨김 */
.vt input[type="number"]::-webkit-inner-spin-button,
.vt input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.vt input[type="number"] {
  -moz-appearance: textfield;
}

/* ---------- 3열 카드 도구 (자간·행간) ---------- */
.vt-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.vt-card-sub {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.vt-results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.vt-results .vt-result {
  margin-top: 0;
}
.vt-result.is-compact {
  min-height: 44px;
  justify-content: flex-start;
}
.vt-result.is-compact .vt-result-value {
  font-size: 18px;
}
.vt-result.is-compact .vt-result-copy {
  margin-left: auto;
}
.vt-result-label {
  min-width: 40px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.vt-preview {
  margin: 0 0 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.vt-preview.is-paragraph {
  font-weight: 400;
}
@media (max-width: 960px) {
  .vt-trio {
    grid-template-columns: 1fr;
  }
}

/* 기존 도구에서 옮겨온 가이드·FAQ 본문 */
.doc .tool-info-section {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.doc .tool-info-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.doc .tool-info-section h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.doc .tool-info-section p,
.doc .tool-info-section li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.75;
}
.doc .tool-info-section p {
  margin: 0 0 12px;
}
.doc .tool-info-section ul,
.doc .tool-info-section ol {
  margin: 0 0 12px;
  padding-left: 20px;
  list-style: disc;
}
.doc .tool-info-section a {
  color: var(--accent-ink);
}
.doc .tool-info-section code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9em;
}
.doc .tool-info-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 14.5px;
}
.doc .tool-info-section th,
.doc .tool-info-section td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
@media (max-width: 860px) {
  .doc .tool-info-section {
    padding: 20px;
  }
}

/* ---------- 모바일 가로 넘침 방지 ----------
   그리드 열이 auto면 코드 블록처럼 줄바꿈 안 되는 내용 폭만큼 늘어나므로
   열을 minmax(0, 1fr)로 고정하고 자식의 최소 폭을 0으로 둔다 */
.vt,
.doc {
  grid-template-columns: minmax(0, 1fr);
}
.vt > *,
.doc > *,
.vt-pair > *,
.vt-trio > *,
.vt-bulk-io > *,
.vt-snippets > *,
.cv-tables > * {
  min-width: 0;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll .cv-table {
  min-width: 480px;
}
@media (max-width: 860px) {
  .vt-pair,
  .vt-bulk-io,
  .vt-snippets {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 960px) {
  .vt-trio {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .vt-settings,
  .vt-card,
  .vt-section,
  .doc-block,
  .doc .tool-info-section {
    padding: 16px;
  }
  .vt-opts {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .vt-input input {
    height: 52px;
    font-size: 22px;
  }
  .vt-result-value {
    font-size: 20px;
  }
}

/* ---------- Clamp 생성기 ---------- */
.vt-settings .cl-small {
  width: 64px;
  height: 34px;
  padding: 0 8px;
}
.vt-base input#cl-min-vp,
.vt-base input#cl-max-vp {
  width: 84px;
}
.vt-result .cl-value {
  font-size: 18px;
}
.cl-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cl-slider input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}
.cl-readout {
  min-width: 140px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-ink);
  text-align: right;
}
.cl-preview {
  min-height: 120px;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cl-scale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
}
.cl-scale-table td {
  padding: 4px 6px;
}
.cl-scale-table .field {
  width: 100%;
  height: 34px;
}
.cl-scale-table {
  min-width: 260px;
}
@media (max-width: 860px) {
  .cl-scale {
    grid-template-columns: minmax(0, 1fr);
  }
  .cl-readout {
    min-width: 0;
  }
}
.cv-table.cl-scale-table td {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
}
.vt-result .cl-value {
  word-break: normal;
  overflow-wrap: anywhere;
}
.cl-scale .table-scroll .cv-table.cl-scale-table {
  min-width: 0;
  table-layout: fixed;
}
.cl-scale-table th,
.cl-scale-table td {
  padding: 4px;
}
.vt-result {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* 로고: 파비콘과 같은 SVG 사용 */
img.sh-logo-mark {
  display: block;
  background: none;
  border-radius: 0;
}

/* =========================================================
   가이드·안내 글 (Article 레이아웃)
   ========================================================= */
.article-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}
.article-head {
  max-width: 760px;
  padding: 32px 0 24px;
}
.article-head h1 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.article-lead {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.article-meta span + span::before {
  content: "·";
  margin-right: 14px;
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: start;
}
.article-grid.no-toc {
  grid-template-columns: minmax(0, 860px);
}
.article-toc {
  position: sticky;
  top: 84px;
  padding: 4px 0;
  font-size: 13.5px;
}
.article-toc-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}
.article-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.45;
}
.article-toc a:hover {
  color: var(--accent-ink);
  border-left-color: var(--accent);
}

/* 본문 타이포그래피 */
.prose {
  padding: 40px 48px;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-2);
  overflow-wrap: break-word;
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2 {
  margin: 48px 0 14px;
  padding-top: 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: 80px;
}
.prose h3 {
  margin: 32px 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.prose h4 {
  margin: 24px 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
}
.prose p {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li {
  margin: 4px 0;
}
.prose li::marker {
  color: var(--muted);
}
.prose strong {
  color: var(--text);
  font-weight: 700;
}
.prose a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}
.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text);
}
.prose pre.code {
  margin: 0 0 20px;
}
.prose pre.code code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
.prose table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--text);
}
.prose .table-scroll table {
  min-width: 520px;
}
.prose .contact-mail {
  font-size: 20px;
  font-weight: 700;
}

/* 안내 상자 */
.callout {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 15.5px;
  line-height: 1.7;
}
.callout > :last-child {
  margin-bottom: 0;
}
.callout p {
  margin: 0 0 8px;
}
.callout-title {
  font-weight: 700;
  color: var(--text);
}
.callout-title::before {
  margin-right: 6px;
}
.callout-tip {
  background: #eef3ff;
  border-color: #c7d7fe;
}
.callout-tip .callout-title::before {
  content: "💡";
}
.callout-warning {
  background: #fff7ed;
  border-color: #fed7aa;
}
.callout-warning .callout-title::before {
  content: "⚠️";
}
.callout-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.callout-success .callout-title::before {
  content: "✅";
}

/* 글 끝 도구 연결·관련 글 */
.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  max-width: calc(100% - 272px);
}
.article-grid.no-toc + .article-cta {
  max-width: 860px;
}
.article-cta small {
  display: block;
  font-size: 13.5px;
  opacity: 0.85;
}
.article-cta strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
}
.article-cta .btn {
  background: #fff;
  border-color: #fff;
  color: var(--accent-ink);
}
.article-cta:hover .btn {
  background: var(--accent-soft);
}
.article-related {
  margin-top: 48px;
}
.article-related .section-title {
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .article-grid,
  .article-grid.no-toc {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-toc {
    display: none;
  }
  .article-cta,
  .article-grid.no-toc + .article-cta {
    max-width: none;
  }
}
@media (max-width: 640px) {
  .prose {
    padding: 24px 20px;
    font-size: 16px;
  }
  .prose h2 {
    margin-top: 36px;
    font-size: 21px;
  }
  .article-lead {
    font-size: 16px;
  }
  .article-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 가이드 목록 */
.guide-section-block {
  max-width: var(--wrap);
  margin: 0 auto 36px;
}
.guide-section-block h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.guide-section-block > p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 14.5px;
}
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.guide-card strong {
  font-size: 17px;
  line-height: 1.4;
}
.guide-card span {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.5;
}
.guide-card small {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}
.guide-card.is-featured {
  background: var(--accent-soft);
  border-color: #c7d7fe;
}
