/* ============================================================
   PAGE HERO — compact dark band with breadcrumb + title
   Used at the top of every interior page. Single source of truth.
   ============================================================ */
.page-hero {
  position: relative;
  background: #0d1117;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.page-hero.aior-pointer-fx-host {
  transform: none !important;
}
.page-hero .aior-pointer-fx {
  display: none !important;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}
.page-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: left center;
  /* Busy screenshots (e.g. referans hero) must stay behind dark glass */
  opacity: 0.28;
  filter: contrast(1.05) saturate(0.75) brightness(0.55);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Darker glass overlay — readable title/body over any hero photo */
  background:
    linear-gradient(
      180deg,
      rgba(6, 9, 15, 0.90) 0%,
      rgba(6, 9, 15, 0.93) 45%,
      rgba(6, 9, 15, 0.95) 100%
    );
  pointer-events: none;
}
.page-hero-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: block;
  opacity: 0.45; /* particles softer over darker glass */
}
.page-hero-content {
  position: relative;
  padding: 18px 16px 28px;
}
@media (min-width: 768px) {
  .page-hero-content { padding: 22px 24px 36px; }
}
.page-hero-text {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  width: 100%;
  /* Use more of the max-w-7xl band on desktop */
  max-width: 52rem;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .page-hero-text { max-width: 64rem; }
}
.page-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.page-hero-title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
  line-height: 1.15;
  max-width: 100%;
}
.page-hero-sub {
  font-size: 14.5px;
  color: rgba(255,255,255,0.78);
  margin: 0 auto;
  max-width: 100%; /* fill widened .page-hero-text */
  line-height: 1.55;
  /* Başlık bandı ortalı kalsın; paragraf site SSOT justify */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Breadcrumb — air-glass chip; theme tokens by default (light/dark surfaces).
   Hardcoded white-on-dark only inside .page-hero (always dark photo band). */
.breadcrumb {
  font-size: 13px;
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 0.15rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow:
    0 10px 28px -18px rgba(15, 23, 42, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
}
:root[data-theme="dark"] .breadcrumb {
  background: rgba(28, 28, 28, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 32px -20px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* Soft+muted mix: readable on light glass without competing with current */
  color: color-mix(in srgb, var(--fg-soft) 70%, var(--fg-muted));
  text-decoration: none;
  transition: color .12s;
  white-space: nowrap;
}
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-home { font-weight: 500; }
.breadcrumb-brand {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.01em;
}
.breadcrumb-sep {
  color: var(--fg-muted);
  flex-shrink: 0;
}
.breadcrumb-current {
  color: var(--fg);
  font-weight: 600;
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Page hero photo band is always dark — invert crumb contrast */
.page-hero .breadcrumb {
  background: rgba(13, 17, 23, 0.58);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 12px 32px -18px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.10) inset;
}
.page-hero .breadcrumb-link {
  color: rgba(255, 255, 255, 0.90);
}
.page-hero .breadcrumb-link:hover {
  color: #fff;
}
.page-hero .breadcrumb-sep {
  color: rgba(255, 255, 255, 0.58);
}
.page-hero .breadcrumb-current {
  color: #fff;
}


/* Adapt XenForo's element resets without forking shared components. */
html#XF { font-size: 16px; }
html#XF body { margin: 0; }
html#XF .p-body-inner { max-width: 1280px; padding: 24px 32px; }
html#XF .p-body-main, html#XF .p-body-content, html#XF .p-body-sidebar { min-width: 0; }
html#XF .page-hero-title { font-weight: 700 !important; padding: 0; text-indent: 0; }
html#XF .page-hero-sub { padding: 0; }
html#XF .page-hero img { display: block; }
html#XF footer.footer-aior { padding: 0; font-size: inherit; background-image: none; margin: 0; }
html#XF footer.footer-aior::after { content: none; }
html#XF .aior-fnav-inner { width: 100%; min-width: 0; }
html#XF .aior-fnav-list { min-width: 0; }
html#XF .button.button--primary, html#XF .button.button--cta,
html#XF .forumStats-header .tabs-tab.is-active, html#XF .forumStats-header .tabs-tab:hover,
html#XF .aior-fnav-link.is-active, html#XF .aior-fnav-link[aria-current="page"] {
  background: var(--accent-solid) !important; border-color: var(--accent-solid) !important; color: var(--on-solid) !important;
}
html#XF .u-scrollButtons, html#XF .js-scrollButtons { display: none !important; }
@media (max-width: 767px) {
  html#XF .p-body-inner { padding: 16px; }
  html#XF .aior-fnav-inner { display: flex; flex-wrap: wrap; gap: 4px; padding-inline: 16px; }
  html#XF .aior-fnav-list { flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; }
  html#XF .aior-fnav-tools { margin-left: auto; }
}

/* Utilities supplied by Astro's page CSS on the main site. */
html#XF body { font-size: 14px !important; line-height: 1.55 !important; }
html#XF .justify-between { justify-content: space-between; }
html#XF .min-w-0 { min-width: 0; }
html#XF .shrink-0 { flex-shrink: 0; }
html#XF .aior-fnav-inner { max-width: 80rem; margin-inline: auto; padding-inline: 32px; }
@media (max-width: 1023px) { html#XF .aior-fnav-inner { padding-inline: 24px; } }
@media (max-width: 639px) { html#XF .aior-fnav-inner { padding-inline: 16px; } }
/* Filled forum actions use the same accessible blue as the shared header. */
html#XF .aior--forum-stats .forumStats-main-tab.is-active,
html#XF .aior--forum-stats .tabs-tab.is-active,
html#XF .forumStats-showMore .button,
html#XF .tab-buttons .buttonGroup-buttonWrapper .button.menuTrigger {
  background: var(--accent-solid) !important;
  border-color: var(--accent-solid) !important;
  color: var(--on-solid) !important;
}
html#XF .tab-buttons .button.menuTrigger .button-text,
html#XF .tab-buttons .button.menuTrigger i,
html#XF .tab-buttons .button.menuTrigger svg { color: var(--on-solid) !important; }
html#XF[data-theme] .aior--forum-stats .forumStats-main-tab.is-active,
html#XF[data-theme] .aior--forum-stats .forumStats-main-tab.is-active :is(span, i, svg),
html#XF[data-theme] .tab-buttons .buttonGroup-buttonWrapper .button.menuTrigger,
html#XF[data-theme] .tab-buttons .buttonGroup-buttonWrapper .button.menuTrigger :is(span, i, svg) {
  color: var(--on-solid) !important;
}
/* XF's external SVG has no intrinsic width; reserve a real touch target and icon slot. */
html#XF .tab-buttons .button.menuTrigger {
  min-width: 36px !important;
  padding: 8px !important;
  justify-content: center !important;
}
html#XF .tab-buttons .button-text,
html#XF .tab-buttons .fa--xf,
html#XF .tab-buttons .fa--xf svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
}

/* Çerez onay — tam genişlik yatay alt bar (WHMCS ile aynı tasarım) */
body.cookie-consent-visible {
  padding-bottom: var(--cookie-consent-offset, 148px);
  transition: padding-bottom 180ms ease;
}
.cookie-consent {
  position: fixed;
  z-index: 10000;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  width: auto;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
  /* Own surface + color-scheme: never inherit dark UA text onto white glass */
  color-scheme: light;
  background: #ffffff;
  color: #0a0e1a;
  border-top: 1px solid #d8dee8;
  padding: 0 clamp(0.85rem, 3vw, 1.5rem) calc(clamp(0.85rem, 2vw, 1rem) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 48px -24px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 220ms;
}
.cookie-consent::before {
  content: "";
  display: block;
  height: 3px;
  margin: 0 0 0.85rem;
  width: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 55%, #1557a0 100%);
}
.cookie-consent[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}
.cookie-consent-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem clamp(0.85rem, 2.5vw, 1.5rem);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0.15rem 0 0.35rem;
}
.cookie-consent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  background: color-mix(in srgb, #1d9bf0 12%, #ffffff);
  color: #0c7abf;
  flex-shrink: 0;
}
.cookie-consent-copy { min-width: 0; }
.cookie-consent-title {
  margin: 0 0 0.25rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #0a0e1a;
}
.cookie-consent-text {
  margin: 0;
  font-size: clamp(13px, 1.45vw, 14px);
  line-height: 1.55;
  /* Hard contrast on white bar — never var(--fg-muted) from dark theme */
  color: #334155;
}
.cookie-consent-links,
.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.cookie-consent-links {
  flex-wrap: wrap;
  margin-top: 0.45rem;
}
.cookie-consent-link {
  font-size: 13px;
  color: #0c7abf;
  text-decoration: none;
  font-weight: 600;
}
.cookie-consent-link:hover {
  color: #1d9bf0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-consent-link-sep {
  color: #64748b;
  font-size: 12px;
  user-select: none;
}
.cookie-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  min-height: 44px;
  padding: 0.72rem 1.15rem;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}
