/* 법적 고지 화면(개인정보처리방침·셀러 이용약관·요금과 환불). intro.css 의 색·글꼴·머리줄·바닥줄 위에 문서 본문만 얹는다.
   읽는 화면이라 본문 폭을 줄이고, 표는 좁은 화면에서 가로로 밀어 본다. */

.p-main { padding: 40px 0 88px; }
.p-wrap { max-width: 880px; }

.p-tabs { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 40px; }
.p-tab {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.p-tab b { font-weight: 800; }
.p-tab:hover { border-color: var(--line-strong); color: var(--ink); }
.p-tab.is-active { border-color: transparent; background: var(--blue-fill); color: var(--on-fill); }
.p-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.p-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 20px; }
.p-head h1 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.2; letter-spacing: -0.04em; }
.p-dates { margin: 0; color: var(--ink-3); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-lead { margin: 0 0 32px; color: var(--ink-2); font-size: 17px; line-height: 1.75; }

.p-toc { margin-bottom: 48px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.p-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; margin: 0; padding-left: 20px; color: var(--ink-3); font-size: 15px; }
.p-doc .p-toc li + li { margin-top: 0; }
.p-toc a { color: var(--ink-2); text-decoration: none; }
.p-toc a:hover { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; }

.p-doc { color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.p-doc a { color: var(--blue-ink); text-underline-offset: 3px; }
.p-doc a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.p-doc b { color: var(--ink); }
.p-doc ul { margin: 12px 0 0; padding-left: 20px; }
.p-doc li + li { margin-top: 8px; }
.p-doc code { font-size: 14px; }

.p-sec { margin-top: 48px; scroll-margin-top: 96px; }
.p-sec h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.p-sec h2 > span {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue-ink); font-size: 15px; font-variant-numeric: tabular-nums;
}
.p-sec p { margin: 12px 0 0; }

.p-table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.p-table table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.p-table th, .p-table td { padding: 14px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.p-table thead th { border-top: 0; background: var(--fill); color: var(--ink-3); font-size: 13px; font-weight: 700; white-space: nowrap; }
.p-table tbody th { width: 22%; color: var(--ink); font-weight: 700; }
.p-table small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.p-fees tbody td:nth-child(2) { white-space: nowrap; }

.p-defs { display: grid; gap: 12px; margin: 16px 0 0; }
.p-defs > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 24px; }
.p-defs dt { color: var(--ink-3); font-weight: 600; }
.p-defs dd { margin: 0; color: var(--ink); }

.p-agencies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; list-style: none; padding: 0 !important; }
.p-agencies li + li { margin-top: 0; }
.p-agencies b { font-variant-numeric: tabular-nums; }

/* 약관 본문(partials/seller_terms.html)은 셀러센터 카드 꼴로 쓰여 있어 여기서 문서 꼴로 다시 그린다. */
.p-terms .card { padding: 0; border: 0; background: none; box-shadow: none; }
.p-terms h3 { margin: 40px 0 12px; color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.p-terms h3:first-child { margin-top: 0; }
.p-terms ol, .p-terms ul { margin: 8px 0 0; padding-left: 22px; }
.p-terms p { margin: 8px 0 0; }

@media (max-width: 720px) {
  .p-main { padding: 24px 0 64px; }
  .p-tabs { margin-bottom: 28px; }
  .p-lead { font-size: 16px; }
  .p-toc ol, .p-agencies { grid-template-columns: 1fr; }
  .p-defs > div { grid-template-columns: 1fr; }
  .p-sec h2 { font-size: 20px; }
  /* 좁은 화면에서는 표 한 줄을 카드 하나로 세워 옆으로 밀지 않고 읽는다. 칸 이름은 data-label 이다. */
  .p-table { overflow: visible; border: 0; background: none; }
  .p-table table { min-width: 0; }
  .p-table thead { display: none; }
  .p-table tbody, .p-table tr, .p-table th, .p-table td { display: block; }
  .p-table tr { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .p-table tr + tr { margin-top: 12px; }
  .p-table tbody th { width: auto; padding: 0 0 8px; border: 0; font-size: 16px; }
  .p-table td { padding: 8px 0 0; border: 0; }
  .p-table td::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: 13px; font-weight: 600; }
  .p-fees tbody td:nth-child(2) { white-space: normal; }
}
