/* jaewoo 디자인 시스템 토큰 (흰 바탕 · 검정 헤드라인 · 포인트 색은 red 하나) */
:root {
  --red: #db082f;
  --black: #1a1a1a;
  --gray-900: #333333;
  --gray-600: #666666;
  --gray-400: #999999;
  --gray-200: #dddddd;
  --gray-050: #f7f7f7;
  --white: #ffffff;

  --sans: NanumSquare, Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: Roboto, NanumSquare, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, NanumSquare, monospace;

  --gutter: 24px;
  --content-max: 1200px;
  --desc-max: 860px;
  --header-height: 84px;
  --section-pad-top: 90px;
  --section-pad-bottom: 110px;
  --section-title-gap: 48px;
  --button-height: 46px;
  --button-pad-x: 22px;
  --radius-button: 3px;
  --hairline: 1px solid var(--gray-200);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--gray-900);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
code, pre, input[spellcheck="false"], textarea[spellcheck="false"] {
  font-family: var(--mono);
  letter-spacing: 0;
}
code { font-size: 0.9em; }
a { color: var(--black); }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 헤더 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: var(--hairline);
}
.header__inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo img { display: block; height: 30px; width: auto; mix-blend-mode: multiply; }
.header__label { font-weight: 700; color: var(--black); }

/* 첫 화면 */
.hero {
  background: var(--gray-050);
  border-bottom: var(--hairline);
  padding: 72px 0 80px;
  text-align: center;
}
.hero__role {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hero__title {
  margin: 0;
  color: var(--black);
  font-size: 42px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero__catch {
  margin: 6px 0 28px;
  color: var(--red);
  font-size: 28px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero__desc {
  max-width: var(--desc-max);
  margin: 0 auto;
  color: var(--gray-600);
  font-size: 19px;
  line-height: 1.85;
  letter-spacing: -0.03em;
}
.hero__desc code { color: var(--black); font-weight: 700; }

/* 2단 배치: 왼쪽 질문, 오른쪽 결과 */
.layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 64px var(--gutter) var(--section-pad-bottom);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}

/* 질문 단계: 섹션 제목 왼쪽의 red 세로 바가 시그니처 */
.step { padding: 0 0 56px; }
.step + .step { padding-top: 56px; border-top: var(--hairline); }
.step h2 {
  position: relative;
  margin: 0 0 24px;
  padding-left: 17px;
  color: var(--black);
  font-size: 24px;
  line-height: 1.6;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.step h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 26px;
  margin-top: -13px;
  background: var(--red);
}
.num {
  font-family: var(--display);
  font-weight: 700;
  margin-right: 10px;
  letter-spacing: 0.02em;
}
.hint { margin: 0 0 20px; color: var(--gray-600); font-size: 15px; }

fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-weight: 700; color: var(--black); }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.types legend { grid-column: 1 / -1; }
.type { position: relative; cursor: pointer; }
.type input { position: absolute; opacity: 0; }
.type span {
  display: block;
  height: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  transition: border-color 0.2s;
}
.type b { display: block; font-weight: 700; color: var(--black); }
.type small { color: var(--gray-600); font-size: 14px; }
.type:hover span { border-color: var(--gray-600); }
.type input:checked + span { border-color: var(--black); }
.type input:checked + span b::after { content: "  ✓"; color: var(--red); }
.type input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }

.field { display: block; margin-bottom: 18px; font-weight: 700; color: var(--black); }
.field small { display: block; font-weight: 400; color: var(--gray-600); font-size: 14px; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 400;
  color: var(--gray-900);
  background: var(--white);
  border: var(--hairline);
  border-radius: 0;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--black); outline: none; }
.field input[spellcheck="false"], .field textarea[spellcheck="false"] { font-size: 14px; }
.field textarea { resize: vertical; line-height: 1.6; }
.field ::placeholder { color: var(--gray-600); opacity: 0.7; }
.field.narrow { max-width: 420px; margin-top: 24px; }
.cmds { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.checks { display: grid; gap: 2px; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--black); flex: none; }
.check[hidden] { display: none; }
.tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  border: 1px solid var(--red);
  white-space: nowrap;
}

/* 결과 미리보기 */
.output {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-height) - 32px);
}
.tabs { display: flex; gap: 28px; border-bottom: var(--hairline); }
.tabs button {
  position: relative;
  font: inherit;
  font-weight: 700;
  padding: 10px 0 12px;
  color: var(--gray-600);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.tabs button:hover { color: var(--red); }
.tabs button[aria-selected="true"] { color: var(--black); }
.tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--red);
}
.sheet {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  background: var(--gray-050);
  border: var(--hairline);
}
.where {
  margin: 0;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--gray-600);
  border-bottom: var(--hairline);
  background: var(--white);
}
#pane {
  flex: 1;
  margin: 0;
  padding: 20px;
  overflow: auto;
  color: var(--gray-900);
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 360px;
}

/* 아웃라인 버튼: 시스템에서 유일하게 둥근 모서리(3px) */
.actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--button-height);
  padding: 0 var(--button-pad-x);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  background: var(--white);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.actions button:hover { background: var(--red); color: var(--white); }
.status { color: var(--gray-600); font-size: 14px; }

/* 푸터 */
.foot {
  border-top: var(--hairline);
  padding: 40px 0 56px;
  color: var(--gray-600);
  font-size: 14px;
}
.foot p { margin: 4px 0; }
.foot__logo { display: block; height: 22px; width: auto; opacity: 0.75; margin-bottom: 16px; mix-blend-mode: multiply; }
.foot .foot__contact { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 12px; color: var(--black); font-weight: 700; }
.foot__contact a { font-weight: 400; color: var(--gray-900); transition: color 0.2s; }
.foot__contact a:hover { color: var(--red); }
.foot__copy { font-family: var(--display); font-size: 13px; color: var(--gray-400); letter-spacing: 0; }

@media (max-width: 900px) {
  :root { --header-height: 68px; }
  .hero { padding: 52px 0 60px; }
  .hero__title { font-size: 30px; }
  .hero__catch { font-size: 21px; }
  .hero__desc { font-size: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 48px; padding-bottom: 76px; }
  .step h2 { font-size: 21px; }
  .step h2::before { width: 4px; height: 22px; margin-top: -11px; }
  .output { position: static; max-height: none; }
  #pane { max-height: 70vh; }
  .actions button { height: 42px; font-size: 14px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .header__label { font-size: 14px; }
  .hero__role { font-size: 12px; }
  .hero__title { font-size: 25px; }
  .hero__catch { font-size: 18px; }
  .types, .cmds { grid-template-columns: 1fr; }
  #pane { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
