:root {
  --paper: #f4efe4;
  --card: #fbf8f1;
  --ink: #1f2a24;
  --sub: #5a5f56;
  --line: #d8cfbc;
  --gut: #b5452c;
  --heart: #a3456b;
  --head: #2b6a6e;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* 머리띠 */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.mark svg { width: 30px; height: 30px; color: var(--ink); }
.bar nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--sub); }
.bar nav a:hover { color: var(--ink); }
.bar nav a.go { color: var(--paper); background: var(--ink); padding: 7px 14px; border-radius: 3px; }

/* 버튼 */
.btn { display: inline-block; background: var(--ink); color: var(--paper); border: 0; border-radius: 3px; padding: 12px 22px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: #33433a; }
.btn.big { padding: 16px 30px; font-size: 18px; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 3px; padding: 9px 16px; cursor: pointer; color: var(--sub); }
.ghost:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.ghost:disabled { opacity: .4; cursor: default; }
.link { color: var(--sub); }

.eyebrow { margin: 0 0 12px; font-size: 14px; letter-spacing: .04em; color: var(--sub); }
.lead { font-size: 19px; color: #3b433d; margin: 18px 0 0; max-width: 40em; }

/* 히어로 */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: -.02em; }
.hero-act { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 30px; }
.resume { margin-top: 18px; font-size: 15px; color: var(--sub); }
.resume button { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* 도형 */
.ennea { width: 100%; height: auto; display: block; overflow: visible; }
.ennea .ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ennea line { stroke: var(--ink); stroke-width: 1; opacity: .45; }
.ennea line.hot { opacity: 1; stroke-width: 2; }
.ennea .node { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; transition: fill .15s; }
.ennea .node.on, .ennea a:hover .node { fill: currentColor; }
.ennea .node.on + .num, .ennea a:hover .num { fill: #fff; }
.ennea .c-gut { color: var(--gut); } .ennea .c-heart { color: var(--heart); } .ennea .c-head { color: var(--head); }
.ennea .num { font-family: var(--serif); font-weight: 700; font-size: 20px; text-anchor: middle; fill: var(--ink); pointer-events: none; }
.ennea .lab { font-size: 14px; fill: var(--sub); }
.ennea a { cursor: pointer; }
.hero-fig { max-width: 460px; justify-self: center; width: 100%; }

/* 검사 */
.quiz { max-width: 760px; padding-top: 48px; padding-bottom: 72px; min-height: 70vh; }
.quiz-top { display: flex; align-items: center; gap: 16px; }
.quiz-count { font-size: 15px; color: var(--sub); white-space: nowrap; }
.quiz-count b { font-family: var(--serif); font-size: 26px; color: var(--ink); }
.quiz-bar { flex: 1; height: 4px; background: var(--line); }
.quiz-bar i { display: block; height: 100%; background: var(--ink); transition: width .2s; }
.quiz-hint { margin: 40px 0 10px; font-size: 14px; color: var(--sub); }
.quiz-q { font-size: clamp(24px, 4.2vw, 34px); min-height: 3.2em; outline: none; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 28px; }
.scale button { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 18px 6px 14px; cursor: pointer; font-size: 14px; color: var(--sub); }
.scale button i { display: block; border: 1.5px solid var(--ink); border-radius: 50%; }
.scale button:nth-child(1) i, .scale button:nth-child(5) i { width: 30px; height: 30px; }
.scale button:nth-child(2) i, .scale button:nth-child(4) i { width: 24px; height: 24px; }
.scale button:nth-child(3) i { width: 18px; height: 18px; }
.scale button:hover { border-color: var(--ink); color: var(--ink); }
.scale button.picked { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.scale button.picked i { background: var(--paper); border-color: var(--paper); }
.quiz-foot { display: flex; justify-content: space-between; margin-top: 28px; }

/* 본문 블록 */
.prose-wrap { max-width: 860px; padding-bottom: 40px; }
.block { padding: 48px 0; border-top: 1px solid var(--line); }
.block h2, .doc-body h2 { font-size: clamp(24px, 3.4vw, 30px); margin-bottom: 16px; }
.block p, .doc-body p { margin: 0 0 14px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; column-gap: 8px; }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--serif); font-size: 34px; line-height: 1; }
.steps b { font-size: 18px; }
.steps span { color: #3b433d; }

.chip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 17px; flex: none; }
.chip.c-gut, .bt i.c-gut { background: var(--gut); } .chip.c-heart, .bt i.c-heart { background: var(--heart); } .chip.c-head, .bt i.c-head { background: var(--head); }
.type-grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-grid a { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; row-gap: 2px; height: 100%; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; text-decoration: none; }
.type-grid a:hover { border-color: var(--ink); }
.type-grid .chip { grid-row: span 2; }
.type-grid b { font-size: 16px; }
.type-grid span:not(.chip) { font-size: 14px; color: var(--sub); line-height: 1.55; }

.centers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.center { padding: 18px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid; border-radius: 3px; }
.center.c-gut { border-top-color: var(--gut); } .center.c-heart { border-top-color: var(--heart); } .center.c-head { border-top-color: var(--head); }
.center b { font-family: var(--serif); font-size: 19px; display: block; }
.center b small { font-family: var(--sans); font-weight: 400; font-size: 14px; color: var(--sub); margin-left: 8px; }
.center p { margin: 4px 0 8px !important; font-weight: 600; }
.center span { font-size: 15px; color: #3b433d; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--serif); font-size: 22px; line-height: 1; color: var(--sub); }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 0 0 18px !important; color: #3b433d; }

/* 문서 */
.doc { padding-top: 32px; padding-bottom: 64px; }
.crumb { font-size: 14px; color: var(--sub); display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--sub); }
.doc-head { padding: 32px 0 36px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(34px, 5.6vw, 56px); letter-spacing: -.015em; }
.type-head { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; }
.big-num { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; color: #fff; margin-right: .3em; font-size: .9em; vertical-align: -.12em; }
.big-num.c-gut { background: var(--gut); } .big-num.c-heart { background: var(--heart); } .big-num.c-head { background: var(--head); }
.doc-body { max-width: 760px; }
.doc-body > section { padding: 36px 0 8px; }
.doc-body h3 { font-size: 20px; margin: 22px 0 8px; }
.doc-body h4 { font-size: 18px; margin-bottom: 6px; }
.doc-body h2 + h3 { margin-top: 0; }
.doc-body section h2:not(:first-child) { margin-top: 32px; }
.motive { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.motive div { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; }
.motive dt { font-size: 14px; color: var(--sub); }
.motive dd { margin: 4px 0 0; font-weight: 600; line-height: 1.5; }
.ticks { padding: 0; margin: 0; list-style: none; }
.ticks li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px dashed var(--line); }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 50%; }
.wing-pair, .arrows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.wing-pair > div, .arrows > div { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; }
.wing-pair h3, .arrows h3 { margin: 0 0 6px; font-size: 19px; }
.wing-pair p, .arrows p { font-size: 16px; margin-bottom: 8px !important; }
.arrows a { font-size: 15px; }
.wing-row { padding: 20px 0; border-top: 1px solid var(--line); }
.wing-row h3 { margin: 0 0 10px; }
.wing-row h3 a { text-decoration: none; }
.side-fig { float: right; width: 260px; margin: 0 0 12px 24px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 700px; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; color: var(--sub); font-weight: 600; background: var(--paper); }
tbody th a { white-space: nowrap; }
.cta { margin: 40px 0 0; padding: 26px; border: 1.5px solid var(--ink); border-radius: 3px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta p { margin: 0 !important; font-family: var(--serif); font-size: 19px; flex: 1 1 260px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.pager a { padding: 16px; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; font-weight: 600; }
.pager a:last-child { text-align: right; }
.pager a:hover { border-color: var(--ink); }
.pager small { display: block; font-weight: 400; color: var(--sub); font-size: 13px; }

/* 결과 */
.result { padding-top: 40px; padding-bottom: 64px; }
.res-head { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.res-head h1 { font-size: clamp(34px, 5.6vw, 56px); }
.res-head h1 small { display: block; font-family: var(--sans); font-weight: 500; font-size: 18px; color: var(--sub); margin-top: 10px; }
.res-block { padding: 32px 0 8px; }
.res-block h2 { font-size: 24px; margin-bottom: 10px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.muted { color: var(--sub); font-size: 15px; }
.bars { list-style: none; padding: 0; margin: 16px 0 0; max-width: 760px; }
.bars a { display: grid; grid-template-columns: 130px 1fr 40px; gap: 14px; align-items: center; padding: 7px 0; text-decoration: none; }
.bars .bl { font-size: 15px; }
.bars li.top .bl { font-weight: 700; }
.bars b, .center-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.bt { display: block; height: 12px; background: #e6dfcf; border-radius: 2px; overflow: hidden; }
.bt i { display: block; height: 100%; }
.bars li:not(.top) .bt i { opacity: .45; }
.center-bars { list-style: none; padding: 0; margin: 0; }
.center-bars li { display: grid; grid-template-columns: 80px 1fr 44px; gap: 10px; align-items: center; padding: 6px 0; font-size: 15px; }
.note { font-size: 15px; color: var(--sub); margin-top: 24px; }
.empty { font-size: 18px; margin: 20px 0; }

/* 바닥 */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 32px; font-size: 15px; color: var(--sub); }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot-name { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ink); margin: 0 0 6px; }
.foot-brand p:last-child { margin: 0; }
.foot nav { display: flex; flex-direction: column; gap: 4px; }
.foot-types { display: grid !important; grid-template-columns: 1fr 1fr; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { margin-top: 28px; font-size: 13px; }

@media (max-width: 860px) {
  .hero, .type-head, .res-head { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; gap: 24px; }
  .hero-fig { max-width: 340px; order: -1; }
  .type-fig { max-width: 240px; }
  .res-fig { max-width: 300px; }
  .type-grid, .centers { grid-template-columns: 1fr 1fr; }
  .res-grid { grid-template-columns: 1fr; gap: 0; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .bar { padding-left: 16px; padding-right: 16px; }
  .bar { flex-wrap: wrap; gap: 8px 16px; }
  .bar nav { gap: 14px; font-size: 14px; flex-wrap: wrap; }
  .bar nav a.go { padding: 5px 10px; }
  .lead { font-size: 17px; }
  .hero-fig { max-width: 280px; }
  .type-grid, .centers, .motive, .wing-pair, .arrows, .pager { grid-template-columns: 1fr; }
  .scale { grid-template-columns: 1fr; gap: 6px; }
  .scale button { flex-direction: row; padding: 13px 16px; font-size: 16px; gap: 14px; }
  .scale button i { width: 20px !important; height: 20px !important; }
  .quiz { padding-top: 28px; }
  .quiz-hint { margin-top: 26px; }
  .quiz-q { min-height: 4.2em; }
  .side-fig { float: none; width: 220px; margin: 0 auto 12px; }
  .bars a { grid-template-columns: 104px 1fr 32px; gap: 10px; }
  .cta { padding: 20px; }
}
.pairs { margin: 20px 0 0; display: grid; gap: 10px; }
.pairs div { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; }
.pairs dt { font-family: var(--serif); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.pairs dt a { text-decoration: none; }
.pairs dd { margin: 0; color: #3b433d; }
