/*
Theme Name: Classaction — 집단소송 사건 안내 (데모)
Description: 페이지빌더 없이 만든 집단소송 사건 안내 테마. 직원은 사건 칸만 채우고, 화면 모양은 테마가 정한다.
Version: 1.0.0
Text Domain: classaction
*/

/* 색 — 대비는 전부 4.5:1 이상으로 계산한 값(색채 패널 실측) */
:root {
	--bg: #F7F5F0;
	--surface: #FFFFFF;
	--text: #1C2422;
	--muted: #57605D;
	--border: #DCD7CC;
	--border-strong: #858B88;
	--brand: #1F4D45;
	--cta: #B4520E;
	--b-rec-bg: #E2F1E7; --b-rec: #1C5E38;
	--b-clo-bg: #ECEAE4; --b-clo: #4A504D;
	--b-ong-bg: #E3ECF6; --b-ong: #1E4B7D;
	--b-end-bg: #EDE8F3; --b-end: #4D3F66;
	--soon-bg: #FBEDDC; --soon: #8A3F0C;
	--cta-h: calc(124px + env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: var(--cta-h); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	font-size: 1.0625rem; /* 17px */
	line-height: 1.7;
	letter-spacing: -0.01em;
	word-break: keep-all;
	overflow-wrap: anywhere;
}
a { color: var(--brand); }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible {
	outline: 3px solid var(--cta);
	outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.35; margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap, .wrap-narrow { padding: 0 24px; } }
@media (min-width: 1280px) { .wrap, .wrap-narrow { padding: 0 32px; } body { font-size: 1.125rem; } }

/* 데모 표시줄 */
.demo-bar {
	background: var(--text);
	color: #F7F5F0;
	font-size: 0.875rem;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 6px 16px;
}
.field-toggle {
	font: inherit; font-weight: 600;
	background: transparent; color: #F7F5F0;
	border: 1px solid #F7F5F0; border-radius: 6px;
	padding: 6px 10px; min-height: 36px; cursor: pointer; white-space: nowrap;
}
.field-toggle[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); }

/* 머리 */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.head-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { text-decoration: none; color: var(--text); display: flex; flex-direction: column; line-height: 1.3; }
.brand-firm { font-size: 0.875rem; color: var(--muted); }
.brand-name { font-weight: 700; font-size: 1.125rem; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }

