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

:root {
  --bg: #0f0f14;
  --surface: #1a1a24;
  --surface-hover: #22222f;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-muted: #9898b0;
  --accent: #7c5cfc;
  --accent-light: #9b82fc;
  --radius: 12px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.lang-current {
  color: var(--accent-light);
  font-weight: 600;
}

/* Hero (index) */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--text), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 0.5rem;
}

.hero-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Policy grid */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding-bottom: 2.5rem;
}

.policy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.policy-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.policy-card h2 {
  font-size: 1rem;
  font-weight: 600;
}

.policy-card .arrow {
  color: var(--accent-light);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Contact box */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

.contact-box h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent-light);
}

.contact-box p {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Layout (doc pages) */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0 3rem;
}

.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.doc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.doc-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.doc-nav a:hover,
.doc-nav a.active {
  background: var(--surface);
  color: var(--accent-light);
  text-decoration: none;
}

/* Document content */
.doc-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  min-width: 0;
}

.doc-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.doc-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--accent-light);
}

.doc-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.doc-content p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.doc-content ul {
  margin: 0.5rem 0 1rem 1.25rem;
  color: var(--text-muted);
}

.doc-content li {
  margin-bottom: 0.35rem;
}

.doc-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.doc-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sidebar {
    position: static;
  }

  .doc-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .doc-content {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .policy-grid {
    grid-template-columns: 1fr;
  }
}
