/* ===========================================================
 * taxmap.css — 역대 정부 부동산 세제 지도 전용 스타일
 * 이 페이지에서만 사용한다. (부트스트랩4 위에 덧입힘)
 * =========================================================== */

#taxh {
	--th-bd: #e3e6ea;
	--th-bd2: #d3d8de;
	--th-ink: #2b3138;
	--th-mute: #7c858e;
	--th-bg: #f7f8fa;
	--th-card: #ffffff;
	color: var(--th-ink);
	font-size: 0.92rem;
	margin-top: 1.5rem; /* 상단 고정 nav와의 간격. 다른 페이지 제목의 mt-4와 같은 값 */
}
#taxh *, #taxh *::before, #taxh *::after { box-sizing: border-box; }

/* ---------- 히어로 ---------- */
.th-hero {
	background: linear-gradient(135deg, #2b3a4a 0%, #3d5166 55%, #4a6b7c 100%);
	color: #fff; border-radius: 0.6rem; padding: 1.4rem 1.3rem 1.2rem;
	margin-bottom: 1rem; position: relative; overflow: hidden;
}
.th-hero::after {
	content: ''; position: absolute; right: -60px; top: -70px;
	width: 220px; height: 220px; border-radius: 50%;
	background: rgba(255,255,255,0.06);
}
.th-hero h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.th-hero .th-copy {
	position: absolute; right: 0.9rem; top: 0.9rem; z-index: 1; cursor: pointer;
	font-size: 0.74rem; color: rgba(255,255,255,0.82); background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.22); border-radius: 2rem; padding: 0.18rem 0.6rem;
}
.th-hero .th-copy:hover { background: rgba(255,255,255,0.22); color: #fff; }
.th-hero p { margin: 0; font-size: 0.86rem; line-height: 1.6; color: rgba(255,255,255,0.86); }
.th-hero .th-stat { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; position: relative; }
.th-hero .th-stat span {
	background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18);
	border-radius: 2rem; padding: 0.18rem 0.7rem; font-size: 0.76rem;
}

