:root {
  --background: #0F141D;
  --card: #262A32;
  --separator: #3A3A3C;
  --text-primary: #FFFFFF;
  --text-body: #E5E5EA;
  --text-secondary: #AEAEB2;
  --text-tertiary: #8E8E93;
  --card-hover: #2E333C;
  --gold: #C8A678;
  --gold-pressed: #E2C89E;
  --on-gold: #0F141D;
  --chevron: #636366;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--background); }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-pressed); }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 6px;
}

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

.brand:hover { color: var(--text-primary); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.language {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.language:hover { color: var(--text-primary); background: var(--separator); }

h1 { margin: 18px 0 2px; font-size: 34px; line-height: 1.15; font-weight: 700; }
h2 { margin: 30px 0 8px; font-size: 20px; line-height: 1.3; font-weight: 600; }
h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }

p { margin: 0 0 10px; color: var(--text-body); }
strong { color: var(--text-primary); font-weight: 600; }

.updated { margin: 0 0 18px; font-size: 13px; color: var(--text-secondary); }
.lead { margin: 14px 0 0; font-size: 17px; color: var(--text-secondary); }
.note { margin: 12px 0 10px; }

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 6px;
}

.hero img { width: 72px; height: 72px; border-radius: 17px; flex: none; }
.hero h1 { margin: 0; font-size: 28px; font-weight: 600; }
.hero span { font-size: 15px; color: var(--text-secondary); }
.hero div { display: flex; flex-direction: column; gap: 2px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 14px 4px;
  border-radius: 16px;
  background: var(--card);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  text-align: center;
  border-inline-end: 0.5px solid var(--separator);
}

.stat:last-child { border-inline-end: none; }
.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-value { font-size: 17px; font-weight: 600; color: var(--gold); }
.stat-caption { font-size: 12px; color: var(--text-secondary); }

.card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}

.card + .card { margin-top: 12px; }

.row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 12px;
  border-bottom: 0.5px solid var(--separator);
  font-size: 15px;
  color: var(--text-body);
}

.row:last-child { border-bottom: none; }
.row svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--gold); }
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.row-detail { font-size: 15px; color: var(--text-secondary); }
.row-source { font-size: 13px; font-weight: 600; color: var(--gold); }

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 15px;
  font-weight: 700;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border-bottom: 0.5px solid var(--separator);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 17px;
}

.link-row:last-child { border-bottom: none; }
.link-row:hover { color: var(--text-primary); background: var(--card-hover); }
.link-row svg { flex: none; width: 20px; height: 20px; color: var(--gold); }
.link-row span { flex-grow: 1; }
.link-row .chevron { width: 14px; height: 14px; color: var(--chevron); }
[dir="rtl"] .chevron, [dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.group-label { padding: 12px 12px 4px; font-size: 13px; color: var(--text-secondary); }

.points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--separator);
  font-size: 15px;
}

.points-row:last-child { border-bottom: none; }

.badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-zero { background: var(--separator); color: var(--text-primary); }

.rules { margin-top: 12px; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 16px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.button:hover { color: var(--on-gold); background: var(--gold-pressed); }

.ltr { direction: ltr; unicode-bidi: isolate; }

details {
  border-radius: 16px;
  background: var(--card);
  margin: 0 0 10px;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary svg { flex: none; width: 18px; height: 18px; color: var(--text-secondary); transform: rotate(90deg); }
details[open] summary svg { color: var(--gold); transform: rotate(-90deg); }

.answer { padding: 0 12px 14px; font-size: 15px; color: var(--text-body); }
.answer p, .answer ul { margin: 0; color: var(--text-body); }
.answer ul { padding-inline-start: 20px; }
.answer li + li { margin-top: 6px; }

footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 0.5px solid var(--separator);
  font-size: 13px;
  color: var(--text-tertiary);
}

footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--text-primary); }
