/* BrainLoop site. Colours are the app's Arena palette (lib/src/design/tokens/arena_colors.dart).
   Every text/background pair below is at least 4.5:1 (WCAG AA). */
:root {
  --bg: #0e0e13;
  --surface: #171722;
  --surface-2: #20202e;
  --stroke: #2e2e40;
  --text: #f4f2fa;
  --muted: #acaab1;
  --link: #7fa0ff;
  --primary: #2962f2;
  --on-primary: #ffffff;
  --gold: #ffc83d;
  --on-gold: #0e0e13;
  color-scheme: dark;
}

/* Without JavaScript the page stays English; i18n.js sets data-lang. */
html:not([data-lang="vi"]) [lang-only="vi"],
html[data-lang="vi"] [lang-only="en"] {
  display: none !important;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--stroke);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

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

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

main {
  padding: 24px 0 40px;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.2rem;
  margin: 28px 0 8px;
}

p,
ul {
  margin: 0 0 12px;
}

ul {
  padding-left: 22px;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.draft {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.code {
  font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  word-break: break-all;
  margin: 8px 0 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn.store {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}

.lang {
  min-height: 36px;
  padding: 6px 12px;
}

footer.site {
  border-top: 1px solid var(--stroke);
  padding: 20px 0 32px;
  color: var(--muted);
  font-size: 0.9375rem;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 8px;
}

/* Retention table on the privacy page (build_site.bi_table). */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
}

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

th {
  color: var(--muted);
  font-weight: 600;
}
