/* 성범죄대응 시안 — 밤에 휴대전화로 찾아오는 사람을 위한 차분한 화면.
   색: 먹색 남색(신뢰) + 종이 흰색, 인주색은 '전화'와 현재 단계 표시에만 쓴다. */
:root {
  --ink: #1e2b45;
  --ink-soft: #33415f;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --line: #d9dee5;
  --text: #1b1f27;
  --muted: #5e6775;
  --tint: #edf0f5;
  --seal: #a8322d;
  --seal-dark: #8c2924;
  --radius-s: 4px;
  --radius-m: 10px;
  --measure: 40rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding-bottom: 4.5rem; /* 모바일 하단 상담 바 자리 */
}
a { color: var(--ink); }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

.demo-bar { background: var(--ink-soft); color: #fff; font-size: .875rem; line-height: 1.5; padding: .5rem 1rem; text-align: center; }

/* 머리 */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding-top: .75rem; padding-bottom: .5rem; }
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; }
.brand-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.brand-firm { font-size: .875rem; color: var(--muted); }
.site-nav { display: flex; gap: 1.25rem; overflow-x: auto; white-space: nowrap; max-width: 100%; scrollbar-width: none; }
.site-nav a { text-decoration: none; font-size: .9375rem; color: var(--ink-soft); padding: .35rem 0; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* 본문 배치: 휴대전화는 한 줄, 넓은 화면은 본문 + 오른쪽 상담 칸 */
.layout { display: grid; gap: 2rem; padding-top: 1.5rem; padding-bottom: 3rem; }
@media (min-width: 64rem) {
  .layout { grid-template-columns: minmax(0, var(--measure)) 17rem; justify-content: space-between; }
  .side { position: sticky; top: 1.5rem; align-self: start; }
}
main { min-width: 0; max-width: var(--measure); }

.crumbs { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); line-height: 1.3; letter-spacing: -.035em; font-weight: 800; color: var(--ink); margin: 0 0 1rem; }
h2 { font-size: 1.375rem; line-height: 1.4; letter-spacing: -.02em; font-weight: 750; color: var(--ink); margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.125rem; line-height: 1.5; font-weight: 700; margin: 1.75rem 0 .5rem; }
p { margin: 0 0 1rem; }

.byline { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0 0 1.5rem; font-size: .875rem; color: var(--muted); }
.byline div { display: flex; gap: .4rem; }
.byline dt { font-weight: 600; }
.byline dd { margin: 0; }

/* 먼저 답부터: 이 사이트에서 가장 먼저 눈에 들어와야 하는 상자 */
.answer { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.1rem 1.25rem .4rem; margin: 0 0 2rem; }
.answer-label { font-size: .875rem; font-weight: 700; color: var(--ink); margin-bottom: .35rem; }
.answer p:last-child { font-size: 1.125rem; line-height: 1.7; }

/* 조문 표시: 근거가 있는 문장임을 바로 보이게 */
a.law { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-size: .8125em; line-height: 1.5; font-weight: 600; color: var(--ink); background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 .4em; text-decoration: none; white-space: nowrap; }
a.law:hover { border-color: var(--ink); }

.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--ink); }
.note { font-size: .9375rem; color: var(--muted); }

/* 표 */
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .9375rem; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--tint); color: var(--ink); font-weight: 700; }
/* 관할 안내 표(데이터로 생성): 항목명 | 값 */
table.kv { min-width: 0; }
table.kv th { width: 7rem; background: var(--tint); color: var(--ink); font-weight: 700; white-space: nowrap; }
.court-box { margin: 0 0 1.5rem; }
.nowrap { white-space: nowrap; }
.court-box .note { margin-top: -.5rem; }
tbody tr:last-child td { border-bottom: 0; }

