/* Erfan Platform v0.21.4 single compositor-pinned header + canonical home content offset
 * Canonical owner for public header, public mobile menu, member topbar,
 * member mobile scroll contract and bottom dock.
 * Geometry never animates during content scroll. Optical material is isolated to
 * one layer per chrome surface; menus do not nest backdrop filters.
 */
:root{
  --ebp-shell-max:1480px;
  --ebp-shell-height:62px;
  --ebp-shell-radius:22px;
  --ebp-shell-blur:16px;
  --ebp-shell-saturation:142%;
  --ebp-shell-fill:rgba(248,251,254,.56);
  --ebp-shell-border:rgba(255,255,255,.74);
  --ebp-shell-shadow:0 14px 38px rgba(8,26,51,.085);
  --ebp-mobile-dock-h:66px;
  --ebp-stable-safe-top:env(safe-area-inset-top);
  --ebp-stable-safe-bottom:env(safe-area-inset-bottom);
}

/* ---------- optical material: one layer per chrome surface ---------- */
.ebp-global-header .ebp-public-nav,
.ebp-topbar-glass,
.ebp-bottom-nav{
  position:relative;
  isolation:isolate;
  border:1px solid var(--ebp-shell-border);
  background:
    radial-gradient(145% 125% at 12% -22%,rgba(255,255,255,.72),rgba(255,255,255,.10) 47%,transparent 72%),
    linear-gradient(148deg,rgba(250,253,255,.58),rgba(238,245,251,.38));
  -webkit-backdrop-filter:blur(var(--ebp-shell-blur)) saturate(var(--ebp-shell-saturation)) brightness(1.025);
  backdrop-filter:blur(var(--ebp-shell-blur)) saturate(var(--ebp-shell-saturation)) brightness(1.025);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(8,26,51,.035),
    0 1px 0 rgba(255,255,255,.34),
    var(--ebp-shell-shadow);
}
.ebp-global-header .ebp-public-nav::before,
.ebp-topbar-glass::before,
.ebp-bottom-nav::before{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:0;
  inset:1px;
  border-radius:inherit;
  background:
    radial-gradient(180px 86px at var(--ebp-glass-x,18%) var(--ebp-glass-y,0%),rgba(255,255,255,.62),transparent 72%),
    linear-gradient(112deg,rgba(255,255,255,.24),transparent 34%,transparent 68%,rgba(255,255,255,.12));
  opacity:.9;
}
.ebp-global-header .ebp-public-nav::after,
.ebp-topbar-glass::after,
.ebp-bottom-nav::after{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:0;
  inset:1px;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),inset 0 -12px 22px rgba(255,255,255,.025);
}
.ebp-global-header .ebp-public-nav>*,
.ebp-topbar-glass>*,
.ebp-bottom-nav>*{position:relative;z-index:1}

/* Dropdowns/panels: translucent, but no nested backdrop sampling. */
.ebp-mobile-menu,.ebp-locale-menu{
  position:absolute;
  z-index:260;
  border:1px solid rgba(255,255,255,.78);
  background:linear-gradient(145deg,rgba(251,253,255,.96),rgba(242,247,251,.92));
  box-shadow:inset 0 1px rgba(255,255,255,.96),0 18px 48px rgba(8,26,51,.13);
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}

/* ---------- public stable frame ---------- */
.ebp-public-mobile-frame,.ebp-public-scroll-frame{min-width:0}
.ebp-public-mobile-frame{display:block}
.ebp-public-scroll-frame{display:block;overflow:visible}
.ebp-public-pin-track{display:contents}

