:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: #31394a;
  background: #f5f4ef;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 92% 2%, var(--accent-soft), transparent 28rem),
    radial-gradient(circle at 3% 58%, rgba(255, 195, 85, 0.1), transparent 25rem),
    #f5f4ef;
  font-size: 16px;
  line-height: 1.78;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.theme-privacy {
  --accent: #4b57e8;
  --accent-dark: #303bbf;
  --accent-soft: rgba(75, 87, 232, 0.12);
  --accent-faint: rgba(75, 87, 232, 0.055);
  --accent-border: rgba(75, 87, 232, 0.26);
}

body.theme-license {
  --accent: #008b78;
  --accent-dark: #006b5d;
  --accent-soft: rgba(0, 139, 120, 0.12);
  --accent-faint: rgba(0, 139, 120, 0.055);
  --accent-border: rgba(0, 139, 120, 0.26);
}

body.theme-terms {
  --accent: #d45f2d;
  --accent-dark: #a9431b;
  --accent-soft: rgba(212, 95, 45, 0.12);
  --accent-faint: rgba(212, 95, 45, 0.055);
  --accent-border: rgba(212, 95, 45, 0.26);
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

a:focus-visible {
  outline: 3px solid var(--accent-border);
  outline-offset: 4px;
  border-radius: 4px;
}

.page-width {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid rgba(23, 32, 54, 0.08);
  background: rgba(245, 244, 239, 0.7);
  backdrop-filter: blur(14px);
}

.site-header .page-width {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111a2d;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand:hover { color: #111a2d; }

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(32, 43, 255, 0.2);
  object-fit: cover;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #606879;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.back-home svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.document-stage { padding: 64px 0 92px; }

.document {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 54, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(29, 36, 57, 0.08);
}

.document-hero {
  position: relative;
  padding: 58px 70px 52px;
  overflow: hidden;
  border-bottom: 1px solid var(--accent-border);
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.7));
}

.document-hero::after {
  position: absolute;
  right: -72px;
  bottom: -105px;
  width: 280px;
  height: 280px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  box-shadow: inset 0 0 0 34px rgba(255, 255, 255, 0.22);
  content: "";
}

.document-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 34px;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  box-shadow: 0 10px 28px rgba(29, 36, 57, 0.06);
}

.document-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.document h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #11182a;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1.18;
}

.document-summary {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin: 18px 0 0;
  color: #626b7c;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.document-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.document-meta span {
  padding: 6px 11px;
  border: 1px solid rgba(23, 32, 54, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #565f70;
  font-size: 0.76rem;
  font-weight: 700;
}

.document-content {
  padding: 58px 70px 76px;
  color: #424b5d;
}

.document-content > :first-child { margin-top: 0; }

.document-content h2 {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 62px 0 19px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e6e8ec;
  color: #161e31;
  font-size: 1.38rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.45;
}

.document-content h2::before {
  width: 5px;
  height: 1.05em;
  margin-top: 0.2em;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.document-content h3 {
  margin: 36px 0 13px;
  color: #242d40;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.document-content p { margin: 0 0 18px; }

.document-content ul,
.document-content ol {
  margin: 0 0 22px;
  padding-left: 1.55rem;
}

.document-content li {
  margin: 7px 0;
  padding-left: 0.3rem;
}

.document-content li::marker {
  color: var(--accent);
  font-weight: 750;
}

.document-content li > ul,
.document-content li > ol {
  margin: 8px 0 12px;
}

.document-content li > ul {
  padding: 11px 18px 11px 2.3rem;
  border-left: 3px solid var(--accent-border);
  border-radius: 0 10px 10px 0;
  background: var(--accent-faint);
}

.table-wrap {
  margin: 25px 0 30px;
  overflow-x: auto;
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(29, 36, 57, 0.04);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.58;
}

th,
td {
  padding: 14px 16px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child { border-right: 0; }

tbody tr:last-child td { border-bottom: 0; }

th {
  background: var(--accent-faint);
  color: #1c2538;
  font-weight: 750;
}

.document-navigation { margin-top: 30px; }

.document-navigation h2 {
  margin: 0 0 14px;
  color: #6c7382;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.document-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.document-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 14px 17px;
  border: 1px solid rgba(23, 32, 54, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  color: #343d50;
  font-size: 0.84rem;
  font-weight: 720;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.document-links a:hover {
  border-color: var(--accent-border);
  color: var(--accent-dark);
  box-shadow: 0 10px 28px rgba(29, 36, 57, 0.07);
  transform: translateY(-2px);
}

.document-links a[aria-current="page"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.document-links svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(23, 32, 54, 0.1);
  color: #7a808e;
  font-size: 0.8rem;
}

.site-footer p { margin: 0; }

.site-footer a { color: #4f5769; }

.floating-actions {
  position: fixed;
  right: max(20px, calc((100vw - 1120px) / 2));
  bottom: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.floating-action {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(23, 32, 54, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #4f5769;
  box-shadow: 0 10px 30px rgba(29, 36, 57, 0.12);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.floating-action:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.floating-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 760px) {
  .page-width { width: min(100% - 28px, 1040px); }
  .site-header .page-width { min-height: 72px; }
  .document-stage { padding: 36px 0 68px; }
  .document { border-radius: 22px; }
  .document-hero { padding: 40px 28px 36px; }
  .document-hero::after { opacity: 0.65; }
  .document-icon { margin-bottom: 27px; }
  .document-content { padding: 40px 28px 54px; }
  .document-content h2 { margin-top: 50px; font-size: 1.24rem; }
  .document-links { grid-template-columns: 1fr; }
  .floating-actions { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .back-home span { display: none; }
  .document-stage { padding-top: 22px; }
  .document { border-radius: 18px; }
  .document-hero { padding: 34px 22px 31px; }
  .document h1 { font-size: clamp(2rem, 11vw, 2.7rem); }
  .document-summary { font-size: 0.93rem; }
  .document-content { padding: 34px 22px 46px; }
  .document-content h2 { gap: 10px; font-size: 1.17rem; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root { background: #fff; }
  body { background: #fff; font-size: 10.5pt; }
  .site-header,
  .document-navigation,
  .site-footer,
  .floating-actions { display: none; }
  .page-width { width: 100%; }
  .document-stage { padding: 0; }
  .document { border: 0; border-radius: 0; box-shadow: none; }
  .document-hero { padding: 0 0 28px; background: #fff; }
  .document-hero::after,
  .document-icon { display: none; }
  .document-content { padding: 28px 0 0; }
  .document-content h2,
  .document-content h3 { break-after: avoid; }
  .table-wrap { overflow: visible; box-shadow: none; }
  table { min-width: 0; font-size: 8.5pt; }
  a { color: inherit; text-decoration: none; }
}
