/* AxisMetric — Data Thinking Lab
 * 디자인 원칙: 모든 것이 좌표다. 화면의 주인공은 도입 × 활용 평면 위의 한 점.
 * 금색은 "우리 회사의 위치"와 주요 실행 버튼에만 쓴다. */

:root {
  --ink: #0a1a33;        /* 본문, 진한 면 */
  --ink-2: #33415a;      /* 보조 본문 */
  --muted: #5b6b82;      /* 설명, 축 눈금 */
  --axis: #14305e;       /* 축, 데이터 선 */
  --axis-soft: #e7edf6;  /* 데이터 면 바탕 */
  --paper: #f4f7fb;      /* 모눈 바탕 */
  --grid: #dce4ee;       /* 모눈 선 */
  --line: #e1e7ef;       /* 구분선 */
  --white: #ffffff;
  --gold: #d4a017;       /* 우리 회사의 위치, 주요 버튼 */
  --gold-ink: #6b4f00;   /* 금색 계열 글자 (흰 바탕 대비 확보) */
  --gold-soft: #fbf3dc;
  --alert: #b42318;
  --ok: #027a48;

  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --fs-sm: 14px; --fs-base: 16px; --fs-md: 19px; --fs-lg: 24px; --fs-xl: 32px; --fs-2xl: clamp(34px, 5.2vw, 56px);
  --r-sm: 8px; --r-md: 14px;
  --max: 1120px; --read: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.65;
  color: var(--ink); background: var(--white); word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 0;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--axis); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.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; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.read { max-width: var(--read); }
[hidden] { display: none !important; }

/* ---------- 상단 ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--white); position: relative; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-size: 21px; font-weight: 900; letter-spacing: -.01em; }
.brand span { font-size: 13px; color: var(--muted); }
.top nav a { font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; }
.top nav a + a { margin-left: 20px; }
.top nav a:hover { color: var(--axis); text-decoration: underline; }

.notice { font-size: var(--fs-sm); padding: 9px 0; text-align: center; }
.notice.demo { background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }
.notice.dev { background: #fef3f2; color: var(--alert); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: #e2ad1c; }
.btn-line { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--paper); }
.btn-quiet { background: transparent; color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.btn-quiet:hover { color: var(--axis); text-decoration: underline; }
.btn[disabled], .btn[aria-disabled='true'] { background: var(--line); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- 랜딩 ---------- */
.hero {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  border-bottom: 1px solid var(--grid);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: var(--fs-2xl); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; margin: 0 0 20px; }
.hero .lead { font-size: var(--fs-md); color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.hero .facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: var(--fs-sm); }
.hero .facts li b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.hero-plane { background: var(--white); border: 1px solid var(--grid); border-radius: var(--r-md); padding: 16px; box-shadow: 0 1px 0 var(--grid); }

.section { padding: 80px 0; }
.section h2 { font-size: var(--fs-xl); line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.section .sub { color: var(--ink-2); margin: 0 0 40px; max-width: 40em; }

.axes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.axis-col h3 { font-size: var(--fs-lg); margin: 0; font-weight: 800; }
.axis-col > p { margin: 2px 0 20px; color: var(--muted); }
.axis-col ol { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--axis); }
.axis-col li { position: relative; padding: 4px 0 20px; }
.axis-col li::before { content: ''; position: absolute; left: -27px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--axis); }
.axis-col li b { display: block; font-size: var(--fs-md); }
.axis-col li span { color: var(--ink-2); font-size: var(--fs-sm); }

