:root {
  --lg-bg: #f8fafc;
  --lg-surface: #ffffff;
  --lg-text: #0f172a;
  --lg-muted: #64748b;
  --lg-line: #e2e8f0;
  --lg-accent: #1e293b;
  --lg-link: #2563eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--lg-bg);
  color: var(--lg-text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.lg-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lg-line);
}

.lg-header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--lg-text);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.lg-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.lg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lg-nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.lg-nav a:hover {
  color: var(--lg-text);
  background: #f1f5f9;
}

.lg-nav a.active {
  color: #ffffff;
  background: var(--lg-text);
}

.lg-wrap {
  max-width: 920px;
  margin: 28px auto 64px;
  padding: 0 20px;
}

.lg-doc {
  background: var(--lg-surface);
  border: 1px solid var(--lg-line);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.03);
}

.lg-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--lg-muted);
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--lg-line);
}

.lg-doc h1 {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--lg-text);
}

.lg-lead {
  font-size: 14.5px;
  color: var(--lg-muted);
  margin-bottom: 28px;
}

.lg-requisites {
  background: #f8fafc;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 13.5px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 24px;
}

.lg-req-item span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lg-req-item b,
.lg-req-item a {
  font-weight: 700;
  color: var(--lg-text);
  text-decoration: none;
}

.lg-doc h2 {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 30px 0 12px;
  color: var(--lg-text);
}

.lg-doc h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--lg-text);
}

.lg-doc p {
  margin-bottom: 12px;
  color: #334155;
}

.lg-doc ul,
.lg-doc ol {
  margin: 0 0 16px 20px;
  color: #334155;
}

.lg-doc li {
  margin-bottom: 6px;
}

.lg-doc a {
  color: var(--lg-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lg-table-wrap {
  overflow-x: auto;
  margin: 16px 0 22px;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
}

.lg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.lg-table th {
  background: #f8fafc;
  color: var(--lg-text);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--lg-line);
}

.lg-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lg-line);
  color: #334155;
  vertical-align: top;
}

.lg-table tr:last-child td {
  border-bottom: 0;
}

.lg-note {
  background: #f8fafc;
  border-left: 3px solid var(--lg-text);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  font-size: 13.5px;
  color: #334155;
}

.lg-footer {
  max-width: 920px;
  margin: 24px auto 0;
  padding: 20px 4px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--lg-muted);
}

.lg-footer a {
  color: var(--lg-muted);
  text-decoration: none;
}

.lg-footer a:hover {
  color: var(--lg-text);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .lg-doc {
    padding: 24px 18px;
    border-radius: 16px;
  }
  .lg-header-inner {
    padding: 12px 14px;
  }
  .lg-wrap {
    padding: 0 12px;
    margin-top: 16px;
  }
}
