/* SoRoKi 웹 공통 스타일 — 디자인 토큰은 앱(app_colors.dart)과 동일 */
:root {
  --navy: #1E2347;
  --purple: #4A3B6B;
  --gold: #B8894D;
  --gold-light: #D4A96A;
  --warm-white: #FBF9F5;
  --surface: #F3F1EC;
  --text-dark: #1A1A2E;
  --text-mid: #4A4A6A;
  --text-muted: #9090A0;
  --border: #E0DDD6;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--warm-white);
  color: var(--text-dark);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

/* ── 헤더 ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img { display: block; height: 34px; width: auto; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.site-nav a:hover { color: var(--gold); }

/* ── 본문(문서) ─────────────────────────────── */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.doc-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.35;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.doc-meta { margin: 0 0 32px; color: var(--text-muted); font-size: 14px; }
.lead {
  background: var(--surface);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin: 0 0 36px;
  color: var(--text-mid);
}
.lead strong { color: var(--navy); }

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 40px;
  background: #fff;
}
.doc .toc h2 { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); font-weight: 600; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 28px; font-size: 14px; }
.toc li { break-inside: avoid; }
.toc a { color: var(--text-mid); text-decoration: none; }
.toc a:hover { color: var(--gold); }

.doc h2 {
  margin: 44px 0 12px;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}
.doc h3 { margin: 24px 0 8px; font-size: 16px; color: var(--text-dark); }
.doc p, .doc li { color: var(--text-dark); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }

.table-wrap { overflow-x: auto; margin: 12px 0 8px; -webkit-overflow-scrolling: touch; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 520px;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.doc th { background: var(--surface); color: var(--navy); font-weight: 700; white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }

.note {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0;
  font-size: 15px;
  color: var(--text-mid);
}
.note.gold { border-color: var(--gold-light); background: #FFFBF3; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 60px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--purple); color: #fff; }
.button.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.button.ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── 첫 화면 ─────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--purple));
  color: #fff;
  text-align: center;
  padding: 88px 20px 96px;
}
.hero img.logo { height: 64px; width: auto; max-width: 90%; }
.hero h1 {
  margin: 28px 0 10px;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero p { margin: 0 auto; max-width: 560px; color: #D9D6E6; }
.hero .badge {
  display: inline-block;
  margin-top: 28px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 600;
}
.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; }
.feature p { margin: 0; color: var(--text-mid); font-size: 15px; }
.feature .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); margin-bottom: 14px;
}

/* ── 푸터 ───────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-mid); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer strong { color: var(--text-mid); }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .brand img { height: 28px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 13px; }
  .doc { padding: 32px 16px 64px; }
  .doc-title { font-size: 24px; }
  .toc ol { columns: 1; }
  .hero { padding: 64px 16px 72px; }
  .hero img.logo { height: 48px; }
}

@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #fff; }
}
