/* AINNA standard page footer — day/night + chip navigation */

/* Cross-link strip: demo -> NeuralOps Scenario */
.ainna-xref-strip {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
}
.ainna-xref-strip a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ainna-xref-strip a:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.6);
  transform: translateY(-1px);
}

/* Lang switcher fallbacks — available outside .ainna-page-footer (profile, micro-site footers) */
:root {
  --footer-lang-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(14, 165, 233, 0.08));
  --footer-lang-border: rgba(14, 165, 233, 0.45);
  --footer-lang-text: #065f46;
}

html[data-theme="dark"],
body[data-theme="dark"],
body.dark-tools,
[data-theme="dark"],
[data-theme="night"] {
  --footer-lang-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(99, 102, 241, 0.12));
  --footer-lang-border: rgba(34, 211, 238, 0.45);
  --footer-lang-text: #a5f3fc;
}

html[data-theme="light"],
html[data-theme="day"],
body[data-theme="light"],
body[data-theme="day"],
[data-theme="light"],
[data-theme="day"] {
  --footer-lang-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.16), rgba(2, 132, 199, 0.1));
  --footer-lang-border: rgba(4, 120, 87, 0.42);
  --footer-lang-text: #065f46;
}

.ainna-page-footer,
.ainna-page-footer-strip {
  --footer-text: #e2e8f0;
  --footer-text-muted: #94a3b8;
  --footer-link: #67e8f9;
  --footer-link-hover: #a5f3fc;
  --footer-border: rgba(148, 163, 184, 0.14);
  --footer-bg: rgba(8, 12, 20, 0.90);
  --footer-chip-bg: rgba(15, 23, 42, 0.68);
  --footer-chip-border: rgba(148, 163, 184, 0.16);
  --footer-chip-hover-bg: rgba(34, 211, 238, 0.12);
  --footer-chip-hover-border: rgba(34, 211, 238, 0.32);
  --footer-lang-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.08));
  --footer-lang-border: rgba(34, 211, 238, 0.28);
  --footer-lang-text: #a5f3fc;
  --footer-accent: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 55%, #6366f1 100%);

  /* Icon tones always visible on the always-dark footer bg (independent of theme) */
  --ainna-icon-primary: #e2e8f0;
  --ainna-icon-primary-dark: #f8fafc;
  --ainna-icon-primary-light: #e2e8f0;
  --ainna-icon-secondary: #38bdf8;
  --ainna-icon-secondary-dark: #38bdf8;
  --ainna-icon-secondary-light: #38bdf8;

  /* Survive accidental nesting under #cyber-network-root (pointer-events:none) */
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  text-align: center;
  /* bottom padding owned by --cutout dock formula (globe Y) */
  padding: 44px 24px 0;
  border-top: 1px solid var(--footer-border);
  background: var(--footer-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--footer-text);
}

html[data-theme="dark"] .ainna-page-footer,
html[data-theme="dark"] .ainna-page-footer-strip,
body[data-theme="dark"] .ainna-page-footer,
body[data-theme="dark"] .ainna-page-footer-strip,
body.dark-tools .ainna-page-footer,
body.dark-tools .ainna-page-footer-strip {
  --footer-text: #f8fafc;
  --footer-text-muted: #94a3b8;
  --footer-link: #67e8f9;
  --footer-link-hover: #a5f3fc;
  --footer-border: rgba(255, 255, 255, 0.09);
  --footer-bg: rgba(6, 10, 18, 0.94);
  --footer-chip-bg: rgba(15, 23, 42, 0.62);
  --footer-chip-border: rgba(148, 163, 184, 0.16);
  --footer-chip-hover-bg: rgba(34, 211, 238, 0.14);
  --footer-chip-hover-border: rgba(34, 211, 238, 0.34);
  --footer-lang-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.10));
  --footer-lang-border: rgba(34, 211, 238, 0.34);
  --footer-lang-text: #a5f3fc;
}

