/*
 * JUJUspace 콘텐츠 페이지 공용 스타일
 * /guide.html, /guide/*.html, /about.html, /contact.html 이 함께 쓴다.
 * SPA(Tailwind)와 별개로 동작하는 독립 정적 페이지용이라 자급자족 CSS다.
 */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --line: #e5e7eb;
  --accent: #6366f1;
  --accent-deep: #4f46e5;
  --accent-soft: #eef2ff;
  --purple: #a855f7;
  --radius: 16px;
  --maxw: 720px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto,
    'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

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

.site-nav a[aria-current='page'] {
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 600;
}

.site-nav a.cta {
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  font-weight: 600;
  padding: 7px 14px;
}

.site-nav a.cta:hover {
  color: #fff;
  opacity: 0.92;
}

/* ---------- 레이아웃 ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ---------- 타이포 ---------- */

h1 {
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.lede {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meta {
  font-size: 13px;
  color: var(--text-faint);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  padding-top: 4px;
}

h3 {
  font-size: 17px;
  margin: 28px 0 10px;
}

p {
  margin-bottom: 16px;
}

article ul,
article ol {
  margin: 0 0 18px 20px;
}

article li {
  margin-bottom: 8px;
  padding-left: 4px;
}

strong {
  font-weight: 700;
}

a {
  color: var(--accent-deep);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ---------- 컴포넌트 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 24px 0;
}

.card h3:first-child,
.card h2:first-child {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.note {
  background: var(--accent-soft);
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 15px;
  color: #3730a3;
}

.note strong {
  color: #312e81;
}

.caution {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 15px;
  color: #78350f;
}

.caution p:last-child {
  margin-bottom: 0;
}

.note p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

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

th {
  background: #fafafa;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 삼정 다이어그램 */
.thirds {
  display: flex;
  gap: 10px;
  margin: 24px 0;
  text-align: center;
}

.thirds div {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 8px;
}

.thirds .label {
  font-weight: 700;
  font-size: 15px;
}

.thirds .range {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

.thirds .pct {
  font-size: 13px;
  color: var(--accent-deep);
  margin-top: 6px;
  font-weight: 600;
}

/* 가이드 목록 카드 */
.guide-list {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.guide-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.guide-list a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.guide-list .title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
}

.guide-list .desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ */
.faq-q {
  font-weight: 700;
  font-size: 17px;
  margin: 32px 0 8px;
}

.faq-q::before {
  content: 'Q. ';
  color: var(--accent);
}

/* 도구로 보내는 CTA */
.tool-cta {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius);
  padding: 24px;
  margin: 40px 0 0;
  text-align: center;
}

.tool-cta p {
  color: #4338ca;
  margin-bottom: 14px;
}

.tool-cta a {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
}

/* 다음 읽을거리 */
.next-reads {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.next-reads h2 {
  margin-top: 0;
  font-size: 18px;
}

.next-reads ul {
  margin-left: 18px;
}

/* 광고 슬롯 — /static/ads.js 가 슬롯 ID 설정 시에만 채운다 */
.ad-slot {
  margin: 32px 0;
  min-height: 0;
}

.ad-slot:empty {
  display: none;
}

/* ---------- 푸터 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 32px 20px 48px;
}

.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 14px;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer .fine {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.6;
}

@media (max-width: 560px) {
  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 20px;
  }

  .wrap {
    padding: 24px 18px 60px;
  }

  .thirds {
    flex-direction: column;
  }

  .site-nav a {
    padding: 6px 8px;
    font-size: 13px;
  }
}
