/* ==========================================================================
   바른길 행정사 — 행정사·번역·비자 템플릿
   색·활자·상태는 00-디자인보드.png 를 정본으로 옮겼다.
   조판은 전부 논리 속성(margin-inline / padding-block / inset-inline / start·end)
   으로 적어 RTL(아랍어·페르시아어) 로 확장할 때 CSS 수정 없이 dir="rtl" 만
   바꾸면 되도록 했다. 방향이 필요한 이동은 --dir 부호로 뒤집는다.
   ========================================================================== */

:root {
  /* 색 — 디자인보드 COLOR */
  --navy: #0d1b3d;
  --navy-2: #16305f;
  --navy-3: #0a1530;
  --red: #c6102e;
  --red-press: #9d0c24;
  --paper: #f5f6f7;
  --surface: #ffffff;
  --ink: #333333;
  --ink-2: #4e5765;
  --muted: #6b7480;
  --line: #e6e8eb;
  --line-soft: #eef0f2;

  /* 의미 색 — 색만으로 상태를 전하지 않는다(아이콘·글자 병기) */
  --ok: #12784a;
  --ok-bg: #eaf6ef;
  --warn: #9a5b00;
  --warn-bg: #fdf3e4;
  --err: #c6102e;
  --err-bg: #fdedef;
  --focus: #1f63c8;

  /* 활자 */
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 조판 */
  --wrap: 1200px;
  --gutter: 20px;
  --section: clamp(56px, 7vw, 96px);
  --radius: 4px;
  --radius-lg: 10px;
  --hdr: 64px;
  --shadow-1: 0 1px 2px rgba(13, 27, 61, 0.06);
  --shadow-2: 0 2px 6px rgba(13, 27, 61, 0.06), 0 14px 34px rgba(13, 27, 61, 0.07);
  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
  --dir: 1; /* LTR. dir="rtl" 이면 -1 로 뒤집혀 방향성 모션이 그대로 맞는다 */
}

[dir="rtl"] { --dir: -1; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--hdr) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.005em;
  /* 한국어는 어절 단위로 끊는다 — 「2층」·「휴무」가 갈라지지 않게 */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* hidden 은 반드시 이긴다 — .notice{display:flex} 같은 규칙이 [hidden] 을
   덮어써 「임시 저장 알림」이 늘 떠 있던 사고가 실제로 났다 */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.34; letter-spacing: -0.022em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  inset-block-start: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
}
.skip:focus { inset-inline-start: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 22px; height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-sm { width: 16px; height: 16px; stroke-width: 1.7; }
.ico-lg { width: 30px; height: 30px; stroke-width: 1.3; }

/* 사진 액자 — 인라인 요소엔 aspect-ratio 가 안 먹는다 */
.frame { display: block; overflow: hidden; background: var(--line-soft); border-radius: var(--radius); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------------------------------------------------- 다국어(한/영) 전환
   본문을 JS 로 갈아끼우지 않는다. 두 언어가 마크업에 모두 살아 있고
   CSS 가 현재 언어만 보여 준다 — JS 가 없으면 한국어가 그대로 나온다. */
html[data-lang="ko"] [lang="en"] { display: none; }
html[data-lang="en"] [lang="ko"] { display: none; }

/* -------------------------------------------------------------- 활자 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--red);
}
.section-title {
  font-size: clamp(23px, 2.7vw, 31px);
  font-weight: 800;
  color: var(--navy);
  margin-block-start: 12px;
}
.section-desc { color: var(--ink-2); margin-block-start: 12px; max-width: 62ch; }
.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(36px, 4.6vw, 62px); }
.bg-white { background: var(--surface); }
.bg-paper { background: var(--paper); }
.section-head { margin-block-end: 34px; }
.section-head.center { text-align: center; }
.section-head.center .section-desc { margin-inline: auto; }

/* -------------------------------------------------------------- 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: none;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-primary:active { background: var(--navy-3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-press); }
.btn-outline { border-color: var(--red); color: var(--red); background: var(--surface); }
.btn-outline:hover { background: var(--err-bg); }
.btn-quiet { border-color: var(--line); color: var(--navy); background: var(--surface); }
.btn-quiet:hover { border-color: var(--navy); }
.btn-onnavy { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-onnavy:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--line-soft);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.btn-text:hover { color: var(--red); }
.btn-text::after { content: ""; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- 헤더 */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-block-end: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 1px 16px rgba(13, 27, 61, 0.08); }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--hdr);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}
.brand .seal {
  width: 30px; height: 30px;
  flex: none;
  color: var(--red);
}
.navlinks { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.navlinks a {
  position: relative;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.navlinks a:hover { color: var(--navy); background: var(--paper); }
.navlinks a[aria-current="page"] { color: var(--navy); }
.navlinks a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  inset-block-end: 2px;
  height: 2px;
  background: var(--red);
}
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* 언어 전환 — 두 언어 모두 실제 링크(?lang=) 로도 열린다 */
.langswitch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.langswitch button {
  min-width: 46px;
  min-height: 44px;
  padding: 6px 10px;
  background: none;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.drawer-lang { display: none; margin-block-start: 16px; }
.drawer-lang .langswitch { width: 100%; }
.drawer-lang .langswitch button { flex: 1 1 0; }
.drawer-lang .lab {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-block-end: 6px;
}
.langswitch button + button { border-inline-start: 1px solid var(--line); }
.langswitch button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.menu-btn {
  display: none;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--navy);
}

/* ------------------------------------------------------- 모바일 서랍 */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(330px, 88vw);
  z-index: 95;
  background: var(--surface);
  border-inline-start: 1px solid var(--line);
  padding: 18px 20px 40px;
  transform: translateX(calc(var(--dir) * 100%));
  transition: transform 0.36s var(--ease);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: 14px;
  border-block-end: 1px solid var(--line);
}
.drawer-close {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--navy);
}
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-block: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  border-block-end: 1px solid var(--line-soft);
}
.drawer nav a[aria-current="page"] { color: var(--red); }
.drawer nav a .ico { color: var(--muted); }
.drawer-foot { margin-block-start: 20px; display: grid; gap: 8px; }
.drawer-note { margin-block-start: 16px; font-size: 12px; color: var(--muted); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 21, 48, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.36s var(--ease), visibility 0.36s;
}
.scrim.open { opacity: 1; visibility: visible; }

