/* ==========================================================================
   components.css — 버튼 · 헤더 · 카드 · 히어로 · 푸터 · 폼
   색상 코드를 직접 쓰지 말고 tokens.css 의 변수만 사용합니다.
   ========================================================================== */

/* ==========================================================================
   버튼
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  border: 1.5px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--primary { background: var(--brand-primary); color: #fff; }
.btn--primary:hover { background: var(--brand-primary-600); }

.btn--accent { background: var(--brand-accent); color: var(--brand-primary-700); }
.btn--accent:hover { background: var(--brand-accent-600); }

.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--brand-primary); }

.btn--ghost-light { border-color: rgba(255,255,255,0.45); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.btn--lg { padding: 17px 34px; font-size: var(--fs-body); }
.btn--block { width: 100%; }

/* 텍스트 링크 (화살표 포함) */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 700;
  color: var(--brand-primary);
}
.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ==========================================================================
   헤더
   ========================================================================== */
.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

/* 로고 락업 — SVG 마크 + 웹폰트 워드마크 (실제 폰트를 쓰기 위해 HTML로 조립) */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__text {
  display: flex; flex-direction: column; line-height: 1;
}
.logo__name {
  font-size: 1.1875rem; font-weight: 800;
  letter-spacing: -0.04em; color: var(--brand-primary);
}
.logo__sub {
  font-size: 0.5625rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}

/* 데스크톱 내비게이션 */
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 10px 16px;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--brand-primary); background: var(--brand-primary-050); }
.nav__link[aria-current="page"] { color: var(--brand-primary); font-weight: 700; }

/* 드롭다운 서브메뉴 */
.nav__item { position: relative; }
.nav__item > .nav__link { display: inline-flex; align-items: center; gap: 5px; }
.nav__caret { width: 9px; height: 9px; opacity: 0.5; transition: transform 0.2s var(--ease); }
.nav__item:hover .nav__caret,
.nav__item:focus-within .nav__caret { transform: rotate(180deg); opacity: 0.9; }

.subnav {
  position: absolute; top: 100%; left: 0;
  min-width: 232px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.nav__item:hover .subnav,
.nav__item:focus-within .subnav { opacity: 1; visibility: visible; transform: none; }

.subnav a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-soft);
  transition: background-color 0.15s, color 0.15s;
}
.subnav a:hover { background: var(--brand-primary-050); color: var(--brand-primary); }
.subnav__note { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); margin-top: 3px; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__tel {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: 700;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

/* 모바일 메뉴 버튼 */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block; width: 21px; height: 2px;
  background: var(--brand-primary); border-radius: 2px;
  position: relative;
}
.hamburger span::before,
.hamburger span::after {
  content: ""; position: absolute; left: 0;
  width: 21px; height: 2px; background: inherit; border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.hamburger span::before { top: -7px; }
.hamburger span::after  { top: 7px; }

.hamburger[aria-expanded="true"] span { background: transparent; }
.hamburger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); background: var(--brand-primary); }
.hamburger[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); background: var(--brand-primary); }

/* 모바일 드로어 */
.drawer {
  position: fixed; inset: var(--header-h) 0 0 0;
  z-index: var(--z-drawer);
  background: #fff;
  padding: 24px var(--gutter) 40px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__link {
  display: block; padding: 18px 4px;
  font-size: 1.125rem; font-weight: 700;
  color: var(--brand-primary);
  border-bottom: 1px solid var(--line-soft);
}
.drawer__cta { margin-top: 28px; display: grid; gap: 10px; }

/* 드로어 하위 항목 */
.drawer__sub { padding: 6px 0 14px 4px; border-bottom: 1px solid var(--line-soft); }
.drawer__sub a {
  display: block; padding: 10px 12px;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-soft);
  border-left: 2px solid var(--line);
}
.drawer__sub a:hover { color: var(--brand-primary); border-left-color: var(--brand-accent); }
.drawer__group-title {
  display: block; padding: 18px 4px 4px;
  font-size: 1.125rem; font-weight: 700; color: var(--brand-primary);
}