.cookie-consent-btn-primary {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: var(--on-solid);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, #1d9bf0 85%, transparent);
}
.cookie-consent-btn-primary:hover {
  background: var(--accent-solid-hover);
  border-color: var(--accent-solid-hover);
}
.cookie-consent-btn-ghost {
  background: #0a0e1a;
  border-color: #0a0e1a;
  color: #ffffff;
  box-shadow: none;
}
.cookie-consent-btn-ghost:hover {
  background: #1a2233;
  border-color: #1a2233;
}
:root[data-theme="dark"] .cookie-consent {
  color-scheme: dark;
  background: rgba(22, 22, 24, 0.97);
  color: #f7f8f9;
  border-top-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 -20px 48px -24px rgba(0, 0, 0, 0.75);
}
:root[data-theme="dark"] .cookie-consent-icon {
  background: color-mix(in srgb, #1d9bf0 18%, #2a2a2a);
  color: #1d9bf0;
}
:root[data-theme="dark"] .cookie-consent-title {
  color: #f7f8f9;
}
:root[data-theme="dark"] .cookie-consent-text {
  color: #c5c9d2;
}
:root[data-theme="dark"] .cookie-consent-link {
  color: #5eb8f5;
}
:root[data-theme="dark"] .cookie-consent-link:hover {
  color: #1d9bf0;
}
:root[data-theme="dark"] .cookie-consent-link-sep {
  color: #8b919c;
}
:root[data-theme="dark"] .cookie-consent-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f7f8f9;
}
:root[data-theme="dark"] .cookie-consent-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}
:root[data-theme="dark"] .cookie-consent-btn-primary {
  color: #ffffff;
}
@media (max-width: 820px) {
  .cookie-consent-inner {
    grid-template-columns: auto 1fr;
    grid-template-areas: "icon copy" "actions actions";
  }
  .cookie-consent-icon { grid-area: icon; }
  .cookie-consent-copy { grid-area: copy; }
  /* Buttons side by side: stacked full-width buttons made the bar ~40% of a phone screen. */
  .cookie-consent-actions {
    grid-area: actions;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .cookie-consent-btn { width: 100%; min-width: 0; }
}
@media (max-width: 480px) {
  .cookie-consent::before { margin-bottom: 0.6rem; }
  .cookie-consent-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "actions";
    gap: 0.6rem;
    padding: 0;
  }
  .cookie-consent-icon { display: none; }
  .cookie-consent-title { font-size: 13px; margin-bottom: 0.15rem; }
  .cookie-consent-text { font-size: 12.5px; line-height: 1.45; }
  .cookie-consent-links { margin-top: 0.3rem; }
  .cookie-consent-link { font-size: 12.5px; }
  /* 44px stays the touch target; long labels may wrap instead of overflowing. */
  .cookie-consent-btn { padding: 0.55rem 0.6rem; font-size: 13.5px; white-space: normal; }
}

/* ============================================================================
   Shell parity with aior.com (measured: 0 px / 0 colour diffs, 20 variants)
   ============================================================================ */
/* =============================================================================
   forum-shell-parity.css  —  aiorforum.com ONLY
   Load after /aior-shared/theme.*.css and /forum-assets/forum-shell.css
   (or append to the end of forum-shell.css).

   GOAL  The shared AIOR shell — topbar/header [data-aior-header], mobile menu
         [data-mobile-menu], promo strip, footer [data-aior-footer], cookie bar
         [data-cookie-consent], plus the floating WhatsApp / scroll-to-top
         buttons — must render exactly as on aior.com.

   WHY IT DIFFERS
   1. aior.com also loads /_astro/SiteLayout.*.css. Its *unlayered* shell rules
      come after theme.css, so at equal specificity they override theme.css; its
      Tailwind layers add the preflight resets and utilities (.text-sm) that the
      shell markup relies on. The forum never loads that file.
   2. XenForo ships rules aior.com does not have:
        html *, html *::before, html *::after { font-family: var(--font-sans) !important }
        button, input, optgroup, select, textarea { line-height: 1.4 }
        a:hover { text-decoration: underline; color: <XF link-hover colour> }
      and the shared theme.css contains forum-only dark rules:
        html#XF[data-theme=dark] a       { color: #f7f8f9 !important }
        html#XF[data-theme=dark] a:hover { color: #4ab6f5 !important }
   3. SiteLayout.css redefines the dark palette (:root[data-theme=dark]).

   METHOD  Every declaration below re-creates one difference measured with
   measure.mjs (aior.com home vs aiorforum.com home, en/tr x light/dark x
   360/390/768/1024/1440). Forum scoping is wrapped in :where(), so each rule keeps
   the specificity of its SiteLayout.css source rule; because this file loads after
   theme.css, ties resolve exactly as they do on aior.com (including theme.css
   :hover rules). Only the rules that must beat XenForo's !important declarations
   use !important plus an html#XF prefix. Nothing here matches XenForo content
   (.p-body, .block, .node, .message, forms) except §8, the H1 dedupe.
   ============================================================================= */


/* §1  Dark palette ------------------------------------------------------------
   aior.com: SiteLayout's :root[data-theme=dark] overrides theme.css's dark tokens
   (light tokens are identical on both hosts). Scoped to the shell roots so
   XenForo content keeps the forum's own palette. Only tokens that change a
   rendered shell value are listed; SiteLayout's other dark changes (--accent-soft,
   --brand*, --ok, --warn, --crit) are not referenced by any shell rule the forum
   loads. --glass-border is derived from --line on :root (custom properties resolve
   where declared), so it is re-derived here with the corrected --line. */
html#XF[data-theme="dark"] :is([data-aior-header], [data-aior-footer], [data-cookie-consent], [data-wa-fab], [data-scroll-top]) {
  --fg-soft: #d4d4d4;          /* theme.css #d4d6da  nav links */
  --fg-muted: #a3a3a3;         /* theme.css #9aa0aa  utility row, footer links/labels */
  --line: #303030;             /* theme.css #2a2f38  dividers, borders, header shadow */
  --line-strong: #404040;      /* theme.css #3a3f48  timeline separators */
  --accent: #4ab6f5;           /* theme.css #1da1f2  accents, gradients, focus ring */
  --accent-deep: #1da1f2;      /* theme.css #0d7fc2  promo arrow, cookie-bar stripe */
  --glass-border: color-mix(in srgb, #ffffff 11%, var(--line));   /* footer tiles */
}


/* §2  Preflight / utility equivalents ------------------------------------------
   Tailwind preflight: form controls inherit line-height (XenForo sets 1.4).
   (0,0,1): beats XenForo's element rule by order, loses to every class rule. */
:where(html#XF) :where([data-aior-header], [data-aior-footer], [data-cookie-consent]) button {
  line-height: inherit;
}
/* Tailwind .text-sm also sets line-height 1.25rem/0.875rem (theme.css only sets
   the font-size) — mobile-menu items are 40px tall on aior.com, not 41.7px. */
:where(html#XF) :where([data-aior-header], [data-aior-footer], [data-cookie-consent]) .text-sm {
  line-height: calc(1.25 / .875);
}
/* Preflight `a { text-decoration: inherit }`: aior.com never underlines shell links
   on hover; XenForo's a:hover does. Class-level :hover underlines
   (.cookie-consent-link, .footer-meta-link, .footer-social-all-link) still win. */
