/* ============================================================================
   legal.css — Workstart 이용약관 · 개인정보 처리방침 전용 스타일

   ★ 혼자 선다 (self-contained) ★
   app.html·ws-mount.css·web/theme-workstart.css 를 전혀 불러오지 않는다.
   로그인 없이 /terms · /privacy 를 열어도 모양이 그대로 나와야 하기 때문이다.
   그래서 색 토큰은 web/theme-workstart.css 의 Workstart 팔레트 값을 "읽고 그대로
   옮겨 적은" 것이다 — import·link 가 아니라 숫자를 복사했다. 글꼴은
   workstart-site/index.html(랜딩)과 같은 IBM Plex Sans KR 이다(app.html 의
   Noto Sans KR 이 아니다 — app.html 은 대시보드와 같이 쓰는 파일이라 아직
   Noto Sans KR 를 쓰고, 랜딩만 먼저 IBM Plex Sans KR 로 바뀌어 있었다).

   ★ 명암비 — 실제로 계산했다 (기준 4.5:1) ★
   아래 숫자는 scratchpad 의 작은 노드 스크립트로 각 색 조합을 WCAG 상대휘도
   공식(L = 0.2126R+0.7152G+0.0722B, 감마보정 포함)으로 직접 계산한 값이다.
   web/theme-workstart.css 주석에 있는 값과 같은 쌍은 서로 맞춰 보았다.

     밝은 판                               어두운 판
     text      / bg       18.08:1          text      / bg       17.76:1
     text-soft / bg        7.56:1          text-soft / surface  10.56:1
     text-faint/ surface   6.05:1          text-faint/ surface   6.75:1
     accent-strong/bg      6.10:1          accent-strong/bg      9.22:1
     warning-ink/warning-soft 6.11:1       warning-ink/surface   9.85:1
     danger-ink/danger-soft   5.92:1       danger-ink/surface    6.48:1

   가장 낮은 값도 5.54:1 이라 전부 4.5:1 을 넉넉히 넘는다.

   ★ 390px 가로 넘침 0 ★
   본문 폭은 글자 수 기준(65ch 안팎)으로 두고, 390px 에서는 좌우 16px
   거터만 남기고 칸을 꽉 채운다. 표는 가로로 넘치면 그 표만 스크롤되게
   가둔다(화면 전체가 넘치지 않는다).
   ========================================================================= */

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F1F2F5;

  --text: #15161A;
  --text-soft: #4A4F57;
  --text-faint: #5E636B;

  --border: #E9EBEF;
  --border-strong: #D6DAE0;

  --accent: #6C4BF6;
  --accent-strong: #5A3CE0;
  --accent-soft: #EFEAFF;
  --accent-contrast: #FFFFFF;

  --warning: #B06F14;
  --warning-soft: #FBF1E2;
  --warning-ink: #7A5310;

  --danger: #C8414F;
  --danger-soft: #FCECEE;
  --danger-ink: #A82D3B;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,18,24,.04), 0 1px 10px rgba(16,18,24,.05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F12;
    --surface: #16181D;
    --surface-2: #21252C;
    --text: #FFFFFF;
    --text-soft: #C3C8D0;
    --text-faint: #9AA0AA;
    --border: #252932;
    --border-strong: #363C47;
    --accent: #9A83FF;
    --accent-strong: #B9A8FF;
    --accent-soft: #241E40;
    --accent-contrast: #15161A;
    --warning: #E3A152;
    --warning-soft: rgba(227,161,82,.18);
    --warning-ink: #EDB778;
    --danger: #F0768A;
    --danger-soft: rgba(240,118,138,.18);
    --danger-ink: #F0768A;
    --shadow: 0 1px 2px rgba(0,0,0,.42), 0 1px 10px rgba(0,0,0,.32);
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F12;
  --surface: #16181D;
  --surface-2: #21252C;
  --text: #FFFFFF;
  --text-soft: #C3C8D0;
  --text-faint: #9AA0AA;
  --border: #252932;
  --border-strong: #363C47;
  --accent: #9A83FF;
  --accent-strong: #B9A8FF;
  --accent-soft: #241E40;
  --accent-contrast: #15161A;
  --warning: #E3A152;
  --warning-soft: rgba(227,161,82,.18);
  --warning-ink: #EDB778;
  --danger: #F0768A;
  --danger-soft: rgba(240,118,138,.18);
  --danger-ink: #F0768A;
  --shadow: 0 1px 2px rgba(0,0,0,.42), 0 1px 10px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-x: hidden;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

