/* ================== Base & Vars ================== */
:root {
  --text-font: 'AppleSDGothicNeo', 'Apple SD Gothic Neo', 'Noto Sans KR',
    'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
    system-ui, sans-serif;
  --bg: #F7F9FC;
  --ink: #111;
  --ink2: #333;
  --ink3: #6b6b6b;
  --line: #E9ECF3;
  --card: #fff;
  --primary: #0A63E8;
  --chip: #F6F8FF;
  --radius: 18px;
}

/* Base */
html, body { font-family: var(--text-font); background: var(--bg); }
.new_header { background: var(--bg); }

/* 아이콘 폰트는 전역 폰트 강제에서 제외 */
i, .xi, [class^="xi-"], [class*=" xi-"],
.fa, .fas, .far, .fal, .fab,
.material-icons, .material-symbols-outlined, .material-symbols-rounded {
  font-family: inherit !important;
}

/* ================== Layout ================== */
.jdg-wrap { max-width: 920px; margin: 0 auto; }
.jdg-title { font-size: 23px; font-weight: 600; line-height: 1.35; color: var(--ink2); margin: 10px 10px 6px; }

/* 사건번호 */
.badge-case {
  display: inline-block; font-size: 13px; color: #2b5fb8; background: #ebf2ff;
  border: 1px solid #dbe7ff; padding: 6px 10px; border-radius: 999px; margin-left: 10px;
}

/* 키워드 칩 */
.jdg-chips { margin-top: 18px !important; display: flex; gap: 8px; flex-wrap: wrap; }
.jdg-chip  { background: var(--chip); border: 1px solid #E6EDFF; color: #3F63AA; padding: 6px 10px; border-radius: 999px; font-size: 12px; }

/* 카드 섹션 */
.section-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px; margin: 14px 0 22px;
}
.section-title { font-size: 18px; font-weight: 500; margin: 0 0 20px; color: var(--ink); }

