:root {
  --paper: #f2f0e9;
  --paper-deep: #e7e4db;
  --ink: #111313;
  --muted: #626661;
  --line: #cfcdc5;
  --accent: #e7b010;
  --link: #866300;
  --header-height: 5.25rem;
  --page-gutter: clamp(1.25rem, 4.5vw, 5rem);
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "Helvetica Neue", Helvetica, Arial, "Noto Sans KR",
    "Apple SD Gothic Neo", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

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

::selection {
  color: var(--ink);
  background: var(--accent);
}

.legal-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--paper);
  background: rgba(17, 19, 19, 0.94);
  backdrop-filter: blur(12px);
}

.legal-header__inner,
.legal-footer__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

.legal-shell {
  width: min(1120px, calc(100% - var(--page-gutter) - var(--page-gutter)));
  margin: 0 auto;
}

.legal-header__inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.legal-brand::before {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  background: url("/media/brand/ci-mark-white.png") center / contain no-repeat;
  content: "";
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid transparent;
  padding: 8px 12px;
  color: rgba(242, 240, 233, 0.9);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible,
.legal-nav a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--paper);
}

.language-switch {
  display: flex;
  margin-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
  gap: 4px;
}

.language-switch a {
  padding: 8px;
}

.language-switch a[aria-current="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.legal-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0 7rem;
}

.legal-shell > article {
  min-width: 0;
}

.legal-shell--single {
  display: block;
  max-width: 880px;
}

.legal-content--bilingual > h1 {
  margin-bottom: 1.75rem;
}

.legal-section h2 small {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.legal-section .english {
  color: var(--muted);
}

.effective {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #ffffff;
  font-size: 0.9rem;
  line-height: 1.75;
}

.legal-hero {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.legal-kicker {
  margin: 0 0 18px;
  color: var(--link);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.legal-title--single-line {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.legal-title--ko {
  font-size: clamp(1.85rem, 5.2vw, 4.25rem);
  letter-spacing: -0.045em;
}

.legal-title--single-line + .legal-lede {
  margin-top: 24px;
}

.legal-lede {
  max-width: 720px;
  margin: 28px 0 0;
  color: #444a46;
  font-size: 1.03rem;
  line-height: 1.8;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 24px;
  gap: 10px 22px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legal-meta span {
  overflow-wrap: anywhere;
}

.legal-content {
  padding-top: 16px;
  overflow-wrap: anywhere;
}

.legal-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.legal-section h3 {
  margin: 26px 0 10px;
  color: var(--ink);
  font-size: 1rem;
}

.legal-section p,
.legal-section li {
  color: #373c39;
  font-size: 0.95rem;
  line-height: 1.85;
}

.legal-section p {
  margin: 0 0 14px;
}

.legal-section ul,
.legal-section ol {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-section a,
.legal-contact a {
  color: var(--link);
  text-underline-offset: 3px;
}

.legal-callout {
  margin: 20px 0 4px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
  background: #ffffff;
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

.legal-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
  line-height: 1.65;
}

th {
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 700;
}

td {
  color: #373c39;
}

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

.legal-aside {
  position: relative;
}

.legal-aside__inner {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 20px;
  background: #ffffff;
}

.legal-aside p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-aside ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-aside li + li {
  margin-top: 8px;
}

.legal-aside a {
  color: #444a46;
  font-size: 0.8rem;
  line-height: 1.35;
  text-decoration: none;
}

.legal-aside a:hover,
.legal-aside a:focus-visible {
  color: var(--link);
}

.legal-contact {
  margin-top: 36px;
  border-top: 3px solid var(--accent);
  padding: 24px;
  background: var(--paper-deep);
  color: var(--ink);
}

.legal-contact strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.legal-contact p {
  margin: 0;
  color: #373c39;
  font-size: 0.9rem;
  line-height: 1.7;
}

.legal-contact a {
  color: var(--link);
  font-weight: 800;
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--ink);
}

.legal-footer__inner {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(242, 240, 233, 0.65);
  font-size: 0.76rem;
}

.legal-footer nav {
  display: flex;
  gap: 18px;
}

.legal-footer a {
  color: var(--paper);
  text-decoration: none;
}

[data-language] {
  display: none;
}

html[data-active-language="ko"] [data-language="ko"],
html[data-active-language="en"] [data-language="en"] {
  display: block;
}

@media (max-width: 900px) {
  .legal-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .legal-aside {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 4.25rem;
    --page-gutter: 1.25rem;
  }

  .legal-brand span {
    display: none;
  }

  .legal-nav {
    gap: 3px;
  }

  .legal-nav a {
    padding: 7px 8px;
    font-size: 0.7rem;
  }

  .language-switch {
    margin-left: 2px;
    padding-left: 5px;
  }

  .legal-shell {
    padding: 58px 0 76px;
  }

  .legal-section {
    padding: 32px 0;
  }

  .legal-footer__inner {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }
}

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