:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --border: #2d3a4f;
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 820px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

.site-header,
.site-footer {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.site-footer {
  border-bottom: none;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-switch a {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lang-switch a:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}

.lang-switch a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.summary-card h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.summary-card.collects h2 {
  color: var(--success);
}

.summary-card.not-collects h2 {
  color: var(--danger);
}

.summary-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.summary-card li {
  margin-bottom: 0.35rem;
  font-size: 0.925rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  font-size: 0.95rem;
}

section {
  margin-bottom: 2.25rem;
}

section h2 {
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

section h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

section p,
section li {
  color: var(--text-muted);
}

section p {
  margin: 0 0 0.85rem;
  text-align: justify;
}

section ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

section li {
  margin-bottom: 0.4rem;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
}

.badge-list li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
}

.third-party-links li {
  margin-bottom: 0.5rem;
}

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

  main {
    padding: 1.5rem 1rem 2.5rem;
  }

  .brand h1 {
    font-size: 1.15rem;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #d8dee9;
    --text: #1a2332;
    --text-muted: #4b5563;
    --shadow: 0 4px 20px rgba(15, 20, 25, 0.08);
  }
}
