/* styles.css — 데이터리포트 허브 공통 스타일
   디자인 토큰 → 레이아웃 → 컴포넌트 순.
   외부 폰트·아이콘 로딩 없음(요청 0건). 360px에서 가로 넘침 0을 기준선으로 잡는다. */

/* ── 디자인 토큰 ───────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #52627a;
  --accent: #1d4ed8;
  --accent-soft: #eff4ff;
  --accent-border: #c7d7fe;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --ok-border: #a7f3d0;

  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 60rem;
  --pad: 1rem;

  --font: system-ui, -apple-system, 'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo',
    'Noto Sans KR', Roboto, sans-serif;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --surface: #111c33;
    --border: #223049;
    --border-strong: #33425e;
    --text: #e8eefb;
    --text-muted: #9fb0c9;
    --accent: #93b4ff;
    --accent-soft: #16233d;
    --accent-border: #2b3f66;
    --ok: #6ee7b7;
    --ok-soft: #0e2a22;
    --ok-border: #1f5145;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}

/* ── 리셋 ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  /* 한국어 줄바꿈: 단어 단위로 끊어 가독성 확보 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ── 레이아웃 ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

main {
  padding-block: 2rem 3rem;
}

main h1 {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.section {
  margin-top: 2.5rem;
}

.section h2 {
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.4rem);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 20;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ── 헤더 ─────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), #7c3aed);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.9) 0 2px,
    transparent 2px 5px
  );
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 55%);
  mask-image: linear-gradient(to top, #000 55%, transparent 55%);
  opacity: 0.75;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}
.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.site-nav {
  margin-left: auto;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.site-nav a:hover {
  color: var(--accent);
}

/* ── 공통 개인정보 배지 ───────────────────────────────────── */
.badge-strip {
  background: var(--ok-soft);
  border-bottom: 1px solid var(--ok-border);
}

.badge {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding-block: 0.625rem;
  font-size: 0.9375rem;
  color: var(--ok);
}
.badge strong {
  color: var(--ok);
}
.badge-icon {
  flex: none;
  line-height: 1.7;
}

/* ── 툴 카드 ──────────────────────────────────────────────── */
.tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tool-card > a,
.tool-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.tool-card > a:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.tool-card.is-planned > div {
  background: var(--bg-soft);
  box-shadow: none;
  border-style: dashed;
}

.tool-card-title {
  font-weight: 700;
}
.tool-card-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.tool-card-meta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pill {
  display: inline-block;
  vertical-align: 0.05em;
  margin-left: 0.375rem;
  padding: 0.0625rem 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.notice {
  margin: 0 0 0.875rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── 리스트류 ─────────────────────────────────────────────── */
.reasons,
.steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.reasons {
  list-style: none;
}
.steps {
  padding-left: 1.25rem;
}

.reasons li,
.steps li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.reasons li {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.reasons span,
.steps span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.bullets {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}
.bullets li {
  margin-bottom: 0.25rem;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq {
  margin: 0;
}
.faq dt {
  font-weight: 700;
  margin-top: 1.125rem;
}
.faq dt:first-child {
  margin-top: 0;
}
.faq dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

/* ── 표 ───────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.data-table th,
.data-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-soft);
  /* 라벨 열이 과도하게 눌리면 한글이 단어 중간에서 끊긴다("통신판매/업/신고번호").
     최소 폭을 줘서 띄어쓰기 지점에서만 줄바꿈되게 한다. 360px에서도 넘침 없음(실측). */
  min-width: 8rem;
}

/* 라틴 고유명사는 단어 중간에서 끊지 않는다("Cloudflar/e, Inc." 방지).
   본문 기본값이 overflow-wrap:anywhere라 이 클래스로만 예외를 준다. */
.nobreak-word {
  overflow-wrap: normal;
}

/* ── 광고 슬롯 (활성화 시 CLS 방지용 예약 높이) ───────────── */
.ad-slot {
  display: block;
  margin: 2.5rem 0 0;
  min-height: 100px;
}

/* ── 크로스링크 ───────────────────────────────────────────── */
.crosslinks {
  margin-top: 2.5rem;
}
.crosslinks h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── 푸터 ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-block: 1.75rem 2.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-badge {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ok);
  font-weight: 600;
}

.biz-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--text);
}

.biz-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

@media (min-width: 40rem) {
  .biz-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 1.5rem;
  }
}

.biz-list li {
  display: flex;
  gap: 0.5rem;
}
.biz-list li > span:first-child {
  flex: none;
  min-width: 7.5rem;
  color: var(--text-muted);
  opacity: 0.85;
}
.biz-list li > span:last-child {
  color: var(--text);
  min-width: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.copyright {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
}

/* ── 문서형 페이지 ────────────────────────────────────────── */
.page-doc main p {
  margin: 0 0 0.75rem;
}
.page-doc .section {
  margin-top: 2rem;
}
