/* =====================================================================
   FirewallX — "Ice / Fire" design system  (fx.css)
   Ice  = your defense (protected, enabled, restored)
   Fire = the threat   (blocked, deleted, banned)
   Shared by every page. RTL-safe (logical properties only).
   ===================================================================== */

:root {
  color-scheme: dark;

  /* Base */
  --abyss: #060912;
  --night: #0a0f1b;
  --deck: #0f1626;
  --deck-2: #131c30;
  --line: rgba(146, 176, 222, 0.13);
  --line-2: rgba(146, 176, 222, 0.22);

  /* Text */
  --bone: #e9eef6;
  --mist: #b4bfd1;
  --steel: #7f8ba2;

  /* Signal */
  --ice: #7fd0ff;
  --ice-2: #3d9bff;
  --ice-ink: #04111f;
  --ice-wash: rgba(127, 208, 255, 0.1);
  --fire: #ff4b3a;
  --fire-2: #ff8a3d;
  --fire-wash: rgba(255, 75, 58, 0.1);
  --amber: #ffbf47;
  --amber-wash: rgba(255, 191, 71, 0.1);

  /* Tiers (kept for premium data) */
  --t-free: #93a3bb;
  --t-bronze: #d08b57;
  --t-silver: #c9d4e3;
  --t-gold: #f5c84c;

  /* Type */
  --f-display: "Bricolage Grotesque", "Readex Pro", system-ui, sans-serif;
  --f-body: "Geist", "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale (1.25 minor third-ish) */
  --s-xs: 0.75rem;
  --s-sm: 0.875rem;
  --s-md: 1rem;
  --s-lg: 1.125rem;
  --s-xl: 1.5rem;
  --s-2xl: 2rem;
  --s-3xl: clamp(2.2rem, 4.2vw, 3.25rem);
  --s-4xl: clamp(2.6rem, 6.4vw, 5.4rem);

  /* Radius hierarchy */
  --r-xl: 26px; /* hero surfaces */
  --r-lg: 18px; /* panels */
  --r-md: 12px; /* controls */
  --r-sm: 8px;

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
}

html[lang="ar"] {
  --f-display: "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--abyss);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: var(--s-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body { line-height: 1.75; }

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 650; line-height: 1.08; letter-spacing: -0.02em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
code, kbd, .fx-mono { font-family: var(--f-mono); font-size: 0.92em; }

::selection { background: var(--ice); color: var(--ice-ink); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }

.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.fx-muted { color: var(--steel); }
.fx-ice { color: var(--ice); }
.fx-fire { color: var(--fire); }
[hidden] { display: none !important; }

/* Background field: cold left, hot right — the logo's split */
.fx-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 0% 0%, rgba(61, 155, 255, 0.11), transparent 70%),
    radial-gradient(50vw 50vh at 100% 100%, rgba(255, 75, 58, 0.07), transparent 70%),
    var(--abyss);
}
.fx-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 80%);
  opacity: 0.35;
}

/* ---------------------------------------------------------------- Buttons */
.fx-btn {
  --b-bg: transparent;
  --b-fg: var(--bone);
  --b-bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 42px;
  padding: 0 1.1em;
  border-radius: var(--r-md);
  border: 1px solid var(--b-bd);
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 600;
  font-size: var(--s-sm);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.fx-btn:hover { border-color: var(--mist); }
.fx-btn:active { transform: translateY(1px) scale(0.99); }
.fx-btn[disabled], .fx-btn.is-busy { opacity: 0.55; pointer-events: none; }
.fx-btn svg { width: 1.1em; height: 1.1em; flex: none; }
.fx-btn--ice { --b-bg: var(--ice); --b-fg: var(--ice-ink); --b-bd: var(--ice); }
.fx-btn--ice:hover { --b-bg: #a9e0ff; box-shadow: 0 10px 30px -10px rgba(127, 208, 255, 0.6); }
.fx-btn--fire { --b-bg: var(--fire-wash); --b-fg: #ffb0a8; --b-bd: rgba(255, 75, 58, 0.45); }
.fx-btn--fire:hover { --b-bg: rgba(255, 75, 58, 0.18); border-color: var(--fire); }
.fx-btn--ghost { --b-bd: transparent; }
.fx-btn--ghost:hover { --b-bg: rgba(255, 255, 255, 0.05); border-color: transparent; }
.fx-btn--lg { min-height: 52px; padding: 0 1.5em; font-size: var(--s-md); border-radius: 14px; }
.fx-btn--sm { min-height: 34px; padding: 0 0.85em; font-size: var(--s-xs); border-radius: 10px; }

/* Language switch */
.fx-lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
}
.fx-lang button {
  border: 0;
  background: none;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  font-size: var(--s-xs);
  font-weight: 600;
  color: var(--steel);
  cursor: pointer;
}
.fx-lang button[aria-pressed="true"] { background: var(--bone); color: var(--abyss); }

/* ---------------------------------------------------------------- Surfaces */
.fx-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 28, 48, 0.72), rgba(12, 18, 32, 0.72));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.2vw, 26px);
  backdrop-filter: blur(10px);
}
.fx-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.fx-panel__title { font-family: var(--f-display); font-size: var(--s-lg); font-weight: 650; }
.fx-panel__sub { color: var(--steel); font-size: var(--s-sm); margin-top: 4px; max-width: 62ch; }

