/* ═══════════════════════════════════════════════════════════════
   Mr. Suits — shared design system
   Noir detective × esports mascot. Warm black, amber outline, leather brown.
   Display: Alexandria · Body: IBM Plex Sans Arabic · Mono: IBM Plex Mono
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0705;
  --bg-2: #120d09;
  --surface: #18110c;
  --surface-2: #211710;
  --surface-3: #2b1e14;
  --line: rgba(255, 176, 74, 0.13);
  --line-2: rgba(255, 176, 74, 0.26);
  --text: #f7efe4;
  --text-2: #d9cbb9;
  --muted: #9c8b78;
  --amber: #ffa41c;
  --amber-2: #ffc766;
  --orange: #f47c1c;
  --leather: #9a5328;
  --leather-2: #5e3219;
  --cream: #f3e2c5;
  --red: #ef4b4b;
  --green: #35d08a;
  --blue: #5aa9ff;
  --bronze: #cd8246;
  --silver: #c9d1db;
  --gold: #ffcf4a;
  --glow: 0 0 0 1px rgba(255, 164, 28, 0.35), 0 12px 40px -12px rgba(255, 140, 20, 0.45);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --r: 16px;
  --r-sm: 10px;
  --cut: 16px;
  --font-d: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-b: 'IBM Plex Sans Arabic', 'Alexandria', system-ui, sans-serif;
  --font-m: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* ambient light + film grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(255, 150, 30, 0.16), transparent 60%),
    radial-gradient(700px 480px at 0% 30%, rgba(154, 83, 40, 0.18), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(255, 140, 20, 0.08), transparent 60%),
    linear-gradient(180deg, #0c0806, #080504);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-d); margin: 0; line-height: 1.35; font-weight: 800; }
p { margin: 0 0 1em; }
::selection { background: var(--amber); color: #1a0e02; }
:focus-visible { outline: 2px solid var(--amber-2); outline-offset: 3px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a2a1c; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--leather); }

/* ───────── layout ───────── */
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.wrap-sm { width: min(760px, 100% - 40px); margin-inline: auto; }
.section { padding: 88px 0; position: relative; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 900; }
.section-head p { color: var(--text-2); margin-top: 12px; font-size: 1.05rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-weight: 700; font-size: 0.8rem; color: var(--amber);
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--amber); }
.eyebrow.ltr { direction: ltr; letter-spacing: 0.22em; font-size: 0.72rem; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap-f { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.amber { color: var(--amber); }
.green { color: var(--green); }
.red { color: var(--red); }
.mono { font-family: var(--font-m); direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.small { font-size: 0.86rem; }
.xs { font-size: 0.76rem; }
.b { font-weight: 700; }
.d { font-family: var(--font-d); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.text-grad {
  background: linear-gradient(100deg, #fff1d6 0%, var(--amber-2) 35%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ───────── buttons ───────── */
.btn {
  --c: var(--cut);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px;
  font-family: var(--font-d); font-weight: 700; font-size: 0.95rem; line-height: 1;
  border: 0; background: var(--surface-3); color: var(--text);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
  white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-start-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn-primary { background: linear-gradient(135deg, var(--amber-2), var(--amber) 45%, var(--orange)); color: #1d0f02; box-shadow: var(--glow); }
.btn-ghost { background: rgba(255, 176, 74, 0.08); color: var(--amber-2); box-shadow: inset 0 0 0 1.5px var(--line-2); clip-path: none; border-radius: 12px; }
.btn-ghost:hover { background: rgba(255, 176, 74, 0.16); }
.btn-dark { background: #0d0907; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); clip-path: none; border-radius: 12px; }
.btn-danger { background: rgba(239, 75, 75, 0.14); color: #ff8b8b; box-shadow: inset 0 0 0 1.5px rgba(239, 75, 75, 0.4); clip-path: none; border-radius: 12px; }
.btn-ok { background: rgba(53, 208, 138, 0.14); color: #7dedb8; box-shadow: inset 0 0 0 1.5px rgba(53, 208, 138, 0.4); clip-path: none; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.82rem; }
.btn-lg { min-height: 56px; padding: 0 34px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; clip-path: none; border-radius: 12px; }
.link { color: var(--amber-2); font-weight: 600; border-bottom: 1px dashed rgba(255, 199, 102, 0.4); }
.link:hover { color: #fff; }

/* ───────── surfaces ───────── */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 190, 110, 0.045), rgba(255, 190, 110, 0.012)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
}
.card.pad-lg { padding: 32px; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card.hover { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.card.hover:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 164, 28, 0.18); }
/* angular "mascot" card: chamfered corners with an amber outline */
.card.cut {
  border: 0; border-radius: 0;
  background: linear-gradient(180deg, #20160f, #150e09);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.card.cut::before {
  content: ''; position: absolute; inset: 0; padding: 1.5px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 199, 102, 0.75), rgba(255, 164, 28, 0.08) 40%, rgba(255, 164, 28, 0.08) 60%, rgba(244, 124, 28, 0.6));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card.glow { box-shadow: var(--glow); }
.card.paper {
  background: linear-gradient(180deg, #f6e9d0, #ecd9b6); color: #2a1a0c; border: 0;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.card.paper .muted { color: #7a6247; }
.card-title { font-family: var(--font-d); font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h3 { font-size: 1.05rem; }

/* ───────── badges / chips ───────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-d); font-weight: 700; font-size: 0.72rem; line-height: 1;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); white-space: nowrap;
}
.badge.amber { background: rgba(255, 164, 28, 0.15); color: var(--amber-2); }
.badge.green { background: rgba(53, 208, 138, 0.14); color: #7dedb8; }
.badge.red { background: rgba(239, 75, 75, 0.15); color: #ff9a9a; }
.badge.blue { background: rgba(90, 169, 255, 0.15); color: #9ccbff; }
.badge.solid { background: var(--amber); color: #1d0f02; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 176, 74, 0.05); font-size: 0.85rem; color: var(--text-2); }
.stamp {
  display: inline-block; font-family: var(--font-d); font-weight: 900; font-size: 0.8rem; color: var(--red);
  border: 2.5px solid var(--red); border-radius: 6px; padding: 4px 12px; transform: rotate(-6deg); opacity: 0.9;
}
.stars { color: var(--amber); letter-spacing: 2px; font-size: 0.95em; white-space: nowrap; }
.stars .off { color: #4a3a2a; }

/* ───────── forms ───────── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-family: var(--font-d); font-weight: 600; font-size: 0.86rem; color: var(--text-2); }
.field .opt { color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  font: inherit; color: var(--text);
  background: #0e0906; border: 1.5px solid #33241a; border-radius: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.7; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffa41c' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 16px center; padding-inline-end: 40px; }
.input::placeholder { color: #6b5a49; }
.input:focus { outline: 0; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 164, 28, 0.14); }
.input.code { font-family: var(--font-m); direction: ltr; text-align: center; letter-spacing: 0.18em; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; }
.input[dir='ltr'] { text-align: left; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.field .error, .form-error { font-size: 0.86rem; color: #ff9a9a; }
.form-error { background: rgba(239, 75, 75, 0.1); border: 1px solid rgba(239, 75, 75, 0.3); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #33241a; transition: background 0.2s; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #c9b8a4; transition: transform 0.2s, background 0.2s; }
.switch input:checked + span { background: rgba(255, 164, 28, 0.35); }
.switch input:checked + span::after { transform: translateX(-20px); background: var(--amber); }

/* ───────── data display ───────── */
.stat { padding: 20px 22px; }
.stat .v { font-family: var(--font-d); font-weight: 900; font-size: 2rem; line-height: 1.1; color: var(--amber-2); direction: ltr; unicode-bidi: isolate; display: inline-block; }
.stat .k { color: var(--muted); font-size: 0.86rem; margin-top: 6px; }
.stat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 164, 28, 0.12); color: var(--amber); margin-bottom: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { text-align: start; font-family: var(--font-d); font-weight: 600; font-size: 0.76rem; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid rgba(255, 176, 74, 0.07); vertical-align: middle; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: rgba(255, 176, 74, 0.045); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--font-d); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.tbl-wrap { overflow-x: auto; }
.progress { height: 10px; border-radius: 99px; background: #2a1d13; overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--amber-2)); box-shadow: 0 0 14px rgba(255, 164, 28, 0.6); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tabs { display: flex; gap: 6px; padding: 5px; background: #0e0906; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; width: fit-content; max-width: 100%; }
.tab { border: 0; background: transparent; color: var(--muted); font-family: var(--font-d); font-weight: 600; font-size: 0.88rem; padding: 9px 18px; border-radius: 10px; white-space: nowrap; transition: all 0.18s; }
.tab:hover { color: var(--text); }
.tab.on { background: linear-gradient(135deg, var(--amber-2), var(--orange)); color: #1d0f02; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { font-size: 2.4rem; margin-bottom: 8px; filter: grayscale(0.2); }
.empty h4 { color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, #1c140e 25%, #2a1e15 50%, #1c140e 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; min-height: 18px; }
.kbd { font-family: var(--font-m); font-size: 0.8em; padding: 2px 7px; border-radius: 6px; background: #0e0906; border: 1px solid var(--line-2); direction: ltr; unicode-bidi: isolate; }

/* avatars, ranks, medals */
.avatar {
  --s: 44px; width: var(--s); height: var(--s); flex: none; border-radius: 30%;
  display: grid; place-items: center; font-size: calc(var(--s) * 0.52); line-height: 1;
  background: linear-gradient(135deg, var(--leather), var(--leather-2)); box-shadow: inset 0 0 0 2px rgba(255, 199, 102, 0.55), 0 6px 16px -6px #000;
}
.rank {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-d); font-weight: 700; font-size: 0.78rem;
  padding: 5px 11px 5px 9px; border-radius: 8px; background: rgba(255, 164, 28, 0.1); color: var(--amber-2); white-space: nowrap;
}
.rank::before { content: ''; width: 9px; height: 9px; background: currentColor; clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.rank[data-l='1'] { color: #b9a892; background: rgba(255, 255, 255, 0.05); }
.rank[data-l='2'] { color: #8fd3a8; background: rgba(53, 208, 138, 0.1); }
.rank[data-l='3'] { color: #8fc2ff; background: rgba(90, 169, 255, 0.1); }
.rank[data-l='4'] { color: #c9a6ff; background: rgba(170, 120, 255, 0.12); }
.rank[data-l='5'] { color: var(--bronze); background: rgba(205, 130, 70, 0.14); }
.rank[data-l='6'] { color: var(--silver); background: rgba(201, 209, 219, 0.12); }
.rank[data-l='7'] { color: var(--gold); background: rgba(255, 207, 74, 0.14); box-shadow: 0 0 18px -4px rgba(255, 207, 74, 0.6); }
.medal { --m: var(--bronze); width: 56px; height: 56px; flex: none; position: relative; display: grid; place-items: center; }
.medal::before { content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--m) 60%, #fff), var(--m) 45%, color-mix(in srgb, var(--m) 55%, #000)); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); box-shadow: 0 0 30px var(--m); }
.medal::after { content: ''; position: absolute; inset: 7px; background: linear-gradient(145deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.1)); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.medal > * { position: relative; z-index: 1; font-family: var(--font-d); font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.medal.silver { --m: var(--silver); } .medal.gold { --m: var(--gold); }
.medal.locked { filter: grayscale(1) brightness(0.45); }

/* ───────── site chrome ───────── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(10, 7, 5, 0.72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 900; font-size: 1.15rem; direction: ltr; flex: none; }
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 4px 12px rgba(255, 140, 20, 0.45)); transition: transform 0.3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand span b { color: var(--amber); font-weight: 900; }
.brand small { display: block; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.22em; color: var(--muted); line-height: 1; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links a { font-family: var(--font-d); font-weight: 600; font-size: 0.9rem; color: var(--text-2); padding: 8px 14px; border-radius: 10px; transition: all 0.18s; position: relative; }
.nav-links a:hover { color: #fff; background: rgba(255, 176, 74, 0.08); }
.nav-links a.on { color: var(--amber-2); }
.nav-links a.on::after { content: ''; position: absolute; bottom: -14px; inset-inline: 14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--amber); box-shadow: 0 0 14px var(--amber); }
.nav-end { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 176, 74, 0.05); transition: background 0.18s; }
.nav-user:hover { background: rgba(255, 176, 74, 0.12); }
.nav-user .avatar { --s: 34px; }
.nav-user b { font-family: var(--font-d); font-size: 0.85rem; display: block; line-height: 1.2; }
.nav-user small { color: var(--amber-2); font-size: 0.72rem; font-family: var(--font-d); font-weight: 700; direction: ltr; display: block; line-height: 1.2; }
.nav-burger { display: none; }
.footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 56px 0 28px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h5 { font-family: var(--font-d); font-size: 0.86rem; color: var(--amber-2); margin: 0 0 14px; }
.footer a { display: block; color: var(--text-2); font-size: 0.92rem; padding: 4px 0; transition: color 0.15s; }
.footer a:hover { color: var(--amber-2); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; }

/* page header band used by inner pages */
.page-head { padding: 64px 0 36px; position: relative; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; }
.page-head p { color: var(--text-2); max-width: 620px; margin-top: 12px; font-size: 1.05rem; }

/* ───────── overlays ───────── */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 44px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: #1d140d; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 0.92rem; animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; margin-top: 10px; flex: none; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.toast.ok::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.toast.err::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
.toast.out { animation: toast-out 0.3s ease forwards; }
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(4, 2, 1, 0.78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade 0.2s ease; overflow-y: auto; }
.modal { width: min(540px, 100%); background: linear-gradient(180deg, #22170f, #150e09); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px; box-shadow: var(--shadow), var(--glow); animation: pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal.wide { width: min(820px, 100%); }
.modal h3 { font-size: 1.3rem; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 22px; flex-wrap: wrap; }
.modal-x { position: sticky; float: left; top: 0; border: 0; background: rgba(255, 255, 255, 0.06); width: 34px; height: 34px; border-radius: 10px; font-size: 1.1rem; line-height: 1; }
.modal-x:hover { background: rgba(255, 255, 255, 0.14); }

/* ───────── motion ───────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(-20px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@keyframes pulse-ring { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes marquee { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } .reveal { opacity: 1; transform: none; } }

/* ───────── responsive ───────── */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { position: fixed; top: var(--nav-h); inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 20px 22px; background: rgba(10, 7, 5, 0.97); border-bottom: 1px solid var(--line-2); transform: translateY(-130%); transition: transform 0.3s ease; z-index: -1; }
  .nav.open .nav-links { transform: none; }
  .nav-links a { padding: 13px 14px; font-size: 1rem; }
  .nav-links a.on::after { display: none; }
  .nav-burger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; margin-inline-start: auto; }
  .nav .wrap { gap: 12px; }
  .nav-user div { display: none; }
  .nav-user { padding: 5px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding: 60px 0; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-end .btn-ghost { display: none; }
  .modal { padding: 22px; }
}