/* 진행 순서: 실제로 순서가 있는 내용에만 번호를 쓴다 */
.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 0 0 1.5rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3rem; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); color: var(--ink); font-weight: 800; font-size: .9375rem; display: grid; place-items: center; line-height: 1; }
.steps > li::after { content: ""; position: absolute; left: calc(1rem - 1px); top: 2.3rem; bottom: .2rem; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li.now::before { background: var(--seal); border-color: var(--seal); color: #fff; }
.steps strong { display: block; font-size: 1.0625rem; }

/* 홈: 상황 고르기 */
.router { list-style: none; padding: 0 !important; margin: 0 0 1rem; border-top: 2px solid var(--ink); }
.router li { margin: 0; border-bottom: 1px solid var(--line); }
.router a { display: grid; gap: .1rem; padding: 1rem .25rem 1rem 0; text-decoration: none; position: relative; padding-right: 2rem; }
.router a::after { content: ""; position: absolute; right: .5rem; top: 50%; width: .55rem; height: .55rem; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: translateY(-50%) rotate(45deg); }
.router a:hover { background: var(--surface); }
.router strong { font-size: 1.125rem; color: var(--ink); }
.router span { font-size: .9375rem; color: var(--muted); }

.index-list { list-style: none; padding: 0 !important; margin: 0 0 1rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.index-list li { margin: 0; border-bottom: 1px solid var(--line); }
.index-list a, .index-list li.soon { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; padding: .8rem 0; text-decoration: none; }
.index-list a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.index-list strong { color: var(--ink); font-size: 1.0625rem; }
.index-list span { color: var(--muted); font-size: .9375rem; }
.index-list li.soon strong { color: var(--muted); font-weight: 600; }

.muted, td.muted, li.muted { color: var(--muted); }
td.muted, td > a:only-child { white-space: nowrap; }

/* 홈: 변호사 */
.person { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; margin-bottom: 1rem; }
.person-photo { width: 100%; height: auto; object-fit: cover; object-position: center top; aspect-ratio: 3 / 4; border-radius: var(--radius-s); background: var(--tint); color: var(--muted); display: grid; place-items: center; font-size: .875rem; }
.person-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.person-firm { color: var(--muted); font-size: .9375rem; margin-bottom: .6rem; }
.person-facts { margin: 0; padding-left: 1.1rem; font-size: .9375rem; }
.person-facts li { margin-bottom: .2rem; }

/* 홈: 사례 자리(고객 사건으로 채울 칸이라 점선으로 표시) */
.case-slots { list-style: none; padding: 0 !important; display: grid; gap: .75rem; }
@media (min-width: 40rem) { .case-slots { grid-template-columns: repeat(3, 1fr); } }
.case-slots li { margin: 0; border: 1.5px dashed var(--line); border-radius: var(--radius-m); padding: 1rem; display: grid; gap: .3rem; background: var(--surface); }
.case-slots strong { color: var(--ink); }
.case-slots span { color: var(--muted); font-size: .875rem; line-height: 1.6; }

/* 홈: 법률 정보 모음 */
.hub { display: grid; gap: 0 2rem; }
@media (min-width: 40rem) { .hub { grid-template-columns: 1fr 1fr; } }
.hub h3 { margin-top: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--ink); }
.hub ul { list-style: none; padding: 0 !important; }
.hub li { padding: .45rem 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .9375rem; }

/* 홈: 사무소 */
.office { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .office { grid-template-columns: 1fr 1fr; } }
.office dl { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem 1.25rem; }
.office dl div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.office dl div:last-child { border-bottom: 0; }
.office dt { font-weight: 700; color: var(--ink); font-size: .9375rem; }
.office dd { margin: 0; font-size: .9375rem; }
.map-slot { min-height: 12rem; border: 1.5px dashed var(--line); border-radius: var(--radius-m); display: grid; place-items: center; color: var(--muted); font-size: .9375rem; background: var(--surface); }

/* 자주 묻는 질문 */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.375rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > *:not(summary) { margin-top: 0; }
.faq details p { padding-bottom: .25rem; }

.related ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.related li { border-bottom: 1px solid var(--line); }
.related a { display: grid; padding: .8rem 0; text-decoration: none; font-weight: 700; }
.related a span { font-weight: 400; color: var(--muted); font-size: .9375rem; }

/* 상담 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.25rem; border-radius: var(--radius-m); font-weight: 700; text-decoration: none; font-size: 1rem; }
.btn-call { background: var(--seal); color: #fff; }
.btn-call:hover { background: var(--seal-dark); }
.btn-line { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.cta { margin-top: 3rem; padding: 1.5rem 1.25rem; background: var(--ink); color: #fff; border-radius: var(--radius-m); }
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #dfe4ec; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta .btn-line { background: transparent; color: #fff; border-color: #fff; }

.side-call { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; }
.side-firm { font-weight: 700; color: var(--ink); margin-bottom: .25rem; }
.side-phone { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 0; }
.side-phone a { text-decoration: none; }
.side-hours { font-size: .875rem; color: var(--muted); }
.side-call .btn { width: 100%; }
.basis { margin-top: 1.25rem; font-size: .9375rem; }
.basis h2 { font-size: 1rem; margin: 0 0 .5rem; }
.basis ul { list-style: none; padding: 0; margin: 0 0 .5rem; }
.basis li { padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.basis p { font-size: .8125rem; color: var(--muted); }

.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); z-index: 5; }
@media (min-width: 64rem) {
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
}

/* 상담 신청 폼(시안: 전송 안 됨) */
.form { display: grid; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .9375rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; color: var(--text); }
.form textarea { min-height: 7rem; resize: vertical; }
.form .btn { border: 0; cursor: pointer; }

.site-foot { background: var(--surface); border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); padding: 2rem 0; }
.foot-grid { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 1fr 1.4fr; gap: 3rem; } .foot-grid:has(> :nth-child(3)) { grid-template-columns: 1fr .8fr 1.4fr; } }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin: .2rem 0; }
.foot-firm { font-weight: 700; color: var(--ink); }
.site-foot p { margin-bottom: .3rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