/* ================== Rich text (editor) ================== */
.section-card p { font-size: 16px; line-height: 1.7; color: var(--ink2); margin: 0 0 .9em; }
.section-card :is(h1,h2,h3,h4,h5,h6) { line-height: 1.35; margin: 0 0 .6em; color: var(--ink); }
.section-card a { color: #2a56a5; text-decoration: underline; }
.section-card :is(ul,ol) { margin: .6em 0 1em 1.2em; }
.section-card li { margin: .25em 0; }
.section-card blockquote { border-left: 3px solid #e0e7ff; padding-left: 12px; color: #555; margin: 1em 0; }
.section-card img { max-width: 100%; height: auto; }
.section-card table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.section-card th, .section-card td { border: 1px solid #e4e7ee; padding: 8px 10px; }

/* 요약 섹션 글자 크기 */
#summary .jdg-rich, #summary .jdg-rich * { font-size: 16px !important; line-height: 1.7 !important; }

/* jdg-rich – 에디터 콘텐츠 기본 */
.jdg-rich h1{ font-size:1.3em; font-weight:700; }
.jdg-rich h2{ font-size:1.2em; font-weight:700; }
.jdg-rich h3{ font-size:1.1em; font-weight:700; }
.jdg-rich h4{ color:#151594; font-size:1.05em; font-weight:600; }
.jdg-rich h5{ color:#151594; font-size:.9em;  font-weight:600; }
.jdg-rich h6{ font-size:1.0em; font-weight:600; }
.jdg-rich b, .jdg-rich strong{ font-weight:700 !important; }
.jdg-rich em, .jdg-rich i{ font-style:italic; }
.jdg-rich hr{ border:0; border-top:1px solid #e3e7ee; margin:1.2em 0; }

/* 에디터 유사 HR 지원 */
.section-card .jdg-rich hr{ display:block !important; height:1px !important; border:0 !important; background:#e3e7ee !important; margin:20px 0 !important; opacity:.95; }
.section-card .jdg-rich :is(.hr,.editor-hr,.cke_hr){ display:block !important; height:1px !important; background:#e3e7ee !important; margin:20px 0 !important; }

/* 컨테이너 폰트 강제 (아이콘 제외) */
.jdg-wrap,
.jdg-wrap *:not(i):not(.fa):not([class^="xi-"]):not([class*=" xi-"]):not(.material-icons):not(.material-symbols-outlined):not(.material-symbols-rounded){
  font-family: var(--text-font) !important;
}

/* ================== Q&A ================== */
.qa-q{ font-weight:500; margin-bottom:12px; color:var(--ink); line-height:1.5; }
.qa-a{ font-size:16px; color:var(--ink2); line-height:1.7; margin-bottom:10px; padding:0 3px; }
.qa-a strong{ font-weight:700; }
.qa-label{ display:inline-block; font-size:13px; color:#1f6d3c; background:#eaf7ef; border:1px solid #d3efdd; padding:5px 9px; border-radius:999px; margin:6px 0 6px; }
.qa-card{ background:#fff; padding:5px 0 20px; margin-bottom:28px; border-bottom:1px solid #e3e7ee; }
.qa-list .qa-card:last-child{ border-bottom:none; margin-bottom:0; }
.ai_fix{ background:#f8f8f8; border:1px solid var(--line); border-radius:12px; padding:14px; margin:16px auto 0; }
.ai_fix span{ font-size:13px; line-height:1.6; color:#555; display:block; }
.dcont_stit{ display:none; }

/* ================== CTA ================== */
.qa-cta{ width:100%; margin-top:16px; display:grid !important; place-items:center !important; text-align:center !important; }
.btn-cta, .btn-cta:hover, .btn-cta:focus, .btn-cta:active, .btn-cta:visited{ text-decoration:none !important; outline:0; }
.btn-cta{
  display:inline-flex; align-items:center; justify-content:center;
  height:52px; min-width:260px; padding:0 20px; border-radius:12px; border:1px solid transparent;
  font-weight:700; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.06); transition:none; margin:0 auto;
}

/* 팔레트 */
.btn-cta.denim { background:#EAF2FF; border-color:#D7E6FF; color:#2F58A5; }
.btn-cta.mint  { background:#E9F9F2; border-color:#CDEFE4; color:#1D6D59; }
.btn-cta.lilac { background:#F3F0FF; border-color:#E3DFFF; color:#5B46A8; }
.btn-cta.sand  { background:#FFF6E9; border-color:#F0E4CF; color:#7A5B2B; }
.btn-cta.stone { background:#F6F6F7; border-color:#E6E6EA; color:#3E4C67; }

/* 기존 테마 유지 */
.btn-cta.primary       { background:#0A63E8; border-color:#0a5de0; color:#fff; }
.btn-cta.soft          { background:#EAF7EF; border-color:#D3EFDD; color:#1F6D3C; }
.btn-cta.neutral       { background:#fff;   border-color:#E3E8F4; color:#3E4C67; }
.btn-cta.primary-indigo{ background:#0062DF; color:#fff; }
.btn-cta.primary-steel { background:#3F72AF; border-color:#39689f; color:#fff; }
.btn-cta.primary-sky   { background:#4F8CFF; border-color:#467fe8; color:#fff; }
.btn-cta.primary-navy  { background:#1F3A93; border-color:#1a327f; color:#fff; }
.btn-cta.primary-quiet { background:#EEF4FF; border-color:#DDE7FF; color:#2A56A5; }
.btn-cta.primary-soft  { background:#EAF2FF; border-color:#D7E6FF; color:#2F58A5; }

/* 카드 내부 CTA 정렬 */
.section-card :is(.qa-cta,.cta-wrap){
  width:100% !important; margin-top:24px !important; display:flex !important;
  justify-content:center !important; align-items:center !important; text-align:center !important; float:none !important;
}
.section-card :is(.qa-cta,.cta-wrap) .btn-cta{ display:inline-flex !important; margin:0 auto 16px !important; text-decoration:none !important; }

/* ================== More panel / links ================== */
#qa .qa-divider, #m-qa .qa-divider{ height:1px; background:var(--line); margin:18px auto; border-radius:1px; width:60%; }
#qa .jdg-more-panel, #m-qa .jdg-more-panel{ padding:12px 14px; }
#qa .jdg-more-title, #m-qa .jdg-more-title{
  font-size:15px; font-weight:500; color:var(--ink2); margin:10px 0 15px;
  display:flex; align-items:center; gap:10px; white-space:nowrap;
}
#qa .jdg-more-list, #m-qa .jdg-more-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:0; }
#qa .jdg-more-list li, #m-qa .jdg-more-list li{ position:relative; padding-left:14px; line-height:1.5; }
#qa .jdg-more-list li::before, #m-qa .jdg-more-list li::before{ content:"•"; position:absolute; left:0; top:0; color:var(--ink2); line-height:1.2; }
#qa .jdg-more-list a, #m-qa .jdg-more-list a{
  text-decoration:none; color:var(--ink2); font-size:14px; font-weight:400; line-height:1.5; display:block;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:color .12s ease;
}
#qa .jdg-more-list a:hover, #qa .jdg-more-list a:focus,
#m-qa .jdg-more-list a:hover, #m-qa .jdg-more-list a:focus{ color:#0062DF; text-decoration:none; outline:0; }
#qa .cta-wrap, #m-qa .cta-wrap{ margin-top:16px; margin-bottom:20px; }

.ad-banner-wrap{ width:100%; margin:0 auto 30px; }

/* ================== 판결문 전체 보기(.jdg-read) ================== */
/* 문단/헤딩 여백 보정 */
.section-card.jdg-read .jdg-rich p{ margin:0 0 30px !important; line-height:1.9 !important; }
.section-card.jdg-read .jdg-rich :is(h1,h2,h3,h4){ margin:1.1em 0 .8em !important; line-height:1.35 !important; }
.section-card.jdg-read .jdg-rich :is(h5,h6){ margin:1.1em 0 .6em !important; line-height:1.35 !important; }

/* align 속성 호환 */
.jdg-read [align="center"]  { text-align:center  !important; }
.jdg-read [align="right"]   { text-align:right   !important; }
.jdg-read [align="justify"] { text-align:justify !important; }

/* jdg-body – 표/이미지 안전장치 */
.jdg-body table{ max-width:100%; width:100%; table-layout:auto; border-collapse:collapse; }
.jdg-body th, .jdg-body td{ word-break:break-word; white-space:normal; }
.jdg-body img{ max-width:100%; height:auto; }

/* 표가 컨테이너를 넘지 않도록 */
.jdg-read{ overflow-x:auto; line-height:1.85; word-break:keep-all; }
.jdg-read p{ margin:0 0 .7em; }

/* 표 기본값 및 단일화 */
.jdg-read table{
  width:100% !important; max-width:100%; border-collapse:collapse; table-layout:auto !important; margin:18px 0;
}
.jdg-read th, .jdg-read td{
  padding:.6em .8em; border:1px solid #e5e7eb; vertical-align:top;
  word-break:keep-all; overflow-wrap:anywhere; line-height:1.6;
}
.jdg-read caption{ caption-side:top; text-align:center; margin-bottom:8px; font-weight:600; }
.jdg-read th[align="center"], .jdg-read td[align="center"]{ text-align:center; }
.jdg-read th[align="right"],  .jdg-read td[align="right"] { text-align:right;  }
.jdg-read th[align="justify"],.jdg-read td[align="justify"]{ text-align:justify; }

/* 표 헤더 줄바꿈 허용 */
.section-card.jdg-read .jdg-rich th{
  white-space:normal !important; word-break:keep-all !important; overflow-wrap:anywhere !important;
}

/* jdg-html – 외부 HTML 임베드 안전장치 */
.jdg-html table{
  width:100% !important; max-width:100%; border-collapse:collapse; table-layout:auto;
}
.jdg-html th, .jdg-html td{ vertical-align:top; word-break:keep-all; overflow-wrap:anywhere; }
.jdg-html :is(img,table,iframe){ max-width:100%; height:auto; }

/* 표 셀 내부 문단 간격 최소화 */
.jdg-read table td > p, .jdg-read table th > p,
#fulltext table td > p, #fulltext table th > p{
  margin:0 !important; padding:0 !important; line-height:1.4 !important;
}
/* 표 셀 내부 spacer/빈 p 숨김 */
.jdg-read table td p.spacer, .jdg-read table th p.spacer,
.jdg-read table td p:empty,  .jdg-read table th p:empty,
#fulltext table td p.spacer, #fulltext table th p.spacer,
#fulltext table td p:empty,  #fulltext table th p:empty{
  display:none !important;
}

/* spacer / blank 단락 최적화 */
.jdg-read p.spacer{
  margin:.5em 0 !important; height:0 !important; line-height:0 !important; font-size:0 !important;
}
/* 연속 spacer 하나만 노출 */
.jdg-read p.spacer + p.spacer{ display:none !important; }
/* 에디터에서 <p><br></p> 케이스도 spacer처럼 처리 */
.jdg-read .jdg-rich p:has(> br:only-child){ margin:.5em 0; line-height:0; }
/* 빈 단락은 숨김(단, spacer는 예외) */
.jdg-read .jdg-rich p:empty:not(.spacer){ display:none; }
/* blank 클래스 지원 */
.jdg-read .jdg-rich p.blank{ margin:.5em 0; height:0; line-height:0; font-size:0; }
.jdg-read .jdg-rich p.blank + p.blank{ display:none; }
/* 표 셀 내부 blank는 숨김 */
.jdg-read table td p.blank, .jdg-read table th p.blank{ display:none; }


.jdg-rich .jdg-source {
  margin-top: 2em;
  font-size: 14px;
  color: #555;
}
.jdg-rich .jdg-source a {
  text-decoration: underline;
  color: #2d6cdf;
}


/* ================== Mobile ================== */
@media (max-width:700px){
  .jdg-wrap{ max-width:100%; padding:0; }
  .jdg-title{ font-size:20px; }
  .section-card{ border-radius:14px; padding:16px; }
  .section-card p{ font-size:15px; }
  .m-section-card span{ font-size:15px; }
  .qa-a{ font-size:15px; }
  .qa-cta{ padding:0 12px; }
  .btn-cta{ width:100%; min-width:0; height:50px; margin:0; }
  .jdg-more .more-grid{ grid-template-columns:1fr; }
  .ad-banner-wrap{ margin-bottom:10px; }

  .jdg-rich h1{ font-size:1.2em; }
  .jdg-rich h2{ font-size:1.1em;  }
  .jdg-rich h3{ font-size:1.0em; }

  /* 모바일 요약 섹션 */
  #summary .jdg-rich, #summary .jdg-rich *{ font-size:15px !important; line-height:1.7 !important; }
  #m-summary .jdg-rich, #m-summary .jdg-rich *{ font-size:15px !important; line-height:1.7 !important; }

  /* 폭 큰 테이블 대비 */
  .jdg-read table{ display:block; overflow-x:auto; }
}

/* 페이지 전역 폰트 강제 (아이콘 제외) – PC/모바일 레이아웃 */
.pc_wrap .cnsl_dcont,
.pc_wrap .cnsl_dcont *:not(i):not(.fa):not([class^="xi-"]):not([class*=" xi-"]):not(.material-icons):not(.material-symbols-outlined):not(.material-symbols-rounded){
  font-family: var(--text-font) !important;
}
.mobile_wrap .dcm_inr,
.mobile_wrap .dcm_inr *:not(i):not(.fa):not([class^="xi-"]):not([class*=" xi-"]):not(.material-icons):not(.material-symbols-outlined):not(.material-symbols-rounded){
  font-family: var(--text-font) !important;
}