.ainna-page-footer-inner {
  width: min(100%, 860px);
  max-width: 860px;
  margin: 0 auto;
  margin-inline: auto;
}

.ainna-page-footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ainna-page-footer-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 2px 10px 6px;
}

.ainna-page-footer-brand {
  margin: 0;
  font-size: clamp(1.3rem, 2.9vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--footer-text);
  white-space: nowrap;
}

.ainna-page-footer-brand span {
  background: var(--footer-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ainna-page-footer-tagline {
  margin: 0;
  max-width: 26rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--footer-text-muted);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.ainna-page-footer-identity::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--footer-accent);
  opacity: 0.55;
}

.ainna-page-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.ainna-page-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--footer-chip-border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  font-size: 12px;
  color: var(--footer-link);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.15;
  pointer-events: auto !important;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ainna-page-footer-links a:hover {
  color: var(--footer-link-hover);
  background: var(--footer-chip-hover-bg);
  border-color: var(--footer-chip-hover-border);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.12);
  text-decoration: none;
}

.ainna-page-footer-links a.ainna-page-footer-link--cta {
  position: relative;
  z-index: 2;
  min-height: 32px;
  padding-inline: 12px;
  border-radius: 999px;
  background: var(--footer-lang-bg, linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(14, 165, 233, 0.08)));
  border: 1px solid var(--footer-lang-border, rgba(14, 165, 233, 0.45));
  color: var(--footer-link-hover, #0f766e);
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.08);
}

.ainna-page-footer-links a.ainna-page-footer-link--cta:hover {
  color: var(--footer-link-hover, #0d9488);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}

.ainna-page-footer-links a.ainna-page-footer-link--home {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.10), rgba(34, 211, 238, 0.04));
  border-color: rgba(14, 165, 233, 0.26);
  color: #0c4a6e;
}

.ainna-page-footer-links a.ainna-page-footer-link--home:hover {
  color: #0369a1;
}

.ainna-page-footer-links a.ainna-page-footer-link--neural {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.10), rgba(251, 146, 60, 0.04));
  border-color: rgba(249, 115, 22, 0.26);
  color: #9a3412;
}

.ainna-page-footer-links a.ainna-page-footer-link--neural:hover {
  color: #c2410c;
}

.ainna-page-footer-lang {
  margin-top: 2px;
}

.ainna-page-footer-lang a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--footer-lang-border, rgba(14, 165, 233, 0.45));
  background: var(--footer-lang-bg, linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(14, 165, 233, 0.08)));
  color: var(--footer-lang-text, #065f46) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ainna-page-footer-lang a:hover {
  color: var(--footer-link-hover, var(--footer-lang-text, #047857)) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
  text-decoration: none !important;
}

.ainna-page-footer-lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.ainna-page-footer-divider {
  height: 1px;
  max-width: 520px;
  margin: 26px auto 22px;
  background: linear-gradient(90deg, transparent, var(--footer-border) 20%, var(--footer-border) 80%, transparent);
}

/* VPN notice — full width ABOVE cutout row (never through globe hole) */
.ainna-page-footer-vpn {
  display: block;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto 10px;
  padding: 5px 12px;
  box-sizing: border-box;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--footer-text-muted);
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  background: color-mix(in srgb, #f97316 8%, transparent);
  border: 1px solid color-mix(in srgb, #f97316 20%, transparent);
  border-radius: 8px;
}

.ainna-page-footer-vpn .vpn-copy {
  display: inline;
  text-wrap: balance;
}

.ainna-page-footer-vpn a {
  color: #ea580c;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html[data-theme="dark"] .ainna-page-footer-vpn a,
body[data-theme="dark"] .ainna-page-footer-vpn a,
body.dark-tools .ainna-page-footer-vpn a {
  color: #fb923c;
}

.ainna-page-footer-vpn a:hover {
  color: var(--footer-link-hover);
}

.ainna-page-footer-strip .ainna-page-footer-vpn {
  margin-bottom: 12px;
}

.ainna-page-footer-copy {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--footer-text);
  line-height: 1.45;
  text-wrap: balance;
}

.ainna-page-footer-love {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--footer-text-muted);
}

/* ── Circular cutout row (dock stack) ──
   Same diameter / centre stack as globe + cookie:
   --ainna-dock-cutout-d / --ainna-dock-cutout-r (from design-tokens)
   Left = copyright, centre = empty circle, right = Melaka love. */
.ainna-page-footer--cutout,
.ainna-page-footer-strip.ainna-page-footer--cutout {
  --ainna-footer-cutout-d: var(--ainna-dock-cutout-d, 60px);
  --ainna-footer-cutout-r: var(--ainna-dock-cutout-r, 30px);
  text-align: center;
}

.ainna-page-footer-cutout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ainna-footer-cutout-d) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 8px 10px;
  width: 100%;
  max-width: 920px;
  /* Last row in footer — no margin below; dock padding owns bottom offset. Margin 0 for exact sepusat with globe. */
  margin: 0 auto;
  min-height: var(--ainna-footer-cutout-d);
}

