/* ============================================================
   Toolbox (툴박스) — 공통 스타일시트
   무료 온라인 도구 플랫폼 / 브라우저 내 처리

   디자인 원칙
   - 밝은 바탕(흰색) + 진한 잉크 텍스트 + 바이올렛 포인트 1색
   - 그림자는 검정이 아니라 브랜드 색으로 물들인다 (hue-tinted)
   - 라운드는 16px 기본, 상호작용 요소는 10px
   - 움직임은 "제품이 하는 일"을 보여줄 때만 쓴다
   - 키보드 포커스는 항상 보이게 (focus-visible)
   ============================================================ */

:root {
  /* --- 브랜드 --- */
  --accent: #7765ff;
  --accent-strong: #5b46f0;
  --accent-soft: #f1efff;
  --accent-line: #ddd6ff;
  --accent-ink: #3b2ea8;

  /* --- 호환 별칭 (--primary 는 기존 마크업/스니펫에서 사용) --- */
  --primary: var(--accent);
  --primary-hover: var(--accent-strong);
  --primary-soft: var(--accent-soft);

  /* --- 표면 / 텍스트 --- */
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #f1f2f8;
  --card: #ffffff;
  --bg: #ffffff;
  --border: #e7e9f2;
  --border-strong: #d9dce8;
  --ink: #1c1c24;
  --ink-2: #3d4152;
  --text: #1c1c24;
  --muted: #6b7183;

  /* --- 상태 --- */
  --green: #12a150;
  --green-soft: #e9f9f0;
  --green-ink: #0b7a3b;
  --red: #e5484d;
  --red-soft: #fef1f1;
  --amber: #b7791f;
  --amber-soft: #fff8e6;
  --blue: #3b82f6;

  /* --- 라운드 --- */
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  /* --- 그림자 (브랜드 색으로 물들인다) --- */
  --shadow-xs: 0 1px 2px rgba(28, 28, 36, 0.05);
  --shadow-sm: 0 1px 3px rgba(28, 28, 36, 0.06), 0 1px 2px rgba(28, 28, 36, 0.04);
  --shadow-md: 0 10px 26px -10px rgba(60, 50, 140, 0.2),
    0 2px 6px rgba(28, 28, 36, 0.05);
  --shadow-lg: 0 28px 56px -20px rgba(60, 50, 140, 0.24),
    0 6px 16px rgba(28, 28, 36, 0.06);
  --shadow: var(--shadow-sm);

  /* --- 레이아웃 --- */
  --max: 1100px;
  --gutter: 20px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Roboto, Helvetica, Arial,
    sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
  /* 한국어는 어절 단위로 줄바꿈한다 (단어 중간에서 잘리면 지저분해 보인다).
     keep-all 만 쓰면 긴 URL/영문 토큰이 넘칠 수 있어 anywhere 를 함께 둔다. */
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration: underline;
}

/* 본문 안의 링크는 잉크색 + 밑줄 → 기본 파란 링크처럼 보이지 않게 */
.article a,
.faq a,
.site-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
}

.article a:hover,
.faq a:hover,
.site-footer a:hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent);
}

img,
svg,
canvas {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 건너뛰기 링크 (키보드 사용자) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  font-size: 0.875rem;
}

.skip-link:focus {
  left: 0;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand .logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-strong);
  color: #fff;
}

.brand .logo svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.brand small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle:hover {
  border-color: var(--border-strong);
}

.nav-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

@media (max-width: 780px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 12px 14px;
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 12px 12px;
  }
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 8px;
}

.hero__copy {
  max-width: 100%;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 .hl {
  color: var(--accent-strong);
}

.hero .lede {
  margin-top: 18px;
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--muted);
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-facts svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: none;
}

/* --- 히어로 화면: 실제 도구를 실행해 캡처한 화면 --- */
.hero__shot {
  margin: 44px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}

.hero__shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- 화면 갤러리 --- */
.shots {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.45fr 1fr 1fr; /* 같은 크기 카드 나열을 피해 첫 화면을 크게 */
}

@media (max-width: 1000px) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 660px) {
  .shots {
    grid-template-columns: 1fr;
  }
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.shot:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 14px 18px 16px;
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.shot figcaption strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

/* --- 주장 목록 (아이콘 카드 대신 텍스트로) --- */
.claims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px 36px;
  margin-top: 28px;
}

.claim h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 9px;
}

.claim p {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 48ch;
}

.claim .mark {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  margin-bottom: 14px;
}

/* ---------------- Search ---------------- */
.tool-search {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 320px;
}

@media (max-width: 780px) {
  .tool-search {
    max-width: none;
  }
}

.tool-search input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-search input::placeholder {
  color: var(--muted);
}

.tool-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(119, 101, 255, 0.14);
}