@media (max-width: 1000px) {
  .nav, .header__tel { display: none; }
  .hamburger { display: inline-flex; }
}

/* 초협폭(320~380px) 대응.
   로고 + "진단 문의" 버튼 + 햄버거가 한 줄에 안 들어가 가로 스크롤이 생깁니다.
   하단 고정바(.mobile-bar)에 전화·문의 버튼이 이미 있으므로 헤더 버튼만 숨깁니다. */
@media (max-width: 380px) {
  .site-header .header__actions .btn { display: none; }
  .logo__mark { width: 30px; height: 30px; }
  .logo__name { font-size: 1.0625rem; }
}

/* ==========================================================================
   히어로
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(255, 158, 27, 0.22), transparent 60%),
    linear-gradient(160deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
  color: #fff;
}
.hero__inner {
  padding-block: clamp(72px, 11vw, 148px);
  max-width: 800px;
  position: relative; z-index: 1;
}
.hero .eyebrow { color: var(--brand-accent); }
.hero__title { color: #fff; }
.hero__title em {
  font-style: normal;
  color: var(--brand-accent);
}
.hero__desc {
  margin-top: 24px;
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }

/* 히어로 배경 장식 — 패널 그리드 라인 */
.hero__deco {
  position: absolute; right: -6%; bottom: -18%;
  width: min(560px, 52vw); aspect-ratio: 1;
  opacity: 0.16; pointer-events: none;
}

/* ==========================================================================
   지표 스트립
   ========================================================================== */
.strip {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.strip__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-block: clamp(28px, 3.5vw, 44px);
  gap: 24px;
}
.strip__item { padding-inline: clamp(0px, 2vw, 24px); }
.strip__item + .strip__item { border-left: 1px solid var(--line); }
.strip__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--brand-accent-text); }
.strip__title { margin-top: 8px; font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; }
.strip__desc { margin-top: 6px; font-size: var(--fs-sm); color: var(--muted); line-height: var(--lh-snug); }

@media (max-width: 720px) {
  .strip__grid { grid-template-columns: 1fr; gap: 0; }
  .strip__item { padding-block: 20px; }
  .strip__item + .strip__item { border-left: 0; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   카드
   ========================================================================== */
.card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: var(--brand-primary-100); box-shadow: var(--shadow); transform: translateY(-3px); }
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--brand-accent-100);
  color: var(--brand-accent-text);
  margin-bottom: 20px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.022em; }
.card__desc { margin-top: 12px; font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-body); }
.card__list { margin-top: 18px; display: grid; gap: 8px; }
.card__list li {
  position: relative; padding-left: 16px;
  font-size: var(--fs-sm); color: var(--ink-soft);
}
.card__list li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-accent);
}
.card__foot { margin-top: auto; padding-top: 22px; }

/* 다크 카드 (강조용) */
.card--dark {
  background: var(--brand-primary); border-color: transparent; color: #fff;
}
.card--dark .card__desc, .card--dark .card__list li { color: rgba(255,255,255,0.78); }
.card--dark .card__icon { background: rgba(255,255,255,0.12); color: var(--brand-accent); }

/* ==========================================================================
   프로세스 (진단 4단계)
   ========================================================================== */
.steps { counter-reset: step; display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.step {
  counter-increment: step;
  background: #fff;
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 30px);
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--brand-accent-text);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.step__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.022em; }
.step__desc { margin-top: 10px; font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-body); }

@media (max-width: 900px) { .steps--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps--4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   설치유형 타일
   ========================================================================== */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.5vw, 18px); }
