/* 공식 배포 사이트 (F-A1) — 원천은 design/site/README.md("토큰"·"PC 에서도"·"페이지"·"하단")와
   prototype/source/PIM-Site.dc.html 의 page 상태. 라이트 + 다크는 prefers-color-scheme 만 따른다(토글·쿠키·저장 없음).
   CSP 가 style-src 'self' 라 인라인 style 속성을 쓰지 않는다 — 모양은 전부 이 파일의 클래스다.
   서체는 자체 호스팅 Pretendard 400·500·600·700(OFL — /assets/OFL-1.1.txt), 모노스페이스는 시스템 서체. 외부 출처 없음. */

@font-face {
  font-family: "Pretendard";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/pretendard-400.3ffbacde.otf") format("opentype");
}

@font-face {
  font-family: "Pretendard";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/assets/pretendard-500.d39e50e4.otf") format("opentype");
}

@font-face {
  font-family: "Pretendard";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/pretendard-600.c89bc430.otf") format("opentype");
}

@font-face {
  font-family: "Pretendard";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/pretendard-700.2e91915f.otf") format("opentype");
}

/* ── 토큰 (디자인 README "토큰" 표 — 라이트 / 다크) ── */
:root {
  color-scheme: light dark;
  --bg: #fff;
  --alt: rgb(247, 247, 248);
  --ink: rgb(23, 23, 25);
  --strong: rgb(15, 15, 16);
  --sub: rgba(55, 56, 60, 0.61);
  --assist: rgba(55, 56, 60, 0.28);
  --line: rgba(112, 115, 124, 0.16);
  --line2: rgb(225, 226, 228);
  --wash: rgba(112, 115, 124, 0.05);
  --wash2: rgba(112, 115, 124, 0.08);
  --btn: rgb(23, 23, 25);
  --btn-ink: #fff;
  --seg: #fff;
  --ok: rgb(0, 153, 51);
  --bad: rgb(230, 46, 46);
  --mid: rgba(55, 56, 60, 0.61);
  --link: rgb(0, 102, 255);
  --gutter: clamp(16px, 4vw, 20px);
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: rgb(15, 15, 16);
    --alt: rgb(23, 23, 25);
    --ink: rgb(247, 247, 248);
    --strong: #fff;
    --sub: rgba(174, 176, 182, 0.82);
    --assist: rgba(174, 176, 182, 0.45);
    --line: rgba(112, 115, 124, 0.32);
    --line2: rgba(112, 115, 124, 0.42);
    --wash: rgba(112, 115, 124, 0.12);
    --wash2: rgba(112, 115, 124, 0.22);
    --btn: #fff;
    --btn-ink: rgb(15, 15, 16);
    --seg: rgb(46, 47, 51);
    --ok: rgb(61, 214, 113);
    --bad: rgb(255, 110, 110);
    --mid: rgba(174, 176, 182, 0.82);
    --link: rgb(109, 143, 245);
  }
}

/* ── 기본 ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Pretendard",
    system-ui,
    -apple-system,
    "Apple SD Gothic Neo",
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1 {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--strong);
}

h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--strong);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.mono.strong {
  font-weight: 600;
}

.small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--sub);
}

.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--sub);
}

.lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--sub);
}

.lead-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
}

.text-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 줄 목록 — 테두리 안 행마다 아래 선 */
.rows {
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.rows .row,
.rows tr {
  box-shadow: inset 0 -1px 0 0 var(--line);
}

/* ── 머리 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  box-shadow: inset 0 -1px 0 0 var(--line);
}

/* 최대 폭은 여백을 뺀 본문 폭이다(디자인 프로토타입이 content-box) — .page 도 같다 */
.bar {
  box-sizing: content-box;
  max-width: 1060px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header .bar {
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
}

.brand {
  display: flex;
  align-items: center;
  height: 40px;
  flex-shrink: 0;
}

.brand svg {
  display: block;
  height: 26px;
  width: auto;
}

.wm-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .wm-light {
    display: none;
  }

  .wm-dark {
    display: inline;
  }
}

.site-nav {
  flex: 1 1 480px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  width: max-content;
  margin-left: auto;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--sub);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--strong);
  background: var(--wash2);
}

/* ── 본문 틀 — 페이지별 최대 폭·간격 ── */
main {
  flex: 1;
}

