/* ==========================================================================
   안심결 보험연구소 — 독립 보험 보장분석 (DREXLY 템플릿)
   색·활자·컴포넌트는 00-디자인보드.png, 각 면의 세부는 02-페이지시안.png 를 따른다.
   조판 원형: 좌측 고정 진단 레일 + 우측 비대칭 리포트(명령 프롬프트 「레이아웃」).
   ========================================================================== */

:root {
  /* 컬러 시스템 — 디자인보드 정본 */
  --navy: #0d1b2a;         /* Ink Navy */
  --navy-2: #13253d;       /* Deep Navy */
  --navy-3: #1d3350;       /* 레일 활성 — 시안의 밝은 네이비 */
  --navy-line: #24405f;
  --mint: #2ec4b6;         /* Mint */
  --mint-deep: #1fa89b;
  --mint-press: #178a80;
  --mint-pale: #e6f7f3;    /* Pale Mint */
  --off: #f7f9fb;          /* Off White */
  --surface: #ffffff;
  --gray: #8b95a1;         /* Gray */

  --ink: #0d1b2a;
  --ink-2: #3d4a59;
  --ink-3: #66717e;
  --line: #e2e8ee;
  --line-soft: #eef2f6;

  /* 의미색 — 상태는 색만으로 전달하지 않는다(글자·아이콘 병기) */
  --ok: #0f9d74;
  --ok-bg: #e8f7f0;
  --warn: #a9720c;
  --warn-bg: #fdf4e4;
  --err: #cf4438;
  --err-bg: #fceeec;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

  --wrap: 1240px;
  --gutter: 32px;
  /* 히어로 패널이 화면 끝까지 흘러가되 글은 안쪽에 남게 하는 여백 */
  --bleed: max(0px, (100vw - 1240px) / 2);
  --section: 100px;
  --rail: 236px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(13, 27, 42, 0.05);
  --shadow: 0 1px 2px rgba(13, 27, 42, 0.04), 0 10px 30px rgba(13, 27, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(13, 27, 42, 0.14);
  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

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

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

body {
  margin: 0;
  background: var(--off);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -0.008em;
  /* 한국어는 어절 단위로 끊는다 — 「입원·수술」이 갈라지지 않게 */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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.025em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 숫자 중심 조판 — 자릿수가 흔들리지 않게 */
.num, table, .score-num, .tl-axis, .stat-v { font-variant-numeric: tabular-nums; }

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

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 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: 28px; height: 28px; stroke-width: 1.4; }

/* ------------------------------------------------------------- 활자 계층 */
.h-display {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.h-display .hl { color: var(--mint-deep); }
.section-title { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.35; font-weight: 700; }
.panel-title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.03em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mint-deep);
}
.lead { color: var(--ink-2); font-size: 16.5px; line-height: 1.8; }
.small { font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.tiny { font-size: 12.5px; color: var(--gray); line-height: 1.66; }
.muted { color: var(--ink-3); }

.section { padding-block: calc(var(--section) / 2); }
.section-first { padding-top: calc(var(--section) * 0.62); }
.section-last { padding-bottom: var(--section); }
.section-tint { background: var(--surface); }
.section-dark { background: var(--navy); color: #fff; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .section-title { margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--ink-2); }

/* --------------------------------------------------------------- 버튼 */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid var(--btn-bd); border-radius: var(--r);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 15px; font-weight: 600; letter-spacing: -0.015em;
  cursor: pointer; text-align: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { --btn-bg: var(--mint); --btn-fg: #06322e; --btn-bd: var(--mint); }
.btn-primary:hover { --btn-bg: var(--mint-deep); --btn-bd: var(--mint-deep); --btn-fg: #fff; }
.btn-dark { --btn-bg: var(--navy); --btn-fg: #fff; --btn-bd: var(--navy); }
.btn-dark:hover { --btn-bg: var(--navy-2); --btn-bd: var(--navy-2); }
.btn-outline { --btn-bg: var(--surface); --btn-fg: var(--navy); --btn-bd: #c9d3dd; }
.btn-outline:hover { --btn-bd: var(--navy); }
.btn-onnavy { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,0.4); }
.btn-onnavy:hover { --btn-bg: rgba(255,255,255,0.1); --btn-bd: rgba(255,255,255,0.75); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-text {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  color: var(--mint-deep); font-size: 14px; font-weight: 600;
  border-bottom: 1px solid transparent; transition: gap 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-text:hover { gap: 10px; border-bottom-color: var(--mint); }

/* --------------------------------------------------------------- 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 8px 26px rgba(13, 27, 42, 0.24); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: #fff; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand b { font-size: 19px; font-weight: 700; letter-spacing: -0.035em; }
.brand small {
  display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62); margin-top: 1px;
}
.navlinks { display: flex; align-items: center; gap: 30px; }
.navlinks a {
  position: relative; font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, 0.8);
  padding: 6px 0; transition: color 0.25s var(--ease);
}
.navlinks a:hover { color: #fff; }
.navlinks a[aria-current="page"] { color: #fff; font-weight: 700; }
.navlinks a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--mint); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--r-sm);
  color: #fff; cursor: pointer;
}

/* 모바일 서랍 */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); z-index: 90;
  background: var(--navy); color: #fff; padding: 22px 22px 40px;
  transform: translateX(100%); transition: transform 0.38s 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; margin-bottom: 14px; }
.drawer-close {
  width: 44px; height: 44px; display: grid; place-items: center; background: none;
  border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--r-sm); color: #fff; cursor: pointer;
}
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  font-size: 17px; font-weight: 600; padding: 15px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.86);
}
.drawer nav a[aria-current="page"] { color: var(--mint); }
.drawer-cta { margin-top: 24px; display: grid; gap: 10px; }
.drawer-cta .btn { justify-content: flex-start; }
.drawer-note { margin-top: 22px; font-size: 12px; line-height: 1.65; color: rgba(255, 255, 255, 0.5); }
.scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(13, 27, 42, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.38s var(--ease), visibility 0.38s;
}
.scrim.open { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------- 히어로 */
.hero { position: relative; overflow: hidden; background: var(--off); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px; align-items: center; padding: 68px 0 78px;
}
.hero-copy .h-display { margin-bottom: 20px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust {
  display: flex; align-items: center; gap: 10px; margin-top: 30px;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.hero-trust .ico { color: var(--mint-deep); }
.hero-trust b { font-weight: 700; color: var(--ink); }

.hero-panel {
  position: relative;
  padding: 34px calc(30px + var(--gutter) + var(--bleed)) 30px 30px;
  background: linear-gradient(150deg, var(--navy-2) 0%, var(--navy) 62%);
  border-radius: var(--r-lg) 0 0 var(--r-lg); color: #fff;
  /* 시안대로 오른쪽 화면 끝까지 흘려보낸다 — .hero 의 overflow:hidden 이 잘라 준다 */
  margin-right: calc(-1 * var(--gutter) - max(0px, (100vw - var(--wrap)) / 2));
  box-shadow: var(--shadow-lg);
}
.hero-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 60% at 78% 12%, rgba(46, 196, 182, 0.22), transparent 62%);
}
.hero-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hero-panel-head h2 { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.hero-panel .radar-wrap { position: relative; z-index: 1; }
.hero-score {
  position: absolute; right: calc(22px + var(--gutter) + var(--bleed)); bottom: 22px; z-index: 2;
  background: var(--surface); color: var(--ink); border-radius: var(--r);
  padding: 14px 18px; min-width: 148px; box-shadow: var(--shadow);
}
.hero-score .k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.hero-score .v { font-size: 30px; font-weight: 700; color: var(--mint-deep); letter-spacing: -0.04em; }
.hero-score .v small { font-size: 14px; color: var(--gray); font-weight: 600; }
.hero-score .d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* --------------------------------------------------------- 레이더 차트 */
.radar { width: 100%; height: auto; display: block; }
.radar .grid { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.radar .spoke { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.radar .ref { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.4; stroke-dasharray: 3 4; }
.radar .mine { fill: rgba(46, 196, 182, 0.3); stroke: var(--mint); stroke-width: 2.2; stroke-linejoin: round; }
.radar .dot { fill: var(--mint); }
.radar .lbl { fill: rgba(255, 255, 255, 0.86); font-size: 13.5px; font-weight: 600; }
.radar.on-light .grid { stroke: #e6ecf2; }
.radar.on-light .spoke { stroke: #eaeff4; }
.radar.on-light .ref { stroke: #b8c3ce; }
.radar.on-light .lbl { fill: var(--ink-2); }
.radar-legend { display: flex; gap: 18px; justify-content: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.radar-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.radar-legend .k-mine i { background: var(--mint); }
.radar-legend .k-ref i { background: #c3cdd7; }
.on-navy .radar-legend { color: rgba(255, 255, 255, 0.7); }

/* ------------------------------------------------------------ 진단 레일 */
.lab { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 36px; align-items: start; }
.lab > *, .asym > *, .asym-b > *, .stack > *, .grid-2 > *, .grid-3 > *, .steps > *, .stat-row > *, .form-grid > *, .footer-grid > * { min-width: 0; }
.rail {
  position: sticky; top: 96px; background: var(--navy); color: #fff;
  border-radius: var(--r-lg); padding: 22px 16px 20px; box-shadow: var(--shadow);
}
.rail h2 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); padding: 0 8px 12px; }
.rail-list { display: flex; flex-direction: column; }
.rail-list a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  color: rgba(255, 255, 255, 0.74); transition: background 0.22s var(--ease), color 0.22s var(--ease);
}
.rail-list a .ico { color: rgba(255, 255, 255, 0.42); }
.rail-list a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.rail-list a[aria-current="page"] { background: var(--navy-3); color: #fff; font-weight: 700; }
.rail-list a[aria-current="page"] .ico { color: var(--mint); }
.rail-sep { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 14px 8px; }
.rail-jump { display: flex; flex-direction: column; }
.rail-jump a {
  min-height: 40px; display: flex; align-items: center; padding: 6px 10px; border-radius: var(--r-sm);
  font-size: 13px; color: rgba(255, 255, 255, 0.6);
}
.rail-jump a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.rail-jump a.is-here { color: var(--mint); font-weight: 700; }
.rail-foot { margin-top: 16px; padding: 12px 10px 2px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 11.5px; line-height: 1.62; color: rgba(255, 255, 255, 0.5); }

/* ----------------------------------------------------------- 면 머리말 */
.page-head { padding: 40px 0 26px; }
.page-head .crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.page-head .crumb a:hover { color: var(--mint-deep); }
.page-head h1 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.035em; }
.page-head p { margin-top: 12px; color: var(--ink-2); max-width: 720px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* --------------------------------------------------------------- 패널 */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-xs);
}
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head p { margin-top: 6px; }
.panel-navy { background: var(--navy); color: #fff; border-color: transparent; }
.panel-navy .panel-title, .panel-navy h3 { color: #fff; }
.panel-navy p { color: rgba(255, 255, 255, 0.74); }
.panel-mint { background: var(--mint-pale); border-color: #cfeee8; }

/* 비대칭 2열 — 리포트 본문 */
.asym { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.asym-b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.32fr); gap: 20px; align-items: start; }
.asym > .offset, .asym-b > .offset { margin-top: 28px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* --------------------------------------------------------------- 칩·배지 */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent;
}
.chip .ico { width: 14px; height: 14px; stroke-width: 2; }
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: #c9ebdd; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dfbc; }
.chip-err { background: var(--err-bg); color: var(--err); border-color: #f3d2ce; }
.chip-neutral { background: var(--off); color: var(--ink-2); border-color: var(--line); }
.chip-navy { background: var(--navy); color: #fff; }

/* --------------------------------------------------------------- 점수 카드 */
.score { display: flex; flex-direction: column; gap: 4px; }
.score-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.score-top h3 { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.score-num { font-size: clamp(46px, 6vw, 64px); font-weight: 700; color: var(--mint-deep); letter-spacing: -0.05em; line-height: 1.06; }
.score-num small { font-size: 20px; color: var(--gray); font-weight: 600; letter-spacing: -0.02em; }
.score-bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-top: 12px; }
.score-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--mint-deep)); }
.score-note { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }

/* --------------------------------------------------------- 보장 타임라인 */
.tl { width: 100%; height: auto; display: block; overflow: visible; }
.tl .axis-t { fill: var(--gray); font-size: 11.5px; font-weight: 600; }
.tl .row-l { fill: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.tl .track { fill: #eef2f6; }
.tl .fill { fill: var(--mint); }
.tl .fill-2 { fill: #8fdcd2; }
.tl .fill-gap { fill: #f0b4ad; }
.tl .vline { stroke: #eef2f6; stroke-width: 1; }
.tl .gapline { fill: none; stroke: var(--err); stroke-width: 2; stroke-linecap: round; stroke-dasharray: var(--len, 1000); stroke-dashoffset: 0; }
.tl .gaphead { fill: var(--err); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.tl-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.tl-legend .k1 i { background: var(--mint); }
.tl-legend .k2 i { background: #8fdcd2; }
.tl-legend .k3 i { background: #eef2f6; border: 1px solid var(--line); }
.tl-scroll { position: relative; overflow-x: auto; }
.tl-scroll > svg { min-width: 520px; }

/* 시그니처 연출 — 스크롤 구간에서 「보장 공백선」만 그린다.
   기본값은 그려진 상태(정적 리포트가 완성본)이고, 지원 브라우저에서만 스크롤로 그린다. */
@supports (animation-timeline: view()) {
  /* view() 를 선 자체에 걸면 가로 스크롤 상자(.tl-scroll)가 기준면이 되어 구간이 0이 된다.
     상자에 이름을 붙여 문서 스크롤을 기준으로 삼고, 선은 그 이름을 부른다. */
  .js .tl-scroll { view-timeline-name: --tlview; view-timeline-axis: block; }
  .js .tl .gapline {
    stroke-dashoffset: var(--len, 1000);
    /* duration 은 적지 않는다 — 축약형이 되돌리는 초기값(auto)이라야 구간 전체를 쓴다 */
    animation: gapdraw linear both;
    animation-timeline: --tlview;
    animation-range: entry 20% cover 48%;
  }
}
@keyframes gapdraw { to { stroke-dashoffset: 0; } }
/* Scroll Timeline 미지원(예: Firefox) — IntersectionObserver 로 1회만 그린다 */
.js .tl .gapline.io-pending { stroke-dashoffset: var(--len, 1000); }
.js .tl .gapline.io-drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease); }

/* --------------------------------------------------------------- 표 */
.tbl-wrap {
  /* overflow 상자는 반드시 position:relative — static 이면 320px 에서 문서 폭이 밀린다 */
  position: relative; overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface);
}
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data caption { text-align: left; padding: 14px 16px 0; font-size: 13px; color: var(--ink-3); }
table.data th, table.data td { padding: 13px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
table.data thead th { background: #eef2f6; color: var(--ink-2); font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }
table.data th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink); }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data .col-rec { background: var(--mint-pale); color: var(--mint-press); font-weight: 700; }
table.data thead .col-rec { background: var(--navy); color: #fff; }
table.data tbody tr.is-lifted { background: #fbfdfe; }
table.data .delta-up { color: var(--err); font-weight: 700; }
.tbl-hint { font-size: 12.5px; color: var(--gray); margin-top: 8px; }

/* --------------------------------------------------------------- 아코디언 */
.acc { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--line-soft); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 60px; padding: 14px 18px; background: none; border: 0; cursor: pointer;
  text-align: left; font-size: 15px; font-weight: 600; color: var(--ink);
}
.acc-trigger .ico { color: var(--gray); transition: transform 0.28s var(--ease); }
.acc-item.open .acc-trigger .ico { transform: rotate(180deg); color: var(--mint-deep); }
.acc-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-body { display: block; padding: 0 18px 20px; color: var(--ink-2); font-size: 14.5px; }
.js .acc-body { display: none; }
.js .acc-item.open .acc-body { display: block; }
.acc-body p + p, .acc-body ul { margin-top: 10px; }
.acc-body li { position: relative; padding-left: 14px; }
.acc-body li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--mint); }

/* --------------------------------------------------------------- 탭 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; position: relative; }
.tab {
  min-height: 46px; padding: 0 18px; background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink-3); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); font-weight: 700; }
.tabpanel { display: block; }
.js .tabpanel[hidden] { display: none; }
.tabpanel + .tabpanel { margin-top: 28px; }
.js .tabpanel + .tabpanel { margin-top: 0; }
.tabpanel > h2.nojs-only { font-size: 18px; margin-bottom: 14px; }
.js .nojs-only { display: none; }

/* 결과 공유 요약 전환 — scoped View Transition */
.vt-report { view-transition-name: vt-report; }

/* --------------------------------------------------------------- 팝오버 */
.pop-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.pop-btn {
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--gray); border-radius: 50%;
}
.pop-btn:hover { color: var(--mint-deep); background: var(--mint-pale); }
.pop-btn[aria-expanded="true"] { color: #fff; background: var(--navy); }
.pop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  z-index: 70; width: max(240px, 18vw); max-width: min(300px, calc(100vw - 40px));
  background: var(--navy); color: #fff; border-radius: var(--r); padding: 14px 16px;
  font-size: 13px; line-height: 1.65; font-weight: 400; text-align: left;
  box-shadow: var(--shadow-lg); letter-spacing: -0.01em;
}
.pop[hidden] { display: none; }
.pop::after {
  content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px;
  margin-left: -5px; background: var(--navy); transform: rotate(45deg); border-radius: 2px;
}
.pop b { color: var(--mint); font-weight: 700; }
/* Anchor Positioning — 지원 시 앵커 기준으로 띄우고, 화면 밖이면 반대편으로 뒤집는다 */
@supports (anchor-name: --a) {
  .pop-wrap { anchor-name: var(--an); }
  .pop {
    position: fixed; top: anchor(bottom); left: anchor(center);
    transform: translateX(-50%) translateY(10px);
    position-anchor: var(--an);
    position-try-fallbacks: flip-block;
  }
  .pop::after { display: none; }
}

/* --------------------------------------------------------------- 단계 */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.step { position: relative; padding-top: 8px; }
.step-dot {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); margin-bottom: 16px;
  position: relative; z-index: 1;
}
.step:first-child .step-dot { background: var(--mint); border-color: var(--mint); color: #fff; }
.step:last-child .step-dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.step::before {
  content: ""; position: absolute; left: 52px; right: -18px; top: 34px; height: 1.5px;
  background: linear-gradient(90deg, var(--mint), #cfe3e0);
}
.step:last-child::before { display: none; }
.step .n { font-size: 12px; font-weight: 700; color: var(--mint-deep); letter-spacing: 0.06em; }
.step h3 { font-size: 16px; margin: 4px 0 8px; }
.step p { font-size: 13.5px; color: var(--ink-3); }

/* 진행 표시 (정보 입력 → 분석 중 → 분석 완료) */
.prog { display: flex; align-items: center; gap: 0; }
.prog-node { display: flex; align-items: center; gap: 8px; }
.prog-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line-soft); color: var(--gray); flex: none;
}
.prog-node.done .prog-dot { background: var(--mint); color: #fff; }
.prog-node.now .prog-dot { background: var(--navy); color: #fff; }
.prog-node span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.prog-node.done span, .prog-node.now span { color: var(--ink); }
.prog-line { flex: 1; height: 1.5px; background: var(--line); margin: 0 10px; min-width: 18px; }
.prog-node.done + .prog-line { background: var(--mint); }

/* --------------------------------------------------------------- 문답 */
.q-list { display: grid; gap: 16px; }
.q {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px;
}
.q-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.q-no { font-size: 12px; font-weight: 700; color: var(--mint-deep); letter-spacing: 0.08em; flex: none; }
.q legend, .q .q-title { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.q-hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.q fieldset { border: 0; margin: 0; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.opt label:hover { border-color: #b9c6d2; }
.opt input:checked + label {
  border-color: var(--mint-deep); background: var(--mint-pale); color: var(--mint-press); font-weight: 700;
}
.opt input:focus-visible + label { outline: 2px solid var(--mint-deep); outline-offset: 2px; }
.opt input:checked + label .tick { opacity: 1; }
.opt .tick { width: 15px; height: 15px; opacity: 0; color: var(--mint-deep); flex: none; }
.q-num { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-num .control { max-width: 200px; }
.q-num .unit { font-size: 14px; color: var(--ink-3); }

/* 모바일 단계형 — 한 화면에 한 문항 */
.wiz-bar { display: none; }
.wiz-count { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.wiz-track { height: 4px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-top: 8px; }
.wiz-track i { display: block; height: 100%; background: var(--mint); border-radius: 999px; transition: width 0.3s var(--ease); }

/* --------------------------------------------------------------- 폼 */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--err); }
.control {
  width: 100%; min-height: 50px; padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-size: 14.5px;
  color: var(--ink); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.control::placeholder { color: #a9b3bd; }
.control:focus { outline: none; border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.16); }
textarea.control { min-height: 132px; resize: vertical; line-height: 1.7; }
select.control {
  appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.field.filled .control { background: #fcfefe; }
.field.invalid .control { border-color: var(--err); box-shadow: 0 0 0 3px rgba(207, 68, 56, 0.12); }
.err { display: none; font-size: 12.5px; color: var(--err); font-weight: 600; }
.field.invalid .err { display: flex; align-items: center; gap: 5px; }
.counter { text-align: right; font-size: 12px; color: var(--gray); }

.agree { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 6px; font-size: 13.5px; color: var(--ink-2); }
.agree input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agree .box {
  width: 22px; height: 22px; flex: none; margin-top: 1px; border: 1.5px solid #c3cdd7; border-radius: 5px;
  display: grid; place-items: center; color: transparent; background: var(--surface); cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.agree input:checked + .box { background: var(--mint-deep); border-color: var(--mint-deep); color: #fff; }
.agree input:focus-visible + .box { outline: 2px solid var(--mint-deep); outline-offset: 2px; }
.agree .box .ico { width: 13px; height: 13px; stroke-width: 3; }
.agree-txt { cursor: pointer; }
.agree.invalid .box { border-color: var(--err); }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- 상태 */
.state { display: none; }
.state.on { display: block; }
.state-box {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px;
  border-radius: var(--r); font-size: 14px; line-height: 1.65;
}
.state-loading { background: var(--off); border: 1px solid var(--line); color: var(--ink-2); }
.state-ok { background: var(--ok-bg); border: 1px solid #c9ebdd; color: #0b6b50; }
.state-warn { background: var(--warn-bg); border: 1px solid #f0dfbc; color: var(--warn); }
.state-err { background: var(--err-bg); border: 1px solid #f3d2ce; color: var(--err); }
.state-box .ico { flex: none; margin-top: 2px; }
.state-box strong { display: block; font-weight: 700; margin-bottom: 2px; }
.dots-load { display: inline-flex; gap: 4px; }
.dots-load i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: bob 1s var(--ease) infinite; }
.dots-load i:nth-child(2) { animation-delay: 0.16s; }
.dots-load i:nth-child(3) { animation-delay: 0.32s; }
@keyframes bob { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* --------------------------------------------------------------- 고지 */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: var(--r-sm);
  background: var(--surface); padding: 18px 20px;
}
.notice h3 { font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.notice h3 .ico { color: var(--navy); }
.notice p { font-size: 13px; line-height: 1.72; color: var(--ink-2); }
.notice p + p { margin-top: 8px; }
.notice-mint { border-left-color: var(--mint); background: var(--mint-pale); border-color: #cfeee8; }
.notice-mint h3 .ico { color: var(--mint-press); }
.notice-mint p { color: #185f58; }

/* --------------------------------------------------------------- 격자 */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card .ico-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--mint-pale); color: var(--mint-press); margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--ink-2); }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--surface); padding: 18px 20px; }
.stat-k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; margin-top: 2px; }
.stat-d { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* 전문가 */
.advisor { display: flex; gap: 18px; align-items: flex-end; }
.advisor-photo {
  display: block; width: 140px; flex: none; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, var(--mint-pale), #fff);
}
.advisor-photo img { width: 140px; height: 224px; object-fit: cover; }
.advisor-body h3 { font-size: 18px; margin-bottom: 6px; }
.advisor-body .role { font-size: 13px; color: var(--mint-deep); font-weight: 600; margin-bottom: 10px; }
.promise { display: grid; gap: 14px; margin-top: 4px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; }
.promise .ico-badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--mint-pale); color: var(--mint-press); flex: none; }
.promise b { display: block; font-size: 14.5px; }
.promise span { font-size: 13px; color: var(--ink-3); }

/* CTA 띠 */
.band { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 34px 36px; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.band h2 { font-size: clamp(20px, 2.3vw, 26px); }
.band p { margin-top: 8px; color: rgba(255, 255, 255, 0.72); font-size: 14.5px; }
.band .acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* 모바일 하단 고정 CTA — sticky 라서 푸터를 덮지 않는다 */
.stickcta { display: none; }

/* --------------------------------------------------------------- 푸터 */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.72); margin-top: 0; padding-top: 60px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; padding-bottom: 40px; }
.footer-brand p { margin-top: 14px; font-size: 13.5px; line-height: 1.75; color: rgba(255, 255, 255, 0.6); }
.footer-col h3 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 14px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-info div { display: flex; gap: 10px; margin-bottom: 9px; font-size: 13.5px; }
.footer-info b { flex: none; width: 56px; color: rgba(255, 255, 255, 0.5); font-weight: 500; }
.footer-disc { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0; font-size: 12.5px; line-height: 1.75; color: rgba(255, 255, 255, 0.5); }
.footer-disc b { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0 26px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255, 255, 255, 0.45); }
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a:hover { color: #fff; }

/* --------------------------------------------------------------- 유틸 */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 100; width: 46px; height: 46px;
  border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff;
  border: 0; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px);
  box-shadow: var(--shadow); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 130; transform: translate(-50%, 18px);
  min-width: 260px; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 11px;
  padding: 14px 20px; background: var(--navy); color: #fff; border-radius: var(--r);
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  /* 알림일 뿐이므로 아래 제출 버튼을 가로막지 않는다 */
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .ico { color: var(--mint); }

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

/* 용어 하이라이트 (CSS Custom Highlight API) */
::highlight(term) { background: #ffe9a8; color: #4a3400; }

/* =============================================================== 반응형 */
@media (max-width: 1180px) {
  :root { --wrap: 1040px; --section: 92px; --rail: 208px; --bleed: max(0px, (100vw - 1040px) / 2); }
  .navlinks { gap: 22px; }
}

@media (max-width: 1024px) {
  :root { --gutter: 24px; --section: 84px; }
  .nav { height: 66px; }
  .navlinks { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; padding: 44px 0 56px; }
  .hero-panel { margin-right: 0; border-radius: var(--r-lg); padding: 26px 24px 22px; }
  .hero-score { right: 24px; }
  .lab { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rail { position: static; padding: 14px; }
  .rail h2 { display: none; }
  .rail-list { flex-direction: row; overflow-x: auto; position: relative; gap: 4px; }
  .rail-list a { white-space: nowrap; }
  .rail-sep, .rail-jump, .rail-foot { display: none; }
  .asym, .asym-b { grid-template-columns: minmax(0, 1fr); }
  .asym > .offset { margin-top: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .step::before { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; --section: 64px; }
  body { font-size: 15.5px; }
  .h-display { font-size: clamp(27px, 8vw, 34px); }
  .hero-panel { padding: 22px 18px 18px; }
  .hero-score { position: static; margin-top: 14px; min-width: 0; }
  .hero-trust { align-items: flex-start; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 20px 18px; }
  .q { padding: 18px 16px; }
  .advisor { flex-direction: column; align-items: flex-start; gap: 14px; }
  .band { padding: 26px 22px; }
  .band .acts .btn { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .page-head { padding: 26px 0 20px; }

  /* 터치 영역 최소 44px */
  .btn, .btn-sm, .tab, .acc-trigger, .rail-list a, button { min-height: 44px; }
  .pop-btn { width: 44px; height: 44px; }
  .to-top { right: 14px; bottom: 76px; }
  .toast { bottom: 78px; }

  /* 모바일 하단 고정 다음/CTA — sticky 이므로 푸터를 가리지 않는다 */
  .stickcta {
    display: block; position: sticky; bottom: 0; z-index: 40;
    margin: 22px calc(-1 * var(--gutter)) 0;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .stickcta .row { display: flex; gap: 10px; }
  .stickcta .row .btn { flex: 1; }

  /* 단계형 문답 — 한 화면에 한 문항 */
  .js .wiz .q[hidden] { display: none; }
  .js .wiz .wiz-bar { display: block; margin-bottom: 14px; }
}

@media (max-width: 380px) {
  .brand b { font-size: 16.5px; }
  .brand small { font-size: 9.5px; }
  .nav-actions .btn { padding: 0 12px; font-size: 13.5px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  /* 진행 애니메이션은 없애고 최종 상태를 즉시 보여 준다 */
  .js .tl .gapline, .js .tl .gapline.io-pending { animation: none !important; stroke-dashoffset: 0 !important; }
}

@media print {
  .site-header, .drawer, .scrim, .to-top, .toast, .stickcta, .rail, .band { display: none !important; }
  body { background: #fff; }
  .panel, .card, .tbl-wrap { break-inside: avoid; box-shadow: none; }
}