:where(html#XF) :where([data-aior-header], [data-aior-footer], [data-cookie-consent]) a:hover,
:where(html#XF) a[data-wa-fab]:hover {
  text-decoration: inherit;
}
/* aior.com's shell inherits overflow-wrap:normal; XenForo sets
   html { overflow-wrap: break-word }. Zero specificity: descendant rules that set
   overflow-wrap themselves (theme.css .footer-link < 560px) still apply. */
:where(html#XF) :where([data-aior-header], [data-aior-footer], [data-cookie-consent], [data-wa-fab], [data-scroll-top]) {
  overflow-wrap: normal;
  -webkit-tap-highlight-color: transparent;
}
/* SiteLayout @media (width <= 640px): paragraphs are not auto-hyphenated (theme.css
   hyphenates every p through `body :where(p, ...)`; same specificity, so order wins). */
@media (max-width: 640px) {
  :where(html#XF) :where([data-aior-header], [data-aior-footer], [data-cookie-consent]) p {
    -webkit-hyphens: manual;
    hyphens: manual;
  }
}
/* Links that have no own :hover colour keep their colour (XenForo's light a:hover
   colour would otherwise show through). */
:where(html#XF) :where([data-aior-header]) a[data-aior-home]:hover { color: inherit; }
:where(html#XF) :where([data-aior-footer]) .footer-btk:hover { color: var(--fg); }


/* §3  Font families -------------------------------------------------------------
   XenForo forces --font-sans on every element with !important, so SiteLayout's
   monospace families need !important (specificity 0,1,0 > `html *`). */
:where(html#XF) :where([data-aior-header], [data-aior-footer]) .mono {
  font-family: var(--font-mono, "Play", monospace) !important;   /* SiteLayout .mono */
  font-feature-settings: "tnum";
  letter-spacing: .01em;
}
:where(html#XF) :where([data-aior-header]) .promo-tag,
:where(html#XF) :where([data-aior-header]) .promo-tag * {
  font-family: var(--font-mono) !important;                       /* SiteLayout .promo-tag */
}


/* §4  Header / topbar ------------------------------------------------------------ */
/* SiteLayout .topbar-nav-link: .5rem .85rem (theme.css: 8px 12px) — desktop nav
   items were 3.2px narrower each and shifted by up to 11px. */
:where(html#XF) :where([data-aior-header]) .topbar-nav-link {
  gap: .25rem;
  padding: .5rem .85rem;
}
/* SiteLayout .topbar-divider (theme.css: 0 6px) */
:where(html#XF) :where([data-aior-header]) .topbar-divider {
  margin: 0 .35rem;
}
/* SiteLayout hover surface of utility links/buttons is --bg (theme.css: --bg-soft) */
:where(html#XF) :where([data-aior-header]) .topbar-link:hover,
:where(html#XF) :where([data-aior-header]) .topbar-icon-btn:hover {
  background: var(--bg);
}


/* §5  Footer ------------------------------------------------------------------------ */
/* Ambient accent gradient (theme.css/SiteLayout .footer-aior). forum-shell.css sets
   background-image:none on `html#XF footer.footer-aior` (1,1,2) — restore it. */
html#XF [data-aior-footer] footer.footer-aior {
  background-image:
    radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 60%),
    none;
}
/* SiteLayout .footer-follow-row: divider + 2rem gap above "Follow us" (was missing). */
:where(html#XF) :where([data-aior-footer]) .footer-follow-row {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
/* SiteLayout .footer-contact-text / -label / -value: only the declarations that
   survive theme.css's (0,2,0) rules on aior.com (tiles were 6-12px shorter). */
:where(html#XF) :where([data-aior-footer]) .footer-contact-text {
  gap: 3px;
}
:where(html#XF) :where([data-aior-footer]) .footer-contact-label {
  line-height: 1;
}
:where(html#XF) :where([data-aior-footer]) .footer-contact-value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: -.005em;
  line-height: 1.25;
}
/* SiteLayout .footer-payment-img: fills the card (theme.css: 20px tall, width auto). */
:where(html#XF) :where([data-aior-footer]) .footer-payment-img {
  object-fit: contain;
  object-position: center;
  width: 100%;
  height: 100%;
}
/* SiteLayout .footer-contact-item:hover surface */
:where(html#XF) :where([data-aior-footer]) .footer-contact-item:hover {
  background: var(--bg-soft);
}


/* §6  Dark mode: shell link colours ---------------------------------------------
   theme.css's forum-only `html#XF[data-theme=dark] a` (1,1,2) and `a:hover` (1,2,2)
   force #f7f8f9 / #4ab6f5 on every link. Restore aior.com's values per link class:
   rest rules are (1,2,1)-(1,2,2) so theme.css's existing (1,3,1) dark :hover rules
   for .topbar-link/.topbar-icon-btn/.footer-contact-item still win; hover rules are
   >= (1,3,1). Values are the same token expressions aior.com uses. */
html#XF[data-theme="dark"] :where([data-aior-header]) .topbar-link,
html#XF[data-theme="dark"] :where([data-aior-header]) .topbar-cart {
  color: var(--fg-muted) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) a[data-aior-home],
html#XF[data-theme="dark"] :where([data-aior-header]) a[data-aior-home]:hover {
  color: inherit !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) .topbar-nav-link {
  color: var(--fg-soft) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) .topbar-nav-link:is(:hover, .is-active, [aria-current="page"]) {
  color: var(--accent-text) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) .btn-brand,
html#XF[data-theme="dark"] :where([data-aior-header]) .btn-brand:hover {
  color: var(--on-solid) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) [data-mobile-menu] a {
  color: var(--fg) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) [data-mobile-menu] a:hover {
  color: var(--accent) !important;
}
html#XF[data-theme="dark"] :where([data-aior-header]) .promo-strip,
html#XF[data-theme="dark"] :where([data-aior-header]) .promo-strip:hover {
  color: var(--fg, #f7f8f9) !important;
}
html#XF[data-theme="dark"] :where([data-aior-footer]) .footer-link,
html#XF[data-theme="dark"] :where([data-aior-footer]) .footer-meta-link {
  color: var(--fg-muted) !important;
}
html#XF[data-theme="dark"] :where([data-aior-footer]) :is(.footer-contact-item, .footer-social-tile, .footer-btk),
html#XF[data-theme="dark"] :where([data-aior-footer]) .footer-btk:hover {
  color: var(--fg) !important;
}
html#XF[data-theme="dark"] :where([data-aior-footer]) .footer-social-all-link,
html#XF[data-theme="dark"] :where([data-aior-footer]) :is(.footer-link, .footer-meta-link, .footer-social-tile, .footer-social-all-link):hover {
  color: var(--accent) !important;
}
html#XF[data-theme="dark"] :where([data-cookie-consent]) .cookie-consent-link {
  color: #5eb8f5 !important;
}
html#XF[data-theme="dark"] :where([data-cookie-consent]) .cookie-consent-link:hover {
  color: #1d9bf0 !important;
}


/* §7  Floating shell widgets (WhatsApp FAB, scroll-to-top button) ------------------
   Rendered from the same shared markup/runtime on both hosts. */
/* Tailwind preflight on the scroll-to-top <button>: no UA padding (forum: 1px 6px)
   and inherited line-height (XenForo: 1.4). */
:where(html#XF) button:where([data-scroll-top]) {
  padding: 0;
  line-height: inherit;
}
/* SiteLayout .wa-fab shadow has no 1px white ring (theme.css adds one). */
:where(html#XF) .wa-fab {
  box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--accent) 65%, transparent);
}
html#XF[data-theme="dark"] a[data-wa-fab],
html#XF[data-theme="dark"] a[data-wa-fab]:hover {
  color: var(--on-solid, #fff) !important;
}


/* §8  One H1 per page -------------------------------------------------------------
   On the error page and the cookie-consent interstitial the shared hero already
   renders the page title as h1.page-hero-title; XenForo's .p-title repeats it as a
   second visible h1. Keep the hero, drop XenForo's title block on these two
   templates only. When .p-title is the header's only child, the (then empty)
   .p-body-header goes too, so its 10px bottom margin does not leave a gap
   (separate rule: a browser without :has() drops only that rule). */