/* --------------------------------------------- 모바일 하단 탭(≤900px) */
.tabbar {
  display: none;
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 70;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  padding-block-end: env(safe-area-inset-bottom);
}
.tabbar ul { display: flex; }
.tabbar li { flex: 1 1 0; }
.tabbar a, .tabbar button {
  width: 100%;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.tabbar a[aria-current="page"] { color: var(--red); }
.tabbar .ico { width: 20px; height: 20px; }

/* ------------------------------------------------ 스크롤 진행 표시줄 */
.scrollbar-wrap {
  position: fixed;
  inset-inline: 0;
  inset-block-start: var(--hdr);
  height: 3px;
  z-index: 59;
  background: rgba(13, 27, 61, 0.07);
  pointer-events: none;
}
.scrollbar-wrap > i {
  display: block;
  height: 100%;
  background: var(--red);
  transform: scaleX(var(--sp, 0));
  transform-origin: left center;
}
[dir="rtl"] .scrollbar-wrap > i { transform-origin: right center; }
/* 신기술은 progressive enhancement — 지원하면 스크롤 타임라인이 직접 그린다 */
@supports (animation-timeline: scroll()) {
  .js .scrollbar-wrap > i {
    transform: scaleX(0);
    animation: sp-grow linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes sp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ------------------------------------------------------ 홈 히어로 */
.hero { background: var(--surface); border-block-end: 1px solid var(--line); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding-block: clamp(38px, 5.4vw, 74px);
}
.hero h1 {
  font-size: clamp(31px, 4.6vw, 52px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.24;
}
.hero .lead {
  margin-block-start: 18px;
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--ink-2);
  max-width: 40ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 28px; }
.hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-block-start: 26px;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.hero-note b { color: var(--navy); font-weight: 700; }
.hero-media { position: relative; }
.hero-media .frame {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  aspect-ratio: 377 / 300;
}
.hero-stamp {
  position: absolute;
  inset-block-start: -14px;
  inset-inline-end: -10px;
  width: 78px; height: 78px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-1);
}
.hero-stamp .ico { width: 40px; height: 40px; }

/* 3축 카드 — 히어로 아래에 살짝 걸친다 */
.axis-strip { background: var(--paper); }
.axis-strip .wrap { padding-block: 0; }
.axis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  margin-block-start: -38px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.axis > li { padding: 26px 24px; }
.axis > li + li { border-inline-start: 1px solid var(--line); }
.axis .ico-lg { color: var(--navy); }
.axis h3 { margin-block-start: 12px; font-size: 17px; color: var(--navy); }
.axis p { margin-block-start: 6px; font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------ 차별점 목록 */
.diff { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 60px); align-items: center; }
.diff-list { border-block-start: 1px solid var(--line); }
.diff-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-block: 20px;
  border-block-end: 1px solid var(--line);
}
.diff-list .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  padding-block-start: 4px;
}
.diff-list h3 { font-size: 17px; color: var(--navy); }
.diff-list p { font-size: 14px; color: var(--ink-2); margin-block-start: 4px; }
.diff-media .frame { aspect-ratio: 3 / 2; border-radius: var(--radius-lg); }