/* Spotlight (React Bits SpotlightCard port) */
.fx-spot { --mx: 50%; --my: 50%; }
.fx-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(127, 208, 255, 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.fx-spot:hover::before { opacity: 1; }

/* ---------------------------------------------------------------- Status */
.fx-badge {
  --c: var(--steel);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  font-size: var(--s-xs);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  white-space: nowrap;
}
.fx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.fx-badge--ok { --c: var(--ice); }
.fx-badge--bad { --c: var(--fire); }
.fx-badge--warn { --c: var(--amber); }
.fx-badge--plain::before { display: none; }

.fx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 0 rgba(127, 208, 255, 0.6); animation: fxPulse 2.2s infinite; flex: none; }
.fx-dot--fire { background: var(--fire); animation-name: fxPulseFire; }
@keyframes fxPulse { 70% { box-shadow: 0 0 0 9px rgba(127, 208, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 208, 255, 0); } }
@keyframes fxPulseFire { 0% { box-shadow: 0 0 0 0 rgba(255, 75, 58, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(255, 75, 58, 0); } 100% { box-shadow: none; } }

.fx-tier { --c: var(--t-free); display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--s-xs); font-weight: 600; color: var(--c); }
.fx-tier::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--c); border-radius: 2px; }
.fx-tier[data-tier="bronze"] { --c: var(--t-bronze); }
.fx-tier[data-tier="silver"] { --c: var(--t-silver); }
.fx-tier[data-tier="gold"] { --c: var(--t-gold); }

/* ---------------------------------------------------------------- Forms */
.fx-label { display: block; font-size: var(--s-sm); font-weight: 600; color: var(--bone); margin-bottom: 6px; }
.fx-hint { display: block; font-size: var(--s-xs); color: var(--steel); margin-top: 6px; line-height: 1.5; }
.fx-input, .fx-select, .fx-textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.6em 0.85em;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: rgba(4, 7, 14, 0.6);
  color: var(--bone);
  font-size: var(--s-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fx-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.fx-input:not([type=number]), .fx-textarea { unicode-bidi: plaintext; }
.fx-input::placeholder, .fx-textarea::placeholder { color: #5d6880; }
.fx-input:focus, .fx-select:focus, .fx-textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(127, 208, 255, 0.15); }
.fx-select {
  appearance: none;
  padding-inline-end: 2.2em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237f8ba2' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9em center;
}
html[dir="rtl"] .fx-select { background-position: left 0.9em center; }
.fx-select option { background: var(--night); }

/* Switch: works on <input type=checkbox class="fx-switch"> */
.fx-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  margin: 0;
  border-radius: 999px;
  background: #222c40;
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s;
}
.fx-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--steel);
  transition: transform 0.3s var(--ease), background 0.25s;
}
.fx-switch:checked { background: rgba(127, 208, 255, 0.25); border-color: var(--ice); }
.fx-switch:checked::after { background: var(--ice); transform: translateX(20px); }
html[dir="rtl"] .fx-switch:checked::after { transform: translateX(-20px); }
.fx-switch:disabled { opacity: 0.45; cursor: not-allowed; }

