:root {
  --bg: #0a0a0f;
  --card: #13131f;
  --border: #1e1e30;
  --border-2: #2d2d4a;
  --accent: #6366f1;
  --text: #e2e2f0;
  --text-2: #6b6b8a;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --warn-border: #fbbf24;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  font-size: 16px;
}

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

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 18px;
  letter-spacing: -1px;
}

.brand .name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  background: transparent;
  color: var(--text-2);
  border: 0;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

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

h1 {
  font-size: 30px;
  letter-spacing: -0.6px;
  margin: 8px 0 4px;
}

h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 34px 0 8px;
}

.updated {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 8px;
}

p,
li {
  color: #cfcfe0;
}

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

ul {
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 18px 0;
}

.placeholder {
  background: var(--warn-bg);
  border: 1px dashed var(--warn-border);
  color: #f3d27a;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 0.92em;
  font-weight: 600;
}

.note {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 14px;
  color: #f0e0b0;
}

.docs-list {
  list-style: none;
  padding: 0;
}

.docs-list a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 10px 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.docs-list a:hover {
  border-color: var(--border-2);
}

footer.site {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}

/* Visible by default so the content is readable without JS (store reviewers,
   crawlers). With JS, the non-selected language gets .hidden. */
[data-lang] {
  display: block;
}

[data-lang].hidden {
  display: none;
}

/* Back link — a styled pill with the arrow and label on one line, plus a
   hover that tints it with the accent and nudges it left. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.back-link:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(-2px);
}

.back-link .arrow {
  display: inline-flex;
  color: var(--accent);
  transition: transform 160ms ease;
}

.back-link:hover .arrow {
  transform: translateX(-3px);
}

/* Keep the language labels inline despite the global [data-lang]{display:block}. */
.back-link [data-lang] {
  display: inline;
}

.back-link [data-lang].hidden {
  display: none;
}
