:root {
  color-scheme: dark;
  --background: #151617;
  --surface: #1b1c1e;
  --text: #f7f7f5;
  --body: #c6c7ca;
  --muted: #929499;
  --border: #34363a;
  --border-soft: #292b2f;
  --focus: #ffffff;
  --content: 1120px;
  --article: 700px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(21, 22, 23, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 9px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  font-weight: 650;
}

.language-switcher a {
  min-width: 67px;
  padding: 8px 12px 9px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.language-switcher a + a {
  border-left: 1px solid var(--border);
}

.language-switcher a:hover {
  color: var(--text);
}

.language-switcher a[aria-current="page"] {
  border-bottom-color: var(--text);
  color: var(--text);
}

.hero {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 78px 0 64px;
  text-align: center;
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.effective-date {
  margin: 20px 0 0;
  color: var(--body);
  font-size: 17px;
}

.policy-layout {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, var(--article)) minmax(220px, 1fr);
  gap: clamp(58px, 8vw, 112px);
  align-items: start;
}

.policy-article {
  min-width: 0;
}

.intro {
  margin-bottom: 54px;
  font-size: 18px;
}

.policy-article section {
  padding: 0 0 54px;
}

.policy-article h2,
.policy-article h3 {
  color: var(--text);
  scroll-margin-top: 108px;
}

.policy-article h2 {
  margin: 0 0 22px;
  font-size: 31px;
  font-weight: 740;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.policy-article h3 {
  margin: 34px 0 14px;
  font-size: 22px;
  font-weight: 710;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.policy-article p {
  margin: 0 0 17px;
  color: var(--body);
}

.policy-article ul {
  margin: 0 0 22px;
  padding-left: 24px;
  color: var(--body);
}

.policy-article li {
  margin: 7px 0;
  padding-left: 4px;
}

.policy-article strong {
  color: var(--text);
  font-weight: 680;
}

.policy-article a {
  text-decoration-color: #73757b;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.policy-article a:hover {
  text-decoration-color: var(--text);
}

.policy-index {
  position: sticky;
  top: 116px;
  max-height: calc(100vh - 152px);
  padding-left: 30px;
  border-left: 1px solid var(--border);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #696b70 transparent;
}

.policy-index h2 {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.policy-index ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-index li {
  margin: 0;
}

.policy-index a {
  position: relative;
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 160ms ease;
}

.policy-index a:hover {
  color: var(--text);
}

.policy-index a.is-active,
.mobile-index a.is-active {
  color: var(--text);
  font-weight: 680;
}

.policy-index a.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -31px;
  width: 2px;
  background: var(--text);
  content: "";
}

.mobile-index {
  display: none;
  margin: 0 0 38px;
  border: 1px solid var(--border);
}

.mobile-index summary {
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style-position: inside;
}

.mobile-index ol {
  margin: 0;
  padding: 0 18px 16px 42px;
  border-top: 1px solid var(--border-soft);
}

.mobile-index li {
  margin-top: 10px;
  color: var(--muted);
}

.mobile-index a {
  text-decoration: none;
}

.mobile-index a.is-active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-soft);
}

.policy-loading,
.policy-error {
  width: min(calc(100% - 48px), var(--content));
  min-height: 55vh;
  margin: 0 auto;
  padding: 90px 0;
  color: var(--body);
  text-align: center;
}

.policy-error a {
  text-underline-offset: 3px;
}

.footer-inner {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 38px 0 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-brand {
  color: var(--text);
  font-size: 17px;
  font-weight: 720;
}

.footer-meta p {
  margin: 0;
}

.footer-meta a {
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 88px;
  }

  body {
    font-size: 16px;
  }

  .header-inner,
  .hero,
  .policy-layout,
  .footer-inner {
    width: min(calc(100% - 36px), 700px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand {
    font-size: 21px;
  }

  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .hero {
    padding: 52px 0 42px;
  }

  .hero h1 {
    font-size: clamp(39px, 10vw, 54px);
  }

  .policy-layout {
    display: block;
  }

  .policy-index {
    display: none;
  }

  .mobile-index {
    display: block;
  }

  .intro {
    margin-bottom: 44px;
    font-size: 17px;
  }

  .policy-article section {
    padding-bottom: 44px;
  }

  .policy-article h2 {
    font-size: 27px;
  }

  .policy-article h3 {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero,
  .policy-layout,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .header-inner {
    gap: 12px;
  }

  .language-switcher a {
    min-width: auto;
    padding: 7px 9px 8px;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .effective-date {
    margin-top: 14px;
    font-size: 15px;
  }

  .policy-article h2 {
    font-size: 25px;
  }

  .policy-article h3 {
    font-size: 19px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