.tool-search .hint {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------------- Sections ---------------- */
.section {
  padding: 48px 0;
}

.section--tint {
  background: var(--surface-2);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-head p {
  color: var(--ink-2);
  font-size: 1rem;
  margin-top: 8px;
  max-width: 62ch;
}

.section-head--center {
  display: block;
  text-align: center;
}

.section-head--center p {
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Cards / grid ---------------- */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* 카드/패널은 선이 아니라 "바탕 한 단계"로 구분한다 (그림자 없음) */
.card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 22px;
}

.tool-card {
  display: block;
  color: inherit;
  position: relative;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.card .icon svg {
  width: 23px;
  height: 23px;
}

.card h3,
.card .card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--ink);
}

.card > p {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}

.tool-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-card h3::after {
  content: "→";
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.tool-card:hover h3::after {
  opacity: 1;
  transform: translateX(0);
}

.tool-card p {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}

.tool-card .tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-ink);
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.tool-card .tag.soon {
  color: var(--ink-2);
  background: var(--surface-3);
}

.tool-card.is-disabled {
  opacity: 0.62;
  pointer-events: none;
}

/* ---------------- 도구 목록 ----------------
   같은 아이콘 카드를 늘어놓는 대신, 이름과 설명이 큰 글씨로 읽히는 목록으로 둔다.
   (검색 필터는 site.js 가 [data-tool] 로 그대로 처리한다)
------------------------------------------------- */
.toollist {
  list-style: none;
  display: grid;
  gap: 10px;
}

.toollist .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.toollist a.row:hover {
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateX(3px);
}

.toollist .row strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.toollist .desc {
  display: block;
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 64ch;
}

.toollist .row .tag {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-ink);
  background: var(--green-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

.toollist .row .tag.soon {
  color: var(--ink-2);
  background: var(--surface-3);
}

.toollist .row--lead {
  background: var(--accent-soft);
}

.toollist .row.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 620px) {
  .toollist .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ---------------- Steps (3단계 안내) ----------------
   카드 3장을 늘어놓는 대신 번호 + 큰 글씨 목록으로 둔다.
------------------------------------------------- */
.steps-list {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 26px;
  max-width: 76ch;
}

.steps-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.steps-list li::before {
  content: counter(step);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--accent-strong);
}

.steps-list strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.steps-list span {
  display: block;
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 60ch;
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.step p {
  color: var(--ink-2);
  font-size: 1rem;
}


/* ---------------- Tool workspace ---------------- */
.tool-head {
  padding: 34px 0 4px;
}

.tool-head h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tool-head p {
  color: var(--ink-2);
  margin-top: 10px;
  max-width: 68ch;
}

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0 10px;
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 20px;
}

.panel h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 26px 14px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  margin-bottom: 16px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone p {
  font-size: 1rem;
  color: var(--muted);
}

.dropzone .pick {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .help {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 5px;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(119, 101, 255, 0.16);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.check input {
  width: auto;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, transform 0.12s ease;
}

.btn + .btn {
  margin-top: 9px;
}

/* 채움색은 흰 글자와 4.5:1 이상이 나오는 진한 보라를 쓴다 (#7765ff 위 흰 글자는 4.1:1 로 부족) */
.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}

.btn-primary:hover {
  background: #4a37d6;
  text-decoration: none;
}

.btn-green {
  background: var(--green-ink);
  color: #fff;
}

.btn-green:hover {
  background: #095f2e;
  text-decoration: none;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--accent-line);
  color: var(--accent-ink);
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  background: var(--surface-3);
  color: #9aa0b0;
  box-shadow: none;
  cursor: not-allowed;
}

/* 히어로용 큰 버튼 (전체 폭이 아닌 인라인) */
.btn-lg {
  width: auto;
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-lg.btn-outline {
  background: transparent;
}

.hidden {
  display: none !important;
}

.info-badge {
  font-size: 1rem;
  color: var(--ink-2);
  background: var(--surface);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.notice {
  font-size: 1rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.notice.warn {
  background: var(--amber-soft);
  color: #7c5410;
  border-color: #f0dcae;
  border-left-color: var(--amber);
}

.notice.error {
  background: var(--red-soft);
  color: #a01f23;
  border-color: #f6cccd;
  border-left-color: var(--red);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 12px 0;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.15s ease;
}

/* canvas / preview */
.canvas-stage {
  position: relative;
  background: #14141c;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  overflow: auto;
  user-select: none;
  touch-action: none;
}

.canvas-stage canvas {
  display: block;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* frames */
.frames-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.frames {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
}

.frame img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  background: var(--surface-2);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.frame .name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.frame a {
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
}

.frame a:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

/* ---------------- Content (article) ---------------- */
.article {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 34px;
  margin: 28px 0;
}

@media (max-width: 620px) {
  .article {
    padding: 22px 18px;
  }
}

.article > * + * {
  margin-top: 14px;
}

.article h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 34px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.article h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 22px 0 8px;
}

.article p,
.article li {
  color: var(--ink-2);
  font-size: 1rem;
}

.article p {
  max-width: 68ch; /* 측정 과다(장문 1줄) 방지 */
}

.article ul,
.article ol {
  margin: 8px 0 8px 22px;
}

.article li {
  margin-bottom: 7px;
  max-width: 66ch;
}

.article strong {
  color: var(--ink);
  font-weight: 700;
}

.article code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 비교표 */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0 8px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.compare caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 0.8125rem;
  padding-top: 10px;
}

.compare th,
.compare td {
  border-bottom: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.compare tr:last-child td {
  border-bottom: 0;
}

.compare thead th {
  background: var(--surface-2);
  font-size: 0.875rem;
  font-weight: 700;
}

.compare thead th:nth-child(2) {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.compare tbody td:first-child {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.compare .yes {
  color: var(--green-ink);
  font-weight: 700;
}

.compare .no {
  color: var(--muted);
}

/* ---------------- 강조 박스 ---------------- */
.keypoint {
  position: relative;
  background: #f6f4ff;
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 22px 0;
  overflow: hidden;
}

.keypoint::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.keypoint h3 {
  margin: 0 0 10px;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

.keypoint p {
  margin: 0;
  font-size: 1rem;
  color: #40379f;
  max-width: 66ch;
}

.keypoint p + p {
  margin-top: 8px;
}

/* ---------------- FAQ ---------------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq details[open] {
  border-color: var(--accent-line);
  background: #fdfdff;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 1.0625rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-weight: 700;
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 68ch;
}

/* ---------------- Breadcrumb ---------------- */
.breadcrumb {
  font-size: 1rem;
  color: var(--muted);
  padding: 18px 0 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--border-strong);
  margin-right: 6px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-strong);
}

/* ---------------- Footer ---------------- */
.site-footer {
  margin-top: 60px;
  background: var(--surface-2);
}

.site-footer .wrap {
  padding: 40px 20px 28px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 720px) {
  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }
}

.site-footer h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}

.site-footer a {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  padding: 4px 0;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.site-footer .about {
  color: var(--muted);
  font-size: 1rem;
  max-width: 40ch;
  margin-top: 10px;
}

.site-footer .bottom {
  text-align: center;
  padding: 24px 20px 28px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.8;
  max-width: 72ch;
  margin: 0 auto;
}

.site-footer .bottom .credit {
  margin-top: 8px;
}

/* ---------------- 진입 모션 ----------------
   .reveal 요소는 IntersectionObserver(site.js)가 .in 을 붙이면 제자리로 온다.
   JS 가 없거나 실패하면 아래 @media (scripting: none) 규칙이 즉시 보이게 한다.
------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

/* 히어로는 로드 즉시 순차 등장 */
.hero .stagger > * {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
}

.hero .stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}
.hero .stagger > *:nth-child(2) {
  animation-delay: 0.13s;
}
.hero .stagger > *:nth-child(3) {
  animation-delay: 0.21s;
}
.hero .stagger > *:nth-child(4) {
  animation-delay: 0.29s;
}

.hero__shot {
  animation: rise 0.8s var(--ease) 0.22s forwards;
  opacity: 0;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (scripting: none) {
  .reveal,
  .hero .stagger > *,
  .hero__shot {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---------------- 광고 레일 (좌/우) ----------------
   차후 애드센스 등 사이드 광고를 붙일 공간을 미리 확보한다.
   레일/슬롯은 site.js 가 주입한다(#ad-left, #ad-right).
------------------------------------------------- */
:root {
  --rail: 0px;
  --rail-gap: 20px;
}

/* 레일은 "정말 자리가 생겼을 때만" 켠다.
   1280px 에서 160px 레일을 강제하면 본문이 880px 로 눌려
   2단 레이아웃이 비좁고 투박해진다. 그래서 넓은 화면에서만 예약한다.
   160x600 레일 + 본문 1100px (합 1460px) → 1500px 부터 */
@media (min-width: 1500px) {
  :root {
    --rail: 160px;
  }
}

/* 300x600 레일 + 본문 1100px (합 1740px) → 1800px 부터 */
@media (min-width: 1800px) {
  :root {
    --rail: 300px;
  }
}

.ad-rail {
  display: none;
}

@media (min-width: 1500px) {
  .ad-rail {
    display: block;
    position: fixed;
    top: 88px;
    z-index: 5;
  }
  .ad-rail--left {
    left: calc(50% - (var(--max) / 2) - var(--rail) - var(--rail-gap));
  }
  .ad-rail--right {
    right: calc(50% - (var(--max) / 2) - var(--rail) - var(--rail-gap));
  }
}

.ad-slot {
  width: var(--rail);
  min-height: 600px;
  border-radius: var(--radius-sm);
  /* 실제 광고 코드를 넣기 전 자리 표시용 — 광고 삽입 시 이 배경/점선은 제거 가능 */
  background: var(--surface-3);
  border: 1px dashed var(--border-strong);
  display: grid;
  place-items: center;
  color: #9aa0b0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

.ad-slot__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ---------------- Utility ---------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.hint-inline {
  font-weight: 500;
  font-size: 0.8125rem;
}

.help-note {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .reveal,
  .hero .stagger > *,
  .hero__shot {
    opacity: 1 !important;
    transform: none !important;
  }
  .tool-card:hover {
    transform: none;
  }
}
