:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #232838;
  --muted: #616b82;
  --line: #dde5f1;
  --accent: #ff7d21;
  --accent-soft: rgba(255, 125, 33, 0.12);
  --shadow: 0 10px 30px rgba(32, 48, 88, 0.08);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --max-width: 1120px;
  --font-ui: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f6fc 100%);
  color: var(--text);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

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

img {
  display: block;
  width: 100%;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.page-shell,
.site-footer__inner {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  flex-shrink: 0;
}

.brand__logo {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
}

.brand__name {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-shell {
  padding: 34px 0 48px;
}

.page-shell > * + * {
  margin-top: 22px;
}

.legal-hero,
.legal-nav,
.legal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-hero {
  padding: 24px 20px 20px;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.05;
}

.legal-hero p {
  margin: 12px 0 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.7;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}

.legal-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.legal-nav__link.is-current {
  border-color: rgba(255, 125, 33, 0.35);
  background: var(--accent-soft);
  color: #b6540d;
}

.legal-content {
  padding: 24px 20px;
  color: var(--text);
  line-height: 1.75;
}

.legal-content > *:first-child {
  margin-top: 0;
}

.legal-content h2 {
  margin: 28px 0 12px;
  font-size: 1.3rem;
}

.legal-content h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin: 14px 0 0;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 10px;
}

.legal-content a {
  color: #b6540d;
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 26px;
}

.site-footer__left,
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer__links a:hover,
.site-footer__left a:hover,
.site-footer__links a:focus-visible,
.site-footer__left a:focus-visible {
  color: var(--text);
}

@media (max-width: 720px) {
  .header-inner,
  .page-shell,
  .site-footer__inner {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .page-shell {
    padding-top: 24px;
  }

  .legal-hero,
  .legal-content {
    padding: 20px 16px;
  }

  .legal-nav {
    padding: 12px;
  }

  .legal-nav__link {
    flex: 1 1 100%;
    justify-content: center;
  }

  .legal-hero p,
  .legal-content {
    font-size: 1rem;
    line-height: 1.7;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