html#XF:is(.template-error, .template-misc_cookies) .p-body-header .p-title {
  display: none !important;
}
html#XF:is(.template-error, .template-misc_cookies) .p-body-header:not(:has(> :not(.p-title))) {
  display: none !important;
}
:where(html#XF) .scroll-top-fab:where([data-scroll-top]):hover { transform: translateY(-2px); }
:where(html#XF) .scroll-top-fab:where([data-scroll-top]):active { transform: translateY(0); }

/* =============================================================================
   AIOR FORUM — MOBILE LIQUID GLASS (proposal, 2026-10-26)
   -----------------------------------------------------------------------------
   Ship as the last section of xenforo-theme/forum-shell.css (served as
   /forum-assets/forum-shell.css, loaded after /aior-shared/theme.<hash>.css), or
   as its own file linked with media="(max-width: 1023.98px)" so desktop never
   waits for it.

   Scope    html#XF only, viewport < 1024px. Every rule sits inside a max-width
            media query, so desktop (>= 1024px) is byte-for-byte unchanged
            (verified: computed-style diff with/without this file at 1024 and
            1440px is empty).
   Shell    The shared topbar / header / promo strip / footer / page hero are NOT
            restyled. Only exception, section 15: the utility bar's account
            controls when the hamburger drawer no longer repeats them.
   Tokens   Only the shared --glass-* tokens and existing AIOR tokens (--bg*,
            --fg*, --line, --hair, --accent*, --on-solid, --r-*). No new colours;
            the local --lgf-* properties below are aliases of those tokens.
   Perf     backdrop-filter on three surfaces only: the sticky forum nav strip
            (tall viewports), open XF menus, the XF off-canvas panel. All other
            surfaces are a solid --glass-bg fill: no blur, no extra layers.
   A11y     Primary controls >= 44px, form fields >= 16px (no iOS focus zoom),
            text >= 4.5:1, field boundaries >= 3:1, and fallbacks for
            prefers-reduced-transparency, prefers-contrast, forced-colors,
            prefers-reduced-motion and missing backdrop-filter support.
   Specificity  html#XF[data-theme] + a context class beats the shared XF
            overrides (html#XF[data-theme="dark"] .x !important = 1,2,1).
   ============================================================================= */

@media (max-width: 1023.98px) {

  /* --- 0. Aliases (existing tokens only) ----------------------------------- */
  html#XF[data-theme] {
    --lgf-link: var(--accent-solid-hover);    /* #06639f: 6.3:1 on glass, 5.2:1 on the grey page;
                                                 --accent-solid is only 4.1:1 on --bg-sunken */
    --lgf-card-radius: var(--r-2xl);          /* 22px, same as shared .aior-card     */
    --lgf-ctl-radius: var(--r-md);            /* 10px, same as shared .aior-btn      */
    --lgf-row-line: var(--line);
    --lgf-field-edge: color-mix(in srgb, var(--fg-muted) 82%, transparent); /* >= 3:1 */
    --lgf-sticky-top: calc(var(--topbar-utility-h, 32px) + 4rem); /* utility bar + 64px header */
  }
  html#XF[data-theme="dark"] {
    --lgf-link: var(--accent);                /* 5.3:1 on dark glass (accent-solid is 3:1) */
  }

  /* --- 1. Cards: one glass surface per XF block ------------------------------
     XF wraps every list in .block > .block-container; the shared theme paints
     BOTH (card-in-card) and XF pulls the container -10px edge-to-edge below
     650px, which shifted rows and the login button off the card edge. */
  html#XF[data-theme] .p-body .block {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  html#XF[data-theme] .p-body .block-container,
  html#XF[data-theme] .p-body .blockMessage:not(.block-container .blockMessage),
  html#XF[data-theme] .aior-forum-statistics .block-body {
    margin-left: 0 !important;
    margin-right: 0 !important;
    color: var(--fg) !important;
    background-color: var(--glass-bg) !important;
    background-image: var(--glass-highlight) !important;  /* specular sheen, fades out by 60% */
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--lgf-card-radius) !important;
    box-shadow: var(--glass-shadow) !important;
  }
  /* Widgets that nest a block inside a block (e.g. the sidebar promo) stay ONE card. */
  html#XF[data-theme] .p-body .block-container .block-container {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  html#XF[data-theme] .p-body .block + .block,
  html#XF[data-theme] .p-body .block-container + .block-container { margin-top: 16px; }

  /* Everything inside a card is transparent: no grey strips, no inner boxes. */
  html#XF[data-theme] .p-body .block-container :is(.block-body, .block-row, .block-header, .block-tabHeader,
    .block-minorHeader, .block-filterBar, .block-footer, .block-formSectionHeader, .structItemContainer,
    .structItemContainer-group, .structItem, .node, .forumStats-main, .formSubmitRow-bar, .dataList-row, .dataList-cell,
    .stick-threads-header, .normal-threads-tabs, .normal-threads-header, .inputGroup-text),
  html#XF[data-theme] .aior-forum-statistics .block-body :is(.contentRow, .contentRow-main, .contentRow-figure) {
    background-color: transparent !important;
    background-image: none !important;
  }

  /* Rows: one hairline between siblings (the shared theme drew top AND bottom). */
  html#XF[data-theme] .p-body .block-container :is(.block-row, .node, .structItem) {
    border: 0 !important;
  }
  html#XF[data-theme] .p-body .block-container :is(.block-row, .node, .structItem) + :is(.block-row, .node, .structItem) {
    border-top: 1px solid var(--lgf-row-line) !important;
  }
  html#XF[data-theme] .p-body .block-container > .block-body { padding: 0 !important; }
  html#XF[data-theme] .p-body .block-container .block-row { padding: 14px 16px !important; }

  /* Card headings */
  html#XF[data-theme] .p-body .block-container > :is(.block-header, .block-minorHeader, .block-tabHeader) {
    padding: 16px 16px 12px !important;
    font-size: 17px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: var(--fg) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--lgf-row-line) !important;
  }
  html#XF[data-theme] .p-body .block-container > :is(.block-header, .block-minorHeader) a { color: inherit !important; }
  html#XF[data-theme] .p-body .block-container > .block-footer {
    padding: 12px 16px !important;
    border: 0 !important;
    border-top: 1px solid var(--lgf-row-line) !important;
    color: var(--fg-muted) !important;
  }

  /* --- 2. Forum nav strip (.aior-fnav-strip): one compact glass row ---------
     Was two rows (89px): pills 38px tall, Search wrapped below a stray divider. */
  html#XF[data-theme] .aior-fnav-strip {
    margin-bottom: 12px !important;
    background: var(--glass-bg) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 4px !important;
    min-height: 0 !important;
    padding: 4px 8px 4px 12px !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-list {
    flex: 1 1 auto !important;
    min-width: 0;
    justify-content: flex-start !important;
    gap: 2px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); /* "more" cue */
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    padding-right: 24px !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-item {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-link {
    height: 44px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--fg-soft) !important;
    border-radius: 999px !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-link--split { padding-right: 0 !important; }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-chevron {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-right {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center;
    gap: 2px !important;
    margin: 0 !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-tools {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html#XF[data-theme] .aior-fnav-strip :is(.aior-fnav-tool, .aior-account-icons .p-navgroup-link, .aior-fnav-staff-btn) {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    color: var(--fg-soft) !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
  }
  /* Icon-only on phones; the links keep aria-label / title as their name. */
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-tool > span,
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-staff-btn > span {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-tool svg { width: 18px; height: 18px; }
  /* Signed-in inbox/alert counters: hug the corner (left+right were both set, stretching the
     pill to 34px) and use the shell's cart-badge colours (white on --danger-solid, 4.8:1;
     the current #1da1f2 pill is 2.8:1). */
  html#XF[data-theme] .aior-fnav-strip .aior-account-icons .badgeContainer::after {
    left: auto !important;
    top: 4px !important;
    right: 4px !important;
    background: var(--danger-solid) !important;
    color: var(--on-solid) !important;
    box-shadow: 0 0 0 2px var(--bg);
  }
  html#XF[data-theme] .aior-fnav-strip :is(.aior-fnav-link.is-active, .aior-fnav-link[aria-current="page"]) {
    background: var(--accent-solid) !important;
    color: var(--on-solid) !important;
  }

  /* --- 3. Breadcrumbs (.p-breadcrumbs): a glass capsule with 44px crumbs --- */
  html#XF[data-theme] .p-body-inner > .p-breadcrumbs,
  html#XF[data-theme] .p-body-content .p-breadcrumbs {
    gap: 0 !important;
    width: fit-content !important;
    max-width: 100%;
    padding: 0 6px !important;
    margin: 0 0 14px !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--lgf-card-radius) !important;   /* = 44px pill on one line, card when wrapped */
    box-shadow: var(--glass-shadow) !important;
  }
  html#XF[data-theme] .p-body-inner > .p-breadcrumbs > li > a,
  html#XF[data-theme] .p-body-content .p-breadcrumbs > li > a {
    height: 44px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    color: var(--fg-soft) !important;
    background: none !important;
    border-radius: 999px !important;
  }
  /* The parent crumb was #1da1f2 on a blue tint (2.6:1). */
  html#XF[data-theme] .p-body-inner > .p-breadcrumbs > li:last-child > a,
  html#XF[data-theme] .p-body-content .p-breadcrumbs > li:last-child > a {
    color: var(--fg) !important;
    font-weight: 700 !important;
    background: none !important;
  }

  /* --- 4. Node list (categories / forums) ---------------------------------- */
  /* Category header: title + search + collapse on ONE row (was 3 rows, 115px). */
  html#XF[data-theme] .p-body .block--category .block-container > .block-header {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 4px;
    padding: 6px 6px 6px 16px !important;
  }
  html#XF[data-theme] .p-body .block--category .block-header::before,
  html#XF[data-theme] .p-body .block--category .block-header::after { content: none !important; }
  html#XF[data-theme] .p-body .block--category .block-header > a {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 0;
    color: var(--fg) !important;   /* was #1da1f2 on #f1f4f9: 2.56:1 */
    font-size: 17px;
    line-height: 1.3;
  }
  html#XF[data-theme] .p-body .block--category .category-forums-search { display: contents; }
  html#XF[data-theme] .p-body .block--category .category-forums-search-icon {
    order: 2;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    border-radius: 999px;
    color: var(--fg-soft);
    cursor: pointer;
  }
  html#XF[data-theme] .p-body .block--category .category-forums-search-icon i { font-size: 17px; }
  html#XF[data-theme] .p-body .block--category .category-forums-search-form { order: 4; flex: 1 0 100%; padding: 0 10px 10px 0; }
  html#XF[data-theme] .p-body .block--category .block-header > .collapseTrigger {
    order: 3;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    border-radius: 999px;
    cursor: pointer;
  }
  html#XF[data-theme] .p-body .block--category .block-header > .collapseTrigger::before {
    float: none !important;
    margin: 0 !important;
    width: 12px !important;
    height: 12px !important;
    background-color: var(--fg-muted) !important;
  }

  /* Node row: whole row is the target (stretched title link), icon in a tile. */
  html#XF[data-theme] .p-body .node-body {
    position: relative;
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    padding: 14px 16px;
  }
  html#XF[data-theme] .p-body .node-body > * { grid-column: 2; }
  html#XF[data-theme] .p-body .node-body > .node-icon {
    grid-column: 1;
    grid-row: 1 / span 3;
    display: grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: var(--r-lg);
    background: var(--accent-tint) !important;
  }
  html#XF[data-theme] .p-body .node-icon i { font-size: 18px !important; width: auto !important; height: auto !important; line-height: 1 !important; }
  html#XF[data-theme] .p-body .node-main,
  html#XF[data-theme] .p-body .node-extra { padding: 0 !important; display: block; }
  html#XF[data-theme] .p-body .node-stats { padding: 0 !important; }   /* XF keeps it hidden on phones */
  html#XF[data-theme] .p-body .node-title { font-size: 16px !important; line-height: 1.35 !important; margin: 0 0 2px !important; }
  html#XF[data-theme] .p-body .node-title a { color: var(--fg) !important; }
  html#XF[data-theme] .p-body .node-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  html#XF[data-theme] .p-body .node-body :is(.node-extra a, .node-description a, .node-subNodesFlat a, .node-statsMeta a) { position: relative; z-index: 1; }
  html#XF[data-theme] .p-body .node-extra-row { display: block !important; max-width: 100%; }
  html#XF[data-theme] .p-body .node-extra-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Category footer ("Statistics: …"): drop the teal-to-blue gradient rule. */
  html#XF[data-theme] .p-body .category-bottom-border { display: none !important; }
  html#XF[data-theme] .p-body .block--category .block-footer { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  html#XF[data-theme] .p-body .block--category .block-footer .button--scroll {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: -10px -8px -10px auto; border-radius: 999px; color: var(--fg-soft) !important;
  }

  /* --- 5. Thread list (structItem) ---------------------------------------- */
  html#XF[data-theme] .p-body .structItem {
    position: relative;
    display: grid !important;
    grid-template-columns: 40px auto minmax(0, 1fr);
    grid-template-areas: "icon main main" "icon meta latest";
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    padding: 14px 16px !important;
  }
  html#XF[data-theme] .p-body .structItem-cell { display: block !important; padding: 0 !important; width: auto !important; border: 0 !important; }
  html#XF[data-theme] .p-body .structItem-cell--icon { grid-area: icon; width: 40px !important; }
  html#XF[data-theme] .p-body .structItem-cell--icon .avatar { width: 40px !important; height: 40px !important; border-radius: var(--r-md) !important; }
  html#XF[data-theme] .p-body .structItem-cell--main { grid-area: main; }
  html#XF[data-theme] .p-body .structItem-cell--meta { grid-area: meta; font-size: 13px; }
  html#XF[data-theme] .p-body .structItem-cell--latest { grid-area: latest; font-size: 13px; text-align: end; }
  html#XF[data-theme] .p-body .structItem-cell--iconEnd { display: none !important; }
  html#XF[data-theme] .p-body .structItem-title { font-size: 16px !important; line-height: 1.35 !important; font-weight: 600; }
  html#XF[data-theme] .p-body .structItem-title a { color: var(--fg) !important; }
  html#XF[data-theme] .p-body .structItem-title a[data-tp-primary]::after { content: ""; position: absolute; inset: 0; }
  html#XF[data-theme] .p-body .structItem :is(.structItem-cell--icon a, .structItem-minor a, .structItem-cell--latest a, .structItem-statuses, .structItem-pageJump a, .labelLink) {
    position: relative; z-index: 1;
  }
  html#XF[data-theme] .p-body .structItem-cell--meta > .pairs:first-child { display: inline-flex; gap: 4px; }

  /* Filter bar: "Filters" becomes a 44px pill */
  html#XF[data-theme] .p-body .block-filterBar { padding: 6px 8px !important; border-bottom: 1px solid var(--lgf-row-line) !important; }
  html#XF[data-theme] .p-body .filterBar-menuTrigger {
    display: inline-flex !important; align-items: center; min-height: 44px; padding: 0 14px !important;
    border-radius: 999px !important; font-size: 14px !important; font-weight: 600; color: var(--fg-soft) !important;
  }

  /* --- 6. Forum statistics tabs block (.aior--forum-stats) -----------------
     Was a 3-level nested table (card > white box > bordered grid) with 32px rows,
     20px-tall links, boxed counters and a gradient on every counter. */
  html#XF[data-theme] .p-body .aior--forum-stats .block-container > .block-body { padding: 8px 0 12px !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .forumStats-main {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .block-mainTabHeader {
    position: relative;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 8px 8px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--lgf-row-line) !important;
    border-radius: 0 !important;
    background: none !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .block-mainTabHeader .hScroller { flex: 1 1 auto; min-width: 0; }
  html#XF[data-theme] .p-body .tabs-tab {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px !important;
    margin: 0 2px 0 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--fg-soft) !important;
    background: none !important;
  }
  html#XF[data-theme] .p-body .tabs-tab.is-active {
    background: var(--accent-solid) !important;
    color: var(--on-solid) !important;
  }
  html#XF[data-theme] .p-body .tabs-tab.is-active :is(i, svg, span) { color: var(--on-solid) !important; }
  /* XF scroll arrows: a 44px glass button for pointer users; touch users swipe and get
     an edge fade instead (section "touch" below). */
  html#XF[data-theme] .p-body .hScroller-action {
    width: 44px !important;
    height: 44px !important;
    background-image: none !important;
    background-color: var(--glass-bg) !important;
    border-radius: 999px;
    box-shadow: var(--glass-shadow);
    top: 0 !important;
    justify-content: center;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .tab-buttons .button.menuTrigger {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 999px !important;
  }
  /* "Sticky threads" was position:sticky (top:25px) inside the card: on a phone it slid
     over the "Latest threads" rows. */
  html#XF[data-theme] .p-body .aior--forum-stats .stats-stickThreads { position: static !important; }
  html#XF[data-theme] .p-body .aior--forum-stats :is(.stick-threads-header, .normal-threads-tabs) { border: 0 !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .stickTab-collapse {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; right: 0 !important; top: 50%; transform: translateY(-50%);
  }
  html#XF[data-theme] .p-body .aior--forum-stats :is(.tab-buttons, .tab-buttons .buttonGroup-buttonWrapper) { border: 0 !important; padding: 0 !important; }
  /* The column-header row and the rank boxes are table chrome on a phone. */
  html#XF[data-theme] .p-body .aior--forum-stats .tabHeader { display: none !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .forumStats-content > .block-body { padding: 0 16px !important; }
  html#XF[data-theme] .p-body .aior--forum-stats :is(.stick-threads-header, .normal-threads-tabs) {
    padding: 14px 0 4px !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .normal-threads-header { padding: 0 !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .statsTab-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .threads-icon i { width: 24px !important; color: var(--fg-muted) !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-table { width: 100%; border-collapse: collapse; }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell {
    padding: 0 !important;
    border: 0 !important;
    vertical-align: middle !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-row + .dataList-row .dataList-cell { border-top: 1px solid var(--lgf-row-line) !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--counter { width: 28px; }
  html#XF[data-theme] .p-body .aior--forum-stats .counts {
    justify-content: flex-start;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums;
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--image { width: 40px; }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--image > span[class*="user--avatar-"] {
    top: calc(50% - 17px) !important;
    left: 22px !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--image .avatar { width: 28px !important; height: 28px !important; border-radius: var(--r-sm) !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--link a,
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--main > a {
    display: block !important;
    padding: 12px 0 !important;              /* 20px line + 24px = 44px minimum row target */
    font-size: 15px !important;
    line-height: 20px !important;
    color: var(--fg) !important;
  }
  /* Titles: two lines instead of a one-line ellipsis ("How to Open .tar.zst Files on M…"). */
  html#XF[data-theme] .p-body .aior--forum-stats .dataList-cell--link .dataList-textRow {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
            line-clamp: 2;
    overflow: hidden;
    white-space: normal !important;
  }
  html#XF[data-theme] .p-body .aior--forum-stats .forumStats-showMore { padding: 12px 16px 0 !important; }
  html#XF[data-theme] .p-body .aior--forum-stats .forumStats-showMore .button.button--link {
    background: var(--accent-solid) !important;
    border: 0 !important;
    color: var(--on-solid) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    font-size: 15px !important;
    font-weight: 600 !important;
  }

  /* Sidebar promo widget (inline styles use --accent #1da1f2: 2.8:1 with white). */
  html#XF[data-theme] .p-body .aior-promo-sidebar .block-body > div:first-child { background: var(--accent-solid) !important; }
  html#XF[data-theme] .p-body .aior-promo-sidebar [data-en="AIOR TECHNOLOGY"] { color: var(--lgf-link) !important; }
  html#XF[data-theme] .p-body .aior-promo-sidebar .button { width: 100%; }

  /* Carousel pager (resources): 24x30 dots -> 44px targets, dot visual unchanged. */
  html#XF[data-theme] .p-body .f-carousel__dots button { min-width: 44px; min-height: 44px; }

  /* --- 7. Thread view: each post is its own glass card ---------------------- */
  html#XF[data-theme] .p-body .block--messages > .block-container {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  html#XF[data-theme] .p-body .block--messages .block-body { display: grid; gap: 12px; padding: 0 !important; }
  html#XF[data-theme] .p-body .block--messages .message {
    margin: 0 !important;
    color: var(--fg) !important;
    background-color: var(--glass-bg) !important;
    background-image: var(--glass-highlight) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--lgf-card-radius) !important;
    box-shadow: var(--glass-shadow) !important;
    overflow: hidden;
  }
  html#XF[data-theme] .p-body .block--messages :is(.message-inner, .message-cell, .message-userDetails, .message-user) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  /* A message rendered inside an ordinary card (quick reply, profile-post lists) is not a second card. */
  html#XF[data-theme] .p-body .block-container .message:not(.block--messages .message) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html#XF[data-theme] .p-body .block--messages .message-cell--user { padding: 14px 16px 0 !important; }
  html#XF[data-theme] .p-body .block--messages .message-userArrow { display: none !important; }
  html#XF[data-theme] .p-body .block--messages .message-cell--main { padding: 8px 16px 14px !important; }
  html#XF[data-theme] .p-body .block--messages .message-attribution {
    background: none !important;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 !important;
    border-bottom: 1px solid var(--lgf-row-line) !important;
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .p-body .block--messages .message-attribution :is(a, .message-attribution-gadget) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .p-body .block--messages .message-attribution-main a { justify-content: flex-start; min-width: 0; }
  html#XF[data-theme] .p-body .message-body .bbWrapper { font-size: 16px !important; line-height: 1.65 !important; overflow-wrap: anywhere; }
  html#XF[data-theme] .p-body .message-body .bbWrapper :is(h1, h2, h3, h4) { line-height: 1.3 !important; }
  /* Seeded bilingual posts: each language block opens with a BBCode newline and the two
     blocks are separated by another <br>; both rendered as an empty first line. */
  html#XF[data-theme] .p-body .message-body .bbWrapper > .aior-lang-block + br,
  html#XF[data-theme] .p-body .message-body .bbWrapper > .aior-lang-block > br:first-child { display: none; }
  html#XF[data-theme] .p-body .message-body .bbWrapper > :is(h1, h2, h3, h4):first-child,
  html#XF[data-theme] .p-body .message-body .bbWrapper > .aior-lang-block > :is(h1, h2, h3, h4):first-child { margin-top: 4px !important; }
  html#XF[data-theme] .p-body .bbCodeBlock {
    border: 1px solid var(--lgf-row-line) !important;
    border-radius: var(--r-lg) !important;
    background: var(--bg-sunken) !important;
    overflow: hidden;
  }
  html#XF[data-theme] .p-body .bbCodeBlock-title { color: var(--fg-muted) !important; background: none !important; }
  html#XF[data-theme] .p-body .block--messages .message-footer { border: 0 !important; background: none !important; }
  /* Share row: 35x34 icons -> 44px targets inside the (now padded) glass card. */
  html#XF[data-theme] .p-body .blockMessage--none:not(.block-container .blockMessage) { padding: 8px 10px 8px 16px !important; }
  html#XF[data-theme] .p-body .shareButtons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  html#XF[data-theme] .p-body .shareButtons-buttons { display: flex !important; flex-wrap: wrap; gap: 2px; }
  html#XF[data-theme] .p-body .shareButtons-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 !important;
    border-radius: 999px !important;
  }
  html#XF[data-theme] .p-body .actionBar-action {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
    padding: 0 10px !important;
  }

  /* --- 8. Buttons --------------------------------------------------------- */
  html#XF[data-theme] .p-body .button,
  html#XF[data-theme] .p-body a.button,
  html#XF[data-theme] .aior-forum-statistics .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px !important;
    border-radius: var(--lgf-ctl-radius) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }
  /* Secondary: a glass chip. */
  html#XF[data-theme] .p-body .button:where(:not(.button--primary, .button--cta, .button--link, .menuTrigger)) {
    color: var(--fg) !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
  }
  /* Filled actions: --accent-solid with white text (4.99:1), both themes. */
  html#XF[data-theme] .p-body :is(.button--primary, .button--cta),
  html#XF[data-theme] .aior-forum-statistics :is(.button--primary, .button--cta) {
    background: var(--accent-solid) !important;
    border-color: var(--accent-solid) !important;
    color: var(--on-solid) !important;
    box-shadow: none !important;
  }
  html#XF[data-theme] .p-body .button--link:not(.menuTrigger) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--lgf-link) !important;
  }
  html#XF[data-theme] .p-body .button--link:not(.menuTrigger) .button-text { color: inherit !important; }
  html#XF[data-theme] .p-body .button-text { color: inherit; }

  /* --- 9. Forms (log in / register / search / account) --------------------- */
  html#XF[data-theme] .p-body .formRow > dt,
  html#XF[data-theme] .p-body .formRow > dd { padding-left: 16px !important; padding-right: 16px !important; }
  html#XF[data-theme] .p-body .formRow > dd { padding-top: 6px !important; padding-bottom: 10px !important; }
  html#XF[data-theme] .p-body .formRow > dt:not(:has(label, .formRow-label)) { display: none !important; } /* empty label cell */
  html#XF[data-theme] .p-body .formRow-label { font-size: 15px; font-weight: 600; color: var(--fg); }
  html#XF[data-theme] .p-body :is(.input, textarea, select),
  html#XF[data-theme] .menu :is(.input, textarea, select) {
    min-height: 48px;
    padding: 12px 14px !important;
    font-size: 16px !important;            /* < 16px makes iOS Safari zoom on focus */
    line-height: 1.4 !important;
    color: var(--fg) !important;
    background: var(--bg) !important;
    border: 1px solid var(--lgf-field-edge) !important;
    border-radius: var(--lgf-ctl-radius) !important;
    box-shadow: none !important;
  }
  html#XF[data-theme="dark"] .p-body :is(.input, textarea, select),
  html#XF[data-theme="dark"] .menu :is(.input, textarea, select) { background: var(--bg-sunken) !important; }
  html#XF[data-theme] .p-body :is(.input, textarea, select):focus,
  html#XF[data-theme] .menu :is(.input, textarea, select):focus {
    border-color: var(--lgf-link) !important;   /* focus edge >= 3:1 in both themes (--accent is 2.7:1 on white) */
    box-shadow: 0 0 0 3px var(--accent-ring) !important;
    outline: none !important;
  }
  html#XF[data-theme] .p-body textarea.input { min-height: 120px; }
  html#XF[data-theme] .p-body .inputGroup { align-items: stretch; }
  html#XF[data-theme] .p-body .inputGroup > .input { min-width: 0; }
  html#XF[data-theme] .p-body .inputGroup--joined > .input { border-radius: var(--lgf-ctl-radius) !important; }
  html#XF[data-theme] .p-body .inputGroup > .inputGroup-text:has(.iconic--hideShow) { padding: 0 !important; border: 0 !important; }
  html#XF[data-theme] .p-body .inputGroup .iconic--hideShow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 48px;
    margin-left: 6px;
    padding: 0 12px !important;
    border-radius: var(--lgf-ctl-radius);
    border: 1px solid var(--lgf-field-edge);
    background: var(--glass-bg);
    color: var(--fg-soft) !important;
  }
  html#XF[data-theme] .p-body .inputGroup .iconic--hideShow > input { position: absolute; opacity: 0; pointer-events: none; }
  html#XF[data-theme] .p-body .inputGroup .iconic--hideShow > i {
    position: relative !important;            /* its ::before/::after eye glyphs anchor here */
    width: 18px !important;
    height: 18px !important;
    margin: 0 6px 0 0 !important;
  }
  html#XF[data-theme] .p-body .inputGroup .iconic--hideShow > .iconic-label { padding: 0 !important; margin: 0 !important; }
  /* Checkbox / radio rows: the whole label is a 44px target. */
  html#XF[data-theme] .p-body label.iconic:not(.iconic--hideShow) {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
  }
  html#XF[data-theme] .p-body .formRow dd > a,
  html#XF[data-theme] .p-body .formRow-explain a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lgf-link) !important; }
  /* Submit row: full-width primary, no grey sticky bar; aligned to the card padding. */
  html#XF[data-theme] .p-body .formSubmitRow-bar { border: 0 !important; box-shadow: none !important; }
  html#XF[data-theme] .p-body .formSubmitRow-controls { padding: 4px 0 16px !important; margin: 0 !important; text-align: start !important; }
  html#XF[data-theme] .p-body .formSubmitRow-controls .button { width: 100%; min-height: 48px; font-size: 16px !important; }
  html#XF[data-theme] .p-body .block-outer--after .block-outer-middle,
  html#XF[data-theme] .p-body .block-outer-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
  html#XF[data-theme] .p-body .blocks-textJoiner em {
    font-size: 13px !important;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-muted);
  }

  /* --- 10. Pagination ----------------------------------------------------- */
  html#XF[data-theme] .p-body :is(.pageNav-page > a, .pageNav-page > span, .pageNav-jump, .pageNavSimple-el) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: var(--lgf-ctl-radius) !important;
    color: var(--fg) !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    line-height: 1 !important;
  }
  html#XF[data-theme] .p-body .pageNav-main { display: flex; flex-wrap: wrap; gap: 6px; }
  html#XF[data-theme] .p-body .pageNav-page { margin: 0 !important; border: 0 !important; background: none !important; }
  html#XF[data-theme] .p-body .pageNav-page--current > a,
  html#XF[data-theme] .p-body .pageNavSimple-el--current {
    background: var(--accent-solid) !important;
    border-color: var(--accent-solid) !important;
    color: var(--on-solid) !important;
  }

  /* --- 11. XF menus (dropdowns: fnav chevrons, Filters, stats settings) ----
     Transient surfaces: blur only while open (display:none otherwise). */
  html#XF[data-theme] .menu {
    max-width: calc(100vw - 24px) !important;
    min-width: min(320px, calc(100vw - 24px)) !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html#XF[data-theme] .menu .menu-content {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%);
            backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-xl) !important;
    box-shadow: var(--glass-shadow-hover) !important;
    overflow: hidden;
  }
  html#XF[data-theme] .menu :is(.menu-header, .menu-footer) { background: none !important; border-color: var(--lgf-row-line) !important; }
  html#XF[data-theme] .menu .menu-linkRow {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 16px !important;
    font-size: 15px !important;
    color: var(--fg) !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  html#XF[data-theme] .menu .menu-linkRow.is-selected { color: var(--lgf-link) !important; font-weight: 700; }
  html#XF[data-theme] .menu .menu-arrow { display: none !important; }

  /* --- 12. XF off-canvas panel (kept consistent if a trigger is ever added) -- */
  html#XF[data-theme] .offCanvasMenu-content {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%);
            backdrop-filter: blur(16px) saturate(150%);
    border-right: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow-hover) !important;
    color: var(--fg) !important;
  }
  html#XF[data-theme] .offCanvasMenu-header { background: none !important; color: var(--fg) !important; border-bottom: 1px solid var(--lgf-row-line) !important; }
  html#XF[data-theme] .offCanvasMenu-link {
    display: flex !important;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px !important;
    color: var(--fg) !important;
  }

  /* --- 13. Board statistics (below the content) ----------------------------- */
  html#XF[data-theme] .aior-forum-statistics .p-footer-inner { padding: 0 16px 16px !important; }
  html#XF[data-theme] .aior-forum-statistics .block-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    padding: 4px 16px !important;
  }
  html#XF[data-theme] .aior-forum-statistics .contentRow {
    margin: 0 !important;
    padding: 12px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  html#XF[data-theme] .aior-forum-statistics .contentRow::before,
  html#XF[data-theme] .aior-forum-statistics .contentRow::after { content: none !important; display: none !important; }
  html#XF[data-theme] .aior-forum-statistics .contentRow.wrapper {
    grid-column: 1 / -1;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    border-bottom: 1px solid var(--lgf-row-line) !important;
  }
  html#XF[data-theme] .aior-forum-statistics .contentRow:not(.wrapper):nth-child(n+4) { border-top: 1px solid var(--lgf-row-line) !important; }
  html#XF[data-theme] .aior-forum-statistics .contentRow-figure { display: none !important; }
  html#XF[data-theme] .aior-forum-statistics .contentRow-main { padding: 0 !important; min-width: 0; }
  html#XF[data-theme] .aior-forum-statistics .statistics-title {
    display: block;
    font-size: 13px !important;
    color: var(--fg-muted) !important;
    white-space: normal !important;
  }
  html#XF[data-theme] .aior-forum-statistics .statistics-count { display: block; font-size: 18px !important; font-weight: 700 !important; color: var(--fg) !important; }

  /* --- 14. Text: contrast + long-form readability ----------------------------
     Muted text: XF's dark muted (#777d88 on #2a2a2a = 3.47:1) and light #6b7280 on
     #f1f4f9 (4.39:1) fail AA; AIOR --fg-muted on glass passes (light 4.6+, dark 5.7). */
  html#XF[data-theme] .p-body :is(.pairs > dt, .u-muted, .u-dimmed, .node-meta, .node-extra, .node-extra-row,
    .node-extra-title, .node-extra-date, .structItem-minor, .structItem-parts, .structItem-latestDate, .contentRow-minor,
    .contentRow-snippet, .shareButtons-label, .block-footer-counter, .p-description, .listInline--bullet),
  html#XF[data-theme] .p-body :is(.node-extra, .structItem-minor, .contentRow-minor, .structItem-cell--latest, .p-description) :is(a, .username, span, time) {
    color: var(--fg-muted) !important;
  }
  html#XF[data-theme] .p-body .pairs > dd { color: var(--fg-soft) !important; }
  /* Accent text links: #1da1f2 on light surfaces is 2.6:1. */
  html#XF[data-theme] .p-body :is(.bbWrapper a:not(.username):not(.button), .formRow-explain a, .blockMessage a, .block-footer a:not(.button--scroll)) {
    color: var(--lgf-link) !important;
  }
  /* Long-form text: start-aligned on phones. The shared SSOT justify rule
     (body :where(p,li,span,…){text-align:justify!important;hyphens:auto}) opens
     rivers in a 320px column and hyphenates headings ("er-rors"). */
  html#XF[data-theme] :is(.p-body, .aior-fnav-strip, .menu, .aior-forum-statistics) :is(p, h1, h2, h3, h4, h5, h6, li, dt, dd, label, button, a, input, textarea, select, span, th, td, figcaption) {
    text-align: start !important;
    text-align-last: auto !important;
    -webkit-hyphens: manual !important;
            hyphens: manual !important;
  }
  html#XF[data-theme] .p-body .p-title-value { text-wrap: balance; }
  html#XF[data-theme] .p-body .p-title-value { font-size: 22px !important; line-height: 1.25 !important; }
  html#XF[data-theme] .p-body .p-title-pageAction .button {
    min-height: 44px;
    background: var(--accent-solid) !important;
    border-color: var(--accent-solid) !important;
    color: var(--on-solid) !important;
    box-shadow: none !important;
  }
}

