/* ==========================================================================
   wpflow 블로그 커스텀 스타일 — 토스 피드(Toss Feed) 에디션
   워드프레스 관리자 → 외모(Customize) → "추가 CSS" 에 통째로 붙여넣기
   ========================================================================== */

/* Pretendard is provided by the WPFlow theme (self-hosted @font-face).
   System-font fallback applies if the plugin is used on a non-WPFlow theme. */

:root {
  --wp-accent: #3182f6;
  --wp-text: #191f28;
  --wp-muted: #4e5968;
  --wp-light-muted: #8b95a1;
  --wp-bg-gray: #f9fafbc4;
  --wp-line: #eff0f2;
  --wp-marker: #dceeff;
}

body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--wp-text);
  letter-spacing: -0.02em;
  background-color: #ffffff;
}

/* ===== 기본 본문 ===== */

.single-content,
.entry-content,
.post-content {
  font-size: 1.76rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  counter-reset: wf-step;
}

.single-content p,
.entry-content p,
.post-content p {
  margin: 0 0 1.5em;
}

h1.title,
.single-content h1,
.entry-content h1,
.post-content h1 {
  font-size: clamp(3.36rem, 2.4rem + 2.5vw, 4.48rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.single-content h2,
.entry-content h2,
.post-content h2 {
  font-size: clamp(2.4rem, 1.92rem + 1.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 3.2em 0 1em;
  padding: 0 0 0 16px;
  border-bottom: none;
  position: relative;
}

/* H2 제목 앞 파란 세로선 */
.single-content h2::before,
.entry-content h2::before,
.post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--wp-accent);
}

/* 순서형 제목: 파란 세로선 대신 파란 번호 배지(번호는 자동 증가).
   flex를 쓰지 않는다 — 제목 안의 <span class="wf-point"> 같은 inline 요소가
   별도 flex 칼럼으로 떨어져 나가 글자가 세로로 깨지는 문제가 있어서,
   일반 h2와 동일하게 절대 위치 배지 + 왼쪽 패딩(행잉 인덴트)으로 처리한다. */
.single-content h2.wf-step,
.entry-content h2.wf-step,
.post-content h2.wf-step {
  counter-increment: wf-step;
  display: block;
  padding-left: 2em;
}

.single-content h2.wf-step::before,
.entry-content h2.wf-step::before,
.post-content h2.wf-step::before {
  content: counter(wf-step);
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: auto;
  width: 1.7em;
  height: 1.7em;
  border-radius: 9px;
  background: var(--wp-accent);
  color: #fff;
  font-size: 0.8em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.single-content h3,
.entry-content h3,
.post-content h3 {
  font-size: clamp(2rem, 1.76rem + 0.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.4;
  margin: 2.4em 0 0.8em;
  padding-left: 0;
  border-left: none;
  color: var(--wp-text);
}

.single-content h4,
.entry-content h4,
.post-content h4 {
  font-size: 1.84rem;
  font-weight: 700;
  margin: 1.6em 0 0.6em;
}

.single-content h5,
.entry-content h5,
.post-content h5,
.single-content h6,
.entry-content h6,
.post-content h6 {
  font-size: 1.68rem;
  font-weight: 600;
  margin: 1.4em 0 0.5em;
  color: var(--wp-muted);
}

/* 제목 속 포인트 키워드(강조 색) */
.single-content .wf-point,
.entry-content .wf-point,
.post-content .wf-point {
  color: var(--wp-accent);
}

/* ===== 형광펜 ===== */

/* 칩이 아니라 형광펜: 글자 아래쪽만 색이 지나가 문장·조사와 자연스럽게 이어짐 */
.single-content mark,
.entry-content mark,
.post-content mark {
  background: linear-gradient(transparent 55%, var(--wp-marker) 55%);
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.single-content mark.hl-pink,
.entry-content mark.hl-pink,
.post-content mark.hl-pink {
  background: linear-gradient(transparent 55%, #fee3ec 55%);
  color: inherit;
}

.single-content mark.hl-green,
.entry-content mark.hl-green,
.post-content mark.hl-green {
  background: linear-gradient(transparent 55%, #e8f7ec 55%);
  color: inherit;
}

.single-content mark.hl-blue,
.entry-content mark.hl-blue,
.post-content mark.hl-blue {
  background: linear-gradient(transparent 55%, #e8f3ff 55%);
  color: inherit;
}

/* ===== 리스트 ===== */

.single-content ul,
.entry-content ul,
.post-content ul,
.single-content ol,
.entry-content ol,
.post-content ol {
  padding-left: 1.2em;
}

.single-content li,
.entry-content li,
.post-content li {
  margin: 0.6em 0;
  color: var(--wp-muted);
}

.single-content li::marker,
.entry-content li::marker,
.post-content li::marker {
  color: var(--wp-accent);
}

/* ===== 표 ===== */

.single-content table,
.entry-content table,
.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 2em 0;
  font-size: 0.95em;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--wp-line);
}

.single-content th,
.entry-content th,
.post-content th {
  background: #f2f4f6;
  color: var(--wp-muted);
  font-weight: 600;
  text-align: left;
}

.single-content th,
.single-content td,
.entry-content th,
.entry-content td,
.post-content th,
.post-content td {
  border-bottom: 1px solid var(--wp-line);
  padding: 1em 1.2em;
}

.single-content tr:last-child td,
.entry-content tr:last-child td,
.post-content tr:last-child td {
  border-bottom: none;
}

/* ===== 링크 ===== */

.single-content a,
.entry-content a,
.post-content a {
  color: var(--wp-accent);
  font-weight: 600;
  text-decoration: none;
}

.single-content a:hover,
.entry-content a:hover,
.post-content a:hover {
  text-decoration: underline;
}

/* ===== 기본 인용구 ===== */

.single-content blockquote,
.entry-content blockquote,
.post-content blockquote {
  margin: 2em 0;
  padding: 1.2em 1.5em;
  border: none !important;
  background: var(--wp-bg-gray);
  color: var(--wp-muted);
  border-radius: 16px;
  font-size: 1.76rem;
}

/* ===== 콘텐츠 컴포넌트 공통 ===== */

.single-content [class^="wf-"],
.entry-content [class^="wf-"],
.post-content [class^="wf-"] {
  box-sizing: border-box;
}

.single-content [class^="wf-"] > :first-child,
.entry-content [class^="wf-"] > :first-child,
.post-content [class^="wf-"] > :first-child {
  margin-top: 0;
}

.single-content [class^="wf-"] > :last-child,
.entry-content [class^="wf-"] > :last-child,
.post-content [class^="wf-"] > :last-child {
  margin-bottom: 0;
}

/* ===== 핵심 요약 ===== */

.wf-summary {
  border: none;
  background: #f2f4f6;
  border-radius: 16px;
  padding: 20px;
  margin: 0 0 28px;
}

.wf-summary > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--wp-accent);
  font-size: 1.05em;
  font-weight: 700;
}

.wf-summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.wf-summary li {
  color: var(--wp-muted);
  margin: 6px 0;
}

/* ===== 콜아웃 ===== */

.wf-tip,
.wf-warn,
.wf-info,
.wf-note {
  border-radius: 16px;
  padding: 16px 20px;
  margin: 24px 0;
  border: none;
}

.wf-tip::before,
.wf-warn::before,
.wf-info::before,
.wf-note::before {
  font-weight: 800;
  margin-right: 8px;
}

.wf-tip {
  background: #e8f7ec;
  color: #1d6a37;
}

.wf-tip::before {
  content: "팁";
}

.wf-warn {
  background: #fff3e0;
  color: #b25e00;
}

.wf-warn::before {
  content: "주의";
}

.wf-info {
  background: #e8f3ff;
  color: #1b64da;
}

.wf-info::before {
  content: "정보";
}

.wf-note {
  background: #f2f4f6;
  color: #333d4b;
}

.wf-note::before {
  content: "참고";
}

/* ===== 체크포인트 ===== */

.wf-keypoints {
  border: 1px solid #eff0f2;
  border-radius: 18px;
  padding: 22px;
  margin: 24px 0;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.wf-keypoints > strong {
  display: block;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--wp-text);
  margin-bottom: 14px;
}

.wf-keypoints ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wf-keypoints li {
  padding-left: 26px;
  position: relative;
  margin: 10px 0;
  color: var(--wp-muted);
}

.wf-keypoints li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: #25a144;
  font-weight: 800;
  font-size: 1.05em;
}

/* ===== 단계 ===== */

.wf-steps {
  counter-reset: wf;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.wf-steps > li {
  counter-increment: wf;
  position: relative;
  padding: 4px 0 20px 48px;
  margin: 0;
  color: var(--wp-muted);
}

.wf-steps > li::before {
  content: counter(wf);
  position: absolute;
  left: 0;
  top: 5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f3ff;
  color: var(--wp-accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
}

.wf-steps > li:last-child {
  padding-bottom: 4px;
}

/* ===== 강조 인용 ===== */

.single-content blockquote.wf-quote,
.entry-content blockquote.wf-quote,
.post-content blockquote.wf-quote {
  border: none !important;
  background: none;
  margin: 52px 0;
  padding: 14px 24px;
  font-size: 2.08rem;
  line-height: 1.8;
  font-weight: 700;
  color: #191f28;
  letter-spacing: -0.03em;
  border-radius: 0;
}

.single-content blockquote.wf-quote::before,
.entry-content blockquote.wf-quote::before,
.post-content blockquote.wf-quote::before {
  content: none;
}

/* ===== CTA 박스 ===== */

.wf-cta {
  text-align: center;
  background: #f8f9fa;
  border: 1px solid #f2f4f6;
  border-radius: 24px;
  padding: 36px 24px;
  margin: 40px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
}

.wf-cta strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: #191f28;
}

.wf-cta p {
  font-size: 1.68rem;
  color: #4e5968;
  margin: 0 0 20px !important;
}

.wf-cta a {
  display: block;
  max-width: 320px;
  margin: 0 auto;
  background: var(--wp-accent);
  color: #ffffff !important;
  padding: 15px 0;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.68rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  box-shadow: 0 12px 20px rgba(49, 130, 246, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wf-cta a:hover,
.wf-cta a:active {
  background: #1b64da;
  box-shadow: 0 8px 16px rgba(49, 130, 246, 0.35);
  transform: translateY(-2px);
}

/* ===== 뱃지 / 구분선 ===== */

.wf-badge {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f2f4f6;
  color: #4e5968;
  vertical-align: middle;
}

.wf-divider {
  border: 0;
  height: 1px;
  background: #eff0f2;
  margin: 40px 0;
}

/* ===== 번호 카드 ===== */

.wf-numcards {
  counter-reset: nc;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}
/* 짝이 안 맞는 마지막 카드는 한 줄 전체를 차지 (3개 → 2 + 1풀폭) */
.wf-numcard:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.wf-numcard {
  counter-increment: nc;
  background: #ffffff;
  border: 1px solid #eff0f2;
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.wf-numcard:hover {
  transform: translateY(-4px);
  border-color: #dbe6ff;
  box-shadow: 0 14px 30px rgba(49, 130, 246, 0.13);
}

.wf-numcard::before {
  content: counter(nc, decimal-leading-zero);
  display: block;
  font-size: 2.56rem;
  font-weight: 800;
  color: #d1d6db;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.wf-numcard:hover::before {
  color: var(--wp-accent);
}

.wf-numcard > strong {
  display: block;
  font-size: 1.92rem;
  font-weight: 700;
  color: var(--wp-text);
  margin-bottom: 8px;
}

.wf-numcard p {
  margin: 0 !important;
  font-size: 1.68rem;
  line-height: 1.65;
  color: var(--wp-muted);
}

/* ===== 강조 소제목 ===== */

.wf-barhead {
  display: table; /* 글자 폭만큼만 형광펜이 칠해지도록 */
  margin: 32px 0 16px;
  padding: 0 0.12em;
  font-size: 2.08rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--wp-text);
  background: linear-gradient(transparent 52%, var(--wp-marker) 52%);
}

/* ===== 마무리 요약 카드 ===== */

.wf-recap {
  background: var(--wp-bg-gray);
  border-radius: 18px;
  padding: 22px 24px;
  margin: 28px 0;
}

.wf-recap > strong {
  display: block;
  font-size: 1.68rem;
  font-weight: 700;
  color: var(--wp-text);
  margin-bottom: 8px;
}

.wf-recap p {
  margin: 0 !important;
  color: var(--wp-muted);
}

/* ===== FAQ 아코디언 ===== */

.wf-faq {
  border: 1px solid #eff0f2;
  border-radius: 14px;
  background: #ffffff;
  margin: 10px 0;
  overflow: hidden;
}

.wf-faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 50px 18px 20px;
  font-weight: 700;
  font-size: 1.728rem;
  color: var(--wp-text);
  position: relative;
}

.wf-faq > summary::-webkit-details-marker {
  display: none;
}

.wf-faq > summary::after {
  content: "›";
  position: absolute;
  right: 20px;
  top: 50%;
  font-size: 2.4rem;
  line-height: 0;
  color: var(--wp-light-muted);
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.25s ease;
}

.wf-faq[open] > summary {
  color: var(--wp-accent);
}

.wf-faq[open] > summary::after {
  transform: translateY(-50%) rotate(-90deg);
}

.wf-faq > *:not(summary) {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--wp-muted);
  line-height: 1.7;
}

/* ===== 관련 글 ===== */

.wf-related {
  margin: 36px 0 8px;
  padding: 22px 24px;
  background: var(--wp-bg-gray);
  border-radius: 18px;
}

.wf-related > strong {
  display: block;
  font-size: 1.68rem;
  font-weight: 700;
  color: var(--wp-text);
  margin-bottom: 12px;
}

.wf-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wf-related li {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid #eff0f2;
}

.wf-related li:first-child {
  padding-top: 0;
}

.wf-related li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wf-related a {
  display: block;
  font-weight: 600;
  color: var(--wp-text) !important;
  position: relative;
  padding-right: 24px;
  text-decoration: none !important;
  border-bottom: none !important; /* 테마가 링크에 넣는 밑줄 제거(이중선 방지) */
  box-shadow: none !important;
}
.wf-related a:hover { text-decoration: none !important; }

.wf-related a::after {
  content: "›";
  position: absolute;
  right: 4px;
  color: var(--wp-light-muted);
  font-size: 1.3em;
  line-height: 1;
}

.wf-related a:hover {
  color: var(--wp-accent) !important;
}

/* ===== 본문 이미지 ===== */

.single-content .wf-figure,
.entry-content .wf-figure,
.post-content .wf-figure {
  margin: 28px 0;
}

.single-content .wf-figure img,
.entry-content .wf-figure img,
.post-content .wf-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.single-content .wf-caption,
.entry-content .wf-caption,
.post-content .wf-caption {
  margin-top: 8px;
  color: var(--wp-light-muted);
  font-size: 1.248rem;
  line-height: 1.5;
  text-align: right;
}

.single-content .wf-caption a,
.entry-content .wf-caption a,
.post-content .wf-caption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== 모바일 최적화 ===== */

@media (max-width: 768px) {
  .single-content,
  .entry-content,
  .post-content {
    font-size: 1.664rem;
    line-height: 1.78;
  }

  .single-content p,
  .entry-content p,
  .post-content p {
    margin: 0 0 1.35em;
  }

  .single-content h2,
  .entry-content h2,
  .post-content h2 {
    margin: 2.6em 0 0.9em;
  }

  .single-content h3,
  .entry-content h3,
  .post-content h3 {
    margin: 2em 0 0.7em;
  }

  .single-content table,
  .entry-content table,
  .post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .single-content th,
  .single-content td,
  .entry-content th,
  .entry-content td,
  .post-content th,
  .post-content td {
    padding: 0.9em 1em;
  }

  .wf-numcards {
    grid-template-columns: 1fr;
  }

  .wf-cta {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .wf-cta a {
    max-width: 100%;
  }

  .single-content blockquote.wf-quote,
  .entry-content blockquote.wf-quote,
  .post-content blockquote.wf-quote {
    font-size: 1.888rem;
    line-height: 1.75;
    margin: 40px 0;
    padding: 12px 16px;
  }

  .wf-faq > summary {
    font-size: 1.6rem;
    padding: 16px 46px 16px 18px;
  }

  .wf-related {
    padding: 20px;
  }
}
