:root {
  color-scheme: light dark;
  --bg: Canvas;
  --text: CanvasText;
  --muted: color-mix(in srgb, CanvasText 55%, Canvas);
  --line: color-mix(in srgb, CanvasText 15%, Canvas);
  --surface: color-mix(in srgb, CanvasText 4%, Canvas);
  /* 파비콘과 같은 값이라야 한 서비스로 읽힌다. */
  --brand: #0d9488;
  --brand-ink: #ffffff;
}

/* 어두운 배경에서는 같은 teal 이 탁해진다. 한 톤 올린다. */
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --brand-ink: #06302c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.75 system-ui,
    -apple-system,
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  /* 한국어는 단어 중간에서 끊기면 읽기 나쁘다. */
  word-break: keep-all;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

header.site {
  border-bottom: 1px solid var(--line);
}

header.site .inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

header.site strong {
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}



h1 {
  font-size: 1.9rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.925rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* 좁은 화면에서 표가 넘치면 가로로 스크롤한다. */
.scroll {
  overflow-x: auto;
}

ol,
ul {
  padding-left: 1.3rem;
}

li {
  margin: 0.3rem 0;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 0.9rem 0 0.9rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

.steps li b {
  display: block;
}

.box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--surface);
  margin: 1.5rem 0;
}

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

footer.site p {
  margin: 0.3rem 0;
}

/* ── 앱 안에 띄울 때(?embed) ────────────────────────────────────
 * 가입 화면의 약관 창이 이 문서를 그대로 띄운다. 사이트 머리(메뉴·로그인)와
 * 꼬리의 이동 링크는 창 안에서 누르면 창 속에서 사이트가 열려 길을 잃는다.
 * 앱은 늘 어두우니 여기도 어둡게. */
html.embed {
  color-scheme: dark;
  --brand: #2dd4bf;
  --brand-ink: #06302c;
}

html.embed header.site,
html.embed footer.site p:last-child {
  display: none;
}

html.embed main.wrap {
  padding-top: 0.5rem;
}

.cta {
  display: inline-block;
  border: 1px solid var(--text);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  font-weight: 600;
}


/* ── 머리말 ─────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  display: block;
  color: var(--brand);
}

/* 로그인 버튼을 오른쪽 끝으로 민다. 찾아 들어갈 곳이 한눈에 보여야 한다. */
header.site .spacer {
  margin-left: auto;
}

/* ── 첫 화면 ───────────────────────────────────────────────── */

.hero {
  padding: 1rem 0 0.5rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}

.cta.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.cta:hover {
  opacity: 0.85;
}

.note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ── 단계 ──────────────────────────────────────────────────── */

/* 번호를 브랜드 색으로 채운다. 목록이 아니라 흐름으로 읽히게. */
.steps li::before {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

.steps li:last-child {
  border-bottom: none;
}

/* ── 강조 상자 ──────────────────────────────────────────────── */

/* 심사에서 가장 중요한 문단이다. 왼쪽에 브랜드 띠를 둔다. */
.box.accent {
  border-left: 3px solid var(--brand);
}

/* ── 약속 목록 ─────────────────────────────────────────────── */

.promise {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.promise li {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.925rem;
}

.promise b {
  display: block;
  margin-bottom: 0.25rem;
}




/* ── 상단 메뉴 ──────────────────────────────────────────────── */

header.site nav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s;
}

header.site nav a:hover {
  color: var(--text);
  background: var(--surface);
}

/* 지금 보고 있는 곳. 링크만 나열하면 어디쯤인지 알 수 없다. */
header.site nav a[aria-current] {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--brand);
}

/* 머리말이 화면에 붙어 있어 앵커로 뛰면 제목이 그 아래로 숨는다.
 * 뛸 자리를 머리말 높이만큼 내려 둔다. */
:where(h2[id]) {
  scroll-margin-top: 5rem;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 좁은 화면에서는 메뉴를 아랫줄로 내린다.
 *
 * 감추는 쪽이 간단하지만 그러면 약관·개인정보로 가는 길이 꼬리말밖에
 * 남지 않는다. 줄을 하나 내주고 넘치면 옆으로 밀게 한다. */
@media (max-width: 34rem) {
  header.site .inner {
    row-gap: 0.5rem;
  }

  header.site .spacer {
    display: none;
  }

  header.site nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -0.35rem;
  }

  header.site nav::-webkit-scrollbar {
    display: none;
  }

  /* 브랜드와 로그인이 한 줄을 나눠 갖는다. */
  header.site .brand {
    margin-right: auto;
  }
}