.tile {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px) 18px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tile:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-sm); }
.tile__icon { width: 34px; height: 34px; margin: 0 auto 14px; color: var(--brand-primary); }
.tile__name { font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.02em; }
.tile__note { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   원인 목록 (발전저하 요인)
   ========================================================================== */
.causes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.cause {
  background: #fff; padding: 22px clamp(18px, 2.5vw, 28px);
  display: flex; gap: 16px; align-items: flex-start;
}
.cause__tag {
  flex: none; margin-top: 2px;
  font-size: var(--fs-xs); font-weight: 800;
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: var(--brand-primary-050); color: var(--brand-primary);
  letter-spacing: -0.01em;
}
.cause__name { font-size: var(--fs-body); font-weight: 700; letter-spacing: -0.022em; }
.cause__desc { margin-top: 5px; font-size: var(--fs-sm); color: var(--muted); line-height: var(--lh-snug); }

@media (max-width: 720px) { .causes { grid-template-columns: 1fr; } }

/* ==========================================================================
   CTA 밴드
   ========================================================================== */
.cta-band {
  background: var(--brand-primary);
  color: #fff;
}
.cta-band__inner {
  padding-block: clamp(52px, 6vw, 84px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.cta-band__title { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.03em; line-height: var(--lh-tight); }
.cta-band__desc { margin-top: 12px; color: rgba(255,255,255,0.78); font-size: var(--fs-sm); }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   푸터
   ========================================================================== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 6vw, 72px) 32px;
  font-size: var(--fs-sm);
}
.footer__top {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer__col-title {
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.footer__list { display: grid; gap: 11px; }
.footer__list a { color: var(--ink-soft); }
.footer__list a:hover { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
.footer__info { margin-top: 20px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.9; }
.footer__bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: var(--fs-xs);
}

@media (max-width: 1000px) {
  .footer__top { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   모바일 하단 고정바 (전화 · 문의)
   ========================================================================== */
.mobile-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--z-mobilebar);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
}
.mobile-bar .btn { flex: 1; padding-block: 15px; }

@media (max-width: 1000px) {
  .mobile-bar { display: flex; }
  body { padding-bottom: 76px; }
}

/* ==========================================================================
   폼
   ========================================================================== */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field__label { font-size: var(--fs-sm); font-weight: 700; }
.field__label .req { color: var(--state-bad); margin-left: 3px; }
.field__hint { font-size: var(--fs-xs); color: var(--muted); }

.input, .textarea, .select {
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  transition: border-color 0.2s;
}
.input:hover, .textarea:hover, .select:hover { border-color: #CBD5E1; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand-primary); outline-offset: 1px; }
.textarea { min-height: 150px; resize: vertical; line-height: var(--lh-body); }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); }
.checkline input { margin-top: 5px; flex: none; width: 17px; height: 17px; accent-color: var(--brand-primary); }

/* 문의처 카드 */
.contact-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
}
.contact-row { display: flex; gap: 14px; padding-block: 14px; align-items: flex-start; }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row__key { flex: none; width: 72px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.contact-row__val { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 알림 박스 */
.notice {
  border-left: 3px solid var(--brand-accent);
  background: var(--brand-accent-100);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-body);
}

/* ==========================================================================
   서브페이지 공통 — 페이지 헤더 / 브레드크럼
   ========================================================================== */
.page-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 84px);
}
.crumb { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 18px; }
.crumb a:hover { color: var(--brand-primary); text-decoration: underline; }
.page-head__desc { margin-top: 18px; max-width: 660px; }

/* 문의 페이지 2단 레이아웃 (본문 + 연락처 사이드) */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: clamp(32px, 4vw, 56px);
}
@media (max-width: 960px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
}

/* 정의 목록 (점검 항목 등) */
.deflist { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.deflist__row { background: #fff; display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px clamp(18px, 2.5vw, 26px); }
.deflist__key { font-size: var(--fs-sm); font-weight: 700; color: var(--brand-primary); }
.deflist__val { font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-body); }
@media (max-width: 700px) { .deflist__row { grid-template-columns: 1fr; gap: 6px; } }

/* ==========================================================================
   진단 도구 (계산기)
   ========================================================================== */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
}
/* 1fr(=minmax(auto,1fr))로 두면 자식의 min-content 가 열을 밀어내
   좁은 화면에서 가로 스크롤이 생깁니다. 반드시 minmax(0,1fr) 로 둡니다. */
@media (max-width: 1000px) { .calc { grid-template-columns: minmax(0, 1fr); } }

