@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

:root {
  --bg-sage: #f6faf7;
  --surface: #ffffff;
  --mint-soft: #ecfdf5;
  --mint-border: #a7f3d0;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --line-soft: #e2e8f0;
  --line-strong: #cbd5e1;
  --amber-badge-bg: #fffbeb;
  --amber-badge-txt: #b45309;
  --font-main: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max-grid: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg-sage);
  color: var(--ink-700);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.66;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.th-frame {
  max-width: var(--max-grid);
  margin: 0 auto;
  padding: 0 20px;
}

/* 최상단 한·일 공익 안내 바 */
.th-bulletin {
  background: var(--emerald-800);
  color: #ecfdf5;
  font-size: 12.5px;
  padding: 7px 0;
}

.th-bulletin__flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.th-bulletin strong { color: #a7f3d0; }

/* 고정 헤더 */
.th-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 95;
}

.th-topbar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.th-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.th-brand__symbol {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--emerald-600);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--mint-border);
}

.th-brand__label strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.15;
}

.th-brand__label span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-700);
  letter-spacing: 0.02em;
}

.th-gnb {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700);
  flex-wrap: wrap;
}

.th-gnb a:hover { color: var(--emerald-600); }

/* 메인 배너 패널 */
.th-intro {
  padding: 26px 0 20px;
}

.th-intro__panel {
  background: #ffffff;
  border: 1px solid var(--mint-border);
  border-left: 5px solid var(--emerald-600);
  border-radius: 14px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.05);
}

.th-kicker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  color: var(--emerald-800);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 9px;
}

.th-intro h1 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  line-height: 1.32;
}

.th-intro p {
  margin: 0 0 15px;
  font-size: 14.4px;
  color: var(--ink-500);
}

/* 도움창구 즉시 검색기 */
.th-querybox {
  position: relative;
  margin-bottom: 12px;
}

.th-querybox input {
  width: 100%;
  padding: 12px 84px 12px 15px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-sage);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-900);
  outline: none;
}

.th-querybox input:focus {
  background: #ffffff;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}

.th-querybox button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  color: var(--emerald-800);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: none;
}

/* 자주 찾는 원천 바로가기 태그 */
.th-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.th-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  font-size: 12.6px;
  font-weight: 600;
  color: var(--emerald-800);
}

.th-shortcut:hover {
  background: var(--emerald-600);
  border-color: var(--emerald-600);
  color: #ffffff;
}

.th-shortcut code {
  font-family: var(--font-code);
  font-size: 11px;
  opacity: 0.85;
}

.th-alert {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 600;
  display: none;
}

/* 테마 탭 스위치 */
.th-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
}

.th-tab {
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink-700);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.th-tab.is-selected,
.th-tab:hover {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

/* 7호기 고유 레이아웃: 2열 스플릿 보드 + 내부 리스트 행(Row) 테이블 */
.th-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.th-desk {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.th-desk__head {
  background: var(--mint-soft);
  border-bottom: 1px solid var(--mint-border);
  padding: 13px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.th-desk__head-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.th-desk__no {
  background: var(--emerald-700);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}

.th-desk__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
}

.th-desk__all {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--emerald-800);
  white-space: nowrap;
}

.th-desk__all:hover { text-decoration: underline; }

.th-list {
  list-style: none;
  margin: 0;
  padding: 6px 18px 10px;
}

.th-row {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.th-row:last-child { border-bottom: 0; }

.th-row__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.th-row__link {
  font-weight: 700;
  font-size: 14.3px;
  color: var(--ink-900);
}

.th-row__link:hover { color: var(--emerald-600); }

.th-badge-gov {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--mint-soft);
  color: var(--emerald-800);
  border: 1px solid var(--mint-border);
}

.th-badge-jp {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--amber-badge-bg);
  color: var(--amber-badge-txt);
}

.th-badge-host {
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--ink-500);
}

.th-row__desc {
  margin: 0;
  font-size: 12.6px;
  color: var(--ink-500);
  line-height: 1.45;
}

/* 가이드 아티클 박스 */
.th-doc {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 32px;
}

.th-doc h2 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
}

.th-doc h3 {
  margin: 20px 0 8px;
  font-size: 15.8px;
  font-weight: 700;
  color: var(--ink-900);
}

.th-doc p {
  margin: 0 0 12px;
  font-size: 14.4px;
  line-height: 1.78;
}

.th-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.8px;
  margin-top: 12px;
}

.th-table th {
  background: var(--mint-soft);
  color: var(--emerald-800);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--mint-border);
}

.th-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

/* 서브페이지 전용 */
.th-sub-wrap {
  padding: 26px 0 46px;
}

.th-sub-head {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-left: 5px solid var(--emerald-600);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 18px;
}

.th-sub-head h1 {
  margin: 6px 0 8px;
  font-size: 22.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.th-cards-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.th-entry-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 17px 19px;
}

.th-entry-card:hover { border-color: var(--emerald-600); }

.th-index-nav {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 22px;
}

.th-index-nav h3 {
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--emerald-800);
}

.th-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.th-index-links a {
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--bg-sage);
  border: 1px solid var(--line-soft);
  font-size: 12.9px;
  font-weight: 600;
}

.th-index-links a:hover,
.th-index-links a.is-here {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

/* 푸터 */
.th-footer {
  background: #ffffff;
  border-top: 1px solid var(--line-soft);
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--ink-500);
}

.th-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--ink-900);
}

.th-footer__links a:hover { color: var(--emerald-600); }

@media (max-width: 960px) {
  .th-intro__panel,
  .th-board-grid,
  .th-cards-2col { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .th-intro__panel,
  .th-doc { padding: 18px 16px; }
}