.outputs { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.outputs dl { margin: 0; display: grid; gap: 18px; }
.outputs dt { font-weight: 800; font-size: var(--fs-md); }
.outputs dd { margin: 2px 0 0; color: var(--ink-2); }

.deep { background: var(--ink); color: var(--white); }
.deep .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.deep h2 { color: var(--white); }
.deep .sub { color: #c5cfdd; }
.deep ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.deep li { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.deep li b { display: block; font-size: var(--fs-md); }
.deep li span { color: #c5cfdd; font-size: var(--fs-sm); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: var(--fs-sm); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--ink-2); }

/* ---------- 랜딩: 성숙도 5단계 ---------- */
.levels-h { font-size: var(--fs-md); font-weight: 800; margin: 6px 0 14px; }
.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.levels li { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 12px 16px; background: var(--white); border-left: 6px solid var(--axis); }
.levels li:nth-child(1) { border-left-color: #c9d5e6; }
.levels li:nth-child(2) { border-left-color: #9fb3cf; }
.levels li:nth-child(3) { border-left-color: #6b86ad; }
.levels li:nth-child(4) { border-left-color: #3d5b88; }
.levels li:nth-child(5) { border-left-color: var(--axis); }
.levels b { font-weight: 800; }
.levels span { grid-row: 2; font-size: 13px; color: var(--muted); }
.levels p { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- 레벨 눈금 ---------- */
.scale { margin: 8px 0 0; }
.scale-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; position: relative; }
.scale-seg { height: 10px; background: var(--axis-soft); }
.scale-seg:first-child { border-radius: 5px 0 0 5px; }
.scale-seg:last-child { border-radius: 0 5px 5px 0; }
.scale-seg.on { background: var(--axis); }
.scale-names { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.scale-names span { line-height: 1.35; }
.scale-names span.on { color: var(--ink); font-weight: 800; }
.scale-names small { display: block; font-size: 12px; }
.scale-pin { position: absolute; top: -6px; width: 4px; height: 22px; margin-left: -2px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 0 2px var(--white); }

/* ---------- 진단 진행 ---------- */
.quiz { padding: 40px 0 72px; }
.quiz h1 { font-size: var(--fs-xl); line-height: 1.3; margin: 0 0 8px; font-weight: 800; }
.quiz .intro { color: var(--ink-2); margin: 0 0 32px; }
.progress { margin: 0 0 28px; }
.progress-label { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; }
.progress-label b { color: var(--ink); }
.progress-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.progress-track i { height: 6px; border-radius: 3px; background: var(--line); }
.progress-track i.done { background: var(--axis); }
.progress-track i.now { background: var(--gold); }

.axis-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--axis); background: var(--axis-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.dim-head h2 { font-size: var(--fs-lg); margin: 0 0 4px; font-weight: 800; }
.dim-head p { margin: 0 0 24px; color: var(--muted); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.item { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.item legend { font-size: var(--fs-md); font-weight: 600; line-height: 1.55; margin-bottom: 14px; padding: 0; float: left; width: 100%; }
.item legend + * { clear: both; }
.item.missing legend { color: var(--alert); }
.item .miss-msg { color: var(--alert); font-size: var(--fs-sm); font-weight: 700; margin: 8px 0 0; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; text-align: center; font-size: 13px; color: var(--ink-2); line-height: 1.3; min-height: 72px; background: var(--white); }
.likert label:hover { border-color: var(--axis); }
.likert input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.likert .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); background: var(--white); flex: none; }
.likert input:checked + .dot { border-color: var(--axis); background: var(--axis); box-shadow: inset 0 0 0 3px var(--white); }
.likert label:has(input:checked) { border-color: var(--axis); background: var(--axis-soft); color: var(--ink); font-weight: 700; }
.likert label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--white); }
.chips label:hover span { border-color: var(--axis); }
.chips input:checked + span { background: var(--axis); border-color: var(--axis); color: var(--white); font-weight: 700; }
.chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.profile-q { padding: 22px 0; border-top: 1px solid var(--line); }
.profile-q legend { font-weight: 700; font-size: var(--fs-md); margin-bottom: 12px; padding: 0; }

.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.hint { font-size: var(--fs-sm); color: var(--muted); margin: 16px 0 0; }

/* ---------- 결과 ---------- */
.result { padding: 40px 0 80px; }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 28px; }
.result-head h1 { font-size: var(--fs-xl); margin: 0; font-weight: 800; }
.result-head p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.position { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 28px; background: var(--paper); border: 1px solid var(--grid); border-radius: var(--r-md); }
.position .plane-box { background: var(--white); border: 1px solid var(--grid); border-radius: var(--r-sm); padding: 8px; }
.verdict .lv { font-size: 15px; font-weight: 700; color: var(--muted); margin: 0; }
.verdict .lv-name { font-size: clamp(36px, 5vw, 52px); font-weight: 900; line-height: 1.1; margin: 4px 0 6px; letter-spacing: -.02em; }
.verdict .lv-name small { font-size: .42em; font-weight: 700; color: var(--ink-2); margin-left: 10px; letter-spacing: 0; }
.verdict .lv-desc { color: var(--ink-2); margin: 0 0 22px; }
.verdict .type { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--grid); }
.verdict .type b { font-size: var(--fs-lg); font-weight: 800; }
.verdict .type p { margin: 6px 0 0; color: var(--ink-2); }
.indices { display: flex; gap: 28px; margin-top: 14px; font-size: var(--fs-sm); color: var(--muted); }
.indices b { display: block; font-size: var(--fs-lg); color: var(--ink); font-weight: 800; }

.block { margin-top: 56px; }
.block > h2 { font-size: var(--fs-lg); font-weight: 800; margin: 0 0 6px; }
.block > .sub { color: var(--muted); margin: 0 0 22px; }

.dims-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.dim-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dim-table caption { text-align: left; font-size: var(--fs-sm); color: var(--muted); padding-bottom: 8px; }
.dim-table th, .dim-table td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dim-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.dim-table td.score { text-align: right; font-weight: 800; width: 52px; }
.dim-table .axis-cell { color: var(--muted); font-size: 13px; width: 76px; }
.bar { height: 8px; background: var(--axis-soft); border-radius: 4px; position: relative; min-width: 80px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--axis); border-radius: 4px; }
.flag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.flag.hi { background: var(--axis-soft); color: var(--axis); }
.flag.lo { background: var(--gold-soft); color: var(--gold-ink); }

/* 잠금 해제 폼 */
.gate { margin-top: 56px; border: 1.5px solid var(--ink); border-radius: var(--r-md); padding: 28px; }
.gate h2 { font-size: var(--fs-lg); margin: 0 0 6px; font-weight: 800; }
.gate > p { margin: 0 0 22px; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; background: var(--white); }
.field input:focus, .field textarea:focus { border-color: var(--axis); outline: none; box-shadow: 0 0 0 3px var(--axis-soft); }
.field .err { color: var(--alert); font-size: 13px; margin: 4px 0 0; }
.consent { margin-top: 20px; font-size: var(--fs-sm); }
.consent table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.consent th, .consent td { text-align: left; padding: 7px 10px; border: 1px solid var(--line); vertical-align: top; }
.consent th { width: 140px; background: var(--paper); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--axis); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 14px 0 0; font-size: var(--fs-sm); font-weight: 700; }
.form-msg.err { color: var(--alert); }
.form-msg.ok { color: var(--ok); }

/* 상세 */
.interp { list-style: none; margin: 0; padding: 0; }
.interp li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.interp li:last-child { border-bottom: 1px solid var(--line); }
.interp .name b { display: block; }
.interp .name span { font-size: 13px; color: var(--muted); }
.interp p { margin: 0; color: var(--ink-2); }

.phase-label { font-size: 13px; font-weight: 700; color: var(--axis); }
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.course { border: 1px solid var(--line); border-left: 4px solid var(--axis); border-radius: var(--r-sm); padding: 18px 20px; }
.course h3 { font-size: var(--fs-md); margin: 4px 0 4px; font-weight: 800; }
.course .meta { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.course .custom { color: var(--gold-ink); font-weight: 700; }
.course p { margin: 0 0 6px; color: var(--ink-2); }
.course .why { font-size: var(--fs-sm); color: var(--ink); margin-top: 10px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tasks li { padding: 14px 18px; background: var(--paper); border-radius: var(--r-sm); }
.tasks b { display: block; }
.tasks span { color: var(--ink-2); font-size: var(--fs-sm); }

.consult { margin-top: 56px; background: var(--ink); color: var(--white); border-radius: var(--r-md); padding: 28px; }
.consult h2 { margin: 0 0 6px; font-size: var(--fs-lg); }
.consult p { margin: 0 0 18px; color: #c5cfdd; }
.consult .field label { color: var(--white); }
.consult textarea { min-height: 96px; color: var(--ink); }
.consult .form-msg.ok { color: #6ce9a6; }
.consult .form-msg.err { color: #fda29b; }

.end-actions { margin-top: 40px; }

/* ---------- 차트 공통 ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--white); font-size: 13px; line-height: 1.45; padding: 7px 10px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); z-index: 3; }
.tip b { font-weight: 800; }

/* ---------- 개인정보 처리방침 ---------- */
.doc { padding: 48px 0 80px; }
.doc h1 { font-size: var(--fs-xl); margin: 0 0 8px; }
.doc h2 { font-size: var(--fs-md); margin: 36px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--paper); width: 160px; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .hero .wrap, .deep .wrap, .outputs, .position, .dims-grid { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 48px; padding-bottom: 48px; gap: 32px; }
  .axes { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  .position { padding: 20px; gap: 24px; }
}
@media (max-width: 600px) {
  .brand span { display: none; }
  .likert { grid-template-columns: 1fr; gap: 6px; }
  .likert label { flex-direction: row; justify-content: flex-start; min-height: 0; padding: 12px 14px; font-size: 15px; text-align: left; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .interp li { grid-template-columns: 1fr; gap: 4px; }
  .consent th { width: 96px; }
  .gate, .consult { padding: 20px; }
  .dim-table .axis-cell { display: none; }
  .nav-row .btn { padding-left: 18px; padding-right: 18px; }
}

/* ---------- 정밀진단 설문 ---------- */
.muted-nav { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 700; }
.step-title { font-size: var(--fs-lg); font-weight: 800; margin: 0 0 4px; }
.progress-track.progress-10 { grid-template-columns: repeat(10, 1fr); }
.likert.six { grid-template-columns: repeat(5, 1fr) .95fr; }
.likert .dk { border-style: dashed; color: var(--muted); margin-left: 6px; }
.facts-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts-list div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts-list dt { font-weight: 800; }
.facts-list dd { margin: 0; color: var(--ink-2); }
.tier-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-opt { position: relative; cursor: pointer; }
.tier-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tier-opt span { display: block; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.tier-opt b { display: block; font-size: var(--fs-md); }
.tier-opt small { color: var(--muted); font-size: 13px; }
.tier-opt:hover span { border-color: var(--axis); }
.tier-opt input:checked + span { border-color: var(--axis); background: var(--axis-soft); box-shadow: inset 0 0 0 1px var(--axis); }
.tier-opt input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.profile-q legend .opt, legend .opt { font-weight: 500; color: var(--muted); font-size: var(--fs-sm); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opts span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--white); font-size: 15px; }
.opts label:hover span { border-color: var(--axis); }
.opts input:checked + span { background: var(--axis); border-color: var(--axis); color: var(--white); font-weight: 700; }
.opts input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.opts-q legend { margin-bottom: 12px; }
.safety { margin: 0 0 8px; padding: 12px 14px; border-radius: var(--r-sm); background: #fef3f2; color: var(--alert); font-size: var(--fs-sm); }
.safety b { margin-right: 6px; }
.item.field label { font-size: var(--fs-md); font-weight: 600; margin-bottom: 10px; }
.radar-sm { max-width: 480px; }

/* ---------- 관리자 ---------- */
.admin-sec { padding: 32px 0 80px; }
.admin-sec h1 { font-size: var(--fs-xl); margin: 0 0 4px; font-weight: 800; }
.admin-sec .sub { color: var(--muted); margin: 0 0 18px; }
.crumb { margin: 0 0 6px; font-size: var(--fs-sm); }
.crumb a { color: var(--muted); }
.sec-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.btn.sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th, table.list td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list thead th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1.5px solid var(--ink); }
table.list th[scope=row] a { font-weight: 800; color: var(--ink); text-decoration: none; }
table.list th[scope=row] a:hover { text-decoration: underline; }
table.list small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
table.list .actions { white-space: nowrap; text-align: right; }
.bar.sm { height: 6px; margin-top: 6px; min-width: 60px; max-width: 120px; }
.status { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--ink-2); margin-right: 8px; }
.status.s-open { background: #d1fadf; color: var(--ok); }
.status.s-closed { background: var(--ink); color: var(--white); }
.pform { margin-top: 18px; display: grid; gap: 18px; }
.pform fieldset.field legend { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; padding: 0; }
.field select { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; background: var(--white); }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.radio-row { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 18px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpis div { padding: 14px 16px 14px 0; }
.kpis div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.kpis dt { font-size: 13px; color: var(--muted); }
.kpis dd { margin: 2px 0 0; font-size: var(--fs-md); }
.kpis.big { grid-template-columns: repeat(3, 1fr); margin: 8px 0 8px; }
.kpis.big b { font-size: var(--fs-xl); font-weight: 900; }
.kpis.big b.txt { font-size: var(--fs-md); font-weight: 800; }
.muted { color: var(--muted); }
.warn { color: var(--alert); font-weight: 700; }
.r { text-align: right !important; }
.tabs { display: flex; gap: 4px; margin: 26px 0 26px; border-bottom: 1.5px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tabs a:hover { color: var(--axis); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--gold); }
.empty { padding: 48px 0; }
.empty h2 { font-size: var(--fs-lg); margin: 0 0 6px; }
.empty p { color: var(--ink-2); margin: 0; max-width: 40em; }
.block.first { margin-top: 0; }
.findings { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: var(--fs-md); }
.two-col, .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; align-items: start; }
.grid-2 > .block { margin-top: 36px; }
.courses.compact .course { padding: 12px 16px; }
.courses.compact .course h3 { font-size: 16px; }
.notice-inline { background: var(--gold-soft); color: var(--gold-ink); padding: 12px 14px; border-radius: var(--r-sm); margin: 0 0 24px; font-weight: 600; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 6px; padding: 0; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { display: inline-block; }
.dim-table tr.sep th, .dim-table tr.sep td { border-top: 1.5px solid var(--ink); }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 15px; min-width: 620px; table-layout: fixed; }
.heat col.c-name { width: 130px; } .heat col.c-n { width: 56px; }
.heat thead th { font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 4px; text-align: center; }
.heat thead th:first-child { text-align: left; }
.heat th[scope=row] { text-align: left; padding: 10px 8px 10px 0; font-weight: 700; white-space: nowrap; }
.heat td { text-align: center; padding: 10px 4px; border-radius: 4px; font-weight: 700; }
.heat td.total { font-weight: 900; }
.heat .h0 { background: #eef2f8; color: var(--ink); }
.heat .h1 { background: #c9d5e6; color: var(--ink); }
.heat .h2 { background: #9fb3cf; color: var(--ink); }
.heat .h3 { background: #4a6894; color: var(--white); }
.heat .h4 { background: #14305e; color: var(--white); }
.heat .hidden-row td.muted { text-align: left; font-weight: 500; background: var(--paper); }
.heat-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.heat-legend li { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend i { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
.heat-legend .h0 { background: #eef2f8; } .heat-legend .h1 { background: #c9d5e6; } .heat-legend .h2 { background: #9fb3cf; } .heat-legend .h3 { background: #4a6894; } .heat-legend .h4 { background: #14305e; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 172px 1fr 48px; align-items: center; gap: 10px; font-size: 15px; }
.hbars .bar { height: 12px; border-radius: 3px; }
.hbars .bar i { border-radius: 3px; }
.hbars .val { text-align: right; font-weight: 800; }
.voice-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--paper); border-radius: var(--r-sm); }
.voice-bar p { margin: 0; color: var(--ink-2); max-width: 46em; font-size: var(--fs-sm); }
.voices { list-style: none; margin: 0; padding: 0; }
.voices li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.voices .check { margin: 0; }
.voices .edit { width: 100%; margin-top: 8px; border: 1.5px solid var(--axis); border-radius: var(--r-sm); padding: 8px 10px; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; z-index: 20; }

@media (max-width: 900px) {
  .two-col, .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis div:nth-child(3) { padding-left: 0; border-left: 0; }
  .kpis div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .likert.six { grid-template-columns: 1fr; }
  .likert .dk { margin-left: 0; margin-top: 4px; }
  .tier-opts { grid-template-columns: 1fr; }
  .facts-list div { grid-template-columns: 1fr; gap: 2px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .kpis.big { grid-template-columns: 1fr; }
  .kpis.big div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .hbars li { grid-template-columns: 110px 1fr 42px; font-size: 14px; }
  table.list .actions { white-space: normal; }
}


/* ---------- 실행계획 편집 ---------- */
.plan-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--paper); border-radius: var(--r-sm); }
.plan-bar p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.plan-bar b { color: var(--ink); margin-right: 6px; }
.sep-dot::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); margin: 0 10px 3px; }
.warns { list-style: none; margin: 14px 0 0; padding: 12px 16px; background: var(--gold-soft); color: var(--gold-ink); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; display: grid; gap: 4px; }
.warns li::before { content: '확인 '; font-weight: 800; }
.plan-kpis { grid-template-columns: repeat(3, 1fr) 1.6fr; }
.plan-kpis b { font-size: var(--fs-lg); font-weight: 900; }
.finding { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 8px; margin-bottom: 8px; }
.finding label { font-weight: 900; color: var(--axis); padding-top: 10px; margin: 0; }
.finding textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; }
.plan-items { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 980px; }
.plan-items thead th { font-size: 13px; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 6px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.plan-items td:last-child { white-space: nowrap; width: 64px; }
.plan-items td.r { white-space: nowrap; }
.plan-items td, .plan-items th[scope=row] { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.plan-items th[scope=row] { min-width: 210px; font-weight: 400; }
.plan-items th[scope=row] b { display: block; font-weight: 800; }
.plan-items small { display: block; font-size: 12.5px; color: var(--muted); }
.plan-items .custom { color: var(--gold-ink); font-weight: 700; }
.plan-items select, .plan-items input { border: 1.5px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--white); font-size: 14px; }
.plan-items input[type=number] { width: 72px; }
.plan-items input[data-k=memo] { width: 100%; min-width: 140px; margin-top: 4px; }
.plan-items input[data-k=name] { width: 100%; font-weight: 700; }
.plan-items select:focus, .plan-items input:focus { border-color: var(--axis); outline: none; box-shadow: 0 0 0 3px var(--axis-soft); }
.plan-items .why-s { color: var(--ink-2); }
.plan-items .nowrap { white-space: nowrap; }
.plan-items tr.ph-head th { background: var(--ink); color: var(--white); text-align: left; padding: 9px 12px; font-size: 14px; font-weight: 800; }
.plan-items tr.ph-head span { font-weight: 500; color: #c5cfdd; margin-left: 8px; }
.plan-items tr.row-task th[scope=row] b, .plan-items tr.row-recheck th[scope=row] b { font-weight: 700; }
.btn.xs { min-height: 30px; padding: 4px 8px; font-size: 13px; margin-left: 4px; }
.add-rows { display: grid; gap: 10px; margin-top: 16px; }
.add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.add-row label { font-weight: 700; font-size: var(--fs-sm); min-width: 70px; }
.add-row select, .add-row input { border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--white); max-width: 100%; }
.add-row input { min-width: 240px; }
.regen { padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- 타임라인 ---------- */
.timeline { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 820px; table-layout: fixed; }
.timeline .t-name { width: 260px; text-align: left; }
.timeline thead th { font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 6px 2px; text-align: center; }
.timeline thead th.ph { color: var(--ink); border-bottom: 3px solid var(--axis); text-align: left; padding-left: 6px; }
.timeline thead th.ph1 { border-bottom-color: #c9d5e6; } .timeline thead th.ph2 { border-bottom-color: #4a6894; } .timeline thead th.ph3 { border-bottom-color: #14305e; }
.timeline tbody th { text-align: left; padding: 7px 8px 7px 0; font-weight: 400; border-bottom: 1px solid var(--line); }
.timeline tbody th b { display: block; font-weight: 700; line-height: 1.3; }
.timeline tbody th small { font-size: 12px; color: var(--muted); }
.timeline td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; padding: 4px 2px; height: 40px; }
.timeline td:nth-child(5), .timeline td:nth-child(10) { border-left: 2px solid var(--muted); }
.timeline td.on span:first-child { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 6px; background: var(--axis-soft); color: var(--axis); font-weight: 800; }
.timeline td.on.crowd span:first-child { background: var(--axis); color: var(--white); }
.timeline td.mark span { display: inline-block; white-space: nowrap; font-size: 11.5px; font-weight: 800; color: var(--gold-ink); background: var(--gold-soft); border-radius: 4px; padding: 2px 4px; }
.timeline tr.t-recheck td.mark span { color: var(--white); background: var(--ink); }

/* ---------- 리포트 ---------- */
.report { max-width: 1000px; }
.r-cover { padding: 56px 0 40px; border-bottom: 2px solid var(--ink); }
.r-kicker { font-weight: 900; letter-spacing: .12em; color: var(--axis); margin: 0 0 14px; }
.r-cover h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.22; margin: 0 0 28px; font-weight: 800; letter-spacing: -.02em; }
.r-meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 40px; margin: 0; }
.r-meta dt { font-size: 13px; color: var(--muted); }
.r-meta dd { margin: 2px 0 0; font-weight: 700; }
.r-sec { padding: 44px 0 8px; }
.r-sec > h2 { display: flex; align-items: baseline; gap: 12px; font-size: var(--fs-xl); font-weight: 800; margin: 0 0 18px; }
.r-no { font-size: 15px; font-weight: 900; color: var(--white); background: var(--axis); border-radius: 6px; padding: 2px 9px; transform: translateY(-4px); }
.r-sec > .sub { color: var(--muted); margin: 0 0 18px; }
.r-h3 { font-size: var(--fs-md); font-weight: 800; margin: 28px 0 12px; }
.grid-2 .r-h3 { margin-top: 0; }
.quote { margin: 0 0 10px; padding: 10px 16px; border-left: 4px solid var(--gold); background: var(--paper); color: var(--ink-2); border-radius: 0 6px 6px 0; }
.method { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); }
.r-close { margin: 56px 0 72px; padding-top: 24px; border-top: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.r-close p { margin: 0; }
.r-close .r-kicker { margin: 0; }

@media (max-width: 900px) {
  .plan-kpis { grid-template-columns: 1fr 1fr; }
  .r-meta { grid-template-columns: 1fr 1fr; }
  .r-close { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .r-meta { grid-template-columns: 1fr; }
  .add-row input { min-width: 0; flex: 1 1 100%; }
}
@media print {
  .report-page .top, .report-page .notice { display: none !important; }
  .report { max-width: none; }
  .r-cover { padding: 0 0 18px; }
  .r-cover h1 { font-size: 24pt; margin-bottom: 14px; }
  .r-sec { padding: 18px 0 0; }
  .r-sec > h2 { font-size: 15pt; margin-bottom: 10px; }
  .r-sec > h2, .r-h3, .block > h2 { break-after: avoid; }
  .r-sec > .sub { break-after: avoid; }
  .position, .dims-grid, .tasks li, .course { break-inside: avoid; }
  .timeline td.mark span { font-size: 7pt; padding: 1px 2px; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .grid-2 > .block { margin-top: 12px; break-inside: avoid; }
  .kpis.big { grid-template-columns: repeat(3, 1fr); }
  .timeline { min-width: 0; font-size: 9pt; }
  .timeline .t-name { width: 34%; }
  .timeline td { height: 26px; }
  .timeline tr { break-inside: avoid; }
  .heat { min-width: 0; font-size: 9.5pt; }
  .heat td { padding: 5px 2px; }
  .r-close { margin: 24px 0 0; break-inside: avoid; }
  .quote { break-inside: avoid; }
  .hbars li { grid-template-columns: 130px 1fr 40px; font-size: 9.5pt; gap: 6px; }
  .r-meta { grid-template-columns: repeat(4, auto); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 인쇄 (A4 세로) ---------- */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { font-size: 9.5pt; line-height: 1.5; }
  .top nav, .notice, .gate, .consult, .end-actions, .no-print, .btn, .foot { display: none !important; }
  .top .wrap { height: 36px; }
  .wrap { padding: 0; max-width: none; }
  .result { padding: 0; }
  .result-head { margin-bottom: 10px; }
  .result-head h1 { font-size: 17pt; }
  .position { grid-template-columns: 250px 1fr; gap: 22px; padding: 12px; background: none; break-inside: avoid; }
  .verdict .lv-name { font-size: 26pt; }
  .verdict .lv-desc { margin-bottom: 10px; }
  .verdict .type { margin-top: 10px; padding-top: 10px; }
  .verdict .type b, .indices b { font-size: 13pt; }
  .block { margin-top: 18px; }
  .block > h2 { font-size: 13pt; }
  .block > .sub { margin-bottom: 8px; }
  .dims-grid { grid-template-columns: 230px 1fr; gap: 20px; break-inside: avoid; }
  .dim-table th, .dim-table td { padding: 5px 6px; }
  .dim-table .axis-cell { display: table-cell; }
  .interp li { grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; break-inside: avoid; }
  .courses { gap: 8px; }
  .course { padding: 10px 14px; break-inside: avoid; }
  .course h3 { font-size: 11pt; }
  .course p { margin: 0 0 1px; }
  .course .meta { margin-bottom: 4px; }
  .course .why { margin-top: 4px; }
  .interp li { padding: 5px 0; }
  .tasks li { padding: 8px 12px; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
