:root {
  --paper: #f7f0e5;
  --surface: #fffaf3;
  --ink: #1c1815;
  --text: #2c2520;
  --muted: #73695f;
  --line: rgba(67, 48, 37, 0.12);
  --wine: #b20843;
  --wine-deep: #79042e;
  --green: #287a3d;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0, rgba(178, 8, 67, 0.08), transparent 30rem),
    linear-gradient(180deg, #fffaf3 0%, var(--paper) 100%);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.65;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legal-container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(67, 48, 37, 0.07);
  background: rgba(247, 240, 229, 0.97);
  backdrop-filter: blur(18px);
}

.legal-header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-brand {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.legal-wordmark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.legal-wordmark strong {
  color: var(--wine);
  font-weight: 700;
}

.legal-back {
  color: var(--muted);
  font-size: 0.8rem;
}

.legal-brand:hover .legal-back { color: var(--wine); }

.legal-language select {
  min-width: 132px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 0.82rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 110px);
  padding-block: clamp(58px, 8vw, 100px);
}

.legal-sidebar {
  position: sticky;
  top: 118px;
  align-self: start;
}

.legal-kicker {
  margin: 0 0 10px;
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-sidebar h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.legal-updated {
  margin: 16px 0 30px;
  color: var(--muted);
  font-size: 0.75rem;
}

.legal-tabs {
  display: grid;
  gap: 4px;
}

.legal-tabs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  color: var(--muted);
  font-size: 0.86rem;
  transition: color 150ms ease, transform 150ms ease;
}

.legal-tabs a b {
  color: transparent;
  font-weight: 400;
  transition: color 150ms ease, transform 150ms ease;
}

.legal-tabs a:hover,
.legal-tabs a.is-active { color: var(--wine); }

.legal-tabs a.is-active b { color: var(--wine); }
.legal-tabs a:hover b { color: var(--wine); transform: translateX(3px); }

.legal-document {
  min-width: 0;
  max-width: 760px;
}

.legal-document > h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.legal-intro {
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 1.02rem;
}

.legal-section {
  padding-block: 26px;
  border-top: 1px solid var(--line);
}

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

.legal-section p,
.legal-section ul { margin: 0; color: #625950; }

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p { margin-top: 12px; }

.legal-section ul { padding-left: 20px; }
.legal-section li + li { margin-top: 7px; }

.legal-section a {
  color: var(--wine-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(178, 8, 67, 0.25);
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 20px;
  padding: 17px 18px;
  border-radius: 14px;
  color: #4c4038;
  background: rgba(178, 8, 67, 0.07);
  box-shadow: inset 3px 0 0 var(--wine);
}

.legal-footer {
  padding: 28px 0 34px;
  color: rgba(255, 249, 241, 0.52);
  background: var(--ink);
}

.legal-footer .legal-wordmark { color: #fff9f1; }

.legal-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.legal-footer-inner p {
  margin: 0;
  font-size: 0.72rem;
  text-align: center;
}

.legal-footer-inner > a {
  justify-self: end;
  font-size: 0.76rem;
}

.legal-footer-inner > a:hover { color: #fff; }

@media (max-width: 760px) {
  .legal-container { width: min(100% - 28px, var(--container)); }
  .legal-back { display: none; }
  .legal-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 42px; }
  .legal-sidebar { position: static; }
  .legal-tabs { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .legal-tabs a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(178, 8, 67, 0.055);
  }
  .legal-tabs a b { display: none; }
  .legal-document { max-width: none; }
  .legal-footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .legal-footer-inner > a { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
