:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #17202c;
  --muted: #5e6b7f;
  --border: #d9e1ec;
  --border-strong: #c4cfdd;
  --accent: #855a3d;
  --accent-strong: #6d452b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", "Aptos", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(920px 360px at 0% -8%, rgba(133, 90, 61, 0.06) 0%, transparent 64%),
    radial-gradient(920px 360px at 100% -8%, rgba(38, 82, 138, 0.06) 0%, transparent 64%),
    linear-gradient(180deg, #f6f8fc 0%, var(--bg) 100%);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--accent-strong);
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 249, 253, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.legal-topbar-content {
  width: min(1000px, 94vw);
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.legal-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.legal-lang-switch button {
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: #334154;
  font-weight: 700;
  cursor: pointer;
}

.legal-lang-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
  color: inherit;
}

.legal-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.legal-brand strong {
  display: block;
  font-size: 1rem;
}

.legal-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.legal-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.48rem 0.86rem;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  text-decoration: none;
  color: #334154;
  background: var(--surface);
  font-weight: 620;
}

.legal-home-link:hover {
  color: #1f2b3c;
  border-color: #a9b8cc;
}

.legal-shell {
  width: min(1000px, 94vw);
  margin: clamp(1rem, 2.5vw, 1.8rem) auto clamp(2rem, 4vw, 3rem);
}

.legal-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(22, 36, 55, 0.08);
  padding: clamp(1rem, 2.4vw, 1.6rem);
}

.legal-meta {
  margin: 0 0 0.36rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
  color: #6b4a32;
  font-weight: 700;
}

h1 {
  margin: 0.1rem 0 0;
  font-size: clamp(1.55rem, 3.3vw, 2.4rem);
  line-height: 1.2;
}

.legal-lead {
  margin-top: 0.72rem;
  color: var(--muted);
  max-width: 72ch;
}

.legal-sections {
  margin-top: 1.05rem;
  display: grid;
  gap: 0.74rem;
}

.legal-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.78rem 0.84rem;
}

.legal-section h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.02rem, 1.8vw, 1.26rem);
  color: #324256;
}

.legal-section p {
  margin: 0;
}

code {
  background: #f2f6fc;
  border: 1px solid #d5dfeb;
  border-radius: 7px;
  padding: 0.1rem 0.38rem;
  font-size: 0.92em;
}

@media (max-width: 760px) {
  .legal-topbar-content {
    min-height: 64px;
  }

  .legal-brand span {
    display: none;
  }

  .legal-home-link {
    min-height: 36px;
    padding: 0.4rem 0.66rem;
    font-size: 0.9rem;
  }

  .legal-actions {
    gap: 0.36rem;
  }
}