.ainna-page-footer-cutout-gap {
  display: block;
  position: relative;
  width: var(--ainna-footer-cutout-d);
  height: var(--ainna-footer-cutout-d);
  max-width: 100%;
  margin: 0 auto;
  border-radius: 50%;
  pointer-events: none;
  isolation: isolate;
  /* Make the centre slot visibly read as the dock hole, not just empty space. */
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(8, 12, 20, 0.0) 0 calc(var(--ainna-footer-cutout-r) - 7px),
      color-mix(in srgb, var(--footer-border) 58%, transparent) calc(var(--ainna-footer-cutout-r) - 6px) calc(var(--ainna-footer-cutout-r) - 2px),
      rgba(8, 12, 20, 0.90) calc(var(--ainna-footer-cutout-r) - 1px) 100%
    );
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--footer-border) 72%, transparent),
    0 0 0 5px rgba(8, 12, 20, 0.24);
}

.ainna-page-footer-cutout-gap::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(34, 211, 238, 0.08) 100%);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.10);
}

.ainna-page-footer-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.ainna-page-footer-side--left {
  align-items: center;
  text-align: center;
  padding-right: 0;
}

.ainna-page-footer-side--right {
  align-items: center;
  text-align: center;
  padding-left: 0;
}

.ainna-page-footer-side .ainna-page-footer-copy,
.ainna-page-footer-side .ainna-page-footer-love {
  margin: 0;
  max-width: 100%;
}

.ainna-page-footer-side--left .ainna-page-footer-copy {
  font-size: clamp(11px, 1.35vw, 13px);
  line-height: 1.45;
  text-wrap: balance;
}

.ainna-page-footer-side--right .ainna-page-footer-love {
  font-size: clamp(11px, 1.3vw, 12px);
  line-height: 1.45;
  text-wrap: balance;
}

