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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px 10px;
  color: #2d3748;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 28px 32px 36px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-left: auto;
}

.lang-switch a {
  padding: 6px 14px;
  text-decoration: none;
  color: #4a5568;
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

.lang-switch a.active {
  background: #667eea;
  color: #fff;
}

.lang-switch a:hover:not(.active) { background: #edf2f7; }

.site-nav {
  text-align: center;
  margin-bottom: 18px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 16px;
  margin: 4px;
  background: #f7fafc;
  color: #667eea;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92em;
}

.site-nav a.active {
  background: #667eea;
  color: #fff;
}

.crumbs {
  font-size: 0.85em;
  color: #718096;
  margin-bottom: 18px;
}

.crumbs a { color: #667eea; text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

article h1 {
  font-size: 2rem;
  line-height: 1.25;
  color: #1a202c;
  margin-bottom: 10px;
}

.lead {
  font-size: 1.12em;
  color: #4a5568;
  line-height: 1.65;
  margin-bottom: 22px;
}

article h2 {
  font-size: 1.35rem;
  color: #2d3748;
  margin: 28px 0 10px;
  padding-top: 6px;
}

article h3 {
  font-size: 1.05rem;
  color: #2d3748;
  margin: 18px 0 8px;
}

article p, article li {
  color: #4a5568;
  line-height: 1.7;
  font-size: 1.02em;
}

article p { margin-bottom: 14px; }

article ul, article ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

article li { margin-bottom: 8px; }
article li::marker { color: #667eea; }

article a { color: #5a67d8; font-weight: 600; }
article a:hover { text-decoration: underline; }

.figure {
  margin: 22px 0;
  background: #f7fafc;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #edf2f7;
}

.figure svg { width: 100%; height: auto; display: block; }

.figure figcaption {
  margin-top: 10px;
  font-size: 0.88em;
  color: #718096;
  text-align: center;
}

.rule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.95em;
}

.rule-table th {
  text-align: left;
  background: #667eea;
  color: #fff;
  padding: 10px 12px;
}

.rule-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
  vertical-align: top;
}

.rule-table tr:nth-child(even) td { background: #f7fafc; }

.cta {
  display: block;
  margin: 24px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

.cta:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.cta span { display: block; font-weight: 500; font-size: 0.9em; opacity: 0.92; margin-top: 4px; }

.related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0 8px;
}

.related a {
  display: block;
  padding: 14px 16px;
  background: #f7fafc;
  border-radius: 10px;
  text-decoration: none;
  color: #2d3748;
  font-weight: 700;
  border: 1px solid #edf2f7;
}

.related a:hover { border-color: #667eea; color: #5a67d8; }
.related a small { display: block; font-weight: 500; color: #718096; margin-top: 4px; }

.note {
  background: #eef2ff;
  border-left: 4px solid #667eea;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0 20px;
  color: #4a5568;
}

.site-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  color: #718096;
  font-size: 0.9em;
  line-height: 1.7;
  text-align: center;
}

.site-footer a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .container { padding: 20px 16px 28px; }
  article h1 { font-size: 1.55rem; }
  .rule-table { font-size: 0.85em; }
}
