:root {
  color-scheme: light;
  --paper: #fbf8f6;
  --panel: rgba(255, 255, 255, 0.78);
  --ink: #1f1d1f;
  --muted: #6c6266;
  --line: rgba(54, 43, 47, 0.12);
  --accent: #b9476f;
  --accent-soft: #f3d9e3;
  --shadow: 0 24px 80px rgba(82, 49, 60, 0.12);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(230, 188, 200, 0.45), transparent 36rem),
    linear-gradient(145deg, #fffaf7 0%, var(--paper) 42%, #f3f0f4 100%);
}

body.ink {
  --accent: #35435c;
  --accent-soft: #dde5f1;
  --shadow: 0 24px 80px rgba(45, 57, 78, 0.13);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 18px;
}

.brand {
  font-size: 0.95rem;
  font-weight: 760;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.site-header nav a {
  min-height: 2.15rem;
  padding: 0.56rem 0.88rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 680;
  transition: color 160ms ease, background 160ms ease;
}

.site-header nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.64rem 0.92rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.88rem;
  font-weight: 760;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.language-switch:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(82, 49, 60, 0.16);
}

.legal-shell {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 780px);
  gap: clamp(28px, 5vw, 72px);
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 88px;
}

.toc {
  position: sticky;
  top: 26px;
  align-self: start;
  max-height: calc(100vh - 52px);
  overflow: auto;
  padding: 18px 12px;
  border-left: 1px solid var(--line);
}

.toc p,
.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc a {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.68rem 0.35rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.toc a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
  transform: translateX(3px);
}

.toc span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.legal-document {
  min-width: 0;
}

.legal-hero {
  padding: clamp(38px, 7vw, 74px) 0 30px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1,
.index-shell h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.summary {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.58;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.meta-row span {
  padding: 0.58rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.notice {
  margin: 28px 0 12px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notice p,
.clause p,
.clause li,
.legal-footer p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.notice p:first-child,
.clause p:first-child {
  margin-top: 0;
}

.notice p:last-child,
.clause p:last-child {
  margin-bottom: 0;
}

.clause {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: clamp(24px, 5vw, 42px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 28px;
}

.clause-number {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.clause h2 {
  margin: 0 0 0.95rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.clause h3 {
  margin: 1.5rem 0 0.45rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.4;
}

.clause ul {
  margin: 0.95rem 0 0;
  padding-left: 1.1rem;
}

code {
  padding: 0.08rem 0.32rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 34px 0 0;
}

.legal-footer a,
.index-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 760;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.legal-footer a:hover,
.index-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(82, 49, 60, 0.18);
}

.index-shell {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(80px, 16vw, 150px) 0;
}

.index-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.index-actions a:nth-child(2) {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-header {
    width: min(100% - 28px, 720px);
    padding-top: 18px;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .language-switch {
    min-height: 2.45rem;
    padding: 0.58rem 0.72rem;
  }

  .legal-shell {
    display: block;
    width: min(100% - 28px, 720px);
    padding-top: 8px;
  }

  .toc {
    position: static;
    display: flex;
    gap: 0.25rem;
    max-height: none;
    margin: 0 0 14px;
    padding: 0 0 10px;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .toc p {
    display: none;
  }

  .toc a {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.35rem;
    min-height: 2.3rem;
    padding: 0.56rem 0.72rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
  }

  .toc a:not(:first-of-type) {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .legal-hero h1,
  .index-shell h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
  }

  .clause {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .legal-footer {
    display: block;
  }

  .legal-footer a {
    width: 100%;
    margin-top: 1rem;
  }
}