/* --- Sticky nav strip: only where it costs < 8% of the viewport height -------
   44px pills + 8px padding = 53px; on a 640px-tall phone the shell header plus a
   sticky strip would eat 23% of the screen, so short viewports keep it static. */
@media (max-width: 1023.98px) and (min-height: 700px) {
  html#XF[data-theme] .aior-fnav-strip {
    position: sticky;
    top: var(--lgf-sticky-top);
    z-index: 40;                              /* below the shell header (49/50) */
    -webkit-backdrop-filter: blur(16px) saturate(150%);
            backdrop-filter: blur(16px) saturate(150%);
  }
}

/* --- Touch: swipeable tab rows get an edge fade instead of overlay arrows ---- */
@media (max-width: 1023.98px) and (hover: none) and (pointer: coarse) {
  html#XF[data-theme] .p-body .hScroller-action { display: none !important; }
  html#XF[data-theme] .p-body .hScroller-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
}

/* --- Fallbacks ------------------------------------------------------------- */
/* No backdrop-filter: glass surfaces that rely on blur become opaque. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (max-width: 1023.98px) {
    html#XF[data-theme] .aior-fnav-strip,
    html#XF[data-theme] .menu .menu-content,
    html#XF[data-theme] .offCanvasMenu-content { background: var(--bg) !important; }
  }
}
/* Reduced transparency / more contrast: opaque surfaces, real edges, no blur. */
@media (max-width: 1023.98px) and (prefers-reduced-transparency: reduce),
       (max-width: 1023.98px) and (prefers-contrast: more) {
  html#XF[data-theme] :is(.aior-fnav-strip, .menu .menu-content, .offCanvasMenu-content,
    .p-body .block-container, .p-body .blockMessage, .p-body .block--messages .message,
    .p-body-inner > .p-breadcrumbs, .aior-forum-statistics .block-body,
    .p-body .button:where(:not(.button--primary, .button--cta, .button--link, .menuTrigger)),
    .p-body .pageNav-page:not(.pageNav-page--current) > a) {
    background-color: var(--bg) !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    box-shadow: none !important;
    border-color: var(--line-strong) !important;
  }
  html#XF[data-theme] .p-body .block--messages > .block-container { background: none !important; border: 0 !important; }
  html#XF[data-theme] :is(.aior-fnav-strip .aior-fnav-list, .p-body .hScroller-scroll) { -webkit-mask-image: none; mask-image: none; }
}
/* Windows High Contrast / forced colours: let the system palette draw edges. */
@media (max-width: 1023.98px) and (forced-colors: active) {
  html#XF[data-theme] :is(.aior-fnav-strip, .menu .menu-content, .offCanvasMenu-content, .p-body .block-container,
    .p-body .block--messages .message, .p-body .button, .p-body .tabs-tab, .p-body .pageNav-page > a) {
    border: 1px solid CanvasText !important;
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    box-shadow: none !important;
  }
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-list { -webkit-mask-image: none; mask-image: none; }
}
/* Reduced motion: no smooth scrolling or transitions on the surfaces above. */
@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-list { scroll-behavior: auto; scroll-snap-type: none; }
  html#XF[data-theme] :is(.aior-fnav-link, .aior-fnav-tool, .p-body .button, .p-body .tabs-tab, .menu .menu-linkRow, .hScroller-action) {
    transition: none !important;
  }
}