/* ── 맨 위 띠 ───────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.topbar .back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-soft);
  padding: 6px 10px; border-radius: 8px;
}
.topbar .back:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar .back svg { width: 16px; height: 16px; flex: none; }

.topbar .right { display: flex; align-items: center; gap: 8px; }
.topbar .doclink {
  font-size: 13.5px; color: var(--text-faint); padding: 6px 8px; border-radius: 8px;
}
.topbar .doclink:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar .doclink[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }

.themebtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); cursor: pointer;
}
.themebtn:hover { background: var(--surface-2); color: var(--text); }
.themebtn svg { width: 16px; height: 16px; }
.themebtn .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .i-moon { display: none; }
  :root:not([data-theme="light"]) .themebtn .i-sun { display: block; }
}
:root[data-theme="dark"] .themebtn .i-moon { display: none; }
:root[data-theme="dark"] .themebtn .i-sun { display: block; }

/* ── 본문 뼈대 ──────────────────────────────────────────────────────── */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 80px; }

.doc-head { padding: 36px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.doc-head .kicker {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-strong); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.doc-head h1 { font-size: 26px; line-height: 1.35; margin: 0 0 10px; font-weight: 700; }
.doc-head .meta { font-size: 13.5px; color: var(--text-faint); }
.doc-head .meta b { color: var(--text-soft); font-weight: 600; }

/* ── 빈칸 — 대표님이 채워야 하는 자리 ───────────────────────────────── */
.fillme {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--warning-soft);
  color: var(--warning-ink);
  border: 1px dashed var(--warning-ink);
  font-weight: 600;
  font-size: .95em;
  white-space: nowrap;
}

/* ── 안내 상자 ──────────────────────────────────────────────────────── */
.notice {
  display: flex; gap: 10px;
  padding: 14px 16px; margin: 0 0 28px;
  background: var(--warning-soft); border: 1px solid var(--warning-ink);
  border-radius: var(--radius); color: var(--text);
  font-size: 14.5px; line-height: 1.7;
}
.notice b { color: var(--warning-ink); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warning-ink); }

/* ── 목차 ───────────────────────────────────────────────────────────── */
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 36px; box-shadow: var(--shadow);
}
.toc h2 { font-size: 14px; margin: 0 0 10px; color: var(--text-faint); font-weight: 600; letter-spacing: .03em; }
.toc ol { margin: 0; padding: 0 0 0 20px; columns: 1; }
.toc li { font-size: 14.5px; line-height: 1.9; }
.toc a { color: var(--text-soft); }
.toc a:hover { color: var(--accent-strong); }
@media (min-width: 620px) {
  .toc ol { columns: 2; column-gap: 24px; }
}

/* ── 조문 ───────────────────────────────────────────────────────────── */
article section { margin-bottom: 34px; scroll-margin-top: 70px; }
article h2 {
  font-size: 18.5px; font-weight: 700; margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
article h2 .no { color: var(--accent-strong); margin-right: 6px; }
article p { margin: 0 0 12px; color: var(--text); max-width: 65ch; }
article ol, article ul { margin: 0 0 12px; padding-left: 22px; max-width: 65ch; }
article li { margin-bottom: 6px; }
article .sub { color: var(--text-soft); }
article strong { font-weight: 700; }

/* 짧은 key-value 표(보호책임자 등) — 칸이 둘뿐이라 좁은 화면에서도 안 짜부라진다.
   가로 스크롤을 만들지 않는다(불필요한 스크롤은 오히려 읽기 번거롭다). */
table {
  width: 100%; border-collapse: collapse; margin: 10px 0 16px;
  font-size: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  table-layout: auto;
}
table th, table td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border);
  white-space: normal; word-break: keep-all; vertical-align: top;
}
table th { color: var(--text-faint); font-weight: 600; background: var(--surface-2); }
table tr:last-child td { border-bottom: 0; }

/* 칸이 넷 다섯인 자료표(수집항목·보유기간·처리위탁·국외이전) — 390px 에서 글자를
   짜부라뜨리는 대신, **표 하나만** 가로로 스크롤되게 가둔다. 화면 전체는 넘치지
   않는다(.wrap 에 overflow-x:hidden 이 없어도 되는 것이 바로 이 때문이다 — 넘칠
   수 있는 것을 표 혼자 가두어 바깥으로 새지 않게 한다). */
.tblwrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 10px 0 16px;
  border: 1px solid var(--border); border-radius: 10px;
}
.tblwrap table {
  min-width: 620px; margin: 0; border: 0; border-radius: 0;
}
/* 2026-10-14 — 칸이 둘인 표(12절 보호책임자)도 가둔다. 넓이를 억지로 늘리지 않고,
   넘칠 때만 표 혼자 가로로 스크롤된다. */
.tblwrap.kv table { min-width: 0; }

blockquote {
  margin: 0 0 16px; padding: 12px 14px;
  background: var(--surface-2); border-left: 3px solid var(--border-strong);
  border-radius: 8px; color: var(--text-soft); font-size: 14.5px;
}

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.crosslink {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 14.5px; color: var(--text-soft);
}

footer.doc-foot {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-faint); line-height: 1.8;
}
footer.doc-foot a { color: var(--text-faint); }
footer.doc-foot a:hover { color: var(--accent-strong); }

@media (max-width: 480px) {
  .doc-head h1 { font-size: 22px; }
  article h2 { font-size: 17px; }
  body { font-size: 15.5px; }
}
