/* pilo ai - legal pages shared styles */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --bg-chip: #eaf3fb;
  --fg: #0f1720;
  --fg-soft: #4a5560;
  --fg-mute: #7a8693;
  --line: #e6ebf1;
  --line-soft: #f0f3f7;
  --accent: #5cb8f0;        /* sky blue from app */
  --accent-strong: #3aa3e0;
  --accent-ink: #0a3a5c;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 0 rgba(15, 23, 32, 0.04), 0 8px 24px rgba(15, 23, 32, 0.05);
  --maxw: 760px;
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "Pretendard";
  font-weight: 45 920;
  font-display: swap;
  font-style: normal;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/woff2/PretendardVariable.woff2") format("woff2-variations");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02";
  color: var(--fg);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
}
.brand-logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7ec8ec 0%, #5cb8f0 60%, #3aa3e0 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.topbar nav {
  display: flex;
  gap: 4px;
}
.topbar nav a {
  font-size: 13px;
  color: var(--fg-soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 500;
}
.topbar nav a:hover { background: var(--bg-chip); text-decoration: none; }
.topbar nav a.active {
  background: var(--bg-chip);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ---------- Page layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 96px;
}

.doc-header {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.doc-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--bg-chip);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.doc-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.doc-meta {
  font-size: 13px;
  color: var(--fg-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.doc-meta b { color: var(--fg-soft); font-weight: 600; }

/* TOC */
.toc {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  counter-reset: toc;
}
.toc ol li {
  counter-increment: toc;
  font-size: 14px;
}
.toc ol li a {
  color: var(--fg-soft);
  display: flex;
  gap: 10px;
  padding: 6px 0;
  align-items: baseline;
}
.toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--fg-mute);
  font-weight: 600;
  min-width: 24px;
}
.toc ol li a:hover { color: var(--accent-strong); text-decoration: none; }

/* Article */
.doc-body {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}
.doc-body section + section { margin-top: 32px; }
.doc-body h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  padding-top: 8px;
  scroll-margin-top: 80px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.doc-body h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--bg-chip);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.doc-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--fg);
}
.doc-body p {
  margin: 0 0 12px;
  color: var(--fg-soft);
  font-size: 15px;
}
.doc-body ul, .doc-body ol {
  margin: 8px 0 12px;
  padding-left: 22px;
  color: var(--fg-soft);
  font-size: 15px;
}
.doc-body ul li, .doc-body ol li { margin: 4px 0; }
.doc-body ul li::marker { color: var(--accent); }

.doc-body strong { color: var(--fg); font-weight: 700; }

/* Callout */
.callout {
  background: var(--bg-chip);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 12px 0 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--accent-ink);
  line-height: 1.55;
}
.callout-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-ink); }

/* Tables */
.doc-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 16px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.doc-body th, .doc-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--fg-soft);
}
.doc-body th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--fg);
  font-size: 13px;
  letter-spacing: -0.005em;
}
.doc-body tr:last-child td { border-bottom: none; }

/* Footer */
.foot {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 24px 20px 48px;
  font-size: 12px;
  color: var(--fg-mute);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.foot a { color: var(--fg-mute); }
.foot .links { display: inline-flex; gap: 14px; }

/* Mobile */
@media (max-width: 640px) {
  .topbar-inner { padding: 12px 16px; }
  main { padding: 20px 14px 64px; }
  .doc-header { padding: 24px 22px 20px; border-radius: 18px; }
  .doc-title { font-size: 24px; }
  .doc-body { padding: 24px 20px; border-radius: 18px; }
  .doc-body h2 { font-size: 17px; }
  .toc ol { grid-template-columns: 1fr; }
  .topbar nav a { padding: 6px 10px; font-size: 12px; }
}

/* Print */
@media print {
  .topbar, .foot { display: none; }
  body { background: white; }
  .doc-header, .doc-body, .toc { box-shadow: none; border: none; }
  main { padding: 0; }
}