/* --- 15. SHELL EXCEPTION — utility-bar account controls (forum only) ---------
   Goes with the hamburger change: once the drawer stops repeating Login/Register
   (signed out) and My Account/Logout (signed in), the utility bar is the only
   account entry point on phones.
   Signed out: pixel-identical to aior.com; only the invisible hit area grows to
   the bar height. Signed in (html[data-aior-auth="1"]): at 360px the greeting
   wrapped to 3 lines (67px in a 32px bar), the theme/cart icons collapsed to 16px
   and, in Turkish, "Çıkış" sat 50px off-screen; the greeting now yields first. */
@media (max-width: 640px) {
  html#XF .topbar-utility :is(.topbar-link[data-aior-anon], [data-aior-auth-panel], [data-aior-auth-logout]) { position: relative; }
  html#XF .topbar-utility :is(.topbar-link[data-aior-anon], [data-aior-auth-panel], [data-aior-auth-logout])::after {
    content: "";
    position: absolute;
    inset: -4px -2px;                         /* 23px link -> 31px target, inside the 32px bar */
  }
  html#XF[data-aior-auth="1"] .topbar-utility > div > div:last-child { min-width: 0; flex-wrap: nowrap; }
  html#XF[data-aior-auth="1"] .topbar-utility :is(.topbar-icon-btn, .topbar-link, .topbar-divider) { flex-shrink: 0; white-space: nowrap; }
  html#XF[data-aior-auth="1"] .topbar-utility :is([data-aior-auth-panel], [data-aior-auth-logout]) {
    padding: 0.2rem 0.35rem;                  /* same compact metrics as the signed-out links */
    font-size: 11px;
    font-weight: 600;
  }
  html#XF[data-aior-auth="1"] .topbar-utility [data-aior-auth-greeting] { flex-shrink: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
  html#XF[data-aior-auth="1"] .topbar-utility [data-aior-auth-greeting] strong {
    display: inline-block;
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }
}
@media (max-width: 480px) {
  /* The forum nav strip already shows the signed-in avatar; the greeting goes first. */
  html#XF[data-aior-auth="1"] .topbar-utility [data-aior-auth-greeting] { display: none !important; }
}