/* Links ABOVE cutout row (full width, never through the hole) */
.ainna-page-footer--cutout > .ainna-page-footer-links,
.ainna-page-footer--cutout .ainna-page-footer-inner > .ainna-page-footer-links {
  margin-top: 4px;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ainna-page-footer-strip {
  padding: 22px 24px 0;
}

/*
 * Dock alignment when page is scrolled to the end:
 *   globe centre Y from viewport bottom = dock-bottom + globe/2
 *   cutout is last child; padding-bottom puts cutout centre on that Y:
 *   padding-bottom + cutout-r = dock-bottom + globe/2
 *   → padding-bottom = dock-bottom + globe/2 - cutout-r
 * Desktop: ~14px · Mobile 480: ~15.5px (plus safe-area via --ainna-dock-bottom)
 */
.ainna-page-footer--cutout,
.ainna-page-footer-strip.ainna-page-footer--cutout {
  padding-bottom: max(
    0px,
    calc(
      var(--ainna-dock-bottom, 20px)
      + (var(--ainna-dock-globe, 60px) / 2)
      - var(--ainna-footer-cutout-r, var(--ainna-dock-cutout-r, 30px))
    )
  );
  /* Extra air under last chips on small touch targets */
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}

.ainna-page-footer-strip .ainna-page-footer-cutout-row {
  margin-bottom: 0;
}

.ainna-page-footer-strip .ainna-page-footer-copy {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .ainna-page-footer,
  .ainna-page-footer-strip {
    display: block !important;
    position: relative !important;
    z-index: 20 !important;
    width: min(420px, calc(100vw - 20px));
    max-width: min(420px, calc(100vw - 20px));
    max-width: 100%;
    margin: 28px auto 0;
    padding: 14px 12px 12px;
    border-radius: 18px;
    box-shadow: 0 -16px 40px rgba(2, 8, 23, 0.18);
  }

  .ainna-page-footer--cutout,
  .ainna-page-footer-strip.ainna-page-footer--cutout {
    padding-bottom: max(
      14px,
      calc(
        var(--ainna-dock-bottom, 20px)
        + (var(--ainna-dock-globe, 60px) / 2)
        - var(--ainna-footer-cutout-r, var(--ainna-dock-cutout-r, 30px))
      )
    );
  }

  .ainna-page-footer-inner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .ainna-page-footer-cutout-row {
    gap: 2px 4px;
    margin: 0 auto;
    min-height: var(--ainna-footer-cutout-d, var(--ainna-dock-cutout-d, 40px));
    padding-inline: 0;
  }

  .ainna-page-footer-side--left .ainna-page-footer-copy,
  .ainna-page-footer-side--right .ainna-page-footer-love {
    font-size: 9px;
    line-height: 1.2;
    max-width: 100%;
  }

  .ainna-page-footer-side--left {
    padding-right: 1px;
  }

  .ainna-page-footer-side--right {
    padding-left: 1px;
  }

  .ainna-page-footer-links {
    gap: 4px;
  }

  .ainna-page-footer-links a {
    padding: 4px 8px;
    font-size: 10px;
    min-height: 22px;
  }

  .ainna-page-footer-identity {
    gap: 4px;
    padding: 2px 4px 4px;
  }

  .ainna-page-footer-brand {
    white-space: normal;
    text-align: center;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  }

  .ainna-page-footer-tagline {
    font-size: 0.7rem;
    line-height: 1.3;
    max-width: 18rem;
  }

  .ainna-page-footer-vpn {
    font-size: 9.5px !important;
    padding: 4px 8px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    border-radius: 6px !important;
  }

  .ainna-page-footer-vpn .vpn-copy {
    text-wrap: pretty;
  }

  .ainna-page-footer-lang a {
    min-height: 26px;
    padding: 4px 10px;
    gap: 4px;
    font-size: 10.5px;
  }

  .ainna-page-footer-divider {
    margin: 8px auto 6px;
    max-width: 60%;
  }
}

@media (max-width: 420px) {
  /* Very narrow: stack love under copyright on the sides still L/R of hole */
  .ainna-page-footer-side--left .ainna-page-footer-copy,
  .ainna-page-footer-side--right .ainna-page-footer-love {
    font-size: 10.5px;
  }
}

/* ── Compact footer (opt-in: $ainna_footer_extra_class = 'ainna-footer-compact') ──
   Slimmer variant of the shared footer. Only padding-top/inline are overridden:
   the circular cutout row and dock padding-bottom formula stay untouched so the
   cyberpunk globe remains sepusat with the 60px hole. */
.ainna-page-footer.ainna-footer-compact,
.ainna-page-footer-strip.ainna-footer-compact {
  padding-top: 20px;
  padding-left: 24px;
  padding-right: 24px;
}

.ainna-footer-compact .ainna-page-footer-top {
  gap: 8px;
}

.ainna-footer-compact .ainna-page-footer-identity {
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ainna-footer-compact .ainna-page-footer-identity::after {
  display: none;
}

.ainna-footer-compact .ainna-page-footer-brand {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  white-space: nowrap;
}

.ainna-footer-compact .ainna-page-footer-tagline {
  font-size: 0.74rem;
  max-width: none;
  white-space: nowrap;
}

.ainna-footer-compact .ainna-page-footer-links {
  gap: 6px;
}

.ainna-footer-compact .ainna-page-footer-links a {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 11.5px;
}

.ainna-footer-compact .ainna-page-footer-lang {
  margin-top: 0;
}

.ainna-footer-compact .ainna-page-footer-lang a {
  min-height: 30px;
  padding: 5px 13px;
  gap: 6px;
  font-size: 12px;
}

.ainna-footer-compact .ainna-page-footer-divider {
  margin: 12px auto 10px;
}

.ainna-footer-compact .ainna-page-footer-vpn {
  margin-bottom: 8px;
  padding: 5px 12px;
  font-size: 10.5px;
  line-height: 1.4;
  max-width: 44rem;
  border-radius: 8px;
}

.ainna-footer-compact .ainna-page-footer-cutout-row {
  min-height: var(--ainna-footer-cutout-d, var(--ainna-dock-cutout-d, 60px));
}

@media (max-width: 768px) {
  .ainna-page-footer.ainna-footer-compact,
  .ainna-page-footer-strip.ainna-footer-compact {
    padding-top: 16px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .ainna-footer-compact .ainna-page-footer-top {
    gap: 8px;
  }

  .ainna-footer-compact .ainna-page-footer-identity {
    flex-direction: column;
    gap: 4px;
  }

  .ainna-footer-compact .ainna-page-footer-tagline {
    white-space: normal;
  }
}

/*
 * Tools / games dock alignment
 * Some tools define broad `footer { ... }` page CSS. Keep the shared AINNA
 * footer cutout aligned to the centred globe/cookie dock, without touching
 * AINNA product/industry pages that already align correctly.
 */
body.ainna-tool-footer-dock-page footer.ainna-page-footer,
body.ainna-tool-footer-dock-page .ainna-page-footer-strip.ainna-page-footer--cutout {
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

body.worldcup-page footer.ainna-page-footer,
body.worldcup-page .ainna-page-footer-strip.ainna-page-footer--cutout {
  /* Standard dock alignment — same as other pages. Globe + cutout must be sepusat. */
  padding-bottom: max(
    0px,
    calc(
      var(--ainna-dock-bottom, 20px)
      + (var(--ainna-dock-globe, 60px) / 2)
      - var(--ainna-footer-cutout-r, var(--ainna-dock-cutout-r, 30px))
    )
  ) !important;
}

body.worldcup-page .ainna-page-footer-links a {
  position: relative;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
}

body.ainna-tool-footer-dock-page footer.ainna-page-footer {
  margin-top: 40px !important;
  border-top: 0 !important;
}
body.ainna-tool-footer-dock-page .ainna-page-footer-strip.ainna-page-footer--cutout {
  margin-top: 40px !important;
}

body.ainna-tool-footer-dock-page .ainna-page-footer-inner {
  width: min(100%, 1160px) !important;
  margin-inline: auto !important;
}

body.ainna-tool-footer-dock-page .ainna-page-footer-cutout-row {
  width: min(100%, 920px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  grid-template-columns: minmax(0, 1fr) var(--ainna-footer-cutout-d, var(--ainna-dock-cutout-d, 60px)) minmax(0, 1fr) !important;
}

body.ainna-tool-footer-dock-page .ainna-page-footer-cutout-gap {
  justify-self: center !important;
}

body.ainna-tool-footer-dock-page .ainna-page-footer-side--left {
  align-items: flex-end !important;
  text-align: right !important;
}

body.ainna-tool-footer-dock-page .ainna-page-footer-side--right {
  align-items: flex-start !important;
  text-align: left !important;
}

@media (max-width: 768px) {
  body.ainna-tool-footer-dock-page footer.ainna-page-footer,
  body.ainna-tool-footer-dock-page .ainna-page-footer-strip.ainna-page-footer--cutout {
    padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
  }

  body.worldcup-page footer.ainna-page-footer,
  body.worldcup-page .ainna-page-footer-strip.ainna-page-footer--cutout {
    /* Standard dock alignment for mobile — no extra px, globe must center in cutout. */
    padding-bottom: max(
      0px,
      calc(
        var(--ainna-dock-bottom, 20px)
        + (var(--ainna-dock-globe, 60px) / 2)
        - var(--ainna-footer-cutout-r, var(--ainna-dock-cutout-r, 30px))
      )
    ) !important;
  }

  body.ainna-tool-footer-dock-page .ainna-page-footer-cutout-row {
    width: 100% !important;
  }
}

/* ESG cluster micro-site nav */
.ainna-esg-cluster-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px;
  max-width: 520px;
}

.ainna-esg-cluster-nav-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-text-muted, #64748b);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--footer-chip-bg, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--footer-chip-border, rgba(15, 23, 42, 0.1));
}

.ainna-esg-cluster-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--footer-link, #0f766e);
  background: var(--footer-chip-bg, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--footer-chip-border, rgba(15, 23, 42, 0.1));
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ainna-esg-cluster-nav-link:hover {
  color: var(--footer-link-hover, #0d9488);
  background: var(--footer-chip-hover-bg, rgba(34, 211, 238, 0.1));
  border-color: var(--footer-chip-hover-border, rgba(14, 165, 233, 0.35));
}

.ainna-esg-cluster-nav-link.is-active {
  color: #fff;
  background: var(--footer-accent, linear-gradient(135deg, #22d3ee 0%, #0ea5e9 55%, #6366f1 100%));
  border-color: transparent;
  pointer-events: none;
}

.ce-footer .ainna-esg-cluster-nav {
  margin-bottom: 16px;
}

/* ── Trending articles ticker (shared footer, masli-style) ──
   Renders as the first row inside the footer, full width, above the
   cutout row so it never interferes with the globe/cookie dock. */
.ainna-footer-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto 18px;
  padding: 7px 14px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--footer-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
}
.ainna-footer-ticker-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #22d3ee;
  white-space: nowrap;
}
.ainna-footer-ticker-all {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #67e8f9;
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ainna-footer-ticker-all:hover {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.6);
}
.ainna-footer-ticker-track {
  overflow: hidden;
  flex: 1;
  position: relative;
  height: 22px;
}
.ainna-footer-ticker-items {
  display: flex;
  gap: 40px;
  animation: ainnaFooterTickerScroll 30s linear infinite;
  width: max-content;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}
.ainna-footer-ticker-items:hover {
  animation-play-state: paused;
}
.ainna-footer-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--footer-text-muted, #94a3b8);
  text-decoration: none;
  transition: color 0.2s;
}
.ainna-footer-ticker-item:hover {
  color: #22d3ee;
}
.ainna-footer-ticker-item .ticker-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #22d3ee;
  flex-shrink: 0;
  opacity: 0.5;
}
.ainna-footer-ticker-item .ticker-title {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
@keyframes ainnaFooterTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ainna-footer-ticker-placeholder {
  font-size: 12.5px;
  color: var(--footer-text-muted, #64748b);
}
@media (max-width: 768px) {
  .ainna-footer-ticker {
    gap: 10px;
    padding: 6px 10px;
    margin-bottom: 14px;
    border-radius: 10px;
  }
  .ainna-footer-ticker-label { font-size: 10px; }
  .ainna-footer-ticker-item { font-size: 12px; }
  .ainna-footer-ticker-item .ticker-title { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .ainna-footer-ticker-items {
    animation: none;
    position: static;
    flex-wrap: wrap;
    gap: 8px 24px;
  }
  .ainna-footer-ticker-track { height: auto; }
}