.page {
  box-sizing: content-box;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-home {
  max-width: 960px;
  padding-top: clamp(40px, 8vw, 88px);
  gap: clamp(40px, 6vw, 64px);
}

.page-limits {
  gap: 36px;
}

.page-newsbot {
  gap: 24px;
}

.page-legal {
  max-width: 1060px;
  gap: 0;
}

.page-notfound {
  padding: clamp(80px, 14vw, 160px) 20px;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-limits .block {
  gap: 14px;
}

/* ── 소개 ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

/* 디자인은 clamp(72px, 12vw, 112px) 높이의 글자 SVG(둘레 여백 포함)다. 윤곽선판은 글자가 상자를 꽉 채우므로
   같은 글자 크기가 되도록 0.89 배 높이 + 위 여백(디자인 SVG 의 점 위 여백 0.16 배)으로 옮긴다 */
.hero-mark svg {
  display: block;
  height: clamp(64px, 10.7vw, 100px);
  width: auto;
  margin-top: clamp(12px, 1.9vw, 18px);
}

.tagline {
  font-size: 15px;
  color: var(--sub);
  letter-spacing: 0.01em;
}

/* 공식 Google Play 배지 줄 — 뒤에 배지 둘이 들어갈 자리(지금은 하나). 배지는 늘이거나 줄이지 않는다(사용 조건) */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.store-badge {
  display: block;
  line-height: 0;
}

.store-badge img {
  display: block;
  height: 53px;
  width: auto;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
}

/* ── 번호 목록 (디자인 v2 `01b`·`03` 의 번호 원 24) — 번호는 CSS 카운터라 생성물에 숫자 글자가 없다.
   기본은 검정 원(--btn/--btn-ink), .muted 는 회색 원(--wash2/--ink — /guide) ── */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps > li {
  counter-increment: step;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.steps > li::before {
  content: counter(step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.steps.muted > li {
  gap: 12px;
}

.steps.muted > li::before {
  background: var(--wash2);
  color: var(--ink);
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.step-body h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.step-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
}

.step-body a {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

/* ── 소개 — 뉴스 요약과 토론 (디자인 v2 `01b`, D-214) ── */
.news-intro {
  padding: clamp(24px, 4vw, 32px);
  border-radius: 16px;
  background: var(--wash);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-intro .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.news-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-top: 14px;
  box-shadow: inset 0 1px 0 0 var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--sub);
}

.news-note a {
  font-weight: 600;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.promise-card {
  padding: 24px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.55;
}

.ticks .icon {
  margin-top: 2px;
}

.page-limits .ticks li {
  line-height: 1.6;
}

.page-limits .ticks .icon {
  margin-top: 3px;
}

.icon.tick {
  color: var(--ink);
}

.icon.cross {
  color: var(--bad);
}

.promise-card .text-link {
  margin-top: 4px;
}

/* 약속 줄 옆 플랫폼 칩 — 문장 글자 밖 (AC-40) */
.chip {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--wash2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sub);
}

/* 익명성 표 아래 색 범례 (AC-41) */
.legend {
  font-size: 13px;
  line-height: 1.5;
  color: var(--sub);
}

/* ── /newsbot 표 — 항목 · 값 ── */
.kv .row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr);
  gap: 12px;
  padding: 12px 16px;
}

.kv dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.kv dd {
  font-size: 13px;
  line-height: 1.6;
  color: var(--sub);
}

/* ── 약관·방침 — /legal 은 주소의 #privacy·#privacy-N 이 아니면 이용약관을 보인다 ── */
.legal-switch:has(#privacy:target, #privacy :target) > #terms,
.legal-switch:not(:has(#privacy:target, #privacy :target)) > #privacy {
  display: none;
}

.legal-doc {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: flex-start;
  scroll-margin-top: 80px;
}

.legal-side {
  flex: 1 1 240px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seg-links {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--wash2);
}

.seg-links a {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  text-decoration: none;
  white-space: nowrap;
}

.seg-links a[aria-current="true"] {
  color: var(--strong);
  background: var(--seg);
  box-shadow: 0 1px 2px -1px rgba(23, 23, 23, 0.1);
}

.legal-side .version {
  font-size: 13px;
  color: var(--sub);
}

.toc {
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 4px 8px;
}

.toc summary {
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
}

.toc a {
  padding: 6px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--sub);
  text-decoration: none;
}

.legal-body {
  flex: 999 1 520px;
  min-width: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.clause {
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-margin-top: 80px;
}

.clause h2 {
  font-size: 17px;
  line-height: 1.45;
}

.clause p {
  font-size: 15px;
  line-height: 1.75;
}

.clause .li {
  display: flex;
  gap: 8px;
  padding-left: 4px;
}

.clause .li.depth-1 {
  padding-left: 26px;
}

.clause .li .n {
  flex-shrink: 0;
}

.table-scroll {
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto;
}

.table-scroll table {
  border-collapse: collapse;
  min-width: 100%;
}

.table-scroll th,
.table-scroll td {
  min-width: 160px;
  max-width: 260px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.table-scroll th {
  font-weight: 600;
  background: var(--wash);
}

.table-scroll td {
  font-weight: 400;
}

.older {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
  box-shadow: inset 0 1px 0 0 var(--line);
  font-size: 14px;
}

.older h2 {
  font-size: 17px;
}

/* ── 한계 고지 ── */
.limits-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.anonymity {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.anonymity tbody {
  display: block;
}

.anonymity tr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 16px;
}

.anonymity th {
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
}

.anonymity td {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.anonymity .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.tone-positive td {
  color: var(--ok);
}

.tone-neutral td {
  color: var(--mid);
}

.tone-negative td {
  color: var(--bad);
}

/* ── 뉴스 수집 안내 ── */
.kv.wide .row {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 4px 16px;
  padding: 14px 16px;
}

.kv.wide dd {
  grid-column: span 2;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  word-break: break-word;
}

.kv.wide dd ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kv a {
  text-decoration: none;
}

/* 앵커가 있는 행(/newsbot#report) — 고정 머리 아래로 내려온다 */
.kv .row[id] {
  scroll-margin-top: 72px;
}

/* ── 이용 가이드 (디자인 v2 `03`, D-214 ③) — 최대 720 은 .page 기본 ── */
.page-guide {
  gap: 32px;
}

.guide-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chips ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chips a {
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line2);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  box-shadow: inset 0 1px 0 0 var(--line);
  scroll-margin-top: 72px;
}

/* ── 계정·데이터 삭제 안내 (디자인 v2 `09`·`10`, AC-43) — 폭은 .page 기본 720, 절은 /guide 와 같은 모양 ── */
.page-account {
  gap: 32px;
}

.page-account .para,
.page-source .para {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
}

/* 앱 없이 메일로 삭제 요청 (디자인 §7 #274 `[data-account-mail]`, AC-57·59) — --wash r12 · 패딩 16·18 · gap 8,
   위 여백은 소스 합 16(절 gap 10 + 6)에 맞춰 절 gap 14 + 2. 첫 줄만 --ink, 메일 링크 600 밑줄 */
.del-mail {
  margin-top: 2px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--wash);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.del-mail p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
}

.del-mail .first {
  color: var(--ink);
}

.del-mail a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 앱 소스 (디자인 v2 `11`, AC-44) — 표 r12 테두리·머리 --wash 13/600 --sub·열 비 0.8:0.8:1:1.6·버전 600·출시일 --sub ── */
.page-source {
  gap: 24px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

table.source {
  width: 100%;
  min-width: 360px;
  border-collapse: separate;
  border-spacing: 0;
}

.source th,
.source td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

.source th {
  background: var(--wash);
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
}

.source th:nth-child(1) {
  width: 19%;
}

.source th:nth-child(2) {
  width: 19%;
}

.source th:nth-child(3) {
  width: 24%;
}

.source td {
  box-shadow: inset 0 -1px 0 0 var(--line);
  word-break: break-word;
}

.source tbody tr:last-child td {
  box-shadow: none;
}

.source .ver {
  font-weight: 600;
}

.source .when {
  color: var(--sub);
}

.source-scope {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warn {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bad);
}

.del-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.del-card {
  padding: 20px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.del-card h2 {
  font-size: 18px;
  font-weight: 700;
}

.del-card .head {
  margin-top: -6px;
  font-size: 14px;
  color: var(--sub);
}

.del-first {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.del-first p {
  font-weight: 700;
}

.del-first a {
  font-size: 14px;
  font-weight: 600;
}

/* ── 404 ── */
.page-notfound .code {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--assist);
}

.page-notfound h1 {
  font-size: clamp(22px, 4vw, 28px);
}

.page-notfound .text-link {
  align-self: center;
  font-size: 15px;
}

/* ── 하단 ── */
.site-footer {
  background: var(--alt);
  box-shadow: inset 0 1px 0 0 var(--line);
}

.site-footer .bar {
  padding-top: 32px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.footer-links a.strong {
  font-weight: 700;
}

.company {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--sub);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--sub);
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
}