/* ============================================================================
   AIOR forum design pass (owner review 2026-10-26)
   - the forum spreads across the viewport (desktop/tablet); the shared shell
     header/footer keep aior.com's width so the hop from aior.com stays seamless
   - XF menus are one clean panel (the shared theme styles every menu row as a
     bordered button)
   - filled states use --accent-solid + white (AIOR strong-surface contrast law)
   - category headers on one row; no redundant "Home" breadcrumb on the index
   - mobile: compact hero, the forum list comes before the statistics widget
   ============================================================================ */

/* 1. One alignment grid ----------------------------------------------------
   The forum region (page hero, forum nav strip, body) sits in exactly the shell
   header's container: max 80rem with 16/24/32 px gutters (Tailwind px-4 sm:px-6
   lg:px-8). Every left edge lines up with the logo, every right edge with the
   header CTAs, at every width. */
html#XF .page-hero .page-hero-content,
html#XF .aior-fnav-strip .aior-fnav-inner,
html#XF .p-body-inner {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
@media (min-width: 640px) {
  html#XF .page-hero .page-hero-content,
  html#XF .aior-fnav-strip .aior-fnav-inner,
  html#XF .p-body-inner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
@media (min-width: 1024px) {
  html#XF .page-hero .page-hero-content,
  html#XF .aior-fnav-strip .aior-fnav-inner,
  html#XF .p-body-inner {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}
/* The mobile glass strip used 12/8 px insets; keep it on the same gutters as everything else. */
@media (max-width: 1023.98px) {
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-inner { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  html#XF[data-theme] .aior-fnav-strip .aior-fnav-inner { padding-left: 24px !important; padding-right: 24px !important; }
}
/* Forum nav strip justified to both edges: sections from the left, tools to the right
   (a centred list was pushed around by the width of the member/staff tools). */
html#XF .aior-fnav-inner { grid-template-columns: minmax(0, 1fr) auto !important; }
html#XF .aior-fnav-list { grid-column: 1 !important; justify-content: flex-start !important; }
html#XF .aior-fnav-tools { grid-column: 2 !important; }
/* Filled CTA (Post thread): --accent-solid with white text, like every filled action */
html#XF .aior-fnav-cta {
  background: var(--accent-solid, #0874b9) !important;
  border-color: var(--accent-solid, #0874b9) !important;
  color: var(--on-solid, #fff) !important;
  box-shadow: none !important;
}
html#XF .aior-fnav-cta:hover { background: var(--accent-solid-hover, #06639f) !important; border-color: var(--accent-solid-hover, #06639f) !important; }

/* 2. Menus: one surface, plain rows ---------------------------------------- */
html#XF .menu .menu-linkRow,
html#XF .menu .menu-linkRow:hover,
html#XF .menu .menu-linkRow:focus-visible {
  box-shadow: none !important;
}
html#XF .menu .menu-linkRow {
  background: transparent !important;
  color: var(--fg) !important;
  border-radius: 10px !important;
}
html#XF .menu .menu-linkRow:hover,
html#XF .menu .menu-linkRow:focus-visible,
html#XF .menu .menu-linkRow.is-selected {
  background: var(--bg-soft) !important;
  color: var(--accent-text, #06639f) !important;
}
html#XF .menu .menu-header {
  background: transparent !important;
  color: var(--fg-muted) !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 10px 14px 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* 3. Filled states: --accent-solid with white text (>= 4.5:1 in both themes) */
html#XF .aior-fnav-link.is-active,
html#XF .aior-fnav-link[aria-current="page"],
html#XF .aior-fnav-staff-btn--admin:hover,
html#XF .aior-fnav-staff-btn--admin[aria-expanded="true"],
html#XF .aior-account-icons div.menu .menu-footer a {
  color: var(--on-solid, #fff) !important;
  background: var(--accent-solid, #0874b9) !important;
  border-color: var(--accent-solid, #0874b9) !important;
}
html#XF .aior-fnav-staff-btn--admin {
  color: var(--accent-text, #06639f) !important;
  border-color: color-mix(in srgb, var(--accent-solid, #0874b9) 40%, transparent) !important;
}
html#XF .aior-fnav-staff-btn:not(.aior-fnav-staff-btn--admin)[aria-expanded="true"] {
  color: var(--fg) !important;
}

/* 4. Category header on one row (mobile already handled by the glass layer) */
@media (min-width: 1024px) {
  html#XF .block--category > .block-container > .block-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
  }
  html#XF .block--category > .block-container > .block-header > a {
    flex: 1 1 auto;
    min-width: 0;
  }
  html#XF .block--category > .block-container > .block-header > .category-forums-search {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 !important;
  }
  html#XF .block--category > .block-container > .block-header > .collapseTrigger {
    position: static !important;
    flex: 0 0 auto;
    margin: 0 !important;
  }
}

/* 5. The index needs no "Home" breadcrumb */
html#XF.template-forum_list .p-body-inner > .p-breadcrumbs {
  display: none !important;
}

/* 6. Mobile: forum first, compact hero ------------------------------------- */
@media (max-width: 1023.98px) {
  html#XF .p-body-inner { flex-direction: column; }
  html#XF .p-body-inner > .p-body-header { order: 1; }
  html#XF .p-body-inner > .p-body-main { order: 2; }
  html#XF .p-body-inner > .aior--forum-stats { order: 3; margin-top: 16px; }
  html#XF .p-body-inner > .p-breadcrumbs--bottom { order: 4; }
}
@media (max-width: 640px) {
  html#XF .page-hero .page-hero-eyebrow { display: none; }
  html#XF .page-hero .page-hero-title { font-size: 1.5rem !important; line-height: 1.2 !important; margin: 0 !important; }
  html#XF .page-hero .page-hero-sub {
    font-size: .875rem !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 7. Breadcrumb bar: XF's own li::after chevron doubled the AIOR separator ("Home › › Forums › ›"). */
@media (min-width: 1024px) {
  html#XF .p-body-inner > .p-breadcrumbs > li::after,
  html#XF .p-body-content .p-breadcrumbs > li::after {
    display: none !important;
    content: none !important;
  }
}
