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

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-border: #e0e0e0;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-section-bg: #f8f9fa;
  --color-code-bg: #f1f3f5;
  --color-card-bg: #ffffff;
  --color-card-shadow: rgba(0, 0, 0, 0.06);
  --max-width: 820px;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 24px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.header-logo span {
  color: var(--color-accent);
}

.lang-switcher {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lang-switcher a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher a:hover {
  background: var(--color-section-bg);
  color: var(--color-text);
}

.lang-switcher a.active {
  background: var(--color-accent);
  color: #ffffff;
}

/* Main */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

/* Navigation */
.nav-toc {
  background: var(--color-section-bg);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 48px;
}

.nav-toc-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.nav-toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 24px;
}

.nav-toc li {
  counter-increment: toc;
  margin-bottom: 6px;
  break-inside: avoid;
}

.nav-toc li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 24px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.nav-toc a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 15px;
}

.nav-toc a:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

.section h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.section p {
  margin-bottom: 12px;
}

.section ul,
.section ol {
  margin-bottom: 12px;
  padding-left: 24px;
}

.section li {
  margin-bottom: 6px;
}

.section li ul,
.section li ol {
  margin-top: 6px;
  margin-bottom: 6px;
}

/* Callout boxes */
.callout {
  border-left: 4px solid var(--color-accent);
  background: var(--color-section-bg);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
}

.callout-warn {
  border-left-color: #f59e0b;
}

.callout-tip {
  border-left-color: #10b981;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Pricing table */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.pricing-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
  background: var(--color-card-bg);
  box-shadow: 0 1px 3px var(--color-card-shadow);
}

.pricing-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card .price {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.pricing-card .price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
}

.pricing-card li {
  padding: 4px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-section-bg);
}

.pricing-card li:last-child {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  margin-bottom: 20px;
}

.faq-item dt {
  font-weight: 600;
  margin-bottom: 4px;
}

.faq-item dd {
  color: var(--color-text-secondary);
}

/* Footer */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

/* Privacy page */
.privacy-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p {
  margin-bottom: 12px;
}

.privacy-content ul {
  margin-bottom: 12px;
  padding-left: 24px;
}

.privacy-content li {
  margin-bottom: 6px;
}

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

  .page-title {
    font-size: 24px;
  }

  .nav-toc ol {
    columns: 1;
  }

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

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