/* ---------- public navigation ---------- */
.ebp-public-header.ebp-global-header{
  position:sticky;
  z-index:220;
  top:0;
  width:100%;
  height:auto;
  margin:0;
  padding:10px 12px 0;
  background:transparent;
  border:0;
  box-shadow:none;
  overflow:visible;
}
.ebp-global-header .ebp-public-nav{
  --ebp-glass-x:18%;
  --ebp-glass-y:0%;
  width:min(100%,var(--ebp-shell-max));
  height:var(--ebp-shell-height);
  margin:0 auto;
  padding:7px 8px 7px 12px;
  display:flex;
  align-items:center;
  gap:14px;
  border-radius:var(--ebp-shell-radius);
  overflow:visible;
  transform:none;
  contain:none;
  will-change:auto;
}
.ebp-global-header .ebp-public-logo{flex:0 0 auto;min-width:156px;display:inline-flex;align-items:center;justify-content:flex-start;text-decoration:none;color:inherit;padding:0 3px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none}
.ebp-global-header .ebp-brand-lockup{display:inline-flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;width:var(--ebp-brand-width,132px);height:var(--ebp-brand-height,34px)}
.ebp-global-header .ebp-brand-lockup.mode-logo{justify-content:center}
.ebp-global-header .ebp-brand-lockup-logo{display:block;width:100%;height:100%;object-fit:contain;object-position:center;pointer-events:none;filter:none;opacity:.96}
.ebp-global-header .ebp-brand-lockup.mode-logo_name .ebp-brand-lockup-logo{width:auto;max-width:calc(100% - 76px)}
.ebp-global-header .ebp-brand-lockup-text{font-size:15px;font-weight:700;letter-spacing:-.02em;color:var(--ebp-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ebp-global-header .ebp-public-logo:hover .ebp-brand-lockup-logo{opacity:1}
.ebp-global-header .ebp-public-logo:active{transform:scale(.985)}
.ebp-global-header .ebp-public-logo:focus-visible{outline:2px solid color-mix(in srgb,var(--ebp-focus) 62%,white);outline-offset:4px;border-radius:10px}
.ebp-global-header .ebp-public-links{flex:1 1 auto;min-width:0;display:flex;align-items:center;justify-content:center;gap:1px;white-space:nowrap}
.ebp-global-header .ebp-public-links a{height:38px;padding:0 10px;border-radius:12px;display:flex;align-items:center;color:var(--ebp-ink-2);font-size:12px;font-weight:660;text-decoration:none}
.ebp-global-header .ebp-public-links a:hover,.ebp-global-header .ebp-public-links a.active{background:rgba(255,255,255,.30);color:var(--ebp-ink);box-shadow:inset 0 1px rgba(255,255,255,.52)}
.ebp-global-header .ebp-public-actions{flex:0 0 auto;display:flex;align-items:center;gap:6px}
.ebp-locale-control{position:relative}
.ebp-locale-trigger,.ebp-global-header .ebp-public-ask,.ebp-global-header .ebp-public-avatar,.ebp-public-menu-button,.ebp-public-search{
  height:42px;border:1px solid rgba(255,255,255,.34);border-radius:14px;background:rgba(255,255,255,.19);color:var(--ebp-ink);
  box-shadow:inset 0 1px rgba(255,255,255,.52),0 1px rgba(8,26,51,.025);
  transition:transform .16s cubic-bezier(.2,.8,.2,1),background .16s ease,border-color .16s ease;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
.ebp-locale-trigger:active,.ebp-global-header .ebp-public-ask:active,.ebp-global-header .ebp-public-avatar:active,.ebp-public-menu-button:active,.ebp-public-search:active{transform:scale(.965)}
.ebp-locale-trigger{min-width:60px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 10px;font:inherit;font-size:11.5px;font-weight:760}
.ebp-locale-trigger i{font-style:normal;color:var(--ebp-muted)}
.ebp-global-header .ebp-public-ask{display:flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;text-decoration:none;white-space:nowrap;font-size:12px;font-weight:720}
.ebp-global-header .ebp-public-ask svg{width:17px;height:17px}
.ebp-global-header .ebp-public-avatar{width:42px;display:grid;place-items:center;text-decoration:none}
.ebp-global-header .ebp-public-avatar svg{width:19px;height:19px}
.ebp-global-header .ebp-public-avatar img{width:100%;height:100%;border-radius:inherit;object-fit:cover}
.ebp-public-menu-button{display:none;width:42px;padding:0;place-items:center;position:relative}
.ebp-public-menu-button span{position:absolute;width:17px;height:1.5px;border-radius:99px;background:currentColor;transition:transform .18s ease}
.ebp-public-menu-button span:first-child{transform:translateY(-4px)}
.ebp-public-menu-button span:last-child{transform:translateY(4px)}
.ebp-public-menu-button[aria-expanded="true"] span:first-child{transform:rotate(45deg)}
.ebp-public-menu-button[aria-expanded="true"] span:last-child{transform:rotate(-45deg)}
.ebp-locale-menu{top:calc(100% + 8px);inset-inline-end:0;min-width:112px;padding:6px;border-radius:16px}
.ebp-locale-menu[hidden]{display:none!important}
.ebp-locale-menu a{min-height:36px;padding:0 10px;border-radius:10px;display:flex;align-items:center;color:var(--ebp-ink-2);font-size:12px;font-weight:700;text-decoration:none}
.ebp-locale-menu a:hover,.ebp-locale-menu a.active{background:rgba(255,255,255,.66);color:var(--ebp-ink)}
.ebp-mobile-menu{
  top:calc(100% + 7px);inset-inline-end:12px;inset-inline-start:auto;
  width:min(272px,calc(100vw - 22px));max-height:min(430px,calc(100svh - 88px));overflow:auto;overscroll-behavior:contain;
  padding:7px;border-radius:18px;
}
.ebp-mobile-menu[hidden]{display:none!important}
.ebp-mobile-menu-head{height:36px;padding:0 3px 5px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(8,26,51,.06);font-size:11px;font-weight:760;color:var(--ebp-muted)}
.ebp-mobile-menu-head button{width:29px;height:29px;border:1px solid rgba(8,26,51,.06);border-radius:9px;background:rgba(255,255,255,.74);display:grid;place-items:center;color:var(--ebp-ink);padding:0}
.ebp-mobile-menu-head button svg{width:15px;height:15px}
.ebp-mobile-menu nav{display:grid;padding:3px 0}
.ebp-mobile-menu nav a{min-height:38px;padding:0 8px;display:flex;align-items:center;justify-content:space-between;border-radius:10px;color:var(--ebp-ink);font-size:12.5px;font-weight:700;text-decoration:none}
.ebp-mobile-menu nav a+a{border-top:1px solid rgba(8,26,51,.035)}
.ebp-mobile-menu nav a:hover,.ebp-mobile-menu nav a.active{background:rgba(255,255,255,.72)}
.ebp-mobile-menu nav a i{font-style:normal;color:var(--ebp-gold);font-size:11px}
.ebp-mobile-menu-foot{padding-top:5px;border-top:1px solid rgba(8,26,51,.06);display:grid;gap:5px}
.ebp-mobile-languages{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:3px;border-radius:11px;background:rgba(8,26,51,.035)}
.ebp-mobile-languages a{min-height:30px;display:grid;place-items:center;border-radius:8px;color:var(--ebp-muted);font-size:10.5px;font-weight:740;text-decoration:none}
.ebp-mobile-languages a.active{background:#fff;color:var(--ebp-ink);box-shadow:0 3px 10px rgba(8,26,51,.05)}
.ebp-mobile-ask{min-height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--ebp-ink);color:#fff!important;text-decoration:none;font-size:11.5px;font-weight:730}

/* ---------- member shell ---------- */
.ebp-top-actions{display:flex;align-items:center;gap:8px;margin-inline-start:auto}
.ebp-brand-button{display:none;align-items:center;gap:8px;border:0;background:none;padding:0;color:var(--ebp-ink)}
.ebp-brand-button span{font-size:13.5px;font-weight:760}
.ebp-topbar{position:sticky;z-index:42;top:0;height:auto;margin:0;padding:10px 12px 0;background:transparent;border:0;box-shadow:none;overflow:visible}
.ebp-topbar-glass{--ebp-glass-x:18%;--ebp-glass-y:0%;min-height:58px;padding:7px 10px 7px 14px;border-radius:19px;display:flex;align-items:center;justify-content:space-between}
.ebp-topbar .topbar-avatar{position:relative;width:100%;height:100%;border-radius:13px}
.ebp-topbar .ebp-brand-button{display:none}
.ebp-bottom-nav{display:none}
.ebp-bottom-nav.is-edge{border-radius:20px}

/* ---------- mobile app viewport ----------
 * The app shell is a 3-row layout: chrome / scroller / dock. No sticky/fixed/absolute
 * navigation participates in content scrolling. The runtime sizes #ebp-root from the
 * visual viewport; CSS falls back to the small viewport so Safari controls never cover it. */
@media(max-width:860px){
  html.ebp-app-document,body.ebp-app-runtime{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}
  body.ebp-app-runtime{padding-bottom:0!important}
  body.ebp-app-runtime #ebp-root{position:relative;width:100%;height:100svh;min-height:0;max-height:none;overflow:hidden;background:transparent}

  body.ebp-app-runtime .ebp-app-shell{display:block!important;width:100%;height:100%;min-height:0!important;padding:0!important;margin:0!important}
  body.ebp-app-runtime .ebp-app-main{display:grid;grid-template-rows:auto minmax(0,1fr) auto;position:relative;width:100%;height:100%;min-height:0!important;overflow:hidden!important;overscroll-behavior:none}
  body.ebp-app-runtime .ebp-sidebar{display:none!important}
  body.ebp-app-runtime .ebp-topbar{position:relative!important;inset:auto!important;z-index:48;margin:0;padding:max(7px,var(--ebp-stable-safe-top,0px)) 8px 0;background:transparent;border:0;box-shadow:none;overflow:visible;transform:none!important;contain:none!important}
  body.ebp-app-runtime .ebp-topbar-glass{min-height:56px;border-radius:19px;padding:7px 9px 7px 12px}
  body.ebp-app-runtime .ebp-topbar .ebp-brand-button{display:flex;margin-inline-end:auto}
  body.ebp-app-runtime .ebp-topbar .ebp-brand-button .ebp-monogram{display:none}
  body.ebp-app-runtime .ebp-topbar .ebp-avatar-button{display:none}
  body.ebp-app-runtime .ebp-top-actions{gap:5px}
  body.ebp-app-runtime .ebp-icon-button,body.ebp-app-runtime .ebp-avatar-button{width:38px;height:38px;border-radius:13px}
  body.ebp-app-runtime .ebp-app-scroll{min-width:0;min-height:0;max-width:none;margin:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:18px 16px 24px}

  body.ebp-app-runtime .ebp-bottom-nav{--ebp-glass-x:50%;--ebp-glass-y:0%;position:relative!important;z-index:72;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:auto;inset:auto!important;margin:6px 8px max(8px,var(--ebp-stable-safe-bottom,0px));height:var(--ebp-mobile-dock-h);padding:5px;border-radius:22px;overflow:visible;transform:none!important;contain:none!important;flex:none}
  body.ebp-app-runtime .ebp-bottom-nav button{border:0;background:transparent;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:var(--ebp-muted);padding:4px 2px;font-size:12px;font-weight:690;transition:background .16s ease,color .16s ease,transform .16s ease}
  body.ebp-app-runtime .ebp-bottom-nav button .ebp-icon{width:21px;height:21px}
  body.ebp-app-runtime .ebp-bottom-nav button.active{background:linear-gradient(145deg,#0a1d36,#0d2b4c);color:#fff;box-shadow:0 7px 18px rgba(8,26,51,.14),inset 0 1px rgba(255,255,255,.08)}
  body.ebp-app-runtime .ebp-bottom-nav button.active .ebp-icon{color:#dfbf82}
  body.ebp-app-runtime .ebp-bottom-nav button:active{transform:scale(.97)}
  body.ebp-app-runtime .ebp-club-tabs{top:0!important}

  /* Guest Club uses the same stable viewport contract but the canonical public shell. */
  body.ebp-app-runtime .ebp-app-public-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;min-height:0;overflow:hidden}
  body.ebp-app-runtime .ebp-app-public-shell>.ebp-public-header{position:relative!important;top:auto!important;z-index:48;flex:none}
  body.ebp-app-runtime .ebp-app-public-scroll{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
  body.ebp-app-runtime .ebp-app-public-scroll .ebp-public-main{min-height:0}
  body.ebp-app-runtime .ebp-app-public-scroll .ebp-global-footer{margin-bottom:18px!important}
}

@media(max-width:1180px){
  .ebp-global-header .ebp-public-logo{min-width:138px}
  .ebp-global-header .ebp-brand-lockup{width:var(--ebp-brand-width-mobile,118px);height:var(--ebp-brand-height-mobile,31px)}
  .ebp-global-header .ebp-public-links a{padding-inline:7px}
  .ebp-global-header .ebp-public-ask span{display:none}
  .ebp-global-header .ebp-public-ask{width:42px;padding:0}
  .ebp-locale-trigger{min-width:50px;padding-inline:7px}
}
@media(max-width:900px){
  :root{--ebp-shell-height:58px;--ebp-shell-radius:20px;--ebp-shell-blur:14px;--ebp-shell-saturation:138%;--ebp-mobile-header-gap:8px}

  /* v0.21.4 TRUE DOCUMENT EDGE-TO-EDGE + ONE COMPOSITOR-PINNED HEADER
     Keep v0.21's real document/window scroll so content still reaches the physical
     browser edges. The same header DOM remains absolute — never sticky/fixed.
     A zero-layout absolute track spans exactly the root scroll range (document minus
     dynamic viewport). CSS scroll-timeline translates the header by 100cqh across
     that track, cancelling root scroll on the compositor without a second header. */
  html{min-height:100%;background:var(--ebp-bg)}
  body.ebp-standalone:not(.ebp-app-runtime){height:auto!important;min-height:100%!important;overflow-x:clip!important;overflow-y:visible!important;overscroll-behavior-y:auto!important}
  body.ebp-standalone:not(.ebp-app-runtime)>.ebp-public-mobile-frame,
  body.ebp-standalone:not(.ebp-app-runtime) .ebp-public-shell>.ebp-public-mobile-frame{height:auto!important;min-height:100vh!important}
  body.ebp-standalone:not(.ebp-app-runtime) .ebp-public-shell{height:auto!important;min-height:100vh!important;overflow:visible!important}
  .ebp-public-mobile-frame{position:relative;display:block;height:auto!important;min-height:100vh!important;overflow:visible!important}
  .ebp-public-scroll-frame{height:auto!important;min-height:100vh!important;overflow:visible!important;overscroll-behavior:initial;-webkit-overflow-scrolling:auto;box-sizing:border-box;scroll-padding-top:0;padding-top:calc(max(7px,var(--ebp-stable-safe-top,0px)) + var(--ebp-shell-height) + var(--ebp-mobile-header-gap));}
  /* v0.21.4: Home now uses the same reserved mobile header space as every other public route.
     The header remains pinned exactly as in v0.21.3; only the document content starts below it.
     No header geometry, scroll timeline, safe-area math or viewport behavior changes here. */
  .ebp-public-pin-track{
    display:block;position:absolute;z-index:220;inset:0 0 100dvh;
    container-type:size;pointer-events:none;overflow:visible;
  }
  .ebp-public-pin-track>.ebp-public-header.ebp-global-header{
    position:absolute!important;top:0!important;inset-inline:0!important;z-index:220;
    width:100%;height:auto;margin:0;padding:max(7px,var(--ebp-stable-safe-top,0px)) 7px 0;
    contain:none!important;will-change:auto!important;pointer-events:auto;
  }
  @supports (animation-timeline:scroll(root)) and (height:100cqh){
    .ebp-public-pin-track>.ebp-public-header.ebp-global-header{
      animation:ebp-public-document-pin linear both!important;
      animation-timeline:scroll(root)!important;
      animation-range:0% 100%!important;
    }
    @keyframes ebp-public-document-pin{
      from{transform:translate3d(0,0,0)}
      to{transform:translate3d(0,100cqh,0)}
    }
  }
  .ebp-global-header .ebp-public-nav{height:var(--ebp-shell-height);gap:6px;padding:6px 7px 6px 11px;border-radius:var(--ebp-shell-radius);background:linear-gradient(148deg,rgba(250,253,255,.58),rgba(238,245,251,.40));transform:none!important;will-change:auto!important;justify-content:space-between}
  .ebp-global-header .ebp-public-links,.ebp-global-header .ebp-locale-control,.ebp-global-header .ebp-public-ask{display:none!important}
  .ebp-global-header .ebp-public-logo{min-width:0;flex:0 0 auto;padding:0 4px;background:transparent;box-shadow:none}
  .ebp-global-header .ebp-brand-lockup{width:var(--ebp-brand-width-mobile,118px);height:var(--ebp-brand-height-mobile,31px)}
  .ebp-global-header .ebp-public-logo:active{background:transparent;box-shadow:none;transform:scale(.98)}
  .ebp-global-header .ebp-public-actions{margin-inline-start:auto}
  .ebp-global-header .ebp-public-avatar,.ebp-public-menu-button{width:42px;height:42px;display:grid}
  .ebp-mobile-menu{inset-inline-end:7px}
}
@media(max-width:390px){
  body.ebp-app-runtime .ebp-app-scroll{padding-inline:12px}
  body.ebp-app-runtime .ebp-topbar{padding-inline:7px}
  body.ebp-app-runtime .ebp-bottom-nav{margin-inline:6px}
  body.ebp-app-runtime .ebp-bottom-nav button,body.ebp-app-runtime .ebp-bottom-nav button span{font-size:11.5px}
}

@media(prefers-reduced-transparency:reduce){
  .ebp-global-header .ebp-public-nav,.ebp-topbar-glass,.ebp-bottom-nav{background:#f8fafc!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
}
@media(prefers-contrast:more){
  .ebp-global-header .ebp-public-nav,.ebp-topbar-glass,.ebp-bottom-nav,.ebp-mobile-menu{border-color:rgba(8,26,51,.20)!important;background:#fbfcfe!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
}
@media(prefers-reduced-motion:reduce){
  .ebp-locale-trigger,.ebp-global-header .ebp-public-ask,.ebp-global-header .ebp-public-avatar,.ebp-public-menu-button,.ebp-public-search,.ebp-bottom-nav button{transition:none!important}
}

/* v0.26 — guest public shells have no authenticated member dock */
@media(max-width:900px){body.ebp-app-runtime .ebp-app-public-shell.is-guest{grid-template-rows:auto minmax(0,1fr)}}