/* 목록 */
.list-page { padding-top: 24px; padding-bottom: 40px; }
.lead { font-size: 1.375rem; font-weight: 700; }
.lead strong { color: var(--brand); }
.lead-sub { margin: 4px 0 16px; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 1280px) { .lead { font-size: 1.75rem; } .list-page { padding-top: 40px; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 44px; padding: 8px 14px;
	border: 1px solid var(--border-strong); border-radius: 999px;
	background: var(--surface); color: var(--text);
	text-decoration: none; font-weight: 600; font-size: 0.9375rem;
}
.chip-n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed="true"] .chip-n { color: #fff; }

.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 0 18px 18px;
	display: flex; flex-direction: column; gap: 12px;
	overflow: hidden;
}
.card:hover { border-color: var(--border-strong); }
.card:focus-within { outline: 3px solid var(--cta); outline-offset: 2px; }
.card-title { font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:focus-visible { outline: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* 카드 전체가 눌린다 */
.card-target { margin: 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.55; }
.lbl { display: inline-block; font-weight: 700; color: var(--text); margin-right: 4px; }
.card-due { margin: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.9375rem; }
@media (min-width: 1280px) { .card-title { font-size: 1.25rem; } }

/* 서류철 색인 띠 */
.tab-strip {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	margin: 0 -18px; padding: 10px 18px;
	border-bottom: 1px dashed var(--border);
	background: linear-gradient(var(--bg), var(--bg));
}
.case-page .tab-strip { margin: 0 0 12px; padding: 0; background: none; border: 0; }
.case-no { font-variant-numeric: tabular-nums; font-size: 0.875rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.cat { font-size: 0.875rem; color: var(--brand); font-weight: 600; }
.badge {
	margin-left: auto;
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 0.875rem; font-weight: 600; line-height: 1;
	padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.case-page .badge { margin-left: 0; }
.b-recruiting { background: var(--b-rec-bg); color: var(--b-rec); }
.b-closed { background: var(--b-clo-bg); color: var(--b-clo); }
.b-ongoing { background: var(--b-ong-bg); color: var(--b-ong); }
.b-ended { background: var(--b-end-bg); color: var(--b-end); }

.dday { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); white-space: nowrap; }
.dday-soon { background: var(--soon-bg); color: var(--soon); padding: 2px 8px; border-radius: 6px; }

/* 진행 노선도 */
.line {
	--dot: 14px;
	position: relative;
	list-style: none; margin: 4px 0 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, 1fr);
}
.line::before, .line::after {
	content: ""; position: absolute; height: 3px; top: calc(var(--dot) / 2 - 1.5px);
	left: 12.5%;
}
.line::before { right: 12.5%; background: var(--border); }
.line::after { width: calc(75% * var(--p)); background: var(--brand); }
.st { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.st-dot { width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.st-done .st-dot { background: var(--brand); border-color: var(--brand); }
.st-now .st-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px #D3E3DF; }
.st-name { font-size: 0.875rem; color: var(--muted); line-height: 1.3; }
.st-done .st-name { color: var(--text); }
.st-now .st-name { color: var(--brand); font-weight: 700; }
.st-now { }
.st-now .st-now { font-size: 0.875rem; font-weight: 700; color: #fff; background: var(--brand); border-radius: 4px; padding: 1px 6px; line-height: 1.4; }
.line-sm .st-now .st-now { display: none; }
.line-lg { --dot: 18px; margin: 20px 0 8px; }
.line-lg .st-name { font-size: 0.9375rem; }

/* 사건 페이지 */
.case-page { padding-top: 16px; padding-bottom: 48px; }
.back { margin: 0 0 16px; font-size: 0.9375rem; }
.back a { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.case-title { font-size: 1.5rem; font-weight: 700; }
@media (min-width: 1280px) { .case-title { font-size: 2rem; } }
.facts { margin: 20px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; }
.facts > div { display: grid; grid-template-columns: 3.5em 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.facts > div:first-child { border-top: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.sec { margin-top: 40px; }
@media (min-width: 1280px) { .sec { margin-top: 56px; } }
.sec h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--text); }
@media (min-width: 1280px) { .sec h2 { font-size: 1.5rem; } }
.prose p { margin: 0 0 1em; }
.prose > :last-child { margin-bottom: 0; }

.notices { list-style: none; margin: 0; padding: 0; }
.notices li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notices time { font-size: 0.9375rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.notices a { color: var(--text); font-weight: 600; text-decoration: none; }
.notices a:hover { text-decoration: underline; }
.new { font-size: 0.875rem; font-weight: 700; color: var(--soon); background: var(--soon-bg); border-radius: 4px; padding: 0 6px; }
.more { margin: 12px 0 0; font-size: 0.9375rem; }
.tag { font-size: 0.875rem; font-weight: 600; color: var(--brand); border: 1px solid var(--brand); border-radius: 4px; padding: 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 20px 48px; }
.steps li::before {
	content: counter(s); position: absolute; left: 0; top: 0;
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--brand); color: #fff; font-weight: 700;
	display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.steps li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--border); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; line-height: 32px; }
.steps p { margin: 4px 0 0; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
	list-style: none; cursor: pointer; font-weight: 600;
	min-height: 52px; padding: 12px 40px 12px 0; position: relative;
	display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+ 열기"; position: absolute; right: 0; font-size: 0.875rem; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "− 닫기"; }
.faq summary { padding-right: 64px; }
.faq-a { padding: 0 0 16px; color: var(--text); }

/* 공지 페이지 */
.page-title { font-size: 1.5rem; margin: 24px 0 16px; }
.notice-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.notice-filter label { font-weight: 600; }
.notice-filter select { font: inherit; font-size: 1rem; min-height: 44px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); max-width: 100%; }
.notice-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9375rem; margin: 0 0 8px; }
main.wrap-narrow:not(.case-page) { padding-top: 24px; padding-bottom: 48px; }
.page-title { margin-top: 0; }

/* 하단 고정 신청 버튼 */
.cta-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	background: var(--surface);
	border-top: 1px solid var(--border);
	box-shadow: 0 -4px 16px rgba(28, 36, 34, 0.08);
	padding: 10px 16px calc(8px + env(safe-area-inset-bottom));
}
.cta-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.cta-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cta-case { font-size: 0.875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta-btn {
	flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 52px; padding: 0 20px;
	background: var(--cta); color: #fff; font-weight: 700; font-size: 1.0625rem;
	border-radius: 10px; text-decoration: none; white-space: nowrap;
}
.cta-btn:hover { background: #9C470C; }
.cta-note { max-width: 720px; margin: 4px auto 0; font-size: 0.875rem; color: var(--muted); text-align: right; }
.cta-bar + .firm { padding-bottom: calc(var(--cta-h) + 16px); }
@media (max-height: 500px) {
	.cta-bar { position: static; box-shadow: none; }
	.cta-bar + .firm { padding-bottom: 32px; }
}

/* 광고 책임 표시 — 읽혀야 하는 글이라 작게 숨기지 않는다 */
.firm { background: #EFECE5; border-top: 1px solid var(--border); padding: 32px 0; font-size: 0.9375rem; color: var(--text); }
.firm-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.firm-list { margin: 0; display: grid; gap: 6px; }
.firm-list > div { display: grid; grid-template-columns: 6em 1fr; gap: 8px; }
.firm-list dt { color: var(--muted); }
.firm-list dd { margin: 0; }
.firm-note { margin: 16px 0 0; color: var(--muted); }
@media (min-width: 1024px) { .firm-list { grid-template-columns: repeat(2, 1fr); gap: 6px 32px; } }

/* 입력 칸 보기 (데모 전용) */
.show-fields [data-field] { outline: 2px dashed var(--cta); outline-offset: 3px; position: relative; }
.show-fields [data-field]::before {
	content: "✎ " attr(data-field);
	position: absolute; z-index: 20; left: 0; top: -1.6em;
	font-size: 0.8125rem; font-weight: 700; line-height: 1.4; letter-spacing: 0;
	color: #fff; background: var(--cta); padding: 1px 6px; border-radius: 4px;
	white-space: nowrap; pointer-events: none; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.show-fields .card { overflow: visible; padding-top: 0; }
.show-fields .cards { row-gap: 40px; }
.show-fields .card [data-field] { margin-top: 1.4em; }
.show-fields .tab-strip { gap: 8px 20px; }
.show-fields .tab-strip [data-field] { margin-top: 1.4em; }
.show-fields .cta-bar[data-field]::before { top: -1.8em; left: 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 데모 신청서 */
.apply-demo-note { background: var(--soon-bg); color: var(--soon); border-radius: 8px; padding: 10px 14px; font-size: 0.9375rem; margin: 0 0 16px; }
.apply-case { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9375rem; margin: 0 0 4px; }
.apply-steps { list-style: none; counter-reset: a; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 16px 0 20px; }
.apply-steps li { counter-increment: a; font-size: 0.875rem; color: var(--muted); text-align: center; padding-top: 8px; border-top: 4px solid var(--border); line-height: 1.35; }
.apply-steps li::before { content: counter(a) ". "; }
.apply-steps li.is-done { border-color: var(--brand); color: var(--text); }
.apply-steps li[aria-current="step"] { border-color: var(--cta); color: var(--text); font-weight: 700; }
.apply-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 18px; position: relative; }
.apply-fill { position: absolute; right: 12px; top: 12px; font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--brand); background: transparent; border: 1px dashed var(--brand); border-radius: 6px; padding: 6px 10px; min-height: 36px; cursor: pointer; }
.apply-panel { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
.apply-panel legend { font-size: 1.125rem; font-weight: 700; padding: 0 0 12px; max-width: calc(100% - 120px); }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; line-height: 1.5; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field input { font: inherit; font-weight: 400; font-size: 1.0625rem; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); width: 100%; }
.apply .facts { margin: 0; }
.sign { width: 100%; height: auto; aspect-ratio: 640 / 220; border: 2px dashed var(--border-strong); border-radius: 8px; background: #FBFAF7; touch-action: none; }
.sign-clear, .btn-ghost { font: inherit; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px; min-height: 48px; padding: 0 18px; cursor: pointer; justify-self: start; }
.apply-error { margin: 14px 0 0; color: #8A1F0C; font-weight: 600; }
.apply-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.apply-nav .cta-btn { margin-left: auto; border: 0; cursor: pointer; font-family: inherit; }
.apply-done { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 18px; }
.apply-done h2 { font-size: 1.375rem; margin-bottom: 16px; }
.apply-done .facts { margin-bottom: 16px; }
.apply .facts > div { grid-template-columns: 4.5em 1fr; }
