:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #07101c;
  --panel-start: rgba(16, 34, 53, 0.98);
  --panel-end: rgba(11, 24, 39, 0.98);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.73);
  --text-muted: rgba(255, 255, 255, 0.55);
  --primary: #2a6db5;
  --primary-dark: #1a4f8a;
  --primary-soft: rgba(42, 109, 181, 0.16);
  --gold: #f5c842;
  --success: #4cd964;
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 860px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fb;
    --panel-start: rgba(255, 255, 255, 0.98);
    --panel-end: rgba(234, 242, 250, 0.98);
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --border: rgba(15, 23, 42, 0.13);
    --text: rgba(16, 24, 40, 0.96);
    --text-secondary: rgba(51, 65, 85, 0.9);
    --text-muted: rgba(71, 85, 105, 0.74);
    --primary: #1f5fa7;
    --primary-dark: #174a83;
    --primary-soft: rgba(31, 95, 167, 0.11);
    --gold: #b7791f;
    --success: #128a42;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(7, 16, 28, 0.24), rgba(7, 16, 28, 0.86)),
    radial-gradient(circle at 50% -10%, rgba(42, 109, 181, 0.20), transparent 34%),
    var(--bg);
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='104' viewBox='0 0 120 104' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.055' stroke-width='2'%3E%3Cpath d='M30 2 58 18v32L30 66 2 50V18L30 2Z'/%3E%3Cpath d='M90 2 118 18v32L90 66 62 50V18L90 2Z'/%3E%3Cpath d='M60 54 88 70v32L60 118 32 102V70L60 54Z'/%3E%3C/g%3E%3C/svg%3E");
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.brand img,
.hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: block;
  box-shadow: 0 10px 26px rgba(42, 109, 181, 0.22);
}

.brand-title {
  display: block;
  font-weight: 800;
  line-height: 1.12;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 430px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.lang-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.lang-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.page {
  position: relative;
  z-index: 1;
  padding: 48px 0 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero-icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 20px;
  border-radius: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-meta {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.doc-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 30px;
}

.doc-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 800;
}

.doc-nav a.current {
  color: #ffffff;
  border-color: rgba(42, 109, 181, 0.42);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  text-decoration: none;
}

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

.notice,
.section,
.home-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.notice {
  padding: 18px 20px;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
}

.notice strong {
  color: var(--gold);
}

.section {
  padding: 22px;
  margin-bottom: 16px;
}

.section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.25;
}

.section p {
  margin: 0 0 10px;
  color: var(--text-secondary);
}

.section p:last-child {
  margin-bottom: 0;
}

.section ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.section li {
  position: relative;
  padding: 4px 0 4px 18px;
  color: var(--text-secondary);
}

.section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.home-card {
  display: block;
  padding: 22px;
  color: var(--text);
}

.home-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.home-card h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.home-card p {
  margin: 0;
  color: var(--text-secondary);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .lang-switcher {
    align-self: stretch;
    justify-content: center;
  }

  .doc-nav,
  .home-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .doc-nav a {
    width: 100%;
  }
}
