/* Legal page styles — Terms & Privacy
   Shares tokens with styles.css */

.legal-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 250, 245, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.legal-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif-kr);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.legal-nav .nav-logo .mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--forest);
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.legal-nav .nav-logo .mark svg {
  width: 18px;
  height: 18px;
  color: var(--lime);
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--forest-ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: transform .2s;
}
.legal-back:hover { transform: translateX(-2px); }

.legal-hero {
  padding: 160px var(--pad-x) 60px;
  max-width: 980px;
  margin: 0 auto;
}
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--moss);
  margin-bottom: 24px;
}
.legal-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--moss);
}
.legal-title {
  font-family: var(--font-serif-kr);
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--forest-ink);
  margin-bottom: 24px;
}
.legal-title .ital {
  color: var(--moss);
  font-weight: 300;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-meta strong {
  display: block;
  font-family: var(--font-serif-kr);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--forest-ink);
  margin-top: 4px;
}

.legal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 var(--pad-x) 120px;
}

.legal-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.legal-toc h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 16px;
  font-weight: 500;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 10px;
}
.legal-toc li {
  counter-increment: toc;
}
.legal-toc a {
  display: flex;
  gap: 12px;
  color: var(--ink-soft);
  padding: 2px 0;
  letter-spacing: -0.005em;
  line-height: 1.4;
  transition: color .2s;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  padding-top: 2px;
}
.legal-toc a:hover { color: var(--forest); }

.legal-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  max-width: 720px;
}

.legal-section {
  padding: 40px 0;
  border-top: 1px solid var(--line-soft);
}
.legal-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.legal-section h2 {
  font-family: var(--font-serif-kr);
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--forest-ink);
  margin-bottom: 8px;
  scroll-margin-top: 100px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.legal-section h2 .n {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--moss);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 30px;
}
.legal-section .lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
  margin-left: 46px;
}
.legal-section .lead-content {
  margin-left: 46px;
}
.legal-section h3 {
  font-family: var(--font-serif-kr);
  font-size: 16px;
  font-weight: 600;
  color: var(--forest-ink);
  margin-top: 24px;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.legal-section p {
  margin-bottom: 14px;
}
.legal-section ul, .legal-section ol {
  margin: 12px 0 16px 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.legal-section ul li {
  padding-left: 20px;
  position: relative;
}
.legal-section ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--moss);
}
.legal-section ol {
  counter-reset: item;
}
.legal-section ol li {
  padding-left: 28px;
  position: relative;
  counter-increment: item;
}
.legal-section ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--moss);
  font-weight: 500;
}

.legal-callout {
  margin: 20px 0 20px 46px;
  padding: 24px 28px;
  background: var(--sage-pale);
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--forest-ink);
}
.legal-callout .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 8px;
  font-weight: 500;
}

.legal-table {
  margin: 16px 0 16px 46px;
  width: calc(100% - 46px);
  border-collapse: collapse;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.legal-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 500;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--line);
}
.legal-table tr:last-child td { border-bottom: none; }

.legal-section .lead-content,
.legal-section .lead,
.legal-section > p,
.legal-section > ul,
.legal-section > ol {
  margin-left: 46px;
}

.legal-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad-x) 28px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.legal-footer .links {
  display: flex;
  gap: 24px;
}
.legal-footer a:hover { color: var(--forest); }

@media (max-width: 880px) {
  .legal-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .legal-toc {
    position: static;
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 16px 0 0 0;
  }
  .legal-section .lead-content,
  .legal-section .lead,
  .legal-section > p,
  .legal-section > ul,
  .legal-section > ol,
  .legal-callout,
  .legal-table {
    margin-left: 0;
    width: 100%;
  }
  .legal-section h2 { flex-wrap: wrap; }
}