.calc__group + .calc__group { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.calc__group-title { font-size: var(--fs-body); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.calc__group-note { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 20px; line-height: 1.7; }

/* 입력 + 단위 */
.inputunit { position: relative; display: flex; align-items: center; }
.inputunit .input { padding-right: 74px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.inputunit__unit {
  position: absolute; right: 14px;
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  pointer-events: none;
}

/* 모드 선택 토글 */
.segmented { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px; gap: 4px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span {
  display: block; padding: 9px 18px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 700; color: var(--muted);
  cursor: pointer; transition: background-color 0.2s, color 0.2s;
}
.segmented input:checked + span { background: var(--brand-primary); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--brand-accent); outline-offset: 2px; }

/* 결과 패널 */
.result {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  overflow: hidden;
}
@media (max-width: 1000px) { .result { position: static; } }

.result__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; color: var(--brand-accent); text-transform: uppercase; }
.result__big {
  margin-top: 10px;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800; line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.result__big small { font-size: 0.4em; font-weight: 700; margin-left: 6px; letter-spacing: -0.02em; }
.result__verdict { margin-top: 18px; }

.result__rows { margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.16); }
.result__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: var(--fs-sm);
}
.result__row:last-child { border-bottom: 0; }
.result__key { color: rgba(255,255,255,0.7); }
.result__val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.result__val--accent { color: var(--brand-accent); }
.result__hint { margin-top: 20px; font-size: var(--fs-xs); color: rgba(255,255,255,0.6); line-height: 1.8; }

/* 판정 배지 */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 800;
  background: rgba(255,255,255,0.14);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge--ok   { color: #4ADE80; }
.badge--fair { color: #FCD34D; }
.badge--warn { color: var(--brand-accent); }
.badge--bad  { color: #FCA5A5; }

/* 도구 카드 (목록용) */
.tool-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.tool-card:hover { border-color: var(--brand-accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.tool-card--soon { background: var(--bg-soft); border-style: dashed; }
.tool-card--soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tool-card__badge {
  align-self: flex-start;
  font-size: var(--fs-xs); font-weight: 800;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--brand-accent-100); color: var(--brand-accent-text);
  margin-bottom: 16px;
}
.tool-card--soon .tool-card__badge { background: var(--line); color: var(--muted); }

/* ==========================================================================
   진단 사례
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: #fff;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.chip[aria-pressed="true"] { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

.case-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.case-card:hover { border-color: var(--brand-primary-100); box-shadow: var(--shadow); transform: translateY(-3px); }

/* 카드 전체를 클릭 영역으로 — 제목 링크를 카드 크기로 늘립니다.
   (display:contents 로 감싸는 방식은 일부 브라우저에서 포커스가 깨집니다) */
.case-card__link { color: inherit; }
.case-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.case-card:focus-within { border-color: var(--brand-primary); }
.case-card__link:focus-visible { outline: none; }
.case-card:focus-within { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
.case-card__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--brand-primary) 0%, var(--brand-primary-600) 100%);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.3);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em;
}
.case-card__body { padding: clamp(20px, 2.5vw, 26px); display: flex; flex-direction: column; flex: 1; }
.case-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.case-card__tag {
  font-size: var(--fs-xs); font-weight: 700;
  padding: 4px 9px; border-radius: var(--radius-sm);
  background: var(--brand-primary-050); color: var(--brand-primary);
}
.case-card__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.024em; line-height: var(--lh-snug); }
.case-card__desc { margin-top: 10px; font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-body); }
.case-card__foot {
  margin-top: auto; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.case-card__gain {
  font-size: var(--fs-sm); font-weight: 800;
  color: var(--state-ok); font-variant-numeric: tabular-nums;
}
.case-card__meta { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* 사례 상세 — 5단 구조 */
.casebody { max-width: 760px; }
.casebody h2 {
  font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.03em;
  margin-top: clamp(44px, 5vw, 64px); padding-top: 4px;
}
.casebody h2:first-child { margin-top: 0; }
.casebody h2 .casebody__step {
  display: block; font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.12em; color: var(--brand-accent-text);
  margin-bottom: 10px;
}
.casebody p { margin-top: 18px; color: var(--ink-soft); }
.casebody ul { margin-top: 18px; display: grid; gap: 10px; }
.casebody ul li { position: relative; padding-left: 18px; color: var(--ink-soft); }
.casebody ul li::before {
  content: ""; position: absolute; left: 0; top: 0.75em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-accent);
}

/* 사례 요약 박스 */
.casefacts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 32px;
}
.casefacts__item { background: #fff; padding: 20px clamp(14px, 2vw, 22px); }
.casefacts__key { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.casefacts__val { margin-top: 7px; font-size: var(--fs-body); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .casefacts { grid-template-columns: repeat(2, 1fr); } }

/* 데이터 표 */
.dtable { font-size: var(--fs-sm); margin-top: 22px; }
.dtable th, .dtable td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); }
.dtable th { font-weight: 700; color: var(--muted); font-size: var(--fs-xs); background: var(--bg-soft); }
.dtable th:first-child, .dtable td:first-child { text-align: left; }
.dtable td { font-variant-numeric: tabular-nums; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable__bad { color: var(--state-bad); font-weight: 700; }
.dtable__wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* 표본/예시 안내 (실제 사례로 오인 방지) */
.samplebar {
  background: var(--brand-accent-100);
  border-bottom: 1px solid var(--brand-accent);
  padding: 14px 0;
  font-size: var(--fs-sm);
  color: var(--brand-accent-text);
  text-align: center;
  font-weight: 600;
}

/* ==========================================================================
   보유 자격 (회사소개)
   ========================================================================== */
.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 18px);
}
@media (max-width: 860px) { .certs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .certs { grid-template-columns: 1fr; } }

