/* ARGPT :: shared chrome for argpt.alrizqi.com (landing + /stats).
   Doomsday dark, the same tokens as alrizqi.com. Green and red carry meaning
   (profit / loss, yes / no); everything else stays neutral. */

:root {
  --ink: #070A08;
  --surface: #0E1411;
  --surface-2: #121A16;
  --deep: #0C1A12;
  --text: #EDF3EE;
  --text-dim: #A3B3A8;
  --text-faint: #7E8F84;
  --line: #1E2A23;
  --line-strong: #2A3A31;
  --accent: #39D98A;
  --accent-line: #39D98A66;
  --win: #39D98A;
  --loss: #FF6B81;
  --gold: #E7B44A;
  --font: 'Geist', -apple-system, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  --topbar-h: 64px;
  --riskbar-h: 40px;
}

/* ------------------------------------------------------------ top bar */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 10, 8, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1120px; margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
}
.tb-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.tb-back:hover { color: var(--text); }
.tb-back svg { transition: transform 0.2s ease; flex-shrink: 0; }
.tb-back:hover svg { transform: translateX(-2px); }
html[dir=rtl] .tb-back svg { transform: scaleX(-1); }
html[dir=rtl] .tb-back:hover svg { transform: scaleX(-1) translateX(-2px); }

.tb-brand {
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text);
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
}
.tb-brand span { color: var(--text-faint); font-weight: 500; }

.tb-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.lang-switch button {
  font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 999px;
  background: none; border: 0; color: var(--text-faint); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--line); color: var(--text); }

.lang-select {
  display: none;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 10px; cursor: pointer;
}

.tb-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--deep);
  color: var(--accent);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.tb-cta:hover { border-color: var(--accent); background: #0F2318; }
html[dir=rtl] .tb-cta svg { transform: scaleX(-1); }

/* a plain page link beside the CTA (Journal) */
.tb-link {
  padding: 8px 6px;
  color: var(--text-dim);
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  white-space: nowrap;
  transition: color 0.2s;
}
.tb-link:hover { color: var(--text); }

.tb-back:focus-visible, .tb-brand:focus-visible, .tb-cta:focus-visible, .tb-link:focus-visible,
.lang-switch button:focus-visible, .lang-select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ------------------------------------------------------------ footer */

.sitefoot {
  border-top: 1px solid var(--line);
  margin-top: 72px;
}
.sitefoot-in {
  max-width: 1120px; margin: 0 auto;
  padding: 32px 24px calc(40px + var(--riskbar-h));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  color: var(--text-faint); font-size: 13.5px;
}
.sitefoot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sitefoot a { color: var(--text-dim); transition: color 0.18s ease; }
.sitefoot a:hover { color: var(--text); }
.sitefoot a.is-cta { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------ risk bar
   The proposal wants a short risk line visible on every screen, so it sits
   fixed at the bottom of the viewport on both pages. */

.riskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  min-height: var(--riskbar-h);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(7, 10, 8, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12.5px; line-height: 1.4; text-align: center;
}
.riskbar i {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold);
}
.riskbar a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* numbers and dates keep their own direction inside Arabic text */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ------------------------------------------------------------ phones */

@media (max-width: 760px) {
  :root { --topbar-h: 58px; }
  .topbar-in { padding: 0 16px; gap: 10px; }
  .tb-brand { display: none; }
  .lang-switch { display: none; }
  .lang-select { display: inline-block; }
  .tb-cta { padding: 8px 13px; font-size: 13.5px; }
  .tb-link { padding: 8px 2px; font-size: 13.5px; }
  .sitefoot-in { padding: 28px 16px calc(36px + var(--riskbar-h)); }
  .riskbar { font-size: 11.5px; padding: 7px 12px; }
}

/* small phones: the Journal link made the top bar one item longer, and the
   Russian "Statistika" button is the widest label */
@media (max-width: 400px) {
  .tb-right { gap: 6px; }
  .tb-link { padding: 8px 0; }
  .tb-cta { padding: 8px 10px; gap: 5px; }
}
@media (max-width: 380px) {
  .tb-cta svg { display: none; }
}