/* -------------------------------------------------------- 주요 업무 */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.work-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 132px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.work-card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.work-card .ico { color: var(--navy); }
.work-card h3 { font-size: 16px; color: var(--navy); }
.work-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.work-card .tail { margin-block-start: auto; font-size: 13px; font-weight: 700; color: var(--red); }

/* ---------------------------------------------------------- CTA 밴드 */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(38px, 5vw, 64px);
}
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
.cta-band p { margin-block-start: 10px; color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn-danger { background: var(--red); }

/* ----------------------------------------------- 내부 페이지 머리 밴드 */
.band {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.band-media {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(52%, 620px);
}
.band-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.band-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--navy) 4%, rgba(13, 27, 61, 0.45) 62%, rgba(13, 27, 61, 0.25) 100%);
}
[dir="rtl"] .band-media::after {
  background: linear-gradient(to left, var(--navy) 4%, rgba(13, 27, 61, 0.45) 62%, rgba(13, 27, 61, 0.25) 100%);
}
.band .wrap { position: relative; z-index: 2; padding-block: clamp(34px, 4.4vw, 60px); }
.band h1 { font-size: clamp(27px, 3.7vw, 42px); font-weight: 800; }
.band .lead { margin-block-start: 12px; color: rgba(255, 255, 255, 0.82); max-width: 34ch; }
.band .crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-block-end: 14px;
}
.band .crumb a:hover { color: #fff; text-decoration: underline; }
.band-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-block-start: 22px;
  padding-block-start: 18px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}
.band-facts b { color: #fff; font-weight: 700; }

/* 흰 바탕 머리(준비서류 전용 — 밴드를 쓰지 않는 유일한 면) */
.pagehead { background: var(--surface); border-block-end: 1px solid var(--line); }
.pagehead .wrap { padding-block: clamp(28px, 3.6vw, 48px); }
.pagehead h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; color: var(--navy); }
.pagehead .crumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-block-end: 12px; }
.pagehead .crumb a:hover { color: var(--navy); text-decoration: underline; }

/* --------------------------------------------------- 절차 스텝 트래커 */
.steps { display: flex; gap: 0; margin-block-start: 26px; }
.steps li { flex: 1 1 0; position: relative; padding-block-start: 22px; text-align: center; }
.steps li::before {
  content: "";
  position: absolute;
  inset-block-start: 7px;
  inset-inline: 0;
  height: 2px;
  background: var(--line);
}
.steps li:first-child::before { inset-inline-start: 50%; }
.steps li:last-child::before { inset-inline-end: 50%; }
.steps .dot {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
}
.steps .n { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 700; }
.steps .t { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.steps li.done::before { background: var(--navy); }
.steps li.done .dot { border-color: var(--navy); background: var(--navy); }
.steps li.done .n, .steps li.done .t { color: var(--navy); }
.steps li[aria-current="step"] .dot { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--err-bg); }
.steps li[aria-current="step"] .n, .steps li[aria-current="step"] .t { color: var(--red); font-weight: 700; }

/* ---------------------------------------------- 좌측 구획 레일(데스크톱) */
.rail {
  position: fixed;
  inset-block-start: 42%;
  inset-inline-start: 22px;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-inline-start: 2px solid var(--line);
}
.rail a .lbl {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--sans);
  opacity: 0;
  transition: max-width 0.3s var(--ease), opacity 0.3s var(--ease);
}
.rail:hover a .lbl, .rail a[aria-current="true"] .lbl { max-width: 130px; opacity: 1; }
.rail a[aria-current="true"] { color: var(--red); border-inline-start-color: var(--red); }

