/* =========================================================
   NAT 인적성검사 결과표 — 인쇄용 A4 보고서 스타일시트
   ========================================================= */

:root {
  --ink:        #16202b;
  --ink-soft:   #3d4a58;
  --muted:      #78848f;
  --line:       #dbe1e7;
  --line-soft:  #eaeef2;
  --paper:      #ffffff;
  --canvas:     #eef1f5;

  --brand:      #1f5d8c;
  --brand-dark: #123a56;
  --brand-tint: #eaf2f8;

  --ok:         #1d8a5f;
  --ok-tint:    #e6f5ee;
  --up:         #1d7fd0;
  --down:       #d8663a;
  --low:        #c9552f;
  --mid:        #d9a52c;
  --high:       #1d8a5f;

  --radius:     10px;
  --shadow:     0 1px 2px rgba(22,32,43,.05), 0 12px 28px -18px rgba(22,32,43,.25);

  --font:       'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-num:   'Barlow Condensed', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 34px 16px 96px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===================== 툴바 ===================== */
.toolbar {
  position: sticky; top: 0; z-index: 50;
  max-width: 900px; margin: 0 auto 26px;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 26px -20px rgba(22,32,43,.4);
}
.toolbar__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.toolbar__logo {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: #fff; font-family: var(--font-num); font-weight: 700;
  font-size: 15px; letter-spacing: .06em;
}
.toolbar__text { display: flex; flex-direction: column; min-width: 0; }
.toolbar__text strong { font-size: 14.5px; font-weight: 700; }
.toolbar__text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s;
}
.btn--ghost { color: var(--ink-soft); border-color: var(--line); background: #fff; }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand); border-color: #b9d4e6; }
.btn--ghost.is-current { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.btn--ghost.is-active { background: var(--brand-tint); color: var(--brand); border-color: #b9d4e6; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }

/* ===================== 문서 / A4 시트 ===================== */
.doc { max-width: 900px; margin: 0 auto; }

.sheet {
  position: relative;
  width: 100%;
  min-height: 1180px;
  padding: 42px 46px 52px;
  margin-bottom: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand) 45%, #7fb3d6);
}
.sheet:last-of-type { margin-bottom: 0; }

.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase;
}
.sheet__page { flex: 0 0 auto; }

/* ===================== 타이틀 ===================== */
.doc-title {
  margin: 0 0 26px;
  font-size: 30px; line-height: 1.18; font-weight: 900; letter-spacing: -.01em;
  text-align: center; color: var(--brand-dark);
}
.doc-title span {
  display: block; margin-top: 8px;
  font-family: var(--font-num);
  font-size: 13px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}

/* ===================== 수험자 정보 ===================== */
.idcard {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; margin: 0 0 30px;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.idcard__cell { background: #fff; padding: 12px 10px; text-align: center; }
.idcard__cell dt { font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-bottom: 4px; }
.idcard__cell dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }

/* ===================== 블록 / 섹션 ===================== */
.block { margin-bottom: 28px; }
.block:last-child { margin-bottom: 0; }

.block__title {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font-size: 16px; font-weight: 700; color: var(--brand-dark);
}
.block__title small {
  font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: .01em;
}
.block__letter {
  flex: 0 0 auto;
  display: grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 5px;
  border-radius: 6px;
  background: var(--brand); color: #fff;
  font-family: var(--font-num); font-size: 13px; font-weight: 700;
}

.subblock { margin-top: 20px; }
.subblock__title {
  margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  padding-bottom: 6px; border-bottom: 1px dashed var(--line);
}

/* ===================== A. 종합 판정 ===================== */
.verdict {
  display: grid; grid-template-columns: 1.35fr repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.verdict__score,
.verdict__cell {
  background: #fff; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 3px;
}
.verdict__score {
  background: linear-gradient(160deg, var(--brand-tint), #fff 70%);
  border-left: 4px solid var(--brand);
}
.verdict__cell--pass { background: var(--ok-tint); border-top: 3px solid var(--ok); }

.verdict__label { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.verdict__value {
  font-family: var(--font-num); font-size: 40px; font-weight: 700; line-height: 1;
  color: var(--brand-dark);
}
.verdict__value small { font-size: 15px; font-weight: 600; margin-left: 2px; }
.verdict__big {
  font-family: var(--font-num); font-size: 34px; font-weight: 700; line-height: 1;
  color: var(--brand);
}
.verdict__big small { font-size: 13px; font-weight: 600; color: var(--muted); }
.verdict__big--text { font-family: var(--font); font-size: 21px; font-weight: 800; }
.verdict__cell--pass .verdict__big { color: var(--ok); }
.verdict__meta { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* 안내 문구 */
.note {
  margin: 12px 0 0; padding: 11px 14px;
  border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  background: #f6f8fa; color: var(--ink-soft); border-left: 3px solid var(--muted);
}
.note strong { margin-right: 6px; }
.note--pass { background: var(--ok-tint); border-left-color: var(--ok); color: #10603f; }
.note--strong { background: var(--brand-tint); border-left-color: var(--brand); color: var(--brand-dark); font-size: 13px; }

/* ===================== B. 합격 판정 기준 표 ===================== */
.crit-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.crit-table thead th {
  background: #f4f7f9; color: var(--ink-soft);
  font-size: 12px; font-weight: 700; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.crit-table thead th em { display: block; font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--muted); }
.crit-table tbody th {
  padding: 11px 12px; text-align: left; font-weight: 700; font-size: 13px;
  border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.crit-table tbody td {
  padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
.crit-table tbody tr:last-child th,
.crit-table tbody tr:last-child td { border-bottom: 0; }
.crit-table tbody tr:nth-child(even) { background: #fbfcfd; }
.crit-table td:nth-child(3) { color: var(--muted); white-space: nowrap; font-size: 12px; }

.crit-table td:nth-child(2) { min-width: 190px; }
.val {
  font-family: var(--font-num); font-size: 15px; font-weight: 700;
  color: var(--brand-dark); margin-left: 8px; vertical-align: middle;
}

/* 게이지 (회색 점선 = 합격 차단 기준선) */
.gauge {
  position: relative; display: inline-block; vertical-align: middle;
  width: 120px; height: 9px; border-radius: 5px;
  background: #eef1f4; overflow: visible;
}
.gauge::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  border-radius: 5px;
  background: linear-gradient(90deg, #4c9bd1, var(--brand));
}
.gauge::after { /* 차단 기준선 */
  content: ""; position: absolute; top: -3px; bottom: -3px;
  left: var(--cut, 0%);
  border-left: 2px dashed #9aa5b0;
}

.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.pill--ok { background: var(--ok-tint); color: var(--ok); border: 1px solid #bfe4d2; }

.footnote { margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }

/* ===================== C. 검사결과 분석 ===================== */
.analysis {
  padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); background: #fcfdfe;
}
.analysis__sub { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.analysis p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-soft); text-align: justify; }

/* ===================== D. 추천 면접 질문 ===================== */
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qlist__item {
  padding: 13px 16px; border: 1px solid var(--line);
  border-top: 3px solid var(--brand); border-radius: var(--radius); background: #fff;
}
.qlist__head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.qlist__no {
  font-family: var(--font-num); font-size: 12px; font-weight: 700; letter-spacing: .05em;
  background: var(--brand-dark); color: #fff; padding: 2px 8px; border-radius: 5px;
}
.qlist__key { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.qlist__item p { margin: 0; font-size: 13px; line-height: 1.72; color: var(--ink-soft); }

/* ===================== 2p. 종합판정 결과표 ===================== */
.final {
  display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: stretch;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, #fbfdfe, #fff 60%);
}
.final__visual { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.final__gauge {
  width: 158px; height: 158px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(closest-side, #fff 74%, transparent 75% 100%),
    conic-gradient(var(--brand) calc(var(--pct, 62.55) * 1%), #e7ecf1 0);
  border: 1px solid var(--line);
}
.final__gauge-val { font-family: var(--font-num); font-size: 40px; font-weight: 700; line-height: 1; color: var(--brand-dark); }
.final__gauge-cap { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.final__badge {
  margin: 0; padding: 5px 14px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-dark); font-size: 13px; font-weight: 800;
}
.final__rel { margin: 0; font-size: 11.5px; color: var(--muted); }

.statlist { margin: 0; display: grid; gap: 1px; background: var(--line-soft); border-radius: 8px; overflow: hidden; }
.statlist__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: #fff;
}
.statlist__row dt { font-size: 12.5px; color: var(--muted); }
.statlist__row dt span { font-size: 11px; }
.statlist__row dd { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.statlist__row dd b { font-family: var(--font-num); font-size: 18px; font-weight: 700; color: var(--brand-dark); }

/* ===================== B. 인성 종합 결과표 카드 ===================== */
.domain-cards {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.domain-card {
  padding: 13px 13px 11px; border: 1px solid var(--line);
  border-top: 3px solid var(--brand); border-radius: var(--radius); background: #fff;
}
.domain-card--top { border-top-color: var(--high); background: #f7fdf9; }
.domain-card--low { border-top-color: var(--low); background: #fdf9f7; }
.domain-card__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.domain-card__head h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.grade {
  font-family: var(--font-num); font-size: 13px; font-weight: 700;
  padding: 1px 7px; border-radius: 5px; color: #fff; background: var(--brand);
}
.grade--bplus { background: var(--high); }
.grade--bminus { background: var(--mid); }
.domain-card__eval { margin: 4px 0 0; font-size: 11.5px; font-weight: 600; color: var(--brand); }
.domain-card__rank { margin: 1px 0 9px; font-size: 11px; color: var(--muted); }
.domain-card__rank span { color: #9aa5b0; }
.domain-card__score { margin: 5px 0 0; font-family: var(--font-num); font-size: 17px; font-weight: 700; color: var(--brand-dark); text-align: right; }

/* 막대 미터 */
.meter {
  position: relative; height: 10px; border-radius: 5px;
  background: #eef1f4; overflow: hidden;
}
.meter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, #6aa9d4, var(--brand));
}
.domain-card--top .meter::before { background: linear-gradient(90deg, #56b98a, var(--high)); }
.domain-card--low .meter::before { background: linear-gradient(90deg, #e08a68, var(--low)); }

.cutline-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0 0 18px; padding: 9px 13px;
  border: 1px dashed var(--line); border-radius: 8px;
  font-size: 11.5px; color: var(--ink-soft);
  background: #fbfcfd;
}
.cutline-legend__item::before {
  content: ""; display: inline-block; width: 10px; height: 10px;
  border-radius: 3px; margin-right: 6px; vertical-align: -1px;
}
.cutline-legend--low::before { background: var(--low); }
.cutline-legend--mid::before { background: var(--mid); }
.cutline-legend--high::before { background: var(--high); }
.cutline-legend__avg { margin-left: auto; color: var(--muted); }
.cutline-legend__avg::before {
  content: ""; display: inline-block; width: 14px; height: 0;
  border-top: 2px dashed #9aa5b0; margin-right: 7px; vertical-align: 3px;
}

/* ===================== 막대 차트 (패기 등 4영역) ===================== */
.chart-box { margin: 0 0 8px; }
.chart-box__cap {
  font-size: 11.5px; color: var(--muted); text-align: center; margin-bottom: 10px;
}
.bar-chart {
  --pad-bottom: 30px;
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  height: 230px; padding: 0 18px var(--pad-bottom);
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(to top, var(--line-soft) 0 1px, transparent 1px 25%);
}
.bar-chart::after { /* 평균 50 기준선 (그래프 영역의 정중앙) */
  content: ""; position: absolute; left: 0; right: 0;
  top: calc((100% - var(--pad-bottom)) / 2);
  border-top: 2px dashed rgba(154,165,176,.85);
}

/* =========================================================
   A4 인쇄 미리보기 / 자동 맞춤(scale-to-fit)
   body.is-previewing 일 때 print.css(media=all)와 함께 동작합니다.
   ========================================================= */
body.is-previewing,
body.is-printing { padding: 26px 12px 80px; background: #dfe3e8; }
body.is-previewing .doc,
body.is-printing .doc { max-width: none; display: flex; flex-direction: column; align-items: center; }

body.is-previewing .sheet,
body.is-printing .sheet {
  width: var(--page-w, 186mm);
  height: var(--page-h, 272mm);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 3px 26px -12px rgba(22,32,43,.55);
  margin: 0 auto 18px;
}

/* 축소가 적용된 시트: 인쇄에서 동일하게 축소되도록 zoom 사용 */
.sheet.is-scaled {
  zoom: var(--fit-scale, 1);
}
body.is-previewing .sheet.is-scaled,
body.is-printing .sheet.is-scaled {
  width: calc(var(--page-w, 186mm) / var(--fit-scale, 1));
  height: calc(var(--page-h, 272mm) / var(--fit-scale, 1));
}

/* 맞춤 안내 배지 (화면 전용) */
.fit-hint {
  display: none;
  max-width: 900px; margin: 0 auto 16px;
  padding: 10px 14px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f0dfb0; color: #7a5a12;
  font-size: 12.5px;
}
body.has-scaled-sheets .fit-hint { display: block; }
@media print { .fit-hint { display: none !important; } }
.bar-chart__item {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
}
.bar-chart__col {
  width: 62%; max-width: 66px; height: var(--h, 0%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6aa9d4, var(--brand));
}
.bar-chart__val {
  position: absolute; bottom: var(--h, 0%); left: 0; right: 0;
  margin-bottom: 4px;
  font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--brand-dark);
  text-align: center;
}
.bar-chart__name {
  position: absolute; bottom: -26px; left: -6px; right: -6px;
  font-size: 11.5px; color: var(--ink-soft); text-align: center; line-height: 1.25;
}
/* 축 눈금 */
.axis-scale {
  display: flex; justify-content: space-between;
  padding: 0 18px; font-family: var(--font-num); font-size: 10.5px; color: var(--muted);
}

/* ===================== 등급 구간 ===================== */
.bandtiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.bandtier {
  padding: 11px 13px; border-radius: 8px; text-align: center;
  border: 1px solid var(--line); background: #fff;
}
.bandtier--high { border-top: 3px solid var(--high); }
.bandtier--mid  { border-top: 3px solid var(--mid); }
.bandtier--low  { border-top: 3px solid var(--low); }
.bandtier__name { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.bandtier__range { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 0 3px; }
.bandtier__codes { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: .04em; }

.grade8 { list-style: none; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 0; padding: 0; }
.grade8 li {
  text-align: center; padding: 8px 4px; border: 1px solid var(--line);
  border-radius: 7px; background: #fbfcfd;
}
.grade8 b { display: block; font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--brand-dark); }
.grade8 span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ===================== 3p. 수검자 태도 ===================== */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trust__card {
  position: relative; padding: 15px 16px 15px 62px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.trust__badge {
  position: absolute; left: 15px; top: 15px;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--ok-tint); color: var(--ok);
  font-family: var(--font-num); font-size: 20px; font-weight: 700;
  border: 1px solid #bfe4d2;
}
.trust__card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.trust__card h3 small { font-family: var(--font-num); color: var(--ok); font-size: 13px; }
.trust__card p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.62; }

/* ===================== D. 적응 유형 ===================== */
.typespectrum {
  list-style: none; display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin: 0 0 14px; padding: 0;
}
.typespectrum li {
  position: relative;
  padding: 16px 4px 9px; text-align: center;
  font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 7px 7px 3px 3px; background: #fbfcfd;
}
.typespectrum li::before {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 70%; height: 4px; border-radius: 3px 3px 0 0; background: #dfe5ea;
}
.typespectrum li.is-active {
  color: #fff; font-weight: 700;
  background: var(--brand); border-color: var(--brand);
  box-shadow: 0 8px 18px -12px rgba(31,93,140,.9);
}
.typespectrum li.is-active::before { background: rgba(255,255,255,.85); }

.quote {
  margin: 0; padding: 14px 18px;
  border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-tint);
  font-size: 13.5px; line-height: 1.78; color: var(--brand-dark);
}
.quote p { margin: 0; }

/* ===================== E. 하위 세부 능력 ===================== */
.chart-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0 0 14px; font-size: 11.5px; color: var(--ink-soft);
}
.chart-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend__note { margin-left: auto; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.swatch--low { background: var(--low); }
.swatch--mid { background: var(--mid); }
.swatch--high { background: var(--high); }
.swatch--avg { background: #9aa5b0; }

.subscale-groups { display: grid; gap: 14px; }
.subscale {
  padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.subscale__title {
  margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px; font-weight: 700; color: var(--brand-dark);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.subscale__title small { font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--brand); }
.subscale__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.subscale__list li {
  display: grid; grid-template-columns: 92px 1fr 62px; align-items: center; gap: 12px;
}
.subscale__name { font-size: 12.5px; color: var(--ink-soft); }
.subscale__list b {
  font-family: var(--font-num); font-size: 14.5px; font-weight: 700; color: var(--brand-dark);
  text-align: right;
}

/* 미니 눈금 막대 (LOW / MIDDLE / HIGH) */
.mini {
  position: relative; height: 14px; border-radius: 4px;
  background: linear-gradient(90deg,
    #f6ece7 0 40%,
    #faf4e4 40% 60%,
    #ecf6f0 60% 100%);
  border: 1px solid var(--line-soft);
}
.mini::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  border-radius: 4px;
  background: linear-gradient(90deg, #c9552f, #d9a52c 42%, #1d8a5f 62%, #15734e);
  opacity: .88;
}
.mini::after { /* 평균 50 점선 */
  content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px;
  border-left: 2px dashed #8e99a4;
}
.axis-note {
  display: flex; justify-content: space-between;
  margin: 12px 0 2px; font-family: var(--font-num);
  font-size: 10px; letter-spacing: .16em; color: var(--muted);
}
.axis-note span:nth-child(2) { margin-left: -6px; }

/* ===================== 4p. 종합 소견 ===================== */
.findings { list-style: none; margin: 0; padding: 0; counter-reset: none; display: grid; gap: 9px; }
.findings__item {
  display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start;
  padding: 12px 15px 12px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.findings__item--warn { background: #fdfaf7; border-color: #f0dcd0; }
.findings__no {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
  font-family: var(--font-num); font-size: 14px; font-weight: 700;
  border: 1px solid #cfe1ee;
}
.findings__item--warn .findings__no { background: #fbeee6; color: var(--down); border-color: #f0d3c2; }
.findings__item p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--ink-soft); }

/* ===================== F. 직무적성 결과표 ===================== */
.rowchart { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rowchart__head {
  display: grid; grid-template-columns: 46px 156px 1fr 1.35fr;
  gap: 10px; padding: 9px 13px;
  background: #f4f7f9; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.rowchart__row {
  display: grid; grid-template-columns: 46px 156px 1fr 1.35fr;
  gap: 10px; align-items: center;
  padding: 9px 13px; border-bottom: 1px solid var(--line-soft);
}
.rowchart__row:last-child { border-bottom: 0; }
.rowchart__row:nth-child(even) { background: #fbfcfd; }
.rowchart__row[data-value="71.83"] { background: var(--brand-tint); }
.rowchart__rank {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--brand); color: #fff;
  font-family: var(--font-num); font-size: 12.5px; font-weight: 700;
}
.rowchart__row[data-value="66.78"] .rowchart__rank,
.rowchart__row[data-value="63.65"] .rowchart__rank { background: #5a8fb4; }
.rowchart__row[data-value="50.33"] .rowchart__rank,
.rowchart__row[data-value="52.02"] .rowchart__rank,
.rowchart__row[data-value="54.15"] .rowchart__rank { background: #9aa5b0; }
.rowchart__name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.rowchart__bar-wrap { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 10px; }
.rowchart__bar {
  position: relative; display: block; height: 12px; border-radius: 4px;
  background: #eef1f4; overflow: hidden;
}
.rowchart__bar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, #6aa9d4, var(--brand));
}
.rowchart__row[data-value="71.83"] .rowchart__bar::before { background: linear-gradient(90deg, #1d8a5f, #15734e); }
.rowchart__row[data-value="50.33"] .rowchart__bar::before,
.rowchart__row[data-value="52.02"] .rowchart__bar::before { background: linear-gradient(90deg, #e0a94a, #c9902c); }
.rowchart__bar-wrap b {
  font-family: var(--font-num); font-size: 14.5px; font-weight: 700; color: var(--brand-dark); text-align: right;
}
.rowchart__desc { font-size: 11.5px; line-height: 1.55; color: var(--muted); }

/* ===================== 5p. 비교 분석 ===================== */
.compare { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.compare__item {
  display: grid; grid-template-columns: 116px 1fr 74px; gap: 14px; align-items: center;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.compare__name { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.compare__bars { display: grid; gap: 6px; }
.compare__bar {
  position: relative; height: 17px; border-radius: 5px; background: #eef1f4;
  display: flex; align-items: center; padding: 0 8px; overflow: hidden;
}
.compare__bar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  background: rgba(154,165,176,.42);
}
.compare__bar--me::before { background: linear-gradient(90deg, rgba(31,93,140,.88), rgba(31,93,140,.62)); }
.compare__bar span { position: relative; font-size: 10.5px; color: var(--ink-soft); font-weight: 600; }
.compare__bar b { position: relative; margin-left: auto; font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.compare__bar--me span { color: #fff; }
.compare__bar--me b { color: #fff; }
.compare__delta {
  margin: 0; text-align: right;
  font-family: var(--font-num); font-size: 20px; font-weight: 700; line-height: 1.15;
}
.compare__delta--up { color: var(--up); }
.compare__delta--down { color: var(--down); }

.compare-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0;
  padding: 9px 13px; border: 1px dashed var(--line); border-radius: 8px;
  font-size: 11.5px; color: var(--ink-soft); background: #fbfcfd;
}
.compare-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ===================== 가이드라인 / 푸터 ===================== */
.guideline { padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fcfdfe; }
.guideline p { margin: 0 0 10px; font-size: 13px; line-height: 1.85; color: var(--ink-soft); text-align: justify; }
.guideline p:last-child { margin-bottom: 0; }

.foot-note {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--muted); text-align: center;
}

/* ===================== 맨 위로 ===================== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  font-size: 18px; box-shadow: 0 10px 24px -14px rgba(22,32,43,.55);
  opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--brand); color: #fff; }

/* =========================================================
   반응형 (화면 전용)
   ---------------------------------------------------------
   ※ 반드시 `screen and` 로 한정합니다.
     그렇지 않으면 A4 인쇄 시 페이지 폭(≈703px)이 이 브레이크포인트에
     걸려 '인쇄물이 모바일 레이아웃으로 출력되는' 문제가 생깁니다.
   ========================================================= */

/* 좁은 데스크톱 / 태블릿 가로 — 그리드는 유지하고 여백만 축소 */
@media screen and (max-width: 900px) {
  .sheet { padding: 34px 30px 42px; }
  .doc-title { font-size: 26px; }
  .rowchart__head, .rowchart__row { grid-template-columns: 40px 132px 1fr 1.35fr; gap: 8px; }
}

@media screen and (max-width: 640px) {
  body { padding: 20px 10px 84px; font-size: 14.5px; }
  .sheet { padding: 26px 20px 34px; min-height: 0; }

  .toolbar { border-radius: 12px; padding: 10px 12px; gap: 10px; }
  .toolbar__text span { display: none; }
  .toolbar__actions .btn--ghost { display: none; }
  .toolbar__actions .btn--file { display: inline-block; }

  .doc-title { font-size: 23px; }

  .idcard { grid-template-columns: repeat(2, 1fr); }
  .idcard__cell:last-child { grid-column: 1 / -1; }

  .verdict { grid-template-columns: 1fr 1fr; }
  .verdict__score { grid-column: 1 / -1; border-left: 0; border-top: 4px solid var(--brand); }

  .crit-table { font-size: 12px; }
  .crit-table thead th em { display: none; }
  .crit-table td:nth-child(2) { min-width: 0; }
  .gauge { width: 78px; }
  .val { display: block; margin: 4px 0 0; }

  .final { grid-template-columns: 1fr; gap: 16px; }
  .final__gauge { width: 138px; height: 138px; }

  .domain-cards { grid-template-columns: repeat(2, 1fr); }
  .grade8 { grid-template-columns: repeat(4, 1fr); }
  .bandtiers { grid-template-columns: 1fr; }

  .bar-chart { --pad-bottom: 34px; height: 190px; padding: 0 6px var(--pad-bottom); gap: 8px; }
  .bar-chart::after { top: calc((100% - var(--pad-bottom)) / 2); }
  .bar-chart__name { font-size: 10px; }
  .axis-scale { padding: 0 6px; }

  .trust { grid-template-columns: 1fr; }
  .typespectrum { grid-template-columns: repeat(4, 1fr); }
  .subscale__list li { grid-template-columns: 82px 1fr 58px; gap: 9px; }

  .compare__item { grid-template-columns: 1fr; gap: 8px; }
  .compare__delta { text-align: left; }

  .rowchart__head { display: none; }
  .rowchart__row {
    grid-template-columns: 30px 1fr;
    grid-template-areas: "rank name" "bar bar" "desc desc";
    gap: 7px; padding: 12px 13px;
  }
  .rowchart__rank { grid-area: rank; }
  .rowchart__name { grid-area: name; }
  .rowchart__bar-wrap { grid-area: bar; }
  .rowchart__desc { grid-area: desc; }

  .findings__item { grid-template-columns: 36px 1fr; gap: 9px; padding: 11px 13px; }
}

@media screen and (max-width: 430px) {
  .sheet { padding: 22px 15px 30px; }
  .verdict__value { font-size: 34px; }
  .verdict__big { font-size: 28px; }
  .domain-cards { grid-template-columns: 1fr; }
  .typespectrum { grid-template-columns: repeat(2, 1fr); }
  .subscale__list li { grid-template-columns: 74px 1fr; }
  .subscale__list b { grid-column: 2; text-align: left; }
  .grade8 { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================
   인쇄 — A4 1장 = 1시트
   ========================================================= */
/* =========================================================
   인쇄 / PDF 전용 규칙은 css/print.css 에 있습니다.
   (media="print" 로 별도 로드 — 인쇄 시 실제 A4 한 장에 맞춰집니다)
   ========================================================= */