.fx-range { width: 100%; accent-color: var(--ice); }

.fx-row-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fx-row-switch:last-child { border-bottom: 0; }
.fx-row-switch strong { display: block; font-size: var(--s-sm); font-weight: 600; }
.fx-row-switch span { display: block; font-size: var(--s-xs); color: var(--steel); margin-top: 2px; }

.fx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fx-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .fx-grid-2, .fx-grid-3 { grid-template-columns: 1fr; } }

/* Chips (word lists, IDs) */
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  font-size: var(--s-xs);
}
.fx-chip button { border: 0; background: rgba(255, 255, 255, 0.08); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; color: var(--mist); }
.fx-chip button:hover { background: var(--fire); color: #fff; }

/* Tables */
.fx-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.fx-table { width: 100%; border-collapse: collapse; font-size: var(--s-sm); }
.fx-table th { text-align: start; font-weight: 600; font-size: var(--s-xs); color: var(--steel); padding: 12px 14px; background: rgba(255, 255, 255, 0.025); border-bottom: 1px solid var(--line); white-space: nowrap; }
.fx-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fx-table tr:last-child td { border-bottom: 0; }
.fx-table tbody tr:hover td { background: rgba(127, 208, 255, 0.03); }

/* Tabs */
.fx-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(4, 7, 14, 0.6); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.fx-tab { border: 0; background: none; padding: 0.6em 1em; border-radius: 10px; font-size: var(--s-sm); font-weight: 600; color: var(--steel); cursor: pointer; white-space: nowrap; }
.fx-tab:hover { color: var(--bone); }
.fx-tab[aria-selected="true"], .fx-tab.active, .fx-tab.is-active { background: var(--deck-2); color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Toast */
.fx-toasts { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.fx-toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--deck-2);
  border: 1px solid var(--line-2);
  border-inline-start: 3px solid var(--ice);
  box-shadow: var(--shadow);
  font-size: var(--s-sm);
  animation: fxToastIn 0.4s var(--ease);
}
.fx-toast--bad { border-inline-start-color: var(--fire); }
@keyframes fxToastIn { from { opacity: 0; transform: translateY(10px); } }

/* Empty / skeleton */
.fx-empty { padding: 28px; text-align: center; color: var(--steel); font-size: var(--s-sm); border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.fx-skel { border-radius: var(--r-md); background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: fxSkel 1.4s linear infinite; }
@keyframes fxSkel { to { background-position: -200% 0; } }

/* =================================================================
   APP SHELL (dashboard + system panels)
   ================================================================= */
.fx-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.fx-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  border-inline-end: 1px solid var(--line);
  background: rgba(6, 9, 18, 0.75);
  backdrop-filter: blur(12px);
  overflow-y: auto;
}
.fx-brand { display: flex; align-items: center; gap: 10px; }
.fx-brand img { width: 38px; height: 38px; border-radius: 50%; }
.fx-brand b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.fx-brand small { display: block; font-size: var(--s-xs); color: var(--steel); line-height: 1.3; }

.fx-guild { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); min-width: 0; }
.fx-guild__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--deck-2); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700; color: var(--mist); }
.fx-guild__icon img { width: 100%; height: 100%; object-fit: cover; }
.fx-guild__name { font-size: var(--s-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-guild__id { font-size: 11px; color: var(--steel); font-family: var(--f-mono); }

.fx-nav { display: grid; gap: 2px; }
.fx-nav__label { font-size: var(--s-xs); color: var(--steel); padding: 0 10px 6px; }
.fx-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: var(--s-sm);
  color: var(--mist);
  transition: background 0.2s, color 0.2s;
}
.fx-nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.75; }
.fx-nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--bone); }
.fx-nav a[aria-current="page"] { background: var(--ice-wash); color: var(--ice); }
.fx-nav a[aria-current="page"] svg { opacity: 1; }
.fx-nav a[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--ice); }
.fx-rail__foot { margin-top: auto; display: grid; gap: 10px; }

