:root {
  color-scheme: dark;
  --bg: #0a0d16;
  --bg-soft: #121728;
  --border: #232b45;
  --text: #e6e9f5;
  --muted: #9aa3c0;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.langswitch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
}

.langswitch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
}

.langswitch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--text);
}

h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
}

h2 {
  font-size: 19px;
  margin: 36px 0 10px;
  padding-top: 4px;
}

h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--text);
}

p,
li {
  color: #cdd4ea;
}

.updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

a {
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

th,
td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 15px;
}

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.cards a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
}

.cards a:hover {
  border-color: var(--accent);
}

.cards strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.cards span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--muted);
}

[data-lang] {
  display: none;
}

[data-lang].is-active {
  display: block;
}

@media (max-width: 520px) {
  h1 {
    font-size: 24px;
  }

  .wrap {
    padding: 20px 16px 72px;
  }
}