.cert {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px clamp(16px, 2vw, 22px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cert:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-sm); }

.cert__seal {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-accent-100);
  color: var(--brand-accent-text);
}
.cert__seal svg { width: 20px; height: 20px; }

.cert__name { font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.cert__kind { display: block; margin-top: 4px; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

/* 빈 상태 */
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px) 24px;
  text-align: center;
  background: var(--bg-soft);
}

/* ==========================================================================
   미기재 정보 표시 (site.json 값이 "진행중" 일 때)
   site.js 가 해당 링크의 href 를 제거하고 이 클래스를 붙입니다.
   실제 정보를 채우면 이 스타일은 자동으로 적용되지 않습니다.
   ========================================================================== */
.is-pending {
  color: var(--muted) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   구축중 안내 배너 (홈 상단)
   정식 오픈 시 index.html 의 .buildbar 블록만 삭제하면 됩니다.
   ========================================================================== */
.buildbar {
  background: var(--brand-accent-100);
  border-bottom: 1px solid rgba(154, 91, 0, 0.18);
}
.buildbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.buildbar__badge {
  flex: none;
  background: var(--brand-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: -0.2px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.buildbar__text {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--brand-accent-text);
}
.buildbar__text strong { color: var(--brand-primary); }

@media (max-width: 640px) {
  .buildbar__inner { align-items: flex-start; gap: 10px; }
}

/* ==========================================================================
   분석 도구 카드 보조 스타일 (analysis.html)
   ========================================================================== */
.tool-card--pick { border-color: var(--brand-accent); }

.safe-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary-050);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--ink-soft);
}
.safe-note svg { flex: none; color: var(--state-ok); margin-top: 1px; }
.safe-note strong { color: var(--brand-primary); }

/* ==========================================================================
   흐리게 처리한 카드 (.card--dim)
   지금 주력으로 내세우지 않는 서비스를 시각적으로 뒤로 물립니다.
   숨기는 것이 아니라 "있긴 하지만 우선순위가 아니다" 를 나타냅니다.
   ========================================================================== */
.card--dim {
  background: var(--bg-soft);
  border-color: var(--line-soft);
  box-shadow: none;
}
.card--dim .card__icon {
  background: var(--line-soft);
  color: var(--muted);
}
.card--dim .card__title { color: var(--muted); }
.card--dim .card__desc  { color: var(--muted); }
.card--dim:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}
