:root {
  --bg: #f7f8fc;
  --bg-strong: #eef2fb;
  --surface: rgba(255,255,255,0.88);
  --surface-strong: #ffffff;
  --line: rgba(48, 65, 120, 0.10);
  --line-strong: rgba(48, 65, 120, 0.16);
  --text: #172033;
  --muted: #5f6980;
  --primary: #4f6bff;
  --primary-deep: #3047c8;
  --secondary: #8aa0ff;
  --accent: #7fe0ff;
  --success: #1fa971;
  --warning: #f0ad3d;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 70px rgba(39, 65, 145, 0.10);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(79,107,255,0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(127,224,255,0.12), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, #f6f8fd 48%, #f4f7fc 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(247, 248, 252, 0.78);
  border-bottom: 1px solid rgba(48, 65, 120, 0.08);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(79,107,255,0.14);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(79,107,255,0.06);
  border: 1px solid rgba(79,107,255,0.10);
}

.lang-switch a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.lang-switch a.active {
  background: #ffffff;
  color: var(--primary-deep);
  box-shadow: 0 8px 18px rgba(79,107,255,0.10);
}

.nav-links a:hover,
.footer-links a:hover,
.lang-switch a:hover {
  color: var(--primary-deep);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  transition: 0.2s ease;
  font-weight: 700;
}

.nav-cta {
  padding: 11px 16px;
  background: rgba(79,107,255,0.08);
  color: var(--primary-deep);
  border: 1px solid rgba(79,107,255,0.12);
}

.btn {
  padding: 14px 20px;
  border: 1px solid transparent;
}

.btn:hover,
.nav-cta:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 18px 36px rgba(79,107,255,0.20);
}

.btn-secondary {
  background: rgba(255,255,255,0.75);
  border-color: rgba(48,65,120,0.10);
  color: var(--text);
}

.section {
  padding: 78px 0;
}

.hero {
  padding-top: 92px;
}

.hero-grid,
.grid-2,
.grid-3,
.footer-grid,
.cta-banner {
  display: grid;
  gap: 22px;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(79,107,255,0.08);
  border: 1px solid rgba(79,107,255,0.10);
  color: var(--primary-deep);
  font-size: 13px;
  margin-bottom: 18px;
}

h1,h2,h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  max-width: 760px;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
}

.lead,
.section-head p,
.card p,
.card li,
.page-intro,
.footer-copy,
.hero-note,
.page-article p,
.page-article li,
.notice,
.legal-meta,
.legal-meta li {
  color: var(--muted);
}

.lead {
  font-size: 18px;
  margin: 18px 0 0;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
}

.hero-note span { color: var(--text); font-weight: 700; }

.hero-card,
.card,
.page-article,
.notice,
.cta-banner,
.legal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero-card,
.card,
.page-article,
.legal-panel {
  padding: 26px;
}

.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(48,65,120,0.08);
  color: var(--muted);
  font-size: 13px;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.traffic-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9deee;
}

.traffic-lights span:nth-child(1){ background:#ff8e8e; }
.traffic-lights span:nth-child(2){ background:#ffd36a; }
.traffic-lights span:nth-child(3){ background:#66d19e; }

pre {
  margin: 0;
  overflow: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #23304d;
  font-family: "SFMono-Regular", Consolas, Monaco, monospace;
}

.section-head {
  margin-bottom: 24px;
  max-width: 760px;
}

.section-head.narrow {
  max-width: 660px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card.soft {
  background: rgba(255,255,255,0.66);
}

.card ul,
.page-article ul,
.page-article ol,
.legal-meta ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.alt-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.10));
}

.cta-banner {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 30px;
}

.footer-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.site-footer {
  padding: 24px 0 56px;
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
}

.page-hero {
  padding-top: 96px;
  padding-bottom: 28px;
}

.page-hero .page-intro {
  margin-top: 14px;
  max-width: 760px;
  font-size: 17px;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.page-article h3 {
  margin-bottom: 10px;
}

.kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79,107,255,0.08);
  color: var(--primary-deep);
  border: 1px solid rgba(79,107,255,0.10);
  font-size: 13px;
}

.notice {
  padding: 18px 20px;
  border-color: rgba(240,173,61,0.16);
}

.muted-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(79,107,255,0.05);
  border: 1px solid rgba(79,107,255,0.08);
  color: var(--muted);
}

.legal-panel h4 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.legal-meta {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.legal-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .footer-grid,
  .cta-banner {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