/* ---------- 정부안 안내 배너 ---------- */
.th-alert {
	background: #f8f5fd; border: 1px solid #ddd2f0; border-left: 4px solid #8a72c4;
	border-radius: 0.5rem; padding: 0.7rem 0.85rem; margin-bottom: 0.8rem;
	font-size: 0.81rem; line-height: 1.65; color: #443c58;
}
.th-alert b { color: #35304a; }
.th-alert-act {
	display: inline-block; margin: 0.35rem 0.25rem 0 0; cursor: pointer;
	font-size: 0.75rem; font-weight: 600; color: #5b4a90; background: #fff;
	border: 1px solid #c9bbe6; border-radius: 2rem; padding: 0.2rem 0.6rem;
}
.th-alert-act:hover { background: #efe9fb; }

/* ---------- 뷰 탭 ---------- */
.th-tabs { display: flex; gap: 0.3rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.th-tab {
	flex: 1 1 auto; text-align: center; cursor: pointer; user-select: none;
	border: 1px solid var(--th-bd2); background: #fff; color: var(--th-mute);
	border-radius: 0.45rem; padding: 0.5rem 0.6rem; font-size: 0.84rem; font-weight: 600;
	transition: all 0.15s;
}
.th-tab:hover { border-color: #9aa4ae; color: var(--th-ink); }
.th-tab.on { background: #2b3a4a; border-color: #2b3a4a; color: #fff; }
.th-tab small { display: block; font-weight: 400; font-size: 0.68rem; opacity: 0.75; }

/* ---------- 필터 패널 ---------- */
.th-filters {
	background: var(--th-card); border: 1px solid var(--th-bd);
	border-radius: 0.6rem; padding: 0.8rem; margin-bottom: 0.8rem;
	box-shadow: 0 1px 3px rgba(20,30,45,0.04);
}
.th-filters.sticky { position: sticky; top: 0; z-index: 30; }
.th-frow { margin-bottom: 0.6rem; }
.th-frow:last-child { margin-bottom: 0; }
.th-flabel {
	font-size: 0.7rem; font-weight: 700; color: var(--th-mute);
	letter-spacing: 0.06em; margin-bottom: 0.3rem; display: flex;
	align-items: center; justify-content: space-between;
}
.th-flabel a { font-size: 0.7rem; font-weight: 500; color: #5b7fa6; cursor: pointer; }
.th-chips { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.th-chip {
	cursor: pointer; user-select: none; font-size: 0.76rem; line-height: 1;
	padding: 0.34rem 0.6rem; border-radius: 2rem; border: 1px solid var(--th-bd2);
	background: #fff; color: #5a636c; transition: all 0.12s; white-space: nowrap;
	display: inline-flex; align-items: center; gap: 0.3rem;
}
.th-chip:hover { border-color: #97a1ab; color: var(--th-ink); }
.th-chip .th-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.th-chip .th-n { font-size: 0.68rem; opacity: 0.6; }
.th-chip.on { color: #fff; border-color: transparent; font-weight: 600; }
.th-chip.on .th-dot { background: rgba(255,255,255,0.9); opacity: 1; }
.th-chip.on .th-n { opacity: 0.8; }
.th-chip.dim { opacity: 0.4; }

.th-search { position: relative; }
.th-search input {
	width: 100%; border: 1px solid var(--th-bd2); border-radius: 0.45rem;
	padding: 0.5rem 2rem 0.5rem 0.7rem; font-size: 0.88rem; color: var(--th-ink);
}
.th-search input:focus { outline: none; border-color: #6f93b8; box-shadow: 0 0 0 3px rgba(111,147,184,0.15); }
.th-search .th-clear {
	position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
	cursor: pointer; color: #aeb5bc; font-size: 1.05rem; line-height: 1; display: none;
}
.th-search.has .th-clear { display: block; }

.th-bar {
	display: flex; align-items: center; justify-content: space-between;
	gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.7rem;
}
.th-count { font-size: 0.82rem; color: var(--th-mute); }
.th-count b { color: #c0392b; font-size: 1rem; }
.th-sort { display: flex; gap: 0.25rem; }
.th-sort span {
	cursor: pointer; font-size: 0.74rem; padding: 0.25rem 0.55rem;
	border: 1px solid var(--th-bd2); border-radius: 0.35rem; background: #fff; color: var(--th-mute);
}
.th-sort span.on { background: #eef2f6; border-color: #a9b6c2; color: var(--th-ink); font-weight: 600; }

/* ---------- 연표 ---------- */
.th-gov {
	margin-bottom: 1.1rem; border: 1px solid var(--th-bd); border-radius: 0.6rem;
	background: var(--th-card); overflow: hidden;
}
.th-gov-head {
	display: flex; align-items: center; gap: 0.6rem; cursor: pointer;
	padding: 0.65rem 0.8rem; background: #fbfcfd; border-bottom: 1px solid var(--th-bd);
	border-left: 5px solid var(--gc, #999);
}
.th-gov-head h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.th-gov-head .th-period { font-size: 0.74rem; color: var(--th-mute); }
.th-gov-head .th-gn {
	margin-left: auto; font-size: 0.72rem; color: #fff; background: var(--gc, #999);
	border-radius: 2rem; padding: 0.1rem 0.55rem; white-space: nowrap;
}
.th-gov-head .th-caret { color: var(--th-mute); font-size: 0.8rem; transition: transform 0.15s; }
.th-gov.collapsed .th-caret { transform: rotate(-90deg); }
.th-gov.collapsed .th-gov-body { display: none; }
.th-gov-one {
	font-size: 0.78rem; color: #5f6a74; padding: 0.5rem 0.85rem 0;
	line-height: 1.5;
}

.th-gov-body { padding: 0.6rem 0.85rem 0.9rem; }
.th-track { position: relative; padding-left: 1.1rem; }
.th-track::before {
	content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px;
	width: 2px; background: linear-gradient(180deg, var(--gc,#ccc) 0%, rgba(0,0,0,0.05) 100%);
	border-radius: 2px;
}

.th-ev { position: relative; padding: 0.55rem 0 0.55rem 0.15rem; border-bottom: 1px dashed #edf0f3; }
.th-ev:last-child { border-bottom: none; }
.th-ev::before {
	content: ''; position: absolute; left: -1.1rem; top: 0.95rem;
	width: 9px; height: 9px; border-radius: 50%;
	background: #fff; border: 2px solid var(--cc, #999);
}
.th-ev.is-new::before { box-shadow: 0 0 0 3px rgba(91,83,201,0.18); }
.th-ev-top { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.th-ev-date {
	font-size: 0.72rem; color: #8a929a; font-variant-numeric: tabular-nums;
	white-space: nowrap; font-weight: 600;
}
.th-ev-title {
	font-size: 0.93rem; font-weight: 700; margin: 0.1rem 0 0.25rem;
	line-height: 1.4; cursor: pointer;
}
.th-ev-title:hover { color: #2f6fb5; }
.th-ev-s { font-size: 0.83rem; line-height: 1.65; color: #4d565f; margin: 0.15rem 0 0.35rem; }
.th-ev.folded .th-ev-s { display: none; }
.th-ev-nums { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.3rem; }
.th-num {
	font-size: 0.73rem; background: #f2f5f8; border: 1px solid #e3e9ef;
	color: #3c4a58; border-radius: 0.3rem; padding: 0.14rem 0.42rem;
	font-variant-numeric: tabular-nums;
}

.th-tag {
	font-size: 0.68rem; font-weight: 700; border-radius: 0.28rem;
	padding: 0.1rem 0.38rem; color: #fff; white-space: nowrap; letter-spacing: -0.01em;
}
.th-tag.cat { background: var(--cc, #888); }
.th-tag.dir { background: var(--dc, #888); }
.th-tag.st { background: #fff; border: 1px solid #c9d1d9; color: #6b747d; font-weight: 600; }
.th-tag.st.정부안, .th-tag.st.검토중 { border-color: #e0b84a; color: #a3781a; background: #fffaee; }
.th-tag.st.개정예정 { border-color: #c6b6e2; color: #6f56a0; background: #f8f5fd; }
.th-tag.st.한시, .th-tag.st.경과조치 { border-color: #9ec5e0; color: #35719b; background: #f4fafd; }
.th-tag.st.위헌 { border-color: #e2a3a3; color: #a33; background: #fff5f5; }

/* ---------- 매트릭스 ---------- */
.th-matrix-wrap { overflow-x: auto; border: 1px solid var(--th-bd); border-radius: 0.6rem; background: #fff; }
table.th-matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: 0.78rem; }
table.th-matrix th, table.th-matrix td { border-bottom: 1px solid #eef1f4; padding: 0; text-align: center; }
table.th-matrix thead th {
	position: sticky; top: 0; background: #f7f9fb; z-index: 2;
	font-size: 0.72rem; font-weight: 700; color: #4c5661; padding: 0.5rem 0.2rem;
	border-bottom: 1px solid var(--th-bd2); white-space: nowrap;
}
table.th-matrix thead th small { display: block; font-weight: 400; color: #949ba2; font-size: 0.64rem; }
table.th-matrix tbody th {
	position: sticky; left: 0; background: #fff; z-index: 1; text-align: left;
	padding: 0.4rem 0.55rem; font-weight: 600; font-size: 0.76rem; white-space: nowrap;
	border-right: 1px solid var(--th-bd2);
}
table.th-matrix tbody th i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 0.35rem; }
.th-cell {
	display: block; width: 100%; height: 100%; min-height: 2.3rem; cursor: pointer;
	display: flex; align-items: center; justify-content: center; gap: 2px;
	flex-wrap: wrap; padding: 0.25rem 0.15rem; transition: background 0.12s;
}
.th-cell:hover { background: #eef4fa; }
.th-cell.empty { cursor: default; color: #d3d8dd; }
.th-cell.empty:hover { background: transparent; }
.th-pip { width: 6px; height: 6px; border-radius: 50%; }
.th-cell .th-cnt { font-size: 0.7rem; font-weight: 700; color: #465059; margin-left: 2px; }

/* ---------- 계보 ---------- */
.th-line {
	border: 1px solid var(--th-bd); border-radius: 0.6rem; background: #fff;
	padding: 0.8rem; margin-bottom: 0.8rem;
}
.th-line h3 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.2rem; display: flex; align-items: center; gap: 0.4rem; }
.th-line .th-note { font-size: 0.78rem; color: #6b757e; margin: 0 0 0.6rem; line-height: 1.55; }
.th-steps { display: flex; overflow-x: auto; gap: 0.4rem; padding-bottom: 0.3rem; scroll-snap-type: x proximity; }
.th-steps > .th-step { scroll-snap-align: start; }
.th-steps::-webkit-scrollbar, .th-matrix-wrap::-webkit-scrollbar, .th-rate-wrap::-webkit-scrollbar { height: 7px; }
.th-steps::-webkit-scrollbar-thumb, .th-matrix-wrap::-webkit-scrollbar-thumb, .th-rate-wrap::-webkit-scrollbar-thumb { background: #c8d0d8; border-radius: 4px; }
.th-steps::-webkit-scrollbar-track, .th-matrix-wrap::-webkit-scrollbar-track, .th-rate-wrap::-webkit-scrollbar-track { background: #f1f4f7; border-radius: 4px; }
.th-scrollwrap { position: relative; }
.th-scrollwrap::after {
	content: ''; position: absolute; right: 0; top: 0; bottom: 8px; width: 28px;
	pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,0), #fff 75%);
}
.th-step {
	flex: 0 0 auto; min-width: 128px; max-width: 170px; border: 1px solid var(--th-bd2);
	border-radius: 0.45rem; padding: 0.45rem 0.55rem; position: relative; background: #fdfefe;
}
.th-step + .th-step::before {
	content: '›'; position: absolute; left: -0.45rem; top: 50%; transform: translateY(-50%);
	color: #b9c1c9; font-size: 0.9rem;
}
.th-step .sy { font-size: 0.7rem; font-weight: 700; color: #46505a; font-variant-numeric: tabular-nums; }
.th-step .sg { font-size: 0.68rem; color: #8b939b; }
.th-step .sv { font-size: 0.76rem; margin-top: 0.25rem; line-height: 1.4; color: #333b43; }
.th-step.on { border-left: 3px solid #1f8a5f; }
.th-step.hold { border-left: 3px solid #d99b1f; background: #fffdf6; }
.th-step.off { border-left: 3px solid #9aa2aa; background: #fafbfc; }
.th-step.off .sv { color: #7d858d; text-decoration: line-through; text-decoration-color: #cdd3d8; }
.th-step.plan { border-left: 3px dashed #9a86c9; background: #fbfaff; }
.th-step.plan .sv { color: #4c4262; }
.th-step.plan .sy::after { content: ' 정부안'; font-size: 0.6rem; color: #7a5aa8; }

/* ---------- 세율표 ---------- */
.th-rate {
	border: 1px solid var(--th-bd); border-radius: 0.6rem; background: #fff;
	padding: 0.8rem; margin-bottom: 0.9rem;
}
.th-rate h3 { font-size: 0.97rem; font-weight: 700; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.th-rate .th-note { font-size: 0.78rem; color: #6b757e; margin: 0 0 0.6rem; line-height: 1.55; }
.th-rate-wrap { overflow-x: auto; border: 1px solid #eaeef2; border-radius: 0.45rem; }

table.th-rt { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 620px; font-size: 0.79rem; }
table.th-rt thead th {
	position: sticky; top: 0; z-index: 2; background: #f4f7fa; color: #3f4a55;
	font-size: 0.73rem; font-weight: 700; padding: 0.45rem 0.5rem; text-align: center;
	border-bottom: 1px solid var(--th-bd2); white-space: nowrap;
}
table.th-rt thead th:first-child { text-align: left; z-index: 3; left: 0; }
table.th-rt tbody th {
	position: sticky; left: 0; z-index: 1; background: #fff; text-align: left;
	padding: 0.45rem 0.55rem; border-right: 1px solid var(--th-bd2);
	border-bottom: 1px solid #eef1f4; min-width: 168px; vertical-align: top; font-weight: 600;
}
table.th-rt tbody td {
	padding: 0.45rem 0.5rem; text-align: center; vertical-align: middle;
	border-bottom: 1px solid #eef1f4; color: #39424b; line-height: 1.45;
	font-variant-numeric: tabular-nums;
}
table.th-rt tbody tr:last-child th, table.th-rt tbody tr:last-child td { border-bottom: none; }
table.th-rt tbody tr:hover th, table.th-rt tbody tr:hover td { background: #f8fbfd; }
table.th-rt tbody tr.hit th { box-shadow: inset 3px 0 0 var(--cc, #888); }

table.th-rt .rp { display: block; font-size: 0.78rem; color: #232a31; font-variant-numeric: tabular-nums; }
table.th-rt .rg { display: block; font-size: 0.7rem; font-weight: 600; color: var(--cc, #7a848d); margin-top: 0.05rem; }
table.th-rt .rn { display: block; font-size: 0.68rem; font-weight: 400; color: #929aa2; margin-top: 0.12rem; line-height: 1.4; }
table.th-rt .rc {
	display: inline-block; margin-top: 0.2rem; font-size: 0.63rem; font-weight: 700;
	color: #b3541e; background: #fff3e8; border: 1px solid #f2d5bd;
	border-radius: 0.25rem; padding: 0 0.28rem;
}
.rplan {
	display: inline-block; font-style: normal; font-size: 0.63rem; font-weight: 700;
	color: #7a5aa8; background: #f4f0fb; border: 1px dashed #c6b6e2;
	border-radius: 0.25rem; padding: 0 0.28rem; margin-left: 0.25rem; vertical-align: 1px;
}
table.th-rt tbody tr.plan th, table.th-rt tbody tr.plan td { background: #fcfbfe; }
table.th-rt tbody tr.plan td { color: #4a4359; }
table.th-rt tbody tr.plan th { border-left: 3px solid #b9a8dd; }
table.th-rt tbody tr.plan:hover th, table.th-rt tbody tr.plan:hover td { background: #f7f4fd; }

table.th-rt td.chg {
	background: #fff6e9; box-shadow: inset 0 0 0 1px #f3e0c4; font-weight: 700; color: #7a4a13;
}
table.th-rt tbody tr:hover td.chg { background: #fff0dc; }
table.th-rt td.none { color: #c8cfd5; }

/* ---------- 안내/빈 결과 ---------- */
.th-empty { text-align: center; padding: 2.4rem 1rem; color: var(--th-mute); }
.th-empty b { display: block; font-size: 1rem; color: var(--th-ink); margin-bottom: 0.3rem; }
.th-legend { font-size: 0.74rem; color: var(--th-mute); line-height: 1.7; }
.th-legend .th-tag { margin-right: 0.2rem; }

/* ---------- 상세 모달 ---------- */
#thModal .modal-content { border: none; border-radius: 0.6rem; }
#thModal .modal-header { border-bottom: 1px solid var(--th-bd); padding: 0.8rem 1rem; }
#thModal .modal-title { font-size: 1rem; font-weight: 700; line-height: 1.4; }
#thModal .modal-body { font-size: 0.88rem; line-height: 1.7; color: #3d464f; }
#thModal .th-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.6rem; }
#thModal .th-rel { border-top: 1px dashed var(--th-bd2); margin-top: 0.9rem; padding-top: 0.7rem; }
#thModal .th-rel h6 { font-size: 0.78rem; color: var(--th-mute); font-weight: 700; }
#thModal .th-rel a { display: block; font-size: 0.82rem; padding: 0.2rem 0; color: #2f6fb5; cursor: pointer; }

/* ---------- 주의사항 ---------- */
.th-caveat { background: #fffdf5; border: 1px solid #eadfbe; border-radius: 0.6rem; padding: 0.9rem 1rem; }
.th-caveat h5 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.5rem; }
.th-caveat ul { margin: 0; padding-left: 1.1rem; }
.th-caveat li { font-size: 0.82rem; line-height: 1.7; color: #55503f; }

/* 좁은 화면(사이트 viewport 400px) 대응 */
@media (max-width: 575px) {
	.th-hero { padding: 1.1rem 1rem; }
	.th-hero h1 { font-size: 1.2rem; padding-right: 5.5rem; }
	.th-tab { font-size: 0.78rem; padding: 0.42rem 0.4rem; }
	.th-chip { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
	.th-gov-body { padding: 0.5rem 0.6rem 0.8rem; }
}
