:root {
  --bg: #f3f0ea;
  --bg-soft: #faf8f3;
  --surface: #fffdf9;
  --surface-2: #f8f4ed;
  --text: #171614;
  --muted: #6f6a61;
  --muted-2: #8a847a;
  --line: #e7e0d4;
  --line-strong: #d8cdbd;
  --accent: #2e5bff;
  --accent-soft: rgba(46, 91, 255, 0.08);
  --shadow-sm: 0 6px 18px rgba(31, 24, 16, 0.04);
  --shadow-md: 0 20px 50px rgba(31, 24, 16, 0.06);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1280px;
  --sidebar-width: 310px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 180px),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 24px auto 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, #fbf8f2 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 52px 52px 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(46, 91, 255, 0.08), transparent 68%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 14px;
  max-width: 920px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.hero__subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.meta__item {
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.meta__label {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.meta__value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 18px;
}

.toc {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
}

.toc__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}

.toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: 10px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    padding-left 0.18s ease,
    box-shadow 0.18s ease;
}

.toc a:hover {
  color: var(--text);
  background: var(--accent-soft);
  padding-left: 14px;
}

.content {
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.intro-card {
  padding: 30px 32px;
  margin-bottom: 24px;
  background:
    linear-gradient(180deg, #fffefb 0%, #fbf8f2 100%);
}

.intro-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.contact-list {
  margin: 0;
  padding-left: 20px;
}

.contact-list li {
  margin: 8px 0;
}

.legal-section {
  padding: 36px 36px 10px;
  background: #fffdfa;
}

.legal-block {
  position: relative;
  padding: 30px 0 32px;
  border-top: 1px solid var(--line);
}

.legal-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal-block h3 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
}

.legal-block h4 {
  margin: 24px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.legal-block p {
  margin: 0 0 14px;
  color: #2e2b27;
  font-size: 16px;
}

.legal-block ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-block li {
  margin: 8px 0;
  color: #2e2b27;
  font-size: 16px;
}

.legal-block strong {
  color: var(--text);
  font-weight: 700;
}

.legal-block a {
  color: var(--accent);
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .toc {
    padding: 18px 16px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    margin: 14px auto 28px;
  }

  .hero {
    padding: 30px 20px 24px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 46px);
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .meta {
    gap: 10px;
  }

  .meta__item {
    width: 100%;
  }

  .intro-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .legal-section {
    padding: 24px 18px 6px;
    border-radius: 24px;
  }

  .legal-block {
    padding: 22px 0 24px;
  }

  .legal-block p,
  .legal-block li {
    font-size: 15px;
  }

  .toc a {
    font-size: 13px;
  }
}

.lang-switcher-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-bottom: 20px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switcher-doc a {
  color: inherit;
  opacity: 0.6;
  text-decoration: none;
}

.lang-switcher-doc a.is-active,
.lang-switcher-doc a:hover {
  opacity: 1;
}

.lang-switcher-doc__sep {
  opacity: 0.45;
}

@media (max-width: 767px) {
  .lang-switcher-doc {
    margin-bottom: 16px;
    font-size: 12px;
  }
}