.fx-main { min-width: 0; padding: 22px clamp(16px, 3vw, 40px) 64px; }
.fx-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.fx-crumbs { display: flex; gap: 8px; align-items: center; font-size: var(--s-xs); color: var(--steel); margin-bottom: 10px; flex-wrap: wrap; }
.fx-crumbs a:hover { color: var(--bone); }
.fx-crumbs svg { width: 12px; height: 12px; }
html[dir="rtl"] .fx-crumbs svg { transform: scaleX(-1); }
.fx-title { font-size: var(--s-3xl); font-weight: 650; }
.fx-lede { color: var(--mist); max-width: 68ch; margin-top: 10px; font-size: var(--s-md); }
.fx-top__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.fx-stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

/* Sticky save bar */
.fx-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 12px 12px 12px 18px;
  border-radius: 16px;
  background: rgba(15, 22, 38, 0.92);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  flex-wrap: wrap;
}
.fx-savebar__msg { font-size: var(--s-sm); color: var(--mist); min-height: 1.4em; }

/* Mobile rail */
.fx-railtoggle { display: none; }
@media (max-width: 980px) {
  .fx-app { grid-template-columns: minmax(0, 1fr); }
  .fx-rail {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 120;
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.4s var(--ease);
  }
  html[dir="rtl"] .fx-rail { transform: translateX(105%); }
  body.rail-open .fx-rail { transform: none; }
  body.rail-open::after { content: ""; position: fixed; inset: 0; z-index: 110; background: rgba(0, 0, 0, 0.5); }
  .fx-railtoggle { display: inline-flex; }
  .fx-main { padding-top: 14px; }
}

/* =================================================================
   PUBLIC SITE HEADER / FOOTER
   ================================================================= */
.fx-header { position: sticky; top: 0; z-index: 80; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.fx-header.is-scrolled { background: rgba(6, 9, 18, 0.82); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.fx-header__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.fx-header nav { display: flex; gap: 4px; margin-inline-start: auto; }
.fx-header nav a { padding: 8px 12px; border-radius: 10px; font-size: var(--s-sm); color: var(--mist); }
.fx-header nav a:hover { color: var(--bone); background: rgba(255, 255, 255, 0.04); }
.fx-header__act { display: flex; gap: 8px; align-items: center; }
.fx-burger { display: none; }
.fx-mnav { display: none; }
@media (max-width: 960px) {
  .fx-header nav { display: none; }
  .fx-header__act { margin-inline-start: auto; }
  .fx-header__act .fx-hide-m { display: none; }
  .fx-burger { display: inline-flex; }
  .fx-mnav.is-open { display: grid; gap: 2px; padding: 8px 16px 18px; background: rgba(6, 9, 18, 0.96); border-bottom: 1px solid var(--line); }
  .fx-mnav a { padding: 12px 8px; border-bottom: 1px solid var(--line); color: var(--mist); }
}
@media (max-width: 520px) { .fx-header .fx-brand small { display: none; } }

.fx-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; color: var(--steel); font-size: var(--s-sm); }
.fx-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.fx-footer h4 { font-family: var(--f-body); font-size: var(--s-sm); font-weight: 600; color: var(--bone); margin-bottom: 12px; }
.fx-footer a { display: block; padding: 4px 0; }
.fx-footer a:hover { color: var(--bone); }
.fx-footer__base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .fx-footer__grid { grid-template-columns: 1fr 1fr; } .fx-footer__grid > :first-child { grid-column: 1 / -1; } }

/* Document pages (privacy / terms) */
.fx-doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding: 48px 0 40px; }
.fx-doc__toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px; font-size: var(--s-sm); }
.fx-doc__toc a { padding: 6px 10px; border-radius: 8px; color: var(--steel); border-inline-start: 2px solid var(--line); }
.fx-doc__toc a.is-active, .fx-doc__toc a:hover { color: var(--bone); border-inline-start-color: var(--ice); }
.fx-doc__body { max-width: 72ch; }
.fx-doc__body section { padding-block: 26px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.fx-doc__body h2 { font-size: var(--s-xl); margin-bottom: 12px; }
.fx-doc__body p, .fx-doc__body li { color: var(--mist); }
.fx-doc__body p + p { margin-top: 10px; }
.fx-doc__body ul { padding-inline-start: 1.2em; margin: 10px 0 0; display: grid; gap: 6px; }
@media (max-width: 860px) { .fx-doc { grid-template-columns: 1fr; gap: 20px; } .fx-doc__toc { position: static; display: flex; flex-wrap: wrap; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