/* ------------------------------------------------------ 검색·분류 탭 */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 2.6vw, 30px); }
.searchrow { display: flex; gap: 8px; margin-block-start: 16px; }
.searchrow input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
}
.searchrow input:focus-visible { border-color: var(--focus); outline-offset: 0; }
.searchrow .btn { flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[aria-pressed="true"] .ico { color: #fff; }
.chip .ico { color: var(--muted); }

/* 검색 결과 목록 */
.rows { margin-block-start: 20px; border-block-start: 1px solid var(--line); }
.row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 6px;
  border-block-end: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}
.row-link:hover { background: var(--paper); }
.row-link .ico { color: var(--navy); }
.row-link h3 { font-size: 16px; color: var(--navy); }
.row-link p { font-size: 13px; color: var(--muted); }
.row-link .go { margin-inline-start: auto; color: var(--muted); }
.row-link:hover .go { color: var(--red); }
.rows-empty {
  display: none;
  padding: 26px 6px;
  color: var(--ink-2);
  font-size: 14px;
  border-block-end: 1px solid var(--line);
}
.rows-empty.show { display: block; }

/* ------------------------------------------------------------ 마법사 */
.wiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(20px, 2.6vw, 34px);
  align-items: start;
}
.wiz {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.8vw, 34px);
  overflow: hidden; /* 방향성 slide 가 상자 밖으로 새지 않게 */
}
.wiz-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wiz-count { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted); }
.wiz-meter { height: 4px; background: var(--line); border-radius: 2px; margin-block-start: 12px; overflow: hidden; }
.wiz-meter > i {
  display: block;
  height: 100%;
  background: var(--red);
  inline-size: var(--wp, 25%);
  transition: inline-size 0.28s var(--ease);
}
.wiz-step { display: none; }
.wiz-step.is-active { display: block; }
.js .wiz-step.is-active { animation: step-fwd 0.24s var(--ease) both; }
.js .wiz.is-back .wiz-step.is-active { animation-name: step-back; }
@keyframes step-fwd {
  from { opacity: 0; transform: translateX(calc(var(--dir) * 20px)); }
  to { opacity: 1; transform: none; }
}
@keyframes step-back {
  from { opacity: 0; transform: translateX(calc(var(--dir) * -20px)); }
  to { opacity: 1; transform: none; }
}
.wiz-q { font-size: clamp(19px, 2.1vw, 24px); font-weight: 800; color: var(--navy); margin-block-start: 22px; }
.wiz-help { margin-block-start: 8px; font-size: 14px; color: var(--ink-2); }
.opts { display: grid; gap: 10px; margin-block-start: 20px; }
.opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.opt:hover { border-color: var(--navy); background: var(--paper); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .mark {
  flex: none;
  width: 20px; height: 20px;
  margin-block-start: 3px;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.opt .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.opt .t { font-size: 15px; font-weight: 700; color: var(--navy); }
.opt .d { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-block-start: 2px; }
.opt:has(input:checked) { border-color: var(--navy); background: #f7f9fc; box-shadow: inset 0 0 0 1px var(--navy); }
.opt:has(input:checked) .mark { border-color: var(--navy); }
.opt:has(input:checked) .mark::after { background: var(--navy); }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.wiz-actions { display: flex; gap: 10px; margin-block-start: 24px; padding-block-start: 20px; border-block-start: 1px solid var(--line); }
.wiz-actions .grow { margin-inline-start: auto; }
.js .wiz-nojs { display: none; }
.wiz-nojs { margin-block-start: 18px; font-size: 13px; color: var(--muted); }

/* JS 가 없으면 마법사는 「모든 질문이 적힌 안내문」이 되고,
   업무 안내 카드와 탭 내용도 전부 펼쳐진다 — 정보가 사라지지 않는다 */
html:not(.js) .wiz-step { display: block; padding-block-start: 20px; }
html:not(.js) .wiz-step + .wiz-step { border-block-start: 1px solid var(--line); }
html:not(.js) .wiz-actions,
html:not(.js) .wiz-meter,
html:not(.js) .wiz-count,
html:not(.js) .wiz-reset,
html:not(.js) .saved,
html:not(.js) [role="tablist"] { display: none; }
html:not(.js) .result { display: block; }
html:not(.js) .result-card[hidden],
html:not(.js) [role="tabpanel"][hidden] { display: block !important; }
html:not(.js) .result-card + .result-card { margin-block-start: 20px; }

/* 요약 패널 */
.wiz-side { position: sticky; inset-block-start: calc(var(--hdr) + 18px); display: grid; gap: 14px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.panel h2, .panel h3 { font-size: 15px; color: var(--navy); }
.panel-sub { font-size: 13px; color: var(--muted); margin-block-start: 4px; }
.sum { margin-block-start: 14px; }
.sum li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-block: 9px;
  border-block-start: 1px dashed var(--line);
  font-size: 13px;
}
.sum .k { color: var(--muted); flex: none; }
.sum .v { color: var(--navy); font-weight: 700; text-align: end; }
.sum .v.dim { color: var(--muted); font-weight: 400; }
.saved {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-block-start: 14px;
  font-size: 12px;
  color: var(--ok);
}
.saved .ico { color: var(--ok); }

/* 결과 카드 */
.result { display: none; }
.result.show { display: block; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--red);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.8vw, 32px);
}
.result-kicker { font-size: 13px; font-weight: 700; color: var(--red); }
.result-title { font-size: clamp(20px, 2.3vw, 27px); font-weight: 800; color: var(--navy); margin-block-start: 8px; }
.result-formal { margin-block-start: 6px; font-size: 14px; color: var(--muted); }
.result-body { margin-block-start: 14px; color: var(--ink-2); font-size: 15px; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-block-start: 22px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts div { background: var(--surface); padding: 16px; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 6px 0 0; font-size: 17px; font-weight: 800; color: var(--navy); }
.facts dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-block-start: 2px; }
.need-list { margin-block-start: 22px; display: grid; gap: 8px; }
.need-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.need-list .ico { color: var(--navy); margin-block-start: 4px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 24px; }

/* ------------------------------------------------------------- 탭 */
.tabs {
  display: flex;
  gap: 4px;
  border-block-end: 1px solid var(--line);
  overflow-x: auto;
  position: relative; /* 넘친 상자가 문서 폭을 밀어 올리지 않게 */
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none;
  min-height: 50px;
  padding: 12px 18px;
  background: none;
  border: 0;
  border-block-end: 2px solid transparent;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--navy); }
.tabs button[aria-selected="true"] { color: var(--red); border-block-end-color: var(--red); }
.tabpanel[hidden] { display: none; }

/* ------------------------------------------------------- 서류 체크리스트 */
.doc-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.doc-case h2 { font-size: clamp(19px, 2.1vw, 24px); color: var(--navy); font-weight: 800; }
.doc-case p { margin-block-start: 8px; font-size: 14px; color: var(--ink-2); }
.doc-case .frame { aspect-ratio: 3 / 2; }
.doc-case .tagline { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.doc-group + .doc-group { margin-block-start: 30px; }
.doc-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 10px;
  border-block-end: 2px solid var(--navy);
}
.doc-group-head h3 { font-size: 17px; color: var(--navy); }
.doc-count { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--navy); }
.doc-count .of { color: var(--muted); font-weight: 400; }

.doc-item { border-block-end: 1px solid var(--line); }
.doc-row { display: flex; align-items: flex-start; gap: 12px; padding-block: 14px; }
.doc-check {
  flex: none;
  width: 24px; height: 24px;
  margin-block-start: 4px;
  accent-color: #0d1b3d;
  cursor: pointer;
}
.doc-label { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.doc-label .t { font-size: 15px; font-weight: 700; color: var(--navy); }
.doc-label .d { display: block; font-size: 13px; color: var(--muted); margin-block-start: 2px; }
.doc-item.checked .doc-label .t { color: var(--ok); }
.doc-item.checked .doc-label .t::after {
  content: " 준비 완료";
  font-size: 12px;
  font-weight: 700;
  color: var(--ok);
}
.acc-trigger {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
}
.acc-trigger:hover { border-color: var(--navy); color: var(--navy); }
.acc-trigger .ico { transition: transform 0.24s var(--ease); }
.acc-trigger[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acc-panel { display: none; padding: 0 0 18px; }
.acc-panel.open { display: block; }
.acc-panel dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.acc-panel dt { color: var(--muted); font-weight: 700; }
.acc-panel dd { margin: 0; color: var(--ink-2); }

.doc-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  margin-block-end: 24px;
}
.doc-progress .meter { flex: 1 1 auto; height: 8px; background: rgba(255, 255, 255, 0.22); border-radius: 4px; overflow: hidden; }
.doc-progress .meter > i {
  display: block;
  height: 100%;
  background: #fff;
  inline-size: var(--dp, 0%);
  transition: inline-size 0.3s var(--ease);
}
.doc-progress .num { font-family: var(--mono); font-weight: 700; font-size: 14px; flex: none; }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.notice .ico { flex: none; margin-block-start: 3px; color: var(--navy); }
.notice b { color: var(--navy); }
.notice-warn { background: var(--warn-bg); border-color: #f0dcbc; }
.notice-warn .ico { color: var(--warn); }
.notice-warn b { color: var(--warn); }
.notice .btn { margin-inline-start: auto; flex: none; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-block-start: 30px; }

/* ---------------------------------------------------------- 진행조회 */
.lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.lookup .field { flex: 1 1 260px; margin: 0; }
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.6vw, 30px);
}
.case-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.case-head h3 { font-size: clamp(18px, 2vw, 22px); color: var(--navy); font-weight: 800; }
.case-meta { margin-block-start: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--muted); }
.case-meta .mono { color: var(--ink-2); font-weight: 600; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid;
}
.badge-run { color: var(--red); background: var(--err-bg); border-color: #f3c9d0; }
.badge-done { color: var(--ok); background: var(--ok-bg); border-color: #bfe0cd; }
.badge-hold { color: var(--warn); background: var(--warn-bg); border-color: #f0dcbc; }

.track { margin-block-start: 26px; }
.track-line { position: relative; height: 2px; background: var(--line); margin: 30px 8% 0; }
.track-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  background: var(--navy);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform 0.7s var(--ease);
}
[dir="rtl"] .track-fill { transform-origin: right center; }
.track-steps { display: flex; margin-block-start: -9px; }
.track-steps li { flex: 1 1 0; text-align: center; }
.track-steps .pin {
  width: 34px; height: 34px;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
}
.track-steps .pin .ico { width: 17px; height: 17px; }
.track-steps .t { display: block; margin-block-start: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.track-steps .d { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.track-steps li.done .pin { background: var(--navy); border-color: var(--navy); color: #fff; }
.track-steps li.done .t { color: var(--navy); }
.track-steps li.now .pin { background: var(--red); border-color: var(--red); color: #fff; }
.track-steps li.now .t, .track-steps li.now .d { color: var(--red); }

.tl { margin-block-start: 10px; }
.tl li { display: flex; gap: 14px; padding-block: 14px; border-block-end: 1px solid var(--line-soft); }
.tl .when { flex: none; width: 132px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-block-start: 3px; }
.tl .what { flex: 1 1 auto; font-size: 15px; font-weight: 700; color: var(--navy); }
.tl .desc { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); margin-block-start: 2px; }
.tl .state { flex: none; }
.tl li.future .what, .tl li.future .desc { color: var(--muted); }
.tl .pip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ok);
}
.tl li.future .pip { color: var(--muted); }

.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: clamp(34px, 5vw, 60px) 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
}
.empty .ico-lg { color: var(--line); }
.empty h3 { font-size: 16px; color: var(--ink-2); }

.skeleton { display: none; }
.is-loading .skeleton { display: block; }
.is-loading .case-list { display: none; }
.sk-line {
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--line-soft) 25%, #f7f8f9 37%, var(--line-soft) 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
  margin-block-end: 12px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------------------------------------- 폼 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: block; margin-block-end: 0; }
.field.full { grid-column: 1 / -1; }
.field > .lab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-block-end: 7px;
}
.req { color: var(--red); font-size: 12px; }
.control {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
textarea.control { min-height: 132px; resize: vertical; line-height: 1.7; }
select.control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-inline-end: 42px;
}
[dir="rtl"] select.control { background-position: left 14px center; }
.control:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 99, 200, 0.14); outline: none; }
.control:disabled { background: var(--paper); color: var(--muted); cursor: not-allowed; }
.field.filled .control { border-color: #cfd6de; }
.field.ok .control { border-color: var(--ok); }
.field.invalid .control { border-color: var(--err); background: var(--err-bg); }
.field .msg { display: none; align-items: center; gap: 6px; margin-block-start: 7px; font-size: 13px; font-weight: 600; color: var(--err); }
.field.invalid .msg { display: flex; }
.field .hint { margin-block-start: 7px; font-size: 12.5px; color: var(--muted); }
.counter { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-inline-start: auto; font-weight: 400; }

.radioset { display: flex; flex-wrap: wrap; gap: 8px; }
.radioset label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.radioset input { accent-color: #0d1b3d; width: 18px; height: 18px; }
.radioset label:has(input:checked) { border-color: var(--navy); color: var(--navy); background: #f7f9fc; }
.radioset label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-block-start: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.agree input { width: 22px; height: 22px; margin-block-start: 2px; accent-color: #c6102e; flex: none; }
.agree .txt { font-size: 13.5px; color: var(--ink-2); }
.agree a { color: var(--navy); text-decoration: underline; font-weight: 700; }
.agree.invalid { border-color: var(--err); background: var(--err-bg); }

/* --------------------------------------------------------- 보안 업로드 */
.drop {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--navy); background: #f2f5fa; }
.drop .ico-lg { color: var(--navy); }
.drop .t { font-size: 14px; font-weight: 700; color: var(--navy); }
.drop .d { font-size: 12.5px; color: var(--muted); }
.drop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.only-touch { display: none; }
@media (hover: none) { .only-touch { display: inline-flex; } }

.filelist { margin-block-start: 12px; display: grid; gap: 8px; }
.filerow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.filerow .ico { color: var(--navy); flex: none; margin-block-start: 2px; }
.filerow .meta { flex: 1 1 auto; min-width: 0; }
.filerow .name { font-size: 14px; font-weight: 700; color: var(--navy); word-break: break-all; }
.filerow .sub { font-size: 12px; color: var(--muted); margin-block-start: 2px; }
.filerow .sum { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-block-start: 4px; word-break: break-all; }
.filerow .rm {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.filerow .rm:hover { border-color: var(--err); color: var(--err); }
.filerow.err { border-color: var(--err); background: var(--err-bg); }
.filerow.err .ico, .filerow.err .name { color: var(--err); }
.state-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ok); }
.state-err { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--err); }
.state-wait { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* -------------------------------------------------------- 상담 부가 */
.consult-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(20px, 2.6vw, 34px); align-items: start; }
.aside-stack { display: grid; gap: 14px; position: sticky; inset-block-start: calc(var(--hdr) + 18px); }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding-block: 12px; border-block-start: 1px solid var(--line); font-size: 14px; }
.contact-list li:first-child { border-block-start: 0; }
.contact-list .ico { color: var(--navy); flex: none; margin-block-start: 3px; }
.contact-list .k { display: block; font-size: 12px; color: var(--muted); }
.contact-list .v { display: block; font-weight: 700; color: var(--navy); }
.contact-list .btn-text { min-height: 34px; }
.contact-list a.v:hover { color: var(--red); }

/* ---------------------------------------------------------- 토스트 */
.toast {
  position: fixed;
  inset-block-end: 22px;
  inset-inline: 20px;
  margin-inline: auto;
  z-index: 120;
  max-width: 460px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  /* 폭 전체 제출 버튼을 덮어 클릭을 삼키지 않게 */
  pointer-events: none;
}
.toast.show { opacity: 1; visibility: visible; transform: none; }
.toast .ico { flex: none; margin-block-start: 2px; }

.to-top {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 65;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  box-shadow: var(--shadow-1);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------- 등장 효과 */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------------------------------------------------------- 푸터 */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.78); }
.site-footer .wrap { padding-block: clamp(40px, 5vw, 62px); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.8fr)) minmax(0, 1.2fr);
  gap: 30px;
}
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: #fff; }
.foot-brand .seal { width: 28px; height: 28px; color: #fff; }
.foot-desc { margin-block-start: 14px; font-size: 13.5px; line-height: 1.85; }
.foot-legal { margin-block-start: 14px; font-size: 12px; color: rgba(255, 255, 255, 0.56); line-height: 1.9; }
.site-footer h2 { font-size: 13px; color: #fff; letter-spacing: 0.02em; }
.foot-links { margin-block-start: 14px; display: grid; gap: 2px; }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}
.foot-links a:hover { color: #fff; text-decoration: underline; }
.foot-contact { margin-block-start: 14px; display: grid; gap: 10px; font-size: 13.5px; }
.foot-tel { font-size: 22px; font-weight: 800; color: #fff; font-family: var(--mono); letter-spacing: -0.02em; }
.foot-langs { margin-block-start: 16px; font-size: 12px; color: rgba(255, 255, 255, 0.56); }
.foot-bottom {
  margin-block-start: 34px;
  padding-block-start: 20px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.56);
}
.demo-note { max-width: 68ch; }

/* =========================================================== 반응형 */
@media (max-width: 1280px) {
  .rail { display: none !important; }
}
@media (min-width: 1281px) {
  .rail { display: flex; }
}

@media (max-width: 1024px) {
  :root { --gutter: 18px; }
  .wiz-layout, .consult-layout { grid-template-columns: minmax(0, 1fr); }
  .wiz-side, .aside-stack { position: static; }
  .diff { grid-template-columns: minmax(0, 1fr); }
  .diff-media { order: -1; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}

@media (max-width: 900px) {
  .navlinks { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-actions .btn-cta { display: none; }
  /* 좁은 화면에서는 언어 전환을 서랍 안으로 옮긴다(머리줄이 넘치지 않게) */
  .site-header .langswitch { display: none; }
  .drawer-lang { display: block; }
  .nav { gap: 10px; }
  .brand { font-size: 17px; }
  .brand .seal { width: 26px; height: 26px; }
  .tabbar { display: block; }
  body { padding-block-end: 62px; }
  .to-top { inset-block-end: 74px; }
  .toast { inset-block-end: 74px; }
  /* 모바일은 제목 → 버튼 → 사진 차례(디자인보드 모바일 시안). 사진이 먼저 오면
     첫 화면이 사진으로 꽉 차 무엇을 하는 곳인지 늦게 읽힌다. */
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-note { order: 3; margin-block-start: 0; }
  .hero-media { order: 2; }
  .hero-copy { display: contents; }
  .hero-stamp { width: 62px; height: 62px; inset-inline-end: 6px; }
  .hero-stamp .ico { width: 32px; height: 32px; }
  .axis { grid-template-columns: minmax(0, 1fr); margin-block-start: -24px; }
  .axis > li { padding: 18px 20px; }
  .axis > li + li { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .band-media { width: 100%; opacity: 0.5; }
  .band-media::after { background: linear-gradient(to bottom, rgba(13, 27, 61, 0.86), rgba(13, 27, 61, 0.94)); }
  [dir="rtl"] .band-media::after { background: linear-gradient(to bottom, rgba(13, 27, 61, 0.86), rgba(13, 27, 61, 0.94)); }
  .doc-case { grid-template-columns: minmax(0, 1fr); }
  .doc-case .frame { order: -1; max-width: 260px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .notice { flex-wrap: wrap; }
  .notice .btn { margin-inline-start: 0; width: 100%; }
}

/* 모바일: 진행 상황은 가로 트래커 대신 세로 타임라인으로 다시 짠다 */
@media (max-width: 720px) {
  .track-line { display: none; }
  .track-steps { display: grid; gap: 0; margin-block-start: 6px; }
  .track-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    text-align: start;
    padding-block: 10px;
    position: relative;
  }
  .track-steps li::before {
    content: "";
    position: absolute;
    inset-block-start: 40px;
    inset-block-end: -4px;
    inset-inline-start: 16px;
    width: 2px;
    background: var(--line);
  }
  .track-steps li:last-child::before { display: none; }
  .track-steps li.done::before { background: var(--navy); }
  .track-steps .t { margin-block-start: 6px; }
  .track-steps .d { display: inline; margin-inline-start: 8px; }
  .steps { flex-wrap: wrap; gap: 4px; }
  .steps li { flex: 1 1 40%; }
  .tl li { flex-wrap: wrap; gap: 4px 12px; }
  .tl .when { width: auto; }
  .opts.two { grid-template-columns: minmax(0, 1fr); }
  .searchrow { flex-wrap: wrap; }
  .searchrow input { flex: 1 1 100%; }
  .searchrow .btn { width: 100%; }
  .pager { flex-direction: column-reverse; }
  .pager .btn { width: 100%; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .result-actions .btn { width: 100%; }
  .wiz-actions { flex-wrap: wrap; }
  .wiz-actions .btn { flex: 1 1 100%; }
  .wiz-actions .grow { margin-inline-start: 0; }
}

@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .tabbar a, .tabbar button { font-size: 10px; }
  .foot-tel { font-size: 19px; }
}

/* 가로 방향(낮은 높이)에서는 고정 요소가 화면을 잡아먹지 않게 */
@media (max-height: 460px) and (orientation: landscape) {
  .tabbar { position: static; }
  body { padding-block-end: 0; }
  .toast, .to-top { inset-block-end: 16px; }
}

/* ------------------------------------------------------ 모션 줄이기 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .js .wiz-step.is-active { animation: none !important; }
  .track-fill { transition: none !important; }
}

@media print {
  .site-header, .drawer, .scrim, .tabbar, .to-top, .toast, .rail,
  .scrollbar-wrap, .cta-band, .pager, .band-media { display: none !important; }
  body { background: #fff; padding: 0; }
  .acc-panel { display: block !important; }
  .section { padding-block: 12px; }
  a[href]::after { content: ""; }
}